Linux 脚本
scScript for Linux

原始链接: https://scapplications.com/

scScript 是一种专为 64 位 Linux 设计的轻量级、高性能类 C 脚本语言。它完全由 C 语言构建,拥有一个能够执行优化字节码的快速虚拟机,并支持尾调用优化以及双重垃圾回收机制(标记/清除与引用计数)。 该语言功能强大,包括无指针内存管理、一等闭包、协程、灵活的数据结构(动态数组和字典)以及强大的模式匹配系统。其设计优先考虑了嵌入和扩展的便捷性,允许通过 `libffi` 与 C 程序无缝集成。 该项目包含 scEmacs,这是一个与该语言集成的定制化轻量级显示编辑器。scEmacs 支持多窗口编辑、UTF-8 文本、增量搜索以及用于简化 scScript 开发的专用命令。由于依赖项极少(仅使用 `libx11`、`libxft` 和 `libffi`),整个生态系统具有极高的可移植性和可定制性。如需嵌入或扩展这一高效的脚本环境,可查阅详细文档、源代码及示例脚本。

Hacker News | 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 | 登录 sc:Linux 脚本 (scapplications.com) OptionOfT 发布于 1 小时前 | 5 分 | 隐藏 | 过往 | 收藏 | 1 条评论 SA9G 1 小时前 [-] 我想写一封给 C 语言的情书……如果你们讨厌它,那全都是我的错。回复 指导原则 | 常见问题 | 列表 | API | 安全 | 法律 | 申请加入 YC | 联系 搜索:
相关文章

原文

scScript is a powerful but simple to use C-like scripting language. It compiles to efficient bytecode (that it shows) and runs in a fast virtual machine. scScript is integrated with scEmacs, a small display editor for I/O.

Everything is written in C, runs on 64-bit Linux, is easy to customize, port, extend, and embed!

Go to Online Manual for a complete guide, or to see sample code (Intro 1).
Go to Downloads to get sources for scScript (and scEmacs).

  • Has familiar C-like syntax and operators.
  • Provides simple pointer-less scripting with:
    • 64-bit integer and double floats
    • Immutable UTF-8 text strings
    • Arrays that grow automatically
    • Dictionaries (flexible assoc lists)
    • External structures (3 flavors)
    • Nested function declarations and first-class closures
    • Variadic Pass-by-value and Pass-by-reference args
    • Subordinate scripts
  • Has stackful asym coroutines and non-local exits.
  • Compiles to optimized bytecode running in a small VM.
  • Can display line-by-line source AST and bytecodes.
  • Optimizes tail call recursion (no stack frame).
  • Uses Mark/Sweep GC as well as Ref Counting.
  • Provides a powerful (text) pattern matching system.
  • Readily interfaces to C routines for package libs.
  • Employs slab-based low-level memory management.
  • Only uses libx11 and libxft for scEmacs,
    plus libffi for printf interface.

scEmacs is an integrated editor with:

  • Multiple buffers, panes, and windows,
  • Color source code display,
  • UTF-8 text, Undo, Kill Ring, and Mark list,
  • Incremental search, query replace, and auto completion,
  • Mouse-based ops, scrolling, and even Unix Sel insert,
  • Pop-up window/menu facility for enumeration/selection,
  • Specialized commands to drive scScript.
联系我们 contact @ memedata.com