LINUX.ORG.RU

«Перспективные» и малоизвестные проекты ЯП

 , , ,


2

5

А накидайте, какие есть малоизвестные проекты языков программирования, которые пилятся или пилились энтузиастами в последние годы? Интересуют компилируемые ЯП, ориентированные на компиляцию в нативный код. (Еще лучше, если у реализации есть собственный бэк, а не просто фронт для LLVM.)

Из того, что я мог вспомнить:

  • Nim
  • Zig
  • Seed7
  • VLang
  • Crystal
  • OOC
★★★
Ответ на: комментарий от lovesan

Spritely Goblins, для guile или racket делать WASM в браузер:

Hoot, трансляция scheme в WASM:

ещё лучше если бы какой-то браузер типа Nyx на самом лиспе

а ещё лучше чтобы не WASM, а нормальный лисп и для клиента, и для сервера

GC вроде там сделали в WASM в последних сборках – что позволяет запускать метациклический лисп в духе SICP: Scheme in Scheme on Wasm

но он всё равно какой-то недоделанный по сравнению с нормальным лиспом, нормальным GC

anonymous
()

https://www.moonbitlang.com

  • The collaborative design of programming language, compiler, build system, and IDE ensures the integrity of the system, reduces component friction, and improves overall efficiency
  • Generate significantly smaller WASM output than any existing solutions
  • Moonbit language designed specifically for WebAssembly. Provide multiple backends including JavaScript and Native
  • Support multiple programming paradigm including functional and object oriented
  • Simple yet practical type system, data oriented language design. Developer with any background can start immediately
  • State of art compile time performace
  • Fast runtime performance using whole program optimizations
  • Support incremental and parallel compilation, handle large-scale programming scenarios smoothly
dataman ★★★★★
()
29 августа 2024 г.

Еще лучше, если у реализации есть собственный бэк, а не просто фронт для LLVM.

Наткнулся сегодня:
https://belijzajac.dev/wisnialang-compiler-project

For the past 3 years, I have been working on the WisniaLang compiler for my own programming language that compiles to native machine code and packs it into an executable by itself. Unlike many others, I rolled out my own compiler backend from scratch that does fast but naive code generation. While it’s admittedly a more old-fashioned approach to compiler engineering, it’s the path I chose to take when developing my compiler.

https://github.com/belijzajac/WisniaLang (C++20, CMake, GPL 3).

A compiler for an experimental programming language that produces tiny Linux binaries (ELF x86_64) without LLVM dependency!


fn fibonacci(n: int) -> int {
  if (n <= 1) {
    return n;
  }
  int prev = 0;
  int current = 1;
  for (int i = 2; i <= n; i = i + 1) {
    int next = prev + current;
    prev = current;
    current = next;
  }
  return current;
}

fn main() {
  print(fibonacci(46));
}

421 байтов.

dataman ★★★★★
()
9 января 2025 г.

На opennet была новость о http://www.fixbrowser.org. Написан он на C и C-подобном https://www.fixscript.org:

FixScript is an extensible scripting language designed for simple implementation and strong support for both backward and forward compatibility.

You can use FixScript both as a standalone and embedded programming language. You can build standalone native executables for any supported platform from every platform.

The best results are obtained when combined with the C language to get a very powerful tool. This way you can use the best of the two worlds, using the language for the high-level stuff and C doing the interoperability and fast stuff while having a good integration between both languages.

Есть JIT для x86/x86_64.

function main()
{
    var hash = {
        "test": 123,
        "blah": 456
    };

    hash{"other"} = 789;

    for (var i=0; i<length(hash); i++) {
        var (key, value) = hash_entry(hash, i);
        log({key, " = ", value});
    }
}
dataman ★★★★★
()
Ответ на: комментарий от wandrien

хотелось бы Zig с линейными типами.

double-free and use-after-free errors вполне отслеживаются статическими анализаторами кода и без такой конструкции, как предлагаеммые в Austral линейные типы.

По concurrency error - не уверен…

MirandaUser2
()
15 января 2026 г.

https://github.com/titzer/virgil – A Fast and Lightweight Systems Programming Language.

def main() {
    System.puts("Virgil is fast and lightweight!\n");
}
Virgil is a programming language designed for building lightweight high-performance systems. Its design blends functional and object-oriented programming paradigms for expressiveness and performance. Virgil's compiler produces optimized, standalone native executables, WebAssembly modules, or JARs for the JVM. For quick turnaround in testing and debugging, programs can also be run directly on a built-in interpreter. It is well-suited to writing small and fast programs with little or no dependencies, which makes it ideal for the lowest level of software systems. On native targets, it includes features that allow building systems that talk directly to kernels, dynamically generate machine code, implement garbage collection, etc. It is currently being used for virtual machine and programming language research, in particular the development of a next-generation WebAssembly virtual machine, Wizard.

This repository includes the entire compiler, runtime system, some libraries, tests, documentation and supporting code for Virgil's various compilation targets.

Language Design

Virgil focuses on balancing these main features in a statically-typed language:

* Classes - for basic object-oriented programming
* Functions - for small-scale reuse of functionality
* Tuples - for efficient aggregation and uniform treatment of multi-argument functions
* Type parameters - for powerful and clean abstraction over types
* Algebraic data types - for easy building and matching of data structures

For more, read this paper. Or see the tutorial. Or read up on libraries.

Supported Targets

Virgil can compile to native binaries for Linux or Darwin, to jar files for the JVM, or to WebAssembly modules. Linux binaries can run successfully under Windows using Window's Linux system call layer. The compiler is naturally a cross-compiler, able to compile from any supported platform to any other supported platform, so you need only be able to run on one of these platforms in order to target any of the others.

* x86-darwin : 32-bit Darwin kernels (MacOS)
* x86-64-darwin : 64-bit Darwin kernels (MacOS)
* x86-linux : 32-bit Linux kernels
* x86-64-linux : 64-bit Linux kernels
* jar : JAR files for the Java Virtual Machine
* wasm : WebAssembly module for any Wasm engine

Implementation

Virgil is fully self-hosted: its entire compiler and runtime system is implemented in Virgil. It was originally designed as a language for embedded systems, particularly microcontrollers, but now supports more mainstream targets. The compiler includes sophisticated whole-program optimizations that achieve great performance and small binaries. Native binaries compiled from your programs can be as small as a few hundred bytes in size and consume just kilobytes of memory at runtime. You can learn more in the Implementation Guide.

Virgil is fully self-hosted: its entire compiler and runtime system is implemented in Virgil.

dataman ★★★★★
()
Последнее исправление: dataman (всего исправлений: 1)
Ответ на: комментарий от wandrien
def main() {
    System.puts("Привет, мир!\n");
}

$ v3c-x86-linux compile hello_world.v3:

File: hello_world
Size: 11876

$ ./hello_world:

Привет, мир!

$ ldd hello_world:

not a dynamic executable

$ strip hello_world:

strip: error: the input file ‘hello_world’ has no sections

dataman ★★★★★
()

Интересуют компилируемые ЯП, ориентированные на компиляцию в нативный код. (Еще лучше, если у реализации есть собственный бэк, а не просто фронт для LLVM.)

Так это про лиспы.

На /r/Lisp загляни: http://reddit.com/r/lisp

Nim Zig Seed7 VLang Crystal OOC

А эти никому не нужные вариации поноса из 70х выкинь

lovesan ★★☆
()