Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

One (onelang) is an open-source system programming language that makes it easy to build reliable, efficient and performant software. (release as soon) 1️⃣ 🕐 🩱

License

NotificationsYou must be signed in to change notification settings

One-Language/One

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome toOne!
It is an open source, self-hosted, bootstrappingsystem programming language which makes it easy tobuild reliable and efficient software.It is being developed byMax,John and other open-source contributors.

Compiler for the One Language will be released in a few months

-----------------------------------------------------

Table of Contents

  1. Features ofOne
  2. RoadMap
  3. Code Examples
  4. Getting Started
  5. Get Involved
  6. License
  7. Contributors

-----------------------------------------------------

➤ Features of One

  • Simplicity
  • Compiler
  • Ability to create output file (x86_64, i386)
  • System Programming Language
  • Intermediate level
  • Network and API programming
  • Supports Web Programming (in the future)
    • Automatic generation of corresponding code for both CSS and HTML. So you won't have to learn more thanOne language to develop a website
    • Uses variables in CSS, so that we can obtain the colors or sizes from the database
    • Auto minify the page results
  • Performance and high speed
  • Supports inline Assembly code (in the future)
  • Does not require specific libraries and tools on the user system in normal mode (in the future)
  • Does not require external runtime libraries in normal mode (in the future)
  • Does not require external compilers to do the compilation (in the future)

-----------------------------------------------------

➤ RoadMap

Grammar of theOne language is availablehere.

  • Lexer/Parser (Mostly)
  • AST Tree
  • VM
  • Code Generator (get inspired from LLVM-C)
  • Develop a runtime library and add features
  • Design web framework for the language
  • Rewrite compiler in theOne language

-----------------------------------------------------

➤ Code Examples

main {ret0}

Convert to C:

#include<stdio.h>#include<stdlib.h>intmain(intargc,char*argv[]) {global_argc=argc;global_argv=argv;return (int)0;}

i32main {ret10}

Convert to C:

#include<stdio.h>#include<stdlib.h>intmain(intargc,char*argv[]) {global_argc=argc;global_argv=argv;return (int)10;}

main {stringin="Hello, World!"__inreturnin.length}

Convert to C:

#include<stdio.h>#include<stdlib.h>#include<string.h>intmain(intargc,char*argv[]) {global_argc=argc;global_argv=argv;char*in="Hello, World!";printf("%s\n",in);return (int)strlen(in);}

Another draft:

importwebhome {_"Hi, Welcome"}error {headers.add('HTTP/1.0 404 Not Found')headers.add('content-type: text/html;charset=utf-8')_"<h1>404></h1>"}main {ifsystem.args.length===2 {port=system.args[1]    }else  {port=8080;    }web.route.add("/",home)web.route.add("*",error)web.listen(port)return0}

Another draft:

error {headers.add('HTTP/1.0 404 Not Found')headers.add('content-type: text/html;charset=utf-8')_ `<!doctypehtml><html><head><title>Error404</title><metacharset="utf-8"></head><body><h1>404></h1></body></html>`}vserror {headers.add('HTTP/1.0 404 Not Found')headers.add('content-type: text/html;charset=utf-8')page {title:'Error 404'label {type:'h1'_"Not found!"        }    }}

Old CLI Development

main:   // __ "Hello, World!"   _ "Hello,"   io.write(' ')   io.write("World")   __ '!'end
@startcustomName:   _ "Hello, World!\n"end
@startvoid app:   __ "Hello, World!"end
@startint customName:   _ "Hello, World!\n"   return 0end

Old GUI Development: (Web, Software)

This architecture is being designed only for websites and native software. In the future, it will also be available for mobile apps (native).
Mobile structures are not yet complete and require more attention and thought.

Example to demonstrate working of the language:

title"Name - Main"description"Descriptions"/*Keyword tag not used in the software, only on the web.*/keyword"keywords"style {* {margin 0    padding 0  }header {    width "100%"    height "auto"  }  list {    color "red"  }  list item {    display "inline"    padding "10px"    background "yellow"  }}header {  list {    item {      _ "Home"    }    item {      _ "About"    }    item {      _ "ContactUs"    }  }}

Convert to CSS/HTML/JS base:

<html><head><title>Name - Main</title><metaname="description"content="Descriptions"/><metaname="keyword"content="keywords"/><style>* {margin:0;padding:0;      }header {width 100%;        height: auto;      }ul {color: red;      }ulli {display: inline;padding:10px;background: yellow;      }</style></head><body><header><ul><li>Home</li><li>About</li><li>Contact Us</li></ul></header></body></html>

-----------------------------------------------------

➤ Getting Started

Refer tothis link to start learning the language.

Supported Environments

  • GNU / Linux
  • Windows
  • macOS (Not complete)
  • BSD

-----------------------------------------------------

➤ Get Involved

We welcome all kinds of contributions, including bug reports, feature requests, documentation improvements etc.To ask a question or open a discussion, create an issue or join theOne Discord Server.

If you are not familiar with how to make a pull request on GitHub then please read thisguide.

If you have decided to contribute, please first read the guidelineshere.
You can also help in the development ofOne by making some donations on❤️ Patreon.

Thanks to all thecontributors!!

If you would like to contribute in the development of this project, you can mail us at:maxbasecode@gmail.com


Created By Max Base @ 2019-----------------------------------------------------

➤ License

One is released under the GNU General Public License v3.0. Please refer to the terms in theLICENSE file included in the repository.

➤ Contributors

The One Contributors

Made withcontrib.rocks.

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp