8000 GitHub - ghuntley/cursed: this is not ready yet; do not share on socials please.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ghuntley/cursed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

✨ CURSED Programming Language πŸ”₯

OMG! CURSED is like, THE MOST iconic programming language that's giving major Go grammar vibes but with Gen Z slang for the keywords?! πŸ’… It's literally a self-compiling compiler written in Rust and I'm obsessed! 😍

The Tea on CURSED β˜•

CURSED is lowkey based on Go's practical design but like, replaces all those boring programming keywords with Gen Z slang that slaps so hard! It's such a vibe while still being fully functional, no cap! πŸ™Œ

New Generic Programming Features! πŸ”₯

CURSED now supports next-level generic programming with:

  • Type Parameters: Write code that works with multiple types (squad Container<T>)
  • Constraint System: Ensure type safety with powerful constraints (where T: Clone + Display)
  • Zero-Cost Abstractions: Generics compile to optimized native code
  • Advanced Features: Higher-kinded types, associated types, and variance support

Check out the Generics Guide for the full tea! β˜•

Type Switches - Runtime Type Dispatch! 🎯

CURSED features powerful type switches for handling interface values:

  • Runtime Type Checking: Branch based on actual types (vibe_check value.(type))
  • Variable Binding: Automatic type casting with v := value.(type)
  • Multiple Types: Handle related types in single cases (mood int, int32, int64:)
  • Interface Integration: Seamless work with interface hierarchies

Check out the Type Switch Guide and Tutorial! πŸ”₯

Example CURSED code (it ATE and left no crumbs):

vibe main

yeet "vibez"

slay main() {
    vibez.spill("Hello, World!")  fr fr This is a comment
    
    sus name tea = "bestie"
    vibez.spillf("Hey %s, what's good?", name)

    lowkey 1 < 2 {
        vibez.spill("This is based!")
    } highkey {
        vibez.spill("This is sus!")
    }
}

Self-Compiling Compiler (so extra!) πŸ’―

CURSED is literally built different with this bootstrapping compiler approach:

  1. Stage 0: Bootstrap environment setup using Rust (so basic but necessary) πŸ™„
  2. Stage 1: Minimal bootstrap compiler in Rust (starting to serve) πŸ‘€
  3. Stage 2: Full compiler written in CURSED (the main character energy) ⭐
  4. Stage 3: Self-compiled full compiler (iconic behavior) πŸ’β€β™€οΈ

Project Structure (we stay organized, periodt!) πŸ“

  • /src: Compiler source code (core behavior, pretty much carrying) πŸ’…
  • /specs: Language specifications and docs (the rulebook, very that) πŸ“
  • /examples: Example CURSED programs (slay examples) ✨
  • /tests: Test suite for the compiler (we don't flop, we test) βœ…

Getting Started (no gatekeeping here!) πŸš€

Prerequisites (the fit check before coding) πŸ‘—

  • Rust toolchain (1.54.0 or later) βš™οΈ
  • Cargo πŸ“¦

Building (so you can build that) πŸ”¨

make build

Running Tests (gotta check the vibes) πŸ§ͺ

make test

Running the Compiler (it's giving main character energy) πŸ’»

make run ARGS="path/to/your/file.csd"

Formatting Your Code (keep it aesthetic!) ✨

CURSED comes with a built-in formatter that makes your code look absolutely iconic:

# Format a single file
cursed-fmt -w main.csd

# Format entire project
cursed-fmt -w src/

# Check if formatting is needed (perfect for CI)
cursed-fmt --check src/

The formatter supports customizable styling through .cursed-fmt.toml config files. It's giving consistency! πŸ’…

Developer Tools (the full toolkit, bestie!) 🧰

Code Formatter (cursed-fmt)

  • Auto-formatting: Makes your code look clean and consistent
  • Editor integration: Works with VSCode, Vim, and more
  • CI/CD support: Perfect for automated checks
  • Customizable: Configure to match your team's style

Quick start:

# Install the formatter
make build-formatter

# Format your code
cursed-fmt -w .

# Set up pre-commit hooks
cp examples/formatter/integration/pre-commit .git/hooks/

πŸ“– Complete Formatter Guide | πŸ”§ Developer API

Documentation Generator (cursed-doc)

  • Comprehensive docs: Auto-generates beautiful HTML documentation
  • Live server: Development server with auto-reload
  • Multiple formats: HTML, Markdown, JSON output
  • Cross-references: Automatic linking between code components
  • Search integration: Full-text search with syntax highlighting

Quick start:

# Generate HTML documentation
make docs

# Serve docs locally with auto-reload
make docs-serve

# Generate Markdown documentation
make docs-markdown

# Check documentation completeness
make docs-check

πŸ“– Documentation Guide | πŸ”§ Configuration Reference

File Watcher (cursed build --watch)

  • Auto-rebuild: Instantly rebuild when source files change
  • Smart filtering: Watch only relevant files with pattern matching
  • Event batching: Efficient handling of multiple rapid changes
  • Cross-platform: Works seamlessly on Linux, macOS, and Windows
  • Performance tuned: Optimized for projects of any size

Quick start:

# Watch and auto-build current project
cursed build --watch

# Watch specific patterns
cursed build --watch --patterns "*.csd,*.toml"

# Watch with custom debounce (milliseconds)
cursed build --watch --debounce 1000

# Watch and run tests automatically
cursed test --watch

πŸ“– File Watching Guide | πŸ”§ Configuration Examples

Language Documentation (real ones read the docs) πŸ“š

The complete language specifications are available in the /specs directory (we ate with these specs):

Contributing (join the CURSED group chat) πŸ‘―β€β™€οΈ

Contributions are welcome, bestie! Your pull requests can absolutely slay! Fork and go off! πŸ’…

License πŸ“œ

This project is licensed under the MIT License - see the LICENSE file for the deets. It's giving open source! 🀩

About

this is not ready yet; do not share on socials please.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published
0