Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Befunge samples and .bf heuristics #5210

Merged
merged 7 commits into from
Sep 2, 2022

Conversation

smola
Copy link
Contributor

@smola smola commented Feb 13, 2021

Description

Added heuristics for .bf extension.

Added the .bf extension to Befunge.

Added the following Befunge-93 samples:

And Befunge-98:

For future reference: I have not included the (rarer) extensions .b93 and .b98, but there are samples for it under liberal licenses here:

Checklist:

@smola smola requested a review from a team as a code owner February 13, 2021 09:50
@smola
Copy link
Contributor Author

smola commented Feb 13, 2021

Although .bf seems to be the most common extension for Befunge, I can't tell if it meets the popularity threshold. If we're not including it, I'll create a separate PR for the .bf heuristics only.

- extensions: ['.bf']
rules:
- language: Beef
pattern: '^using\s+(System|Beefy)(\.(.*))?;\s*$'
Copy link
Contributor

@Nixinova Nixinova Feb 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't just ^using\s+(System|Beefy) work fine? (Same logic for 3 lines down as well.) Also should there be a \s* before using?

lib/linguist/heuristics.yml Outdated Show resolved Hide resolved
lib/linguist/heuristics.yml Outdated Show resolved Hide resolved
smola and others added 3 commits June 18, 2021 17:19
Added heuristics for `.bf` extension.

Added the `.bf` extension to Befunge.

Added the following Befunge-93 samples:

* aturley.bf by Andrew Turley (CC0 license), fetched from https://github.com/catseye/Befunge-93/blob/master/eg/aturley.bf
* beer7.bf by Wim Rijnders (CC0 license), fetched from https://github.com/catseye/Befunge-93/blob/master/eg/beer7.bf
* befunge3.bf by Ben Olmstead (CC0 license), fetched from https://github.com/catseye/Befunge-93/blob/master/eg/befunge3.bf
* cascade.bf by Chris Pressey (CC0 license), fetched from https://github.com/catseye/Befunge-93/blob/master/eg/cascade.bf

And Befunge-98:

* mycorand.bf by Matti Niemenmaa (MIT license), fetched from https://github.com/Deewiant/Mycology/blob/master/mycorand.bf
Co-authored-by: John Gardner <gardnerjohng@gmail.com>
Co-authored-by: John Gardner <gardnerjohng@gmail.com>
@lildude
Copy link
Member

lildude commented Jul 19, 2021

Looks like the classifier cross-validation is struggling with one of the Befunge samples causing the test to fail:

Befunge/mycorand.bf BAD (Brainfuck)

@lildude lildude merged commit 6cab9f0 into github-linguist:master Sep 2, 2022
@smola smola deleted the befunge-samples branch September 16, 2022 11:40
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants