{"id":18881284,"url":"https://github.com/init-ref/lldbf","last_synced_at":"2026-02-21T01:30:17.327Z","repository":{"id":253740394,"uuid":"843912389","full_name":"INIT-REF/LLDBF","owner":"INIT-REF","description":"A Brainf*ck inspired Esolang","archived":false,"fork":false,"pushed_at":"2024-08-19T10:29:29.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T03:27:21.603Z","etag":null,"topics":["brainfuck","brainfuck-interpreter","brainfuck-language","esolang","esoteric-language","esoteric-programming-language"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/INIT-REF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-17T19:48:18.000Z","updated_at":"2024-08-19T10:29:33.000Z","dependencies_parsed_at":"2024-11-08T06:48:25.259Z","dependency_job_id":null,"html_url":"https://github.com/INIT-REF/LLDBF","commit_stats":null,"previous_names":["init-ref/lldbf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INIT-REF%2FLLDBF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INIT-REF%2FLLDBF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INIT-REF%2FLLDBF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INIT-REF%2FLLDBF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/INIT-REF","download_url":"https://codeload.github.com/INIT-REF/LLDBF/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239850450,"owners_count":19707348,"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":["brainfuck","brainfuck-interpreter","brainfuck-language","esolang","esoteric-language","esoteric-programming-language"],"created_at":"2024-11-08T06:48:19.871Z","updated_at":"2026-02-21T01:30:17.277Z","avatar_url":"https://github.com/INIT-REF.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLDBF\nA Brainf*ck inspired, interpreted language using signed 64bit cells (or whatever long long int will be on your machine) and a 2-element stack. Numbers can be entered as literals in the source code.\n\n## Usage\nLLDBF is inspired by BF and some of its dialects. In fact, any non-wrapping BF code should work as is, but no guarantee. The similarities, diffrences and extensions are as follows:\n\nThe usual BF commands work as expected:\n\n`+` increase the current cells value by 1\n\n`-` decrease the current cells value by 1\n\n`\u003e` go to next cell\n\n`\u003c` go to previous cell\n\n`[` enter loop if current cells value is \u003e 0, else skip it\n\n`]` leave loop if current cells value is \u003c= 0, else repeat it\n\n`.` print current cells value as char\n\n`,` get number as user input from stdin\n\n\n\u0026nbsp;\n\n\nIn addition there are the following commands:\n\n`#` print current cells value as number\n\n`^` push current cells value on the stack (leaves cell unchanged)\n\n`v` pop top stack item in current cell\n\n`a` add the numbers on the stack\n\n`s` subtract top stack item from bottom one\n\n`m` multiply the numbers on the stack\n\n`d` divide bottom stack item by top one (integer division like / in C)\n\n`r` modulus of bottom stack item and top one\n\n## Integer literals\nYou can set the current cell to a certain value by just using the number in the source code. A trivial example would be the following \"Hello, World!\" implementation, which just uses the same cell over and over to print the characters one by one and a final new line:\n\n`72.101.108..111.44.32.87.111.114.108.100.33.10.`\n### Negative numbers\nIf you want to put a negative number in a cell (and because '-' is already used as a decrement operator), you need to use a little workaround for now. You can either multiply the number by -1 like so: `1234^0-^mv` or you can subtract it from 0 like so: `0^1234^sv`. When you can be sure that the stack is empty (i.e. it consists of 0s), you may also just do `1234^sv`.\n\n## The stack\nThe stack can hold up to two numbers, which can be pushed to the stack using `^`. The top stack item can be popped with `v`, after which the bottom item becomes the new top item (last in, first out). For example, if the current tape has the values 2, 3 in the first two cells, the pointer is at the first cell and we execute the sequence `^\u003e^\u003ev\u003ev`, the first four cells will now be 2, 3, 3, 2.\n\nIf more than two numbers are pushed to the stack, the bottom one will be discarded.\n\n### Stack arithmetics:\nYou can use the stack to quickly get the sum, difference, product, quotient or modulus of two numbers. Both stack items will be consumed by the operation and the result will be the new top stack item:\n\n| Stack before | Operation | Stack after |\n| ------------ | --------- | ----------- |\n| 14 3         | a         | 0 17        |\n| 14 3         | s         | 0 11        |\n| 14 3         | m         | 0 42        |\n| 14 3         | d         | 0 4         |\n| 14 3         | r         | 0 2         |\n\n## Some practical examples\n### Hello, World!\n`72.101.108..111.44.32.87.111.114.108.100.33.10.` (Same as above)\n### Factorial of n (taking n as user input)\n`\u003e,[^\u003ev-]1\u003c[^\u003c^mv]\u003e#10.`\n### Print the first n Fibonacci numbers (n as user input)\n`,\u003e\u003e1\u003c\u003c[\u003e^^#32.v\u003e^\u003ev\u003c^av\u003e^\u003c\u003cv\u003c-]10.`\n### Solutions for the first three Project Euler problems:\n`\u003e1000[\u003e1[\u003c-^\u003e3^rv\u003c^\u003e\u003e5^r\u003c^mv]\u003c^\u003c^av\u003e]\u003c#10.`\n\n`\u003e1\u003e1\u003e1[[\u003c^^\u003ev\u003c\u003c^\u003eav\u003e^^\u003c\u003cv\u003e\u003e2^rv]\u003c\u003c^\u003c^av\u003e\u003e\u003e4000000^\u003c^\u003esv]\u003c\u003c\u003c#10.`\n\n`600851475143\u003e3\u003e1[\u003c\u003c^\u003e^\u003erv[\u003c++\u003c^\u003e^\u003erv]\u003c\u003c^\u003e^\u003cdv^\u003e\u003e1^sv]\u003c#10.`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finit-ref%2Flldbf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finit-ref%2Flldbf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finit-ref%2Flldbf/lists"}