GithubHelp home page GithubHelp logo

gleam-lang / gleam Goto Github PK

View Code? Open in Web Editor NEW
17.0K 88.0 713.0 15.51 MB

⭐️ A friendly language for building type-safe, scalable systems!

Home Page: https://gleam.run

License: Apache License 2.0

Erlang 0.27% Rust 93.92% Makefile 0.13% Dockerfile 0.02% CSS 0.77% HTML 0.95% Cap'n Proto 0.15% JavaScript 1.47% Gleam 2.06% Shell 0.16% Elixir 0.02% TypeScript 0.07% PowerShell 0.02%
gleam programming-language compiler erlang statically-typed

gleam's Introduction

Lucy, Gleam's mascot

GitHub release Discord chat

 

Gleam is a friendly language for building type-safe systems that scale! For more information see the website.

Sponsors

Gleam is kindly supported by its sponsors. If you would like to support Gleam please consider sponsoring its development on GitHub.

Thank you to our sponsors! Gleam would not be possible without you.

00bpa - Aaron Gunderson - Abdulrhman Alkhodiry - ad-ops - Adam Brodzinski - Adam Johnston - Adi Iyengar - Adi Salimgereyev - Adrian Mouat - Ajit Krishna - Alembic - Alex - Alex Houseago - Alex Manning - Alex Viscreanu - Alexander Koutmos - Alexander Stensrud - Alexandre Del Vecchio - Ameen Radwan - AndreHogberg - andrew - András B Nagy - Andy Aylward - Antharuu - Anthony Khong - Anthony Maxwell - Anthony Scotti - Arnaud Berthomier - Arthur Weagel - Austin Daily - Barry Moore - Bartek Górny - Ben Martin - Ben Marx - Ben Myles - Benjamin Peinhardt - Benjamin Thomas - bgw - Bill Nunney - brettkolodny - Brian Dawn - Brian Glusman - Bruno Michel - bucsi - Carlo Gilmar - Carlo Munguia - Carlos Saltos - Chad Selph - Charlie Govea - Chaz Watkins - Chew Choon Keat - Chris - Chris Donnelly - Chris King - Chris Lloyd - Chris Ohk - Chris Rybicki - Christopher Dieringer - Christopher Keele - clangley - Cleo - CodeCrafters - Coder - Cole Lawrence - Colin - Comamoca - Daigo Shitara - Damir Vandic - Dan Dresselhaus - Daniel - Danny Arnold - Danny Martini - Darshak Parikh - Dave Lucia - David Bernheisel - David Cornu - David Sancho - Denis - Dennis Dang - dennistruemper - Dillon Mulroy - Dima Utkin - Dmitry Poroh - Donnie Flood - ds2600 - ducdetronquito - Dylan Carlson - Edon Gashi - Eileen Noonan - eli - Elliott Pogue - Emma - EMR Technical Solutions - Eric Koslow - Erik Terpstra - erikareads - ErikML - Ernesto Malave - Evaldo Bratti - Evan Johnson - Felix Mayer - Fernando Farias - Filip Figiel - Fionn Langhans - Florian Kraft - frankwang - G-J van Rooyen - Georg H. Ekeberg - Giacomo Cavalieri - Giovanni Kock Bonetti - Graeme Coupar - grotto - Guilherme de Maio - Guillaume Hivert - Hammad Javed - Hampus Kraft - Hannes Nevalainen - Hannes Schnaitter - Hayes Hundman - Hayleigh Thompson - Hazel Bachrach - Henning Dahlheim - Henry Firth - Henry Warren - human154 - Humberto Piaia - Iain H - Ian González - Ian M. Jones - Igor Goryachev - Igor Montagner - Igor Rumiha - ILLIA NEGOVORA - inoas - Isaac - Isaac Harris-Holt - Ismael Abreu - Ivar Vong - J. Rinaldi - Jacob Lamb - Jake Cleary - James Birtles - James MacAulay - Jan Skriver Sørensen - Jean-Luc Geering - Jen Stehlik - Jenkin Schibel - Jeremy Jacob - jiangplus - Jimpjorps™ - Joey Kilpatrick - Johan Strand - John Björk - John Gallagher - John Pavlick - John Thile - Jonas E. P - Jonas Hedman Engström - Jorge Martí Marín - Josef Richter - Joseph Lozano - Joshua Steele - Julian Lukwata - Julian Schurhammer - Justin Lubin - Kero van Gelder - Kevin Schweikert - Kieran Gill - kodumbeats - Kramer Hampton - Kryštof Řezáč - Krzysztof G. - Leandro Ostera - Leon Qadirie - Leonardo Donelli - lidashuang - LighghtEeloo - Lily Rose - Loïc Tosser - Lucas Pellegrinelli - Lucian Petic - Lukas Meihsner - Luke Amdor - Luna - Manuel Rubio - Maor Kadosh - Marcus André - Marcøs - Mariano Uvalle - Marius Iversen - Marius Kalvø - Mark Holmes - Mark Markaryan - Mark Spink - Markéta Lisová - Martin Janiczek - Martin Rechsteiner - martonkaufmann - Matt Champagne - Matt Robinson - Matt Savoia - Matt Van Horn - Matthias Benkort - Max McDonnell - max-tern - Michael Duffy - Michael Jones - Michael Kieran O'Reilly - Michael Kumm - Michael Mazurczak - Michał Hodur - Mike - Mike Nyola - Mike Roach - Mikey J - MoeDev - MzRyuKa - Måns Östman - n8n - Workflow Automation - Natanael Sirqueira - Nathaniel Knight - NFIBrokerage - Nick Chapman - Nick Reynolds - Nicklas Sindlev Andersen - NicoVIII - Niket Shah - Ninaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - NineFX - Nomio - Ocean - OldhamMade - Oliver Medhurst - optizio - Osman Cea - Patrick Wheeler - Patrik Kühl - Paul Gideon Dann - Paul Guse - Paulo Vidal - Pawel Biernacki - Pete Jodo - Peter Rice - Petri-Johan Last - Philip Giuliani - Pierrot - Piotr Szlachciak - Praveen Perera - Qdentity - qingliangcn - Race Williams - Rahul Butani - Raúl Chouza - Redmar Kerkhoff - Reilly Tucker Siemens - Renovator - Richard Viney - Rico Leuthold - Ripta Pasay - Rob - Robert Attard - Robert Ellen - Robert Malko - Rodrigo Heinzen de Moraes - Ross Bratton - Ruslan Ustitc - Sam Aaron - sambit - Sammy Isseyegh - Samu Kumpulainen - Santi Lertsumran - Savva - Saša Jurić - Scott Trinh - Scott Wey - Sean Jensen-Grey - Sebastian Porto - sekun - Seve Salazar - Shane Poppleton - Shuqian Hon - Simone Vittori - Spec - star-szr - Stephen Belanger - Steve Powers - Strandinator - syhner - Sławomir Ehlert - Theo Harris - Thomas - Thomas Ernst - Tim Brown - Timo Sulg - Tom Schuster - Tomasz Kowal - tommaisey - Tristan de Cacqueray - Tristan Sloughter - Vassiliy Kuzenkov - Vic Valenzuela - Victor Rodrigues - Vincent Costa - Viv Verner - Volker Rabe - Weizheng Liu - Wesley Moore - Willyboar - Wilson Silva - xhh - Yamen Sader - Yasuo Higano - yoshi~ - Zhomart Mukhamejanov - Zsombor Gasparin - ~1847917

gleam's People

Contributors

abs0luty avatar acepie avatar ascandone avatar brettkolodny avatar crowdhailer avatar dependabot[bot] avatar gearsdatapacks avatar giacomocavalieri avatar harryet avatar inoas avatar itsgreggreg avatar johnbjrk avatar johndoneth avatar lpil avatar lucasavila00 avatar lunarmagpie avatar massivefermion avatar maxdeviant avatar michaeljones avatar michallepicki avatar mrgleam avatar nicklimmm avatar nthtensor avatar pgbiel avatar quinnwilton avatar thehabbos007 avatar tomwhatmore avatar tranzystorekk avatar tristancacqueray avatar vstreame avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gleam's Issues

Type annotations

All are optional

fn id(x: Int) -> Int {
  x
}
  • Parsing
  • Module fn args
  • Module fn return
  • Anon fn args

Code formatter

gleam format path/to/file.gleam

Reuse the pretty printing algebra used for Erlang code generation. Effectively it's a new compiler backend that skips type inference and compiles to Gleam.

Retaining comments

Strip the comments out, parse the remaining AST, traverse the AST and use positions in the AST and the comments to determine where to annotate which nodes with which comments.

Custom lalrpop tokenizer:

Explore implicit params

After reading about the OCaml implicit module PR I've had the idea for a system of implicit parameters bouncing round my head, giving Gleam a way of producing polymorphic functions such as enum:map which could operate on more than 1 type of data structure with less boilerplate.

Now it seems Scala has a very similar system already! A good place to start research.

https://docs.scala-lang.org/tour/implicit-parameters.html

https://docs.scala-lang.org/tutorials/FAQ/finding-implicits.html

https://discuss.ocaml.org/t/critique-of-implicits/3031/59

Pipe operator

1 |> run

Parsing and typing is done, but the code generator is currently incorrect.

Remove module header syntax

Current syntax:

module Calculator
  exposing add/2, sub/2, div/2, mult/2

fn add(a, b) {
  a + b
}

fn sub(a, b) {
  a - b
}

fn div(a, b) {
  a / b
}

fn mult(a, b) {
  a * b
}

Proposed syntax:

pub fn add(a, b) {
  a + b
}

pub fn sub(a, b) {
  a - b
}

pub fn div(a, b) {
  a / b
}

pub fn mult(a, b) {
  a * b
}

Advantages

  • Removing the module header removes duplication between filename and source, making renaming easier and removing potential typos
  • Removing the export list removes duplication of name/arity between the list and the function definitions, making renaming easier and removing potential typos
  • Slightly more concise
  • May be more familiar to mainstream language users

Disadvantages

  • Slight increase in noise for public function definitions
  • Public interface of a module is less clear
  • Less familiar to Erlang and ML users

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.