1. Home
  2. /
  3. Thue Typing Test
  4. /
  5. Hello World in Thue

Hello World in Thue - Thue Typing CST Test

Skip to main content
CodeSpeedTest
Languages
Start TypingJump into a test — pick any languageAdaptive TrainingUnlock chars as you master themPractice DrillsFocused sessions targeting weak spotsDaily ChallengesNew coding challenges every dayRace ModeCompete against others in real timeAI OpponentRace against an AI at your WPM levelTournamentsLive coding speed tournamentsArcade GamesZType, Overkill Survival, Glyphica & moreGamificationXP, coins, badges & quests
LeaderboardGlobal rankings for every languageCertificatesEarn verifiable Bronze / Silver / Gold certsActivityDaily streaks & historical analyticsProfileYour stats, badges & achievements
Browse Languages500+ languages with real code examplesBlogTips, guides & deep divesFree ToolsWPM calculator, typing speed report & moreFAQCommon questions answeredGetting StartedNew to CodeSpeedTest?AboutOur story & missionSupportGet help — Pro users get priorityContactGet in touch with the team
Pricing
Mode:
Duration:
1
2
3
4
5
::=

::=Hello World!

::=::
Coding works best on desktop or with an external keyboard.
CodeSpeedTest

Improve your coding speed, code accuracy, and programming syntax WPM with practice sessions across 500+ programming languages.

Quick Links

HomeAboutFeaturesGetting StartedLanguages

Legal & Support

Pro ⚡ PricingContactPrivacy PolicyTerms of Service

Connect

CodeSpeedTest on GitHubCodeSpeedTest on TwitterEmail CodeSpeedTest

© 2026 CodeSpeedTest. All rights reserved.

Hello World in Thue — Thue Code

A simple Thue program that outputs 'Hello World!'. The rules transform an initial start symbol into the target string.

::=

::=Hello World!

::=::

Thue Language Guide

Thue is an abstract computational model based on string rewriting systems. It allows defining rules to transform strings, serving as a theoretical model for computation and a framework for exploring universal computation.

Primary Use Cases

  • ▸Study of formal languages and rewriting systems
  • ▸Turing-completeness demonstrations
  • ▸Exploration of non-deterministic algorithms
  • ▸Teaching computational theory concepts
  • ▸Theoretical experiments in automata and computation

Notable Features

  • ▸Pattern-based string rewriting
  • ▸Support for non-deterministic rule application
  • ▸Turing-complete computational model
  • ▸Minimalistic and formal
  • ▸Flexible for theoretical exploration

Origin & Creator

Thue was created in 1914 by the Norwegian mathematician Axel Thue to study sequences and combinatorial problems in strings; it later became recognized as a model of computation.

Industrial Note

Thue is mainly of academic and theoretical interest, used in formal language research, computational theory, and exploring Turing-completeness in minimal systems.

Quick Explain

  • ▸Uses string rewriting rules of the form ‘pattern -> replacement’.
  • ▸Can simulate any Turing-complete computation.
  • ▸Non-deterministic or deterministic execution depending on rule application.
  • ▸Primarily theoretical, but has been used to explore formal language theory and computation.
  • ▸Instructive for understanding the foundations of computation and algorithmic processes.

Core Features

  • ▸Alphabet - finite set of symbols
  • ▸Strings - sequences over the alphabet
  • ▸Rules - pattern -> replacement transformations
  • ▸Initial string - starting state of computation
  • ▸Halting condition - no more applicable rules

Learning Path

  • ▸Understand basic string rewriting
  • ▸Study Thue rules and notation
  • ▸Explore deterministic vs non-deterministic applications
  • ▸Simulate simple Thue programs
  • ▸Read about Thue’s Turing-completeness

Practical Examples

  • ▸String reversal via Thue rules
  • ▸Generating arithmetic sequences
  • ▸Simulating finite automata transformations
  • ▸Encoding small algorithms as Thue programs
  • ▸Demonstrating universal computation

Comparisons

  • ▸Thue vs Turing Machine: abstract but equivalent computational power
  • ▸Thue vs Lambda Calculus: string-based vs function-based
  • ▸Thue vs Post systems: generalization of rewriting systems
  • ▸Thue vs Regular Expressions: more powerful, Turing-complete
  • ▸Thue vs Practical languages: educational and theoretical only

Strengths

  • ▸Simple yet universal computational model
  • ▸Demonstrates Turing-completeness in minimal form
  • ▸Useful for educational purposes in computation theory
  • ▸Explores non-determinism and computational paths
  • ▸Highly abstract, applicable to various formal systems

Limitations

  • ▸Not practical for real-world programming
  • ▸Execution can be highly inefficient
  • ▸Non-deterministic versions are hard to analyze
  • ▸Limited tooling and software support
  • ▸Requires strong theoretical background to use effectively

When NOT to Use

  • ▸For practical software development
  • ▸Large-scale data processing
  • ▸Performance-critical applications
  • ▸Production system automation
  • ▸Tasks requiring libraries, APIs, or GUI

Cheat Sheet

  • ▸Alphabet = set of symbols
  • ▸String = sequence of symbols
  • ▸Rule = pattern -> replacement
  • ▸Initial string = starting state
  • ▸Halting = no applicable rules remain

FAQ

  • ▸Is Thue a programming language? -> No, theoretical model.
  • ▸Can Thue simulate any computation? -> Yes, it is Turing-complete.
  • ▸Does Thue require a computer? -> Can be simulated manually or in software.
  • ▸Is Thue practical for production? -> No, purely theoretical.
  • ▸Where is Thue studied? -> Computational theory, formal languages, automata.

30-Day Skill Plan

  • ▸Week 1: Simple string replacements
  • ▸Week 2: Deterministic Thue programs
  • ▸Week 3: Non-deterministic transformations
  • ▸Week 4: Encode basic algorithms
  • ▸Week 5: Explore Turing-complete constructions

Final Summary

  • ▸Thue is a theoretical string rewriting system and computational model.
  • ▸It uses rules to transform strings to explore universal computation.
  • ▸Deterministic or non-deterministic execution allows modeling algorithms.
  • ▸Primarily used in academia to study formal languages and computation.
  • ▸Provides insight into minimalistic Turing-complete systems.

Project Structure

  • ▸rules.thue - file defining pattern -> replacement rules
  • ▸input.txt - initial string(s) to transform
  • ▸output.txt - resulting strings after computation
  • ▸logs/ - optional, tracks transformation steps
  • ▸docs/ - notes on rules and expected behaviors

Monetization

  • ▸Primarily academic, no direct monetization
  • ▸Educational toolkits for computation theory
  • ▸University courses and textbooks
  • ▸Workshops and seminars
  • ▸Research publications

Productivity Tips

  • ▸Start with simple rules
  • ▸Visualize derivations for understanding
  • ▸Use consistent notation
  • ▸Document transformations
  • ▸Experiment incrementally

Basic Concepts

  • ▸Alphabet - set of allowed symbols
  • ▸String - sequence of symbols
  • ▸Rule - defines how substrings can be replaced
  • ▸Initial string - starting point for rewriting
  • ▸Halting - when no rules match

Official Docs

  • ▸https://en.wikipedia.org/wiki/Thue_system
  • ▸https://www.cs.umd.edu/~gasarch/TOPICS/thue.html

More Thue Typing Exercises

Simple IncrementSimple DecrementPrint Numbers 1 to 3Swap Two SymbolsSimple Copy RuleConditional Output ExamplePalindrome CheckReverse StringFactorial Concept

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher