npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fareldev-hub/flang

v1.2.0

Published

Bahasa pemrograman flang yang berbase Python

Readme

FLang

FLang is a simple interpreted programming language with the .flg file extension. Its interpreter is written in Python and distributed through npm so it can be run from the terminal.

The npm package also includes a VS Code extension that provides syntax highlighting, editor configuration, and a custom icon for .flg files.

Features

  • Variables with var and reassignment.
  • Strings and numbers.
  • The +, -, ==, >, and < operators.
  • if and else conditionals.
  • while loops.
  • Functions with parameters.
  • Built-in print and input functions.
  • Single-line comments with //.
  • Syntax highlighting and .flg icons for VS Code, VS Code Insiders, and VSCodium.

Installation

Prerequisites

  • Node.js 16 or later.
  • Python 3.
  • VS Code, VS Code Insiders, or VSCodium (optional, for syntax highlighting and file icons).

Install FLang globally:

npm install -g @fareldev-hub/flang

During installation, FLang automatically checks for Python 3 and pip. When both are available, it runs:

python3 -m pip install lark

On Windows, FLang also tries the Python Launcher (py -3).

If Python is not installed, download it from:

https://www.python.org/downloads/

If Python is installed but pip is unavailable, follow the official pip installation guide:

https://pip.pypa.io/en/stable/installation/

After installing Python or pip, run the npm installation again:

npm install -g @fareldev-hub/flang

The npm installation also tries to install the bundled FLang extension into any VS Code-compatible editor available in PATH. If no compatible editor is found, the interpreter is still installed and npm does not fail.

To skip automatic VS Code extension installation:

FLANG_SKIP_VSCODE_INSTALL=1 npm install -g @fareldev-hub/flang

If the extension was not installed automatically, install it manually:

code --install-extension "$(npm root -g)/@fareldev-hub/flang/vscode-extension"

Once the extension is active, .flg files are recognized as FLang files, receive syntax highlighting, and use the FLang file icon.

Quick start

Create a file named hello.flg:

var name = "Andi"
print "Hello " + name

var age = 20
if age > 18 {
    print "Adult"
} else {
    print "Underage"
}

func greet(person) {
    print "Welcome, " + person
}

greet(name)

var i = 0
while i < 3 {
    print i
    i = i + 1
}

Run it with either command:

flang hello.flg

or:

flang run hello.flg

Output:

Hello Andi
Adult
Welcome, Andi
0
1
2

Show the version

flang -v

or:

flang --version

The displayed version is read directly from the npm package's package.json.

Show FLang information

Running flang without a file displays the language name, version, creator, an description, and usage examples:

flang

Syntax reference

Variables

Use var when declaring a new variable. Reassignment does not require var.

var name = "Budi"
var age = 18
age = 19

Strings and numbers

Strings use double quotation marks. The current implementation supports integer numbers.

var message = "Hello"
var count = 10
print message
print count

Print

print accepts one or more comma-separated expressions.

print "Hello world"
print "Name:", name, "Age:", age

The + operator can concatenate strings with other values.

print "Count: " + 10

Operators

| Operator | Purpose | Example | | --- | --- | --- | | + | Add or concatenate values | a + b | | - | Subtract numbers | a - b | | == | Compare equality | a == b | | > | Check whether a value is greater | a > b | | < | Check whether a value is smaller | a < b |

If and else

Code blocks are written between { and }.

if age == 18 {
    print "Exactly 18"
} else {
    print "Not 18"
}

While

var i = 0
while i < 5 {
    print i
    i = i + 1
}

Functions

Define functions with func. The current version does not support return.

func greet(name) {
    print "Hello " + name
}

greet("Budi")

Functions can have multiple parameters:

func show(name, age) {
    print name, age
}

show("Budi", 20)

Input

Use input to read text from the terminal.

var name = input("What is your name? ")
print "Hello " + name

Comments

Single-line comments start with //.

// This is a comment
var value = 10 // A comment after code

Running from source

If you do not want to install the npm package globally:

python3 -m pip install lark
node bin/flang.js hello.flg

VS Code extension

The extension is located in the vscode-extension directory. It provides:

  • The flang language definition for .flg files.
  • Syntax highlighting for keywords, functions, numbers, strings, operators, and comments.
  • A custom .flg file icon.
  • Automatic closing for {}, (), and quotation marks.

Install the extension from source:

code --install-extension ./vscode-extension

Current limitations

  • Functions do not support return yet.
  • else if is not supported yet.
  • The *, /, and % operators are not supported yet.
  • Error messages do not always include line numbers.
  • The currently available built-ins are input and print.

License

FLang is released under the MIT License. See LICENSE for the full license text.