Recent posts

#21
newLISP newS / Re: Forked newLISP – Meet Rebe...
Last post by ufko - November 16, 2025, 09:53:32 AM
OK, Rebel v1.0 is out.

Clean build on OpeBSD 7.8 Lenovo x270
Clean build on Ubuntu Linux using Github Actions

$: rebel
Rebel v.1.0 64-bit on BSD IPv4/6 UTF-8 libffi, options: rebel -h

rebel: /home/ufko/me/c/rebel/src
main >
Buffer/Memory overflow warnings/potential errors eliminated.
Strings truncation warnings eliminated.
Ignored return values eliminated.
No linker warnings.
Lutz's Park & Miller algo in my_random() unused now.
C function random() replaced with arc4random() everywhere.

Build Report HERE

I believe Rebel v1.0 is currently the most stable incarnation of the newLISP codebase.
...
#22
newLISP newS / Re: Forked newLISP – Meet Rebe...
Last post by ufko - November 15, 2025, 01:40:45 PM
Thank you for your kind words, itistoday :)

Rebel runs on OpenBSD 7.8 and Ubuntu Linux.
For Linux test builds, I use GitHub Actions
(https://github.com/ufko-org/rebel/actions)
because I don't have a Linux machine.

I would appreciate it if someone could test it
on a real Linux machine and report the results:

1. Clone the repo
2. cd src
3. Run `make -f Makefile.linux`
4. Start `./rebel`

:)

There are some compiler warnings and notes on Linux,
but I'm working on fixing them.

#23
newLISP newS / Re: Forked newLISP – Meet Rebe...
Last post by itistoday - November 15, 2025, 01:15:16 PM
Woah this is awesome! Congrats Ufko! I'm excited to see where this goes, please keep us posted of updates!
#24
newLISP newS / Forked newLISP – Meet Rebel
Last post by ufko - November 15, 2025, 04:43:59 AM
Hi guys,

I've forked newLISP 10.7.6 and made a few targeted changes:

    Removed compiler warnings
    Fixed or double-checked known bugs from the forum
    Refactored some internal structures for clarity
    Renamed files to match the new project name Rebel
    On BSD platforms, rebel-math.c now uses arc4random() for random numbers

Reasons for the fork, refactor, and renaming:

    Clear project identity 
    Wider adoption if it's not called newLISP 
    Less hate and flamewars 
    End of endless comparisons with LISP 
    Lutz had revolutionary thinking and was a rebel in his own way 
    Independence of development and ability to make internal changes 
    Better communication with new users 
    Motivation for contributors 
    Clear distinction for documentation, tutorials, and community

Just like most users, for example, don't perceive Clojure as a "new Lisp" but as a language with Lisp-like syntax that integrates smoothly into the JVM world, Rebel can be perceived similarly, as a Lisp-like tool that integrates smoothly with the C world.

It now runs cleanly on OpenBSD 7.8, 64-bit, UTF-8, with libffi support.

⚡gringo ~/me/c/rebel/src $: make
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-symbol.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-math.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-list.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-liststr.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-string.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-filesys.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-sock.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-import.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-xml-json.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-web.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-matrix.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-debug.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI rebel-utf8.c
cc -m64 -Wall -fno-strict-aliasing -O2 -c -g  -I/usr/local/include -DREADLINE -DREBEL64 -DSUPPORT_UTF8 -D_BSD -DFFI pcre.c
cc rebel.o  rebel-symbol.o  rebel-math.o  rebel-list.o  rebel-liststr.o  rebel-string.o  rebel-filesys.o  rebel-sock.o  rebel-import.o  rebel-xml-json.o  rebel-web.o  rebel-matrix.o  rebel-debl
ld: warning: rebel-web.c:1389(rebel-web.o:(handleHTTPcgi)): warning: random() may return deterministic values, is that what you want?
strip rebel

⚡gringo ~ $: rebel -n
rebeL v.0.1 64-bit on BSD IPv4/6 UTF-8 libffi, options: rebel -h

>

Functionality remains fully compatible with newLISP.

If you edit your Makefile contents, it should compile without problems.

I've bought the domain
https://rebel-lang.org

I've created an empty GitHub organization at
github.com/rebellang

For now, the repository is hosted under my account:
https://github.com/ufko-org/rebel

I fully respect GPL3 and Lutz's copyright.
Everyone is welcome to test the code.
Everyone is welcome to provide feedback, and share suggestions here in the forum for now.

And so I don't forget: scripts have the .rbl extension... Surprisingly 😄

Cheers, Ufko
#25
newLISP in the real world / Re: regex-all
Last post by cameyo - June 15, 2025, 08:52:37 AM
Thanks.
You reminder me of 'collect' ... :)
#26
newLISP newS / Re: Wisp to new lisp
Last post by rrq - June 13, 2025, 09:11:43 PM
Yes I like parentheses too 8) . I remember Interlisp having square brackets as "meta parentheses" so as to avoid strings of stopping parentheses; the two forms interoperated so that ']' closed all '(' to match prior balancing '[', and likewise ')' closed all '[' to match prior balancing '('.
One could then write for example the following
(define (factorial n)
    [if (zero? n)
        1
        (* n (factorial (- n 1 ] )
Perhaps it's clearer? But the reader has to know the syntax in any case.
#27
newLISP in the real world / Re: regex-all
Last post by rrq - June 13, 2025, 06:53:48 PM
I suppose one might use find-all for that. Though, find-all doesn't provide the character index, and it doesn't provide the match overlap variant. It wouldn't be terribly hard to patch the source to make find-all offer the index (eg as $index) similar to the match count.

However, one can use collect and a small helper function to get the following alternative solution:
> (define (regex-all EXP STR OPT ALL)
  (let ((i 0)
     (move-i (fn (X) (setq i (+ (X 1) (if ALL 1 (X -1)))) X)))
      (collect (if (regex EXP STR OPT i) (move-i $it)))))

> (setq a "AAAaBAAAABcADccAAAB")
> (regex-all "[A]{3}" a 0)
(("AAA" 0 3) ("AAA" 5 3) ("AAA" 15 3))
> (regex-all "[A]{3}" a 0 true)
(("AAA" 0 3) ("AAA" 5 3) ("AAA" 6 3) ("AAA" 15 3))

EDIT: I fixed to use EXP rather than hard-coded search pattern.
#28
newLISP newS / Re: Wisp to new lisp
Last post by itistoday - June 13, 2025, 04:44:12 PM
Yeah same here, parenthesis make everything easy to understand for me, I honestly don't get why anyone hates them.
#29
newLISP in the real world / regex-all
Last post by cameyo - June 13, 2025, 07:49:32 AM
Does anyone know of any more efficient methods than the following to calculate all the matches of a regex?
Thanks.
(define (regex-all regexp str all)
"Find all occurrences of a regex in a string"
  (let ( (out '()) (idx 0) (res nil) )
    (setq res (regex regexp str 64 idx))
    (while res
      (push res out -1)
      (if all
          (setq idx (+ (res 1) 1))        ; contiguos pattern (overlap)
          (setq idx (+ (res 1) (res 2)))) ; no contiguos pattern
      (setq res (regex regexp str 64 idx)))
    out))

(setq a "AAAaBAAAABcADccAAAB")
(regex "[A]{3}" a)
;-> ("AAA" 0 3)
(regex-all "[A]{3}" a)
;-> (("AAA" 0 3) ("AAA" 5 3) ("AAA" 15 3))
(regex-all "[A]{3}" a true)
;-> (("AAA" 0 3) ("AAA" 5 3) ("AAA" 6 3) ("AAA" 15 3))
#30
newLISP newS / Re: Wisp to new lisp
Last post by cameyo - June 07, 2025, 10:36:27 AM
Interesting, but I'm fond of parentheses. :)