Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Source code language identification
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
milasudril  
View profile  
 More options May 2 2011, 8:15 am
From: milasudril <milasud...@gmail.com>
Date: Mon, 2 May 2011 05:15:06 -0700 (PDT)
Local: Mon, May 2 2011 8:15 am
Subject: Source code language identification
How does github identify language? If I have a C++ include file,
should it end with .hpp rather than .h?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Mechelynck  
View profile  
 More options May 3 2011, 3:50 am
From: Tony Mechelynck <antoine.mechely...@gmail.com>
Date: Tue, 03 May 2011 09:50:15 +0200
Local: Tues, May 3 2011 3:50 am
Subject: Re: Source code language identification
On 02/05/11 14:15, milasudril wrote:

> How does github identify language? If I have a C++ include file,
> should it end with .hpp rather than .h?

Does git need to know about language? (I mean, beyond the fact that the
file is "text" or "binary")

*.h files can be C, Ch, C++, Objective-C or Objective-C++. When
compiling a program that includes such a file, the compiler will parse
it according to where the *.h file is included, and your make target
should set the appropriate dependencies, but a versioning system? I
would only expect it to deliver the file version corresponding to
whatever changeset you have made current, either by fetching the
appropriate full copy of the file, or by applying the appropriate diff
compared with the current version.

Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
83. Batteries in the TV remote now last for months.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Mear  
View profile  
 More options May 3 2011, 4:40 am
From: Chris Mear <chrism...@gmail.com>
Date: Tue, 3 May 2011 09:40:36 +0100
Local: Tues, May 3 2011 4:40 am
Subject: Re: Source code language identification
On 3 May 2011, at 08:50, Tony Mechelynck <antoine.mechely...@gmail.com> wrote:

> On 02/05/11 14:15, milasudril wrote:
>> How does github identify language? If I have a C++ include file,
>> should it end with .hpp rather than .h?

> Does git need to know about language? (I mean, beyond the fact that the file is "text" or "binary")

It doesn't, but GitHub has a 'graphs' feature which, among other things, does a percentage breakdown of what languages your project is written in.

I'm guessing milasudril was just curious about how that worked.

Chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kyle Neath  
View profile  
 More options May 3 2011, 8:58 am
From: Kyle Neath <k...@github.com>
Date: Tue, 3 May 2011 05:58:02 -0700
Local: Tues, May 3 2011 8:58 am
Subject: Re: Source code language identification

Our .h/.c detection is still a little blurry between C, C++ and Obj-C. We have some plans to improve this based on files in the directory (if there's a .cpp, the .h is most likely C++) or keywords (If there's an @implementation keyword, it's most likely Obj-C) but we haven't had a chance to deploy it yet.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
milasudril  
View profile  
 More options May 3 2011, 11:25 am
From: milasudril <milasud...@gmail.com>
Date: Tue, 3 May 2011 08:25:22 -0700 (PDT)
Local: Tues, May 3 2011 11:25 am
Subject: Re: Source code language identification

> I'm guessing milasudril was just curious about how that worked.

> Chris

That is right

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
milasudril  
View profile  
 More options May 3 2011, 11:26 am
From: milasudril <milasud...@gmail.com>
Date: Tue, 3 May 2011 08:26:46 -0700 (PDT)
Local: Tues, May 3 2011 11:26 am
Subject: Re: Source code language identification

On May 3, 2:58 pm, Kyle Neath <k...@github.com> wrote:

> Our .h/.c detection is still a little blurry between C, C++ and Obj-C. We have some plans to improve this based on files in the directory (if there's a .cpp, the .h is most likely C++) or keywords (If there's an @implementation keyword, it's most likely Obj-C) but we haven't had a chance to deploy it yet.

Thank you

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas van Cranenburgh  
View profile  
 More options May 4 2011, 1:51 pm
From: Andreas van Cranenburgh <andr...@unstable.nl>
Date: Wed, 4 May 2011 10:51:56 -0700 (PDT)
Local: Wed, May 4 2011 1:51 pm
Subject: Re: Source code language identification

Prolog code is also incorrectly identified as Perl code. The
extension .pl is used by both, so heuristics could be:

1) whether the file starts with a Perl shebang
2) signs that it is Prolog: whether the file has lines starting with %
(comments in Prolog), lines ending with ".", and frequent occurrences
of ":-".


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »