Skip to content

Playground for WokeLang - Human-centric programming language

License

Notifications You must be signed in to change notification settings

hyperpolymath/wokelang-playground

Repository files navigation

WokeLang Playground

MPL-2.0 Palimpsest

WokeLang Human-Centric

Playground for WokeLang - Human-Centric Programming Language

Overview

WokeLang is designed to be human-centric, prioritizing readability, accessibility, and inclusive design in programming.

Key Features

  • Natural Syntax: Read like natural language

  • Accessibility: Screen reader friendly output

  • Inclusive Naming: Guidelines for inclusive code

  • Error Messages: Helpful, non-judgmental errors

Language Design

Natural Language Syntax

-- Reads naturally
define greeting as "Hello, World!"
display greeting

-- Conditional logic
if user is authenticated then
    show welcome_message
otherwise
    redirect to login_page

Accessible Code

-- Accessible output annotations
@accessible
@aria_label("User profile section")
component UserProfile:
    display user.name as heading level 1
    display user.bio as paragraph

Inclusive Guidelines

-- Built-in inclusive naming suggestions
-- The compiler suggests alternatives:
-- "master/slave" -> "primary/replica"
-- "whitelist/blacklist" -> "allowlist/blocklist"
-- "dummy" -> "placeholder"

configuration:
    primary_server: "main.example.com"
    replica_servers: ["backup1.example.com"]
    allowlist: ["trusted.example.com"]

Helpful Errors

-- Instead of: "Error: undefined variable 'nam'"
-- WokeLang says:
-- "It looks like 'nam' hasn't been defined yet.
--  Did you mean 'name'? (defined on line 5)
--  Here's how to define a new variable:
--    define nam as your_value"

Getting Started

guix install wokelang
wokelang run greeting.woke

Examples

  • accessible/ - Accessibility-focused examples

  • natural/ - Natural language syntax demos

  • inclusive/ - Inclusive coding patterns

License

SPDX-License-Identifier: PMPL-1.0

About

Playground for WokeLang - Human-centric programming language

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •