{"id":16894195,"url":"https://github.com/jsuereth/lambda-doge","last_synced_at":"2025-11-04T01:30:32.527Z","repository":{"id":19544247,"uuid":"22792466","full_name":"jsuereth/lambda-doge","owner":"jsuereth","description":"A language that takes itself seriously.","archived":false,"fork":false,"pushed_at":"2016-04-15T19:38:42.000Z","size":151,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-27T06:26:38.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"INFO-201/m14-shiny","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsuereth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-09T18:28:48.000Z","updated_at":"2017-01-04T16:35:03.000Z","dependencies_parsed_at":"2022-08-21T12:11:00.218Z","dependency_job_id":null,"html_url":"https://github.com/jsuereth/lambda-doge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsuereth%2Flambda-doge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsuereth%2Flambda-doge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsuereth%2Flambda-doge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsuereth%2Flambda-doge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsuereth","download_url":"https://codeload.github.com/jsuereth/lambda-doge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239425311,"owners_count":19636346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T17:17:58.086Z","updated_at":"2025-11-04T01:30:32.464Z","avatar_url":"https://github.com/jsuereth.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda Doge\n\n\nA language for those who take themselves seriously.\n\n## Installation\n\n  For a prebuilt package, simple download:  [ ![Download](https://api.bintray.com/packages/jsuereth/doge/dogec/images/download.png) ](https://bintray.com/jsuereth/doge/dogec/_latestVersion) \n\n  To build, requires [sbt](http://scala-sbt.org) and a java JRE.  Once sbt is installed, cd into the doge directory and type:\n\n\n    $ sbt\n    \u003e stage\n    \nNow, you should see a `target/universal/stage` directory which contains all the files needed to run the DOGE compiler,\nincluding a `bin/` directory with utilities and a `lib/` directory with all the necessary jar files to run.\n\nIt's quite limited now, but Enjoy! Hack! Contribute!\n\n\nBelow follows a minor user guide.\n\n# Getting Started\n\n    WOW\n    SUCH language!\n    Much typing!\n    Very Welcome!\n\nDOGE is a statically typed language based, loosely, on lambda calculus with several ideas taken from Haskell/Scala.\n\nIt has the following features:\n\n* Type Inference\n* Tuples\n* Lists\n* Curried functions\n* Compiles to JVM bytecode\n\n\n## Your first module.\n\nIn DOGE, any file is treated as a DOGE module.   That is, all let expressions within the module are encoded into the\nsame JVM .class file.   One function may see those previously defined, but are unable to call other let expressions not \nyet defined.   Additionally, any expression labelled as main will be evaluated as an appliation on the JVM.\n\nFor example, let's create a file called `test.doge` with the following contents:\n\n\n    WOW\n    main\n    MUCH PrintLn 1!\n\nNow, we can compile this file via the following command line:\n\n    dogec test.doge\n\nAnd \"run\" the module via the following command:\n\n    java -cp . test\n\nWhich will print the output `1`.\n\n\n# Basics\n\nThe entire DOGE language is composed of named expressions.  We can define a new named expression using the WOW statement.  For example:\n\n    WOW\n    \u003cname\u003e\n    \u003cfunction application expr\u003e\n    \nExpressions can be one of four things:\n\n1. An integer literal, e.g. `1` or `451`\n2. A boolean literal, i.e. `true` or `false`\n3. A function application, e.g. `MUCH \u003cfunc\u003e \u003cargs\u003e !` **Note: the ! ends the function application**\n4. A Lambda expression, e.g. `MANY \u003carg names\u003e \u003cfunction-application\u003e`\n\nNamed expressions may also have 'holes', i.e. function arguments.   These are denoted using the `SO` syntax, for example here is a method which adds one to any integer it is given:\n\n    WOW\n    addOne\n    SO number\n    MUCH Plus number 1!\n\nAdditionally, all functions in DOGE are curried by default.  That is, we can pass as many arguments as we wish to methods.\nFor example, `Plus` has the type `Int =\u003e Int =\u003e Int`.\nThis means it is a function which takes two integers and returns an integer, however you can supply just one integer to get back\na function `Int =\u003e Int`.\n\n    WOW\n    partialAdd\n    MUCH Plus 1!\n    \n    WOW\n    fullAdd\n    MUCH partialAdd 2!\n    \nThe `partialAdd` method will return a function `Int =\u003e Int` as its result.  The `fullAdd` method supplies the remaining\narguments, and its result would be `3`.\n\n\n\n\nBesides this basic syntax, there are a set of built in functions/methods you can use to define your program.\n\nAdditionally, any zero-argument expression named `main` will be evaluated as the \"application\" on the JVM.  This can\nbe passed to the `java` executable to \"run\" a lambda-doge program.\n\n\n# Standard Library\n\nThe standard library supports several primitive functions currently:\n\n## Raw\n\n    IS :: a =\u003e a\n\nIs a method which just returns its argument.  It is actually completely erased in bytecode, but exists\nas a syntactic sugar to ensure that expressions which require a function call can just return a value.\n\n## Booleans\n\n\n    ifs :: Boolean =\u003e a =\u003e a =\u003e a\n\nEncodes if statements. If the first argument is true, returns the second argument, otherwise returns the last argument.\nFor evaluation semantics, the second/third argument are evaluated lazily.\n\n\n## Integers\n\n    Plus :: Int =\u003e Int =\u003e Int\n    \nAdds two numbers together.\n\n\n    Minus:: Int =\u003e Int =\u003e Int\n    \nMinus two numbers together.\n\n    Multiply :: Int =\u003e Int =\u003e Int\n    \nMultiply two numbers together.\n\n    Divide :: Int =\u003e Int =\u003e Int\n    \nDivide two numbers together.\n\n\n## Tuples\n\n    tuple2 :: a -\u003e b -\u003e (a,b)\n    \nCreates a tuple of the two values\n\n    fst :: (a,b) -\u003e a\n    \nReturns the first part of a tuple\n\n    snd :: (a,b) -\u003e b\n    \nReturns the second part of a tuple\n\n## Lists\n\n    Nil :: List a\n    \nCreates an empty list with unspecified contents.\n\n    cons :: a -\u003e List a -\u003e List a\n\nPrepends an element to a list.\n\n     hd :: List a -\u003e a\n   \nGrabs the top of a list.  Note: This may throw an exception.\n\n     tl :: List a -\u003e List a\n   \nGrabs a new list with all but the first element.\n\n## Stdout\n\n    Print :: a -\u003e Unit\n\nPrints the value passed (using .toString) to the console\n\n    PrintLn :: a -\u003e Unit\n\nPrints the value passed (using .toString) to the console, as well as an end-of-line.\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsuereth%2Flambda-doge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsuereth%2Flambda-doge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsuereth%2Flambda-doge/lists"}