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 Aiken Language #6991

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add Aiken Language #6991

wants to merge 6 commits into from

Conversation

rvcas
Copy link

@rvcas rvcas commented Aug 12, 2024

supersedes #6520

Description

There was an attempt before to add this language but we decided that it's best to wait until the grammars stabilized. We have reached that point and a general availability release is imminent, so we felt it was appropriate to revisit this with a fresh pull request in favor of the one linked above.

It seems we have reached the appropriate thresholds and there are many repositories with Aiken source code. Untyped Plutus Core is the target lambda calculus that Aiken compiles to. The Aiken vscode extension packages a grammar for Untyped Plutus Core as well so it should already be included by including the Aiken grammar. Although Untyped Plutus Core isn't normally written by hand, it's highly human readable and seems to also be present in a substantial number of repositories. I've included Untyped Plutus Core within this pull request as a matter of convenience but if it's a no-go, then I can make the necessary adjustments.

Aiken is a fast growing smart contract programming language that targets the virtual machine inside of the Cardano network. It has become the de-facto standard for developing smart contracts on Cardano.

Checklist:

  • I am adding a new language.
    • The extension of the new language is used in hundreds of repositories on github.com.
      • Search results for each extension:
    • I have included a real-world usage sample for all extensions added in this PR:
    • I have included a syntax highlighting grammar: https://github.com/aiken-lang/vscode-aiken
    • I have added a color
      • .ak
        • Hex value: #640ff8
        • Rationale: picker used to extract a color from a random position on the logo
      • .uplc
        • Hex value: #36adbd
        • Rationale: picker used to extract a color from the center of the logo
    • I have updated the heuristics to distinguish my language from others using the same extension.

@rvcas rvcas changed the title Add Aiken Language Latest Add Aiken Language Aug 12, 2024
@rvcas rvcas marked this pull request as ready for review August 12, 2024 21:22
@rvcas rvcas requested a review from a team as a code owner August 12, 2024 21:22
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

Whoops. Looks like your editor has changed indentation on the languages.yml file making it incredibly hard to review. Please reverse these changes.

Several of your samples are too big too. If the diff suppresses them, they're too big. Please replace these.

@rvcas
Copy link
Author

rvcas commented Aug 13, 2024

@lildude oh whoops, sorry about that. Total accident. Will fix

@rvcas rvcas requested a review from lildude August 13, 2024 17:44
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

Linguist only accepts TextMate compatible grammars. This is mentioned a little further down in the CONTRIBUTING.md file. You should have encountered an error when attempting to add the grammar using the script/add-grammar script which should have alerted you to there being problems with the grammar repo.

The lines in script/list-grammars are for grammars maintained directly in the highlighting engine completely independently of Linguist. Only GitHub staff know which grammars these are which is why this list exists.

There is currently no way to submit tree-sitter grammars.

Please replace the grammar with a TextMate-compatible grammar.

@lildude lildude changed the title Latest Add Aiken Language Add Aiken Language Aug 14, 2024
@rvcas
Copy link
Author

rvcas commented Aug 14, 2024

@lildude I have added text mate grammars from the VSCode extension. I simply also added a link to the tree-sitter one that we ALSO have cause I saw that list there. But the thing linked as a sub module is indeed a textmate grammar.

I can simply just remove the link from that list. It's not linked as a submodule.

@rvcas rvcas requested a review from lildude August 14, 2024 12:46
@KtorZ
Copy link

KtorZ commented Aug 15, 2024

Note: Aiken seems to be a quite popular name in some part of the world, and it's apparently also a file format for writing quizzes (!). For these reasons, I usually prefer the following query which is more strict for filtering out actual Aiken projects.

I went ahead and checked results found from Github to ensure we are above the 200 threshold mentioned in the CONTRIBUTING.md. I discarded repositories that were empty or had actually no Aiken (.ak) files in them, but were only mentioning Aiken.

See final list

The final list arrives just above the threshold at 212!


@lildude This PR is also adding support for the .uplc format which is commonly used around Aiken projects, but far less popular (in the sense that it is rarely committed and pushed on repositories, so likely much below the required threshold for popularity). Shall we split it out of this PR; and come back later once there's a higher need for it?

@lildude
Copy link
Member

lildude commented Aug 15, 2024

I went ahead and checked results found from Github to ensure we are above the 200 threshold mentioned in the CONTRIBUTING.md.

See #5756

This PR is also adding support for the .uplc format which is commonly used around Aiken projects, but far less popular (in the sense that it is rarely committed and pushed on repositories, so likely much below the required threshold for popularity). Shall we split it out of this PR; and come back later once there's a higher need for it?

If this is less likely to reach the usage requirements, then yes, remove it from this PR and add later when it does meet requirements.

@KtorZ
Copy link

KtorZ commented Aug 15, 2024

@lildude: See #5756

Ho! Didn't see that. So I take it that this is deemed not popular enough due to the lack of files per extension. I crunched the number through the GitHub search API, and I arrive at a grand total of 1605 files which seems indeed insufficient 😞. I suppose we'll have to encourage people to share a bit more of their code in open source.

See data
repository count
https://github.com/0eau/elude 5
https://github.com/ADAOcommunity/cardano-vesting-dApp 6
https://github.com/Achyut770/AikenSupplyChain 2
https://github.com/AdaSouls/Cardano-Soulbound 4
https://github.com/AgustinBadi/aiken-merkle-tree 1
https://github.com/Ali-Hill/blueprint-experiments 18
https://github.com/Anastasia-Labs/aiken-design-patterns 17
https://github.com/Anastasia-Labs/aiken-linked-list 6
https://github.com/Anastasia-Labs/aiken-merkle-tree 2
https://github.com/Anastasia-Labs/aiken-trie 5
https://github.com/AngeYobo/htlc-contract-aiken 1
https://github.com/Astodialo/unLearn 4
https://github.com/Banele78/hello-world-aiken 1
https://github.com/Cardano-Fans/acca 36
https://github.com/Charli3-Official/oracle-integration-aiken 1
https://github.com/Cornucopias/mint-contract 4
https://github.com/CryptoSnowPrince/aiken_hello_world 1
https://github.com/CryptoSnowPrince/aiken_vesting 1
https://github.com/Danogo2023/bond-dex 19
https://github.com/Danogo2023/bond-issue 28
https://github.com/Danogo2023/daken 39
https://github.com/Deadairx/aiken-hello-world 1
https://github.com/Eibbie/hello-world-aiken 1
https://github.com/ErickRomeroDev/aiken-example-node 1
https://github.com/EzePze/automatic-octo-palm-tree 2
https://github.com/FaizanShaikh-3033/Aiken 4
https://github.com/Halalend/protocol-analysis 5
https://github.com/HeptaSean/aiken-trivial 1
https://github.com/Jidooochan/aiken-hello-world 1
https://github.com/Jidooochan/aiken-vesting 1
https://github.com/KtorZ/aiken-fuzz 11
https://github.com/MeshJS/aiken-next-ts-template 1
https://github.com/MeshJS/mesh 13
https://github.com/MeshJS/mesh-pbl-student-library 1
https://github.com/Modulo-P/Cardano-Semaphore 21
https://github.com/Modulo-P/ak-128 1
https://github.com/Modulo-P/ak-381 1
https://github.com/Modulo-P/hydra-node-plutusv3 1
https://github.com/Modulo-P/zk-mastermind-aiken 4
https://github.com/MynthAI/cnt-burn 12
https://github.com/MynthAI/mint-chocolate-chip 1
https://github.com/MynthAI/myusd 7
https://github.com/NicholasMaselli/SimpleCardanoContract 5
https://github.com/NoumenaDigital/carbon-accounting 0
https://github.com/OpShin/pyaiken 0
https://github.com/OptimFinance/clean-code 16
https://github.com/PaimaStudios/paima-engine 11
https://github.com/PaimaStudios/projected-nft-whirlpool 1
https://github.com/Piefayth/aiken-blog-1-code 4
https://github.com/Piefayth/aiken-ide 0
https://github.com/Sebpereira33/CoffeeDAO 1
https://github.com/SilV-1951742/MP_aiken 2
https://github.com/SundaeSwap-finance/aicone 2
https://github.com/SundaeSwap-finance/checkpoint-demo 1
https://github.com/SundaeSwap-finance/cosponsor 1
https://github.com/SundaeSwap-finance/merkle-patricia-forustry 0
https://github.com/SundaeSwap-finance/mint-chocolate-chip 1
https://github.com/TienTung2501/Aiken-Document 0
https://github.com/TienTung2501/Aiken-Learn 4
https://github.com/TienTung2501/Aiken-MintNFT 1
https://github.com/Vortecsmaster/Aiken_Auction 2
https://github.com/Vortecsmaster/EA_AikenExamples 8
https://github.com/WinChitiphat/aiken-vesting 1
https://github.com/aadafinance/aada_v1_aiken 8
https://github.com/actions-marketplace-validations/aiken-lang_setup-aiken 0
https://github.com/adacapital/ak-hellow-world 1
https://github.com/adalicious/aiken-gift-card 1
https://github.com/adrian052/cardano-betting-system 4
https://github.com/adrian052/examples-aiken 6
https://github.com/aiken-extra/auxlib 4
https://github.com/aiken-extra/string_util 5
https://github.com/aiken-extra/time_util 11
https://github.com/aiken-extra/tx_util 1
https://github.com/aiken-lang/aiken 147
https://github.com/aiken-lang/aiken-mode 0
https://github.com/aiken-lang/aikup 0
https://github.com/aiken-lang/auplc 7
https://github.com/aiken-lang/awesome-aiken 0
https://github.com/aiken-lang/branding 0
https://github.com/aiken-lang/editor-integration-nvim 0
https://github.com/aiken-lang/fuzz 2
https://github.com/aiken-lang/homebrew-tap 0
https://github.com/aiken-lang/marlowe 2
https://github.com/aiken-lang/merkle-patricia-forestry 6
https://github.com/aiken-lang/play 0
https://github.com/aiken-lang/prelude 2
https://github.com/aiken-lang/setup-aiken 0
https://github.com/aiken-lang/site 0
https://github.com/aiken-lang/stdlib 17
https://github.com/aiken-lang/tree-sitter-aiken 0
https://github.com/aiken-lang/trees 2
https://github.com/aiken-lang/vscode-aiken 0
https://github.com/aiken-lang/zed-aiken 0
https://github.com/aleksey-makarov/aiken-auction 1
https://github.com/anhoangphuc/aiken_lang-gift_card 1
https://github.com/antibody-cardano/singly-satisfiable 4
https://github.com/ariady-putra/lock_unlock 0
https://github.com/ariady-putra/morbid 7
https://github.com/ariady-putra/more_aiken_examples 9
https://github.com/ariady-putra/stakable_aiken 5
https://github.com/ariady-putra/world 12
https://github.com/ava-orange-education/Ultimate-Cardano-Smart-Contracts 8
https://github.com/bWorksApp/aiken-hello-world 1
https://github.com/bWorksApp/paas-aiken-contracts 120
https://github.com/bloxbean/aiken-java-binding 0
https://github.com/bloxbean/aiken-jna-wrapper 0
https://github.com/bmoore117/aiken-dates 1
https://github.com/bsovdat/aiken-smart-contracts 19
https://github.com/buixuandinh711/aiken-to-lucid 0
https://github.com/buixuandinh711/cardano_counter 1
https://github.com/cardano-foundation/aiken-lucid-yaci-dev-kit-starter-kit 1
https://github.com/cardano-foundation/cardano-ibc-incubator 142
https://github.com/cardano-foundation/cf-cardano-ballot 1
https://github.com/cardano-foundation/merkle-tree-java 2
https://github.com/cardano-miners/fortuna 15
https://github.com/cardano-scaling/aiken-doom 8
https://github.com/carlos53093/Aiken_NFT 1
https://github.com/cdev-meetup/hello_aiken 3
https://github.com/coinecta/staking-contracts 7
https://github.com/deltadefi-protocol/hft-aiken-prototype 28
https://github.com/encryptedcoins/encoins-core-aiken 3
https://github.com/ernest404/hello-world-aiken 1
https://github.com/fabianbormann/aiken-payment-splitter 1
https://github.com/fallen-icarus/cardano-aftermarket 7
https://github.com/fallen-icarus/cardano-loans 13
https://github.com/fallen-icarus/cardano-swaps 8
https://github.com/free-honey/naumachia 9
https://github.com/gclaramunt/AikenExploration 1
https://github.com/gimbalabs/ppbl-2024-aiken-examples 6
https://github.com/golddydev/aiken-gift-card 1
https://github.com/golddydev/aiken-tutorial 2
https://github.com/hammadzubair/Auction-dApp 2
https://github.com/hammadzubair/Cardano-Aiken 2
https://github.com/ilap/bls 6
https://github.com/independenceee/aiken-tutorial 15
https://github.com/independenceee/cip68 0
https://github.com/independenceee/demarket 4
https://github.com/iog-edu-argentina-2024/cardano-dev-2024 28
https://github.com/jackchuong/test-smart-contract-aiken 0
https://github.com/jpg-store/contracts-v3 4
https://github.com/kayvank/rust-aiken-flake 0
https://github.com/ken-underscore/cardano_loans_aiken 1
https://github.com/keyan-m/cardano-recorded-mint 1
https://github.com/krszktc/aiken 1
https://github.com/lenfiLabs/lenfi-smart-contracts 22
https://github.com/levietcuong2602/aiken-tutorials 1
https://github.com/linconvidal/vesting_pycardano 1
https://github.com/logicalmechanism/aiken-order-book 16
https://github.com/logicalmechanism/assist 22
https://github.com/logicalmechanism/bundle-sale 13
https://github.com/logicalmechanism/distributed_representation 9
https://github.com/logicalmechanism/tx_simulation 5
https://github.com/mach-diamond/token-metadata-validator 10
https://github.com/marlowe-contrib/marlowe-oracle-service 12
https://github.com/mathiramilo/aiken-hello-world-lucid 1
https://github.com/micahkendall/distributed-set 4
https://github.com/micdurodola/aiken-cardano-typescript 1
https://github.com/ngocht-ibl/aiken-hello-world 1
https://github.com/ngocht-ibl/aiken-vesting 1
https://github.com/nhatcaoo/aiken-learn 1
https://github.com/nikhils9/aiken-mesh-examples 3
https://github.com/nikhils9/cip68-nfts 4
https://github.com/nikhils9/rewards-distribution 2
https://github.com/not-known-person/Aiken-Scripts 1
https://github.com/orcfax/orcfax-aiken 6
https://github.com/perturbing/mod-exp-bench 0
https://github.com/pgrange/aiken_backtrace 1
https://github.com/projectNEWM/contracts 16
https://github.com/projectNEWM/newm-aipoph 19
https://github.com/projectNEWM/newm-minter 9
https://github.com/realdecimalist/aiken-contracts 3
https://github.com/reeshavacharya/multisig-aiken 8
https://github.com/renanvalentin/cardano-gift-card 2
https://github.com/rhystmorgan/mesh 1
https://github.com/rhystmorgan/okapi-aiken 20
https://github.com/rhystmorgan/raiders-contracts 2
https://github.com/rober-m/ppp-contracts-in-aiken 13
https://github.com/scarmuega/aiken-cli-hello-world 1
https://github.com/scisamir/aiken-lang 1
https://github.com/sergi10/aiken-argentina-2024 1
https://github.com/sidan-lab/aiken-content-ownership 24
https://github.com/sidan-lab/aiken-example 2
https://github.com/sidan-lab/aiken-game-account 19
https://github.com/sidan-lab/aiken-pbl-hk-student-examples 27
https://github.com/sidan-lab/aiken-poker-game 1
https://github.com/sidan-lab/mesh-lower-level-api-demo 2
https://github.com/sidan-lab/vodka 33
https://github.com/sma11world/DomSwap 3
https://github.com/solidsnakedev/aiken-template 0
https://github.com/sonson0910/Aiken-Tutorial 27
https://github.com/sonson0910/Demarket-Contract 4
https://github.com/spacebudz/nebula 7
https://github.com/spacebudz/tokens 17
https://github.com/strike-finance/options-smart-contracts 3
https://github.com/surajsingla333/mynth-assignment 1
https://github.com/t0anh/aiken-stringify 3
https://github.com/thuannguyen2010/aiken-debug 2
https://github.com/trwa/cardamove 33
https://github.com/vacuumlabs/cardano-ctf 31
https://github.com/waalge/aiken-bench-comp 6
https://github.com/waalge/aiken-fail-example 8
https://github.com/waalge/aiken-play 0
https://github.com/waalge/aiken-test-params 4
https://github.com/waalge/aiken-tests 4
https://github.com/waalge/hello-aiken 1
https://github.com/waalge/plutus-data 1
https://github.com/wattsmainsanglais/hello-world 1
https://github.com/wisconic/learning-aiken 2
https://github.com/wowica/jungle_vault 3
https://github.com/zenGate-Global/winter-cardano-contracts 4
https://github.com/zing-rsa/aiken-playground 7
--- ---
total 1605

@lildude: If this is less likely to reach the usage requirements, then yes, remove it from this PR and add later when it does meet requirements.

It is indeed. The .uplc is a compilation target which turns out to be a typed lambda calculus for which there's a textual syntax. But given that it really is a compilation target, it's not meant to be written by humans. Let's revisit this addition to later @rvcas to not needlessly block the PR for Aiken.

@rvcas
Copy link
Author

rvcas commented Aug 15, 2024

No problem. Let's wait and see. We're pretty close for both I believe. It'll be time soon. I'll keep this in sync with master in the meantime.

@lildude lildude dismissed their stale review August 29, 2024 14:10

Changes applied. Pending popularity now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants