/rosettacode

submissions to the RosettaCode programming chrestomathy site

Primary LanguageForth

rosettacode

Various submissions to the RosettaCode programming chrestomathy site.

The site is called after the https://en.wikipedia.org/wiki/Rosetta_Stone - an ancient stele with identical text written in Greek and Egyptian; the stele was a key to deciphering previously unknown Egyptian writing. The RosettaCode site presents a number of simple programming tasks implemented in multiple programming languages each, thus exposing languages properties.

Chaos game

https://github.com/chmykh/rosettacode/blob/master/rosettacode/chaos.fsx

http://rosettacode.org/wiki/Chaos_game#F.23

Numerical integration

https://github.com/chmykh/rosettacode/blob/master/rosettacode/integration.fsx

http://rosettacode.org/wiki/Numerical_integration#F.23

Markov chain text generator

Very simple but efficient non-machine-learning, non-neural-network artificial text generator. One of few algorithms that generate good results on unprepared texts in Russian (try War and Peace).

https://github.com/chmykh/rosettacode/blob/master/rosettacode/markov.fsx

https://rosettacode.org/wiki/Markov_chain_text_generator#F.23

2048 game

The popular (non-deterministic) 4x4 board game in F# interactive console

https://github.com/chmykh/rosettacode/blob/master/rosettacode/2048.fsx

http://rosettacode.org/wiki/2048#F.23

15 puzzle

The popular (deterministic) 4x4 board game together with IDDFS solver, in the low-level language Forth

Game

https://github.com/chmykh/rosettacode/blob/master/15_puzzle_game.fs

http://rosettacode.org/wiki/15_Puzzle_Game#Forth

Solver

https://github.com/chmykh/rosettacode/blob/master/15_puzzle_solver.fs

http://rosettacode.org/wiki/15_puzzle_solver#Forth

Combined game and solver

As both the interactive game and the automatic solver works on the same domain, it is natural the vocabulary is mostly overlaps, so it is reasonable to ship it together.

https://github.com/chmykh/rosettacode/blob/master/15_puzzle.fs

Reverse words in a string

The tiny task where the Forth's implicit stack is a perfect fit.

https://github.com/chmykh/rosettacode/blob/master/reverse_words.fs

http://rosettacode.org/wiki/Reverse_words_in_a_string#Forth

Comma quibbling

https://github.com/chmykh/rosettacode/blob/master/comma_quibbling.fs

http://rosettacode.org/wiki/Comma_quibbling#Forth

Snake

https://github.com/chmykh/rosettacode/blob/master/snake.c

http://rosettacode.org/wiki/Snake#C