hackmoji.jl

A small language based on Brainfuck which is written to help my children Hamiltonian and Valerian to learn programming.

https://github.com/doktormike/hackmoji.jl

Science Score: 31.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.3%) to scientific vocabulary

Keywords

brainfuck-interpreter hackmoji kids-coding kids-programming programming-for-kids programming-language
Last synced: 4 months ago · JSON representation ·

Repository

A small language based on Brainfuck which is written to help my children Hamiltonian and Valerian to learn programming.

Basic Info
  • Host: GitHub
  • Owner: DoktorMike
  • License: mit
  • Language: Julia
  • Default Branch: master
  • Homepage:
  • Size: 96.7 KB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Topics
brainfuck-interpreter hackmoji kids-coding kids-programming programming-for-kids programming-language
Created over 5 years ago · Last pushed over 5 years ago
Metadata Files
Readme License Citation

README.md

HackMoji

Stable Dev Build Status Build Status

Introduction

The purpose behind Hack-Moji is to use a fun a stimulating way of learning computer programming for my children Hamiltonian and Valerian.

I will add fun and useful examples here as I go.

Examples

These examples are taken from the Brainfuck wikipedia article.

Hello World!

This is the classic "Hello World!" example from so many programming languages.

julia runme("++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.")

Add two input numbers together

```julia addtwo = """ , Input first number ------------------------------------------------ Make the number character into a real number

                                                Move to cell 1

, Input second number ------------------------------------------------ Remove 48 from character < Move to cell 0 [>+<-] Loop where we decrease the number in cell 0 and increase in cell 1 Move to cell 1 ++++++++++++++++++++++++++++++++++++++++++++++++ Convert the number to a character number . Print the result """ runme(addtwo) ```

Add 5 + 2

This example produces 7 by adding 5 + 2.

```julia addme = """ ++ Cell c0 = 2

+++++ Cell c1 = 5 [ Start your loops with your cell pointer on the loop counter (c1 in our case) < + Add 1 to c0 - Subtract 1 from c1 ] End your loops with the cell pointer on the loop counter At this point our program has added 5 to 2 leaving 7 in c0 and 0 in c1 but we cannot output this value to the terminal since it is not ASCII encoded! To display the ASCII character "7" we must add 48 to the value 7 48 = 6 * 8 so let's use another loop to help us! ++++ ++++ c1 = 8 and this will be our loop counter again [ < +++ +++ Add 6 to c0 - Subtract 1 from c1 ] < . Print out c0 which has the value 55 which translates to "7"! """ runme(addme) ```

ROT13 encryption

julia mycode = """ -,+[ Read first character and start outer character reading loop -[ Skip forward if character is 0 >>++++[>++++++++<-] Set up divisor (32) for division loop (MEMORY LAYOUT: dividend copy remainder divisor quotient zero zero) <+<-[ Set up dividend (x minus 1) and enter division loop >+>+>-[>>>] Increase copy and remainder / reduce divisor / Normal case: skip forward <[[>+<-]>>+>] Special case: move remainder back to divisor and increase quotient <<<<<- Decrement dividend ] End division loop ]>>>[-]+ End skip loop; zero former divisor and reuse space for a flag >--[-[<->+++[-]]]<[ Zero that flag unless quotient was 2 or 3; zero quotient; check flag ++++++++++++<[ If flag then set up divisor (13) for second division loop (MEMORY LAYOUT: zero copy dividend divisor remainder quotient zero zero) >-[>+>>] Reduce divisor; Normal case: increase remainder >[+[<+>-]>+>>] Special case: increase remainder / move it back to divisor / increase quotient <<<<<- Decrease dividend ] End division loop >>[<+>-] Add remainder back to divisor to get a useful 13 >[ Skip forward if quotient was 0 -[ Decrement quotient and skip forward if quotient was 1 -<<[-]>> Zero quotient and divisor if quotient was 2 ]<<[<<->>-]>> Zero divisor and subtract 13 from copy if quotient was 1 ]<<[<<+>>-] Zero divisor and add 13 to copy if quotient was 0 ] End outer skip loop (jump to here if ((character minus 1)/32) was not 2 or 3) <[-] Clear remainder from first division if second division was skipped <.[-] Output ROT13ed character from copy and clear it <-,+ Read next character ] End character reading loop """ runme(mycode)

Owner

  • Name: Michael Green
  • Login: DoktorMike
  • Kind: user
  • Location: Copenhagen
  • Company: @Desupervised

AI Scientist, Founder @Desupervised, Co-founder @ai-alpha-lab @Blackwood

Citation (CITATION.bib)

@misc{HackMoji.jl,
	author  = {Michael Green <micke.green@gmail.com> and contributors},
	title   = {HackMoji.jl},
	url     = {https://github.com/DoktorMike/HackMoji.jl},
	version = {v0.1.0},
	year    = {2020},
	month   = {8}
}

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 9
  • Total Committers: 1
  • Avg Commits per committer: 9.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Michael Green m****n@g****m 9

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • github-actions[bot] (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/ci.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • julia-actions/julia-buildpkg latest composite
  • julia-actions/julia-runtest latest composite
  • julia-actions/setup-julia v1 composite