Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AbuLang Web IDE

A browser-based IDE for AbuLang that works on Windows, Linux, and any device with a web browser.

πŸš€ Quick Start

Option 1: Python Server (Recommended)

Windows:

cd web
python serve.py

Linux:

cd web
python3 serve.py

The browser will open automatically at http://localhost:8000

Option 2: Direct File Open

Simply open index.html in your web browser:

  • Double-click index.html
  • Or drag it into your browser

Option 3: Live Server (VS Code)

If you have VS Code with Live Server extension:

  1. Right-click index.html
  2. Select "Open with Live Server"

πŸ“± Features

  • βœ… No Installation Required - Runs entirely in the browser
  • βœ… Cross-Platform - Works on Windows, Linux, macOS, Android, iOS
  • βœ… Offline Support - Works without internet (after first load)
  • βœ… Mobile Friendly - Responsive design for phones and tablets
  • βœ… Code Examples - Built-in examples to get started
  • βœ… Save/Load - Save your code in browser storage
  • βœ… Keyboard Shortcuts - F5 to run, Ctrl+S to save

🎯 Supported AbuLang Features

βœ… Working

  • show - Display output
  • plus(), minus(), multi(), divid() - Math operations
  • expon(), modul() - Power and modulo
  • strip(), lower(), upper(), lengt() - String operations
  • Variables and assignments
  • =: Inverse walrus operator
  • check/if statements
  • loopf/for loops
  • while loops
  • break, continue

⚠️ Limited

  • ask - Uses browser prompt() (blocks execution)
  • File operations - Not available in browser
  • Import libraries - JavaScript only

❌ Not Available

  • Python libraries (math, statistics, etc.)
  • File I/O (readf, write)
  • System commands (execa, listd)
  • GUI (tkinter, pygame)

πŸ“ Usage

Basic Example

show "Hello, World!"

x = 10
y = 5
result = plus(x, y)
show result

Loops

loopf i in range(5):
    show i

Inverse Walrus

y = 6
x =: 12
# Shows: x>y 12

⌨️ Keyboard Shortcuts

  • F5 - Run code
  • Ctrl+Enter - Run code
  • Ctrl+S - Save code
  • Tab - Insert 4 spaces (in editor)

🌐 Deploy to Web

GitHub Pages

  1. Push the web/ folder to GitHub
  2. Go to Settings > Pages
  3. Select branch and /web folder
  4. Your IDE will be at: https://username.github.io/repo/

Netlify

  1. Drag the web/ folder to Netlify Drop
  2. Get instant URL
  3. Optional: Configure custom domain

Vercel

cd web
vercel

πŸ”§ Customization

Change Theme

Edit style.css:

:root {
    --primary: #3498db;  /* Change primary color */
    --secondary: #2c3e50; /* Change secondary color */
}

Add Examples

Edit app.js:

const examples = {
    myexample: `# My Example
show "Hello!"`,
};

πŸ“¦ Files

  • index.html - Main HTML structure
  • style.css - Styling and theme
  • abulang-interpreter.js - AbuLang interpreter
  • app.js - Application logic
  • serve.py - Development server
  • manifest.json - PWA configuration

πŸ› Troubleshooting

Code doesn't run

  • Check browser console (F12) for errors
  • Make sure syntax is correct
  • Try the examples first

Server won't start

  • Make sure port 8000 is not in use
  • Try a different port: python serve.py 3000
  • Check firewall settings

Styles not loading

  • Hard refresh: Ctrl+F5 (Windows) or Cmd+Shift+R (Mac)
  • Clear browser cache
  • Check browser console for errors

πŸš€ Advanced

Add Service Worker (Offline Support)

Create sw.js:

self.addEventListener('install', (e) => {
    e.waitUntil(
        caches.open('abulang-v1').then((cache) => {
            return cache.addAll([
                '/',
                '/index.html',
                '/style.css',
                '/app.js',
                '/abulang-interpreter.js'
            ]);
        })
    );
});

Register in index.html:

if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('/sw.js');
}

πŸ“„ License

Same as AbuLang main project.

🀝 Contributing

Contributions welcome! To add features:

  1. Edit abulang-interpreter.js for language features
  2. Edit app.js for UI features
  3. Edit style.css for styling
  4. Test in multiple browsers

πŸ”— Links

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages