Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
npm install -g algo-lang
Basic usage:
algo-lang path/to/file.algo
Pretty print your file in console:
algo-lang --pretty-print path/to/file.algo
algorithme test
variables
entier i, j
algorithme procedure swap
parametres globaux
entier i, j
variables
entier tmp
debut
tmp ← i
i ← j
j ← tmp
fin algorithme procedure swap
debut
i ← 2
j ← 4
swap(i, j)
afficher(chaine(i) + chaine(j)) /* prints 42 */
fin algorithme test
Some operators have aliases to ease development:
<-
is equivalent to ←
^
is equivalent to ↑
nul
There is a special nul
keyword to assign the null pointer to any pointer variable and check if a pointer is null.
Only those base types are available:
caractere
(can be cast with system routines to: chaine
, entier
)chaine
(can be cast with system routines to: entier
, reel
)entier
(can be cast with system routines to: caractere
, chaine
, reel
)reel
(can be cast with system routines to: chaine
, entier
)There are some system routines you can use:
afficher(chaine)
: prints the string on stdout (no endline is added automatically)allouer(pointer)
: allocate memory for the pointed valuecaractere(value)
: try to cast value
in caractere
chaine(value)
: try to cast value
in chaine
entier(value)
: try to cast entier
in chaine
liberer(pointer)
: free memory pointed by the provided pointer, do nothing if pointer is nul
, resets pointer
to nul
longueur(chaine)
: returns the length of the string[]
The operator also allows you to access characters (caractere
) in a string (chaine
) like in:
afficher("toto"[1])
Important note: In this language, index are from 1
to n
and not from 0
to n − 1
!
FAQs
Algorithmic language interpreter (in French only for now)
The npm package algo-lang receives a total of 4 weekly downloads. As such, algo-lang popularity was classified as not popular.
We found that algo-lang demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.