[PATCH] gnu: Add quirrel

  • Open
  • quality assurance status badge
Details
2 participants
  • Andy Tai
  • Ludovic Courtès
Owner
unassigned
Submitted by
Andy Tai
Severity
normal
A
A
Andy Tai wrote on 17 Apr 2023 02:10
(address . guix-patches@gnu.org)(name . Andy Tai)(address . atai@atai.org)
20230417001037.6464-1-atai@atai.org
* gnu/packages/squirrel.scm (quirrel): New variable
---
gnu/packages/squirrel.scm | 64 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)

Toggle diff (88 lines)
diff --git a/gnu/packages/squirrel.scm b/gnu/packages/squirrel.scm
index 1b9489882f..818f04ebf9 100644
--- a/gnu/packages/squirrel.scm
+++ b/gnu/packages/squirrel.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2019 Li-cheng (Andy) Tai <atai@atai.org>
+;;; Copyright © 2019, 2023 Li-Cheng (Andy) Tai <atai@atai.org>
;;
;;; This file is part of GNU Guix.
;;;
@@ -22,6 +22,7 @@ (define-module (gnu packages squirrel)
#:use-module (gnu packages sphinx)
#:use-module (guix build-system cmake)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build utils)
#:use-module (guix packages)
@@ -81,3 +82,64 @@ (define-public squirrel
size, memory bandwidth, and real-time requirements of applications like video
games.")
(license license:expat)))
+
+
+
+(define-public quirrel
+ (package
+ (name "quirrel")
+ (version "4.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/GaijinEntertainment/quirrel.git")
+ (commit "bef3fc5")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "10pd1l8gbp8kyak9caklp061nnp2lqvnb21wwg7zjd75pp0xf63s"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:configure-flags '("-DDISABLE_STATIC=ON")
+ #:tests? #f ;no tests
+ #:phases (modify-phases %standard-phases
+ ;; TODO: build and install doc files like squirrel above
+ (add-after 'install 'install-headers
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (include-dir (string-append out "/include")))
+ (mkdir-p include-dir)
+ (for-each (lambda (header-file)
+ (copy-recursively header-file
+ (string-append
+ include-dir "/"
+ (basename header-file))))
+ (find-files "../include"))) #t)))))
+ (native-inputs `(("cmake" ,cmake-minimal)
+ ("python-sphinx" ,python-sphinx)))
+ (home-page "https://github.com/GaijinEntertainment/quirrel")
+ (synopsis "Script language that is based on Squirrel language and is
+inspired by Python, Javascript and especially Lua")
+ (description
+ "Quirrel is a script language that is based on Squirrel language and is
+inspired by Python, Javascript and especially Lua, with
+
+ Lexical scoping
+ Higher order functions, closures and lambda
+ Classes and inheritance
+ Tail recursion
+ Delegation
+ String interpolation
+ Exception handling
+ Cooperative threads (coroutines)
+ Generators
+ Performance - Quirrel is fast and small (comparable with Lua and sometimes even faster)
+ Both compiler and virtual machine fit together in about 13k lines of C++ code and add only around 100kb-150kb the executable size.
+ Automatic memory management (CPU bursts free - reference counting and GC)
+ Optional 16bits characters strings
+ Dynamic typing type system is close to Javascript but stricter and simpler (there is integer type and no 'undefined')
+ Powerful embedding api
+ Modules
+ Hot-reload (if you implement it in your code)
+ Open Source MIT License")
+ (license license:expat)))

base-commit: 9a5e1dc1f16f5f8c056e64f2077b035784003673
--
2.39.2
A
A
Andy Tai wrote on 12 May 2023 01:36
Re: bug#62891: Acknowledgement ([PATCH] gnu: Add quirrel)
(address . 62891@debbugs.gnu.org)
CAJsg1E--HUpYGWb74HqXAN+GuRkX5k-SX+kP45veZZkb6U-EeQ@mail.gmail.com
ping
A
A
Andy Tai wrote on 11 May 18:59 +0200
[PATCH v2] gnu: Add quirrel
(address . 62891@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
129aa222dbae82ff4e2fc85f32a56b6405a63b12.1715446743.git.atai@atai.org
* gnu/packages/squirrel.scm (quirrel): New variable

Change-Id: I3b25604f7c5cc4f046a6421810e3928d5c5ba276
---
gnu/packages/squirrel.scm | 64 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)

Toggle diff (88 lines)
diff --git a/gnu/packages/squirrel.scm b/gnu/packages/squirrel.scm
index 1b9489882f..638f06ab8f 100644
--- a/gnu/packages/squirrel.scm
+++ b/gnu/packages/squirrel.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2019 Li-cheng (Andy) Tai <atai@atai.org>
+;;; Copyright © 2019, 2023 Li-Cheng (Andy) Tai <atai@atai.org>
;;
;;; This file is part of GNU Guix.
;;;
@@ -22,6 +22,7 @@ (define-module (gnu packages squirrel)
#:use-module (gnu packages sphinx)
#:use-module (guix build-system cmake)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build utils)
#:use-module (guix packages)
@@ -81,3 +82,64 @@ (define-public squirrel
size, memory bandwidth, and real-time requirements of applications like video
games.")
(license license:expat)))
+
+
+
+(define-public quirrel
+ (package
+ (name "quirrel")
+ (version "4.6.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/GaijinEntertainment/quirrel.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18xvhssnh5lddi4ava7wzzvsiin8rh3vrbhcblv7l00qv0brh6gg"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:configure-flags '("-DDISABLE_STATIC=ON")
+ #:tests? #f ;no tests
+ #:phases (modify-phases %standard-phases
+ ;; TODO: build and install doc files like squirrel above
+ (add-after 'install 'install-headers
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (include-dir (string-append out "/include")))
+ (mkdir-p include-dir)
+ (for-each (lambda (header-file)
+ (copy-recursively header-file
+ (string-append
+ include-dir "/"
+ (basename header-file))))
+ (find-files "../include"))) #t)))))
+ (native-inputs `(("cmake" ,cmake-minimal)
+ ("python-sphinx" ,python-sphinx)))
+ (home-page "https://github.com/GaijinEntertainment/quirrel")
+ (synopsis "Script language that is based on Squirrel language and is
+inspired by Python, Javascript and especially Lua")
+ (description
+ "Quirrel is a script language that is based on Squirrel language and is
+inspired by Python, Javascript and especially Lua, with
+@itemize
+@item Lexical scoping
+@item Higher order functions, closures and lambda
+@item Classes and inheritance
+@item Tail recursion
+@item Delegation
+@item String interpolation
+@item Exception handling
+@item Cooperative threads (coroutines)
+@item Generators
+@item Performance - Quirrel is fast and small (comparable with Lua and sometimes even faster)
+@item Both compiler and virtual machine fit together in about 13k lines of C++ code and add only around 100kb-150kb the executable size.
+@item Automatic memory management (CPU bursts free - reference counting and GC)
+@item Optional 16bits characters strings
+@item Dynamic typing type system is close to Javascript but stricter and simpler (there is integer type and no 'undefined')
+@item Powerful embedding api
+@item Modules
+@item Hot-reload (if you implement it in your code)
+@end itemize")
+ (license license:expat)))

base-commit: 703ae431f4ad28658e34675310b4fdf58685ccdd
--
2.34.1
L
L
Ludovic Courtès wrote on 11 Jun 23:30 +0200
(name . Andy Tai)(address . atai@atai.org)(address . 62891@debbugs.gnu.org)
87plsnkvzm.fsf@gnu.org
Hi Andy,

Andy Tai <atai@atai.org> skribis:

Toggle quote (4 lines)
> * gnu/packages/squirrel.scm (quirrel): New variable
>
> Change-Id: I3b25604f7c5cc4f046a6421810e3928d5c5ba276

[...]

Toggle quote (4 lines)
> +(define-public quirrel
> + (package
> + (name "quirrel")

Should it (inherit squirrel) since it looks very similar, to avoid
duplication?

Toggle quote (3 lines)
> + (synopsis "Script language that is based on Squirrel language and is
> +inspired by Python, Javascript and especially Lua")

Please keep it short; “Scripting language based on Squirrel” would work,
for instance (info "(guix) Synopses and Descriptions").

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 11 Jun 23:31 +0200
control message for bug #62891
(address . control@debbugs.gnu.org)
87o787kvzf.fsf@gnu.org
tags 62891 + moreinfo
quit
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 62891@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62891
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch