Author Topic: Pastel - cross-platform app framework  (Read 694 times)

AliZairov

  • New Member
  • *
  • Posts: 21
Pastel - cross-platform app framework
« on: November 01, 2026, 07:05:17 pm »
Hello. I haven’t been around much lately due to a heavy workload. While I’m no longer actively involved in programming, I haven’t forgotten Pascal/Delphi. I’ve realized that some of the concepts I dreamed up years ago can now be brought to life using artificial intelligence. I recently discussed a tool I had in mind with Claude, and through our conversation, I asked it to develop a more modern, streamlined tool using the Free Pascal compiler. It’s something that can be further developed if you’re interested. I’ll provide updates whenever I find the time.

If you’d like to take a look, I’ve added it to a GitHub repository. https://github.com/azrov/pastel

Pastel
A modern cross-platform app framework and toolchain for Object Pascal.

Write your app once in Object Pascal and run it on the desktop, on servers and on Raspberry Pi — and, next, on Android phones. Pastel is built on top of the Free Pascal compiler and brings a modern developer experience: a simple command-line tool, clear project conventions, forms with hot reload, and a UI drawn by Pastel itself so it looks the same everywhere.

Why Pastel?
Object Pascal is a fast, readable, compiled language with a loyal community. But today you have two choices:

Delphi is powerful and modern, but commercial.
Lazarus is free and open source, but its IDE and workflow feel dated, and mobile support is limited.
Pastel aims to be the missing piece: free, open source, modern, and easy to set up.

Project structure
myapp/
├── pastel.toml        project settings
├── src/
│   ├── main.pas       entry point
│   ├── forms/         screens: Home.pform + Home.pas
│   ├── models/        data classes
│   └── services/      business logic, HTTP, database
├── assets/            images, fonts, translations
├── platforms/         platform-specific settings and icons
├── tests/
└── build/             build output (not committed)
« Last Edit: November 03, 2026, 08:37:45 pm by AliZairov »

MarkMLl

  • Hero Member
  • *****
  • Posts: 8606
Re: Pastel
« Reply #1 on: November 02, 2026, 08:14:07 am »
I'd suggest finding a different name. Pastel is an early and historically-significant systems programming dialect of Pascal.

https://forum.lazarus.freepascal.org/index.php/topic,64224.msg487827.html#msg487827

https://en.wikipedia.org/wiki/Pastel_(programming_language)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

440bx

  • Hero Member
  • *****
  • Posts: 6628
Re: Pastel
« Reply #2 on: November 02, 2026, 11:02:56 am »
I'd suggest finding a different name. Pastel is an early and historically-significant systems programming dialect of Pascal.
I second that.

When I saw the title "Pastel", I thought it was going to be something about the Pastel compiler which I have always been very interested in getting as much information about it as possible.  I admit being disappointed to see that the post had nothing to do with the Pastel language.

Like you, I do think it would be a good idea to rename this post's related project to something else. 
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8606
Re: Pastel
« Reply #3 on: November 03, 2026, 08:18:26 am »
Exactly what I assumed. Its historical significance is that like Kernighan's critique https://ia800601.us.archive.org/15/items/pascal-not-my-favorite/Image092317211255_text.pdf it identified flaws apparent to somebody trying to use Pascal for "real work" in the late 1970s, which were either addressed by "popularising" implementations such as UCSD and Turbo or demonstrated to be misconceptions.

The fact that the S-1 project plus various Crays etc. demonstrated that Pascal /could/ be used as a systems programming language attests to the efficacy of cautious extensions applied to Pascal's underlying design which emphasised strong type checking etc.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 13053
  • FPC developer.
Re: Pastel
« Reply #4 on: November 03, 2026, 09:39:54 am »
Worse, Kernighan was still selling his Pascal books at the time.

AliZairov

  • New Member
  • *
  • Posts: 21
Re: Pastel
« Reply #5 on: November 03, 2026, 08:33:50 pm »
Hello. Thank you for the feedback. I wasn't aware of this, so thanks for bringing it to my attention. I had simply chosen the name "Pastel" because it sounded similar to "Pascal." From your responses, I gather that the "Pastel" tool—created for the Amber operating system—is an extended version of Pascal. My own goal is to develop a toolkit that can run smoothly on a select number of operating systems. I am currently experimenting with it on Android and will add it to the repository soon. I don't intend to change the name; I quite like "Pastel." It’s a project I started for myself, born out of curiosity and imagination—I just wanted to share it with you all.

AliZairov

  • New Member
  • *
  • Posts: 21
Re: Pastel - cross-platform app framework
« Reply #6 on: November 07, 2026, 08:42:34 pm »
New version 1.5.0 beta 9

Phones, tablets, TVs and windows of every size (forms.md).

ScreenClass (scPhone, scTablet, scDesktop, scTV) and OnScreenClassChange on forms; a narrow window on a computer counts as a phone; PASTEL_SCREEN=phone|tablet|tv|desktop tries one
Views, like FireMonkey's: Home.tablet.pform (also phone, tv, desktop) next to Home.pform changes values for that kind of screen — sizes, places, fonts, texts, Visible; applied when the app starts and when the screen changes, undone when another screen has none; a TV uses the tablet's view; pastel build and pastel check make sure a view has only the form's controls; hot reload watches view files too
MaxContentWidth on forms and containers: the controls in the middle, at most that wide
A TV's remote: the arrows move the focus to the nearest control in that direction, with a clear ring; OK presses, ticks, brings the keyboard; on Android always, on a computer with PASTEL_SCREEN=tv
Android: the text size of the phone's settings (up to 1.3 times); apps are on Android TV's home screen, with a banner made from the icon, and need no touch screen
Android: the on-screen keyboard comes up for an edit on every phone and TV box — Pastel's activity has an editor view the keyboard types into (NativeActivity's own view is not one, so many devices showed no keyboard); a tap on an edit brings it back after the back button closed it
The keyboard an edit needs: KeyboardType on TEdit and TMemo (ktNumber, ktDecimal, ktPhone, ktEmail, ktUrl, ktTime; FireMonkey's name); TNumberEdit, TCurrencyEdit and TTimeEdit choose by themselves; Password gets a password keyboard
ReturnKeyType: what the keyboard's Enter key says and does — Done, Next (to the next control), Go, Search, Send; in a TMemo Enter makes a new line
Word suggestions of the keyboard (composing text) and its Backspace work
pastel logcat: the log of the app on the connected Android device, by its package name — its processes (learned from the system's start lines and the process list), its start and end, crash reports; a crash shows the Pascal function and line (<- ClearClick (Home.pas:33), from the debug build); --all, --clear; the whole log is saved in build/android/logcat.txt
pastel run --target android shows the app's log the same way (before: only some tags, without native crashes' libc lines)
New targets: android-arm (ARM 32-bit: older phones, TV boxes; Android 4.4 and newer), android-x86_64 (the Android emulator on a PC) and android-x86, besides android-arm64
pastel doctor --install android sets up all of them whose binutils are installed; the ARM 32-bit and x86 compilers are built from Free Pascal's sources (fpc-source, or the source archive with FPCDIR) in seconds — no NDK, no fpcupdeluxe
pastel package apk makes one .apk with every kind set up (lib/arm64-v8a, lib/armeabi-v7a, lib/x86_64, lib/x86), or one kind with --target; apps install on Android 4.4 and newer; libraries carry both kinds of symbol tables for older Android
pastel run --target android asks the phone or emulator for its CPU and builds for that
The app's icon: pastel new app puts Pastel's icon in assets/icon.png, ready to be replaced; Linux docks match the window to the app's menu entry (StartupWMClass, the window's class); forms.md says where the icon shows up

Pastel 1.5.0-beta.9
VSCode extension 1.5.5

 

TinyPortal © 2005-2018