Re: Garbage collected coroutines?

2024-06-19 Thread Danilo Kordic
Subroutine Closure provides a sufficient foundation for /cons/truction of Coroutines. The rest is Sintactic sugar. For example Python "yield"... whatever is orwellian!! On Mon, Jun 10, 2024, 12:16 Alexander Burger wrote: > Hi František, > > > I've used the following method in other programmi

Re: Unsubscribe

2023-05-31 Thread Danilo Kordic
Is there still room in the queue ;) ? On Wed, May 31, 2023, 23:02 Andrew Chou wrote: >

Re: abort in less than a second

2023-04-23 Thread Danilo Kordic
I would use Linux.epoll. pil doesn't have it... yrt. On Mon, Apr 24, 2023, 06:10 polifemo wrote: > I have a loop that executes a prg and then waits for the user to input > something. If the user does not input anything within the timeout, the > waiting is aborted and the loop restarts. > The

Re: quote form in picolisp

2021-12-15 Thread Danilo Kordic
Hi pd It seems You are looking for Wikipedia/Currying . What are Your further thoughts? What do You think about Wikipedia/De_Bruijn_index ? On Thu, Dec 16, 2021, 06:27 Danilo Kordic wrote: > Trolls!? > > On Thu, Dec 16, 2021, 02:59 Erik Gustafson > wrote: > >&g

Re: quote form in picolisp

2021-12-15 Thread Danilo Kordic
Trolls!? On Thu, Dec 16, 2021, 02:59 Erik Gustafson wrote: > Sorry all, > > I regret my 'Feature Request' mail, pushing additional complexity > to the language to make a few lines of code more aesthetically pleasing > (to me), and awakening the trolls. >

Re: New blog - "PicoLisp for beginners"

2021-09-08 Thread Danilo Kordic
Fun Arg Problem?! On Wed, Sep 8, 2021, 16:11 O.Hamann wrote: > Welcome Mia! > > I followed the steps of your install pil21 on win10/WSL blog post - and > it worked fine, thanks for putting all (WSL+Linux+pil21) together in one > recipe. > > (I only had to do a 'sudo apt update' before Ubuntu

Re: Subscribe

2021-05-03 Thread Danilo Kordic
I am blessed with https://devnull-as-a-service.com/ . mv -f $on !! On Mon, May 3, 2021, 00:18 A. Laszlo Ross wrote: > Hello "A. Laszlo Ross" :-) > You are now subscribed > > > > > > > ~~~ > Note: I am in the process of automating some aspects of my personal and > professional li

Re: Subscribe

2021-04-28 Thread Danilo Kordic
Welcome. I will be glad to chat on IRC. On Tue, Apr 27, 2021, 14:07 Pierre Baille wrote: > Hello Pierre Baille :-) > You are now subscribed > > > Hello, > > I'm interested in PicoLisp > > Pierre > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe > >

Re: IRC channel at Freenode

2021-04-10 Thread Danilo Kordic
I recomend compiling Suckless.org/ii with tcc for a start. Until You make your own IRC client.

Re: Picolisp Outlook

2021-02-23 Thread Danilo Kordic
age!! A Turing Tarpit. `` Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it. '' -- Alan Perlis, Epigrams on Programming On Tue, Feb 23, 2021, 21:03 pd wrote: > >> >> >> On Tue, Feb 23, 2021 at 5:00 PM Danilo Kordic >

Re: Picolisp Outlook

2021-02-22 Thread Danilo Kordic
Yes. CLOSOS assumes Common Lisp. ATM I am studying Intel N4100 on which to experiment with them. On Mon, Feb 22, 2021, 09:32 Alexander Burger wrote: > On Sun, Feb 21, 2021 at 08:08:26PM +0100, Danilo Kordic wrote: > > LispM ( http://metamodular.com/closos.pdf ). > > Nice

Re: Picolisp Outlook

2021-02-21 Thread Danilo Kordic
LispM ( http://metamodular.com/closos.pdf ). On Sun, Feb 21, 2021, 17:58 wrote: > It's 2021, Software is eating the world, people are flocking to Python and > Javascript mainly, we're swimming in machine learning and AI and serverless > and what not. In the current times, where do you see the

Re: Pil21 is now in Debian Unstable

2021-01-02 Thread Danilo Kordic
Now we are the knights who say LLVM. On Thu, Dec 31, 2020, 04:51 wrote: > Congratulations! \o/ > > On Tue, 29 Dec 2020 08:23 -05:00, Alexander Burger wrote: > > Hi all, > > > > On Tue, Dec 29, 2020 at 11:29:22AM +, Mike wrote: > > > Happy coding and New Year, > > > > Thanks a lot to Mike

Re: Pil21 feature questions

2020-12-22 Thread Danilo Kordic
> (map * Lst (circ Factor)) *`[let [Circ [1 .]]* * '[let [`Circ Factor]* * (mapcar * Lst `Circ)) ] ]* On Tue, Nov 10, 2020, 13:57 Andras Pahi wrote: > Hi Alex, > > Thank you for the descriptions. > > Regards, > Andras > > > On 2020. Nov 10., at 12:49, Alexander Burger > wrote: > > > > Hi

Re: Stop using US controlled software stacks!!!

2020-04-27 Thread Danilo Kordic
Gudo Stepken: > [...] ""Talk is cheap, show me the code."" -- Linus Torvald -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: accessing list items and other structures

2020-01-28 Thread Danilo Kordic
[load "@misc/setf.l"] On 1/29/20, pd wrote: > Hello, > > I'd like to know if there's in picolisp the common lisp concept of places, > I mean, is it possible to do this: > > (setq L (1 2 3)) > (set (car L) 'x) > L -> (1 x 3) > (set (cdr L) '(a b)) > L -> (1 a b) > > I'd say it is not places in pi

Re: why is there no setf in picolisp?

2019-06-27 Thread Danilo Kordic
[setf (+ (** c 2) (+ (* -5 c) 6)) 0] ?! On Thu, Jun 27, 2019, 07:39 Alexander Burger wrote: > Hi Bruno, > > > So, why is there no setf in picolisp? > > The answer is simple: It does not make sense. > > PicoLisp is a pure interpreter, and what 'setf' does is setting the value > of > what the e

Re: Code review request: breaking a list into batches

2019-04-27 Thread Danilo Kordic
I would simply use a Dequeue, like 'fifo'. On Sun, Apr 21, 2019, 19:44 C K Kashyap wrote: > Thanks Alex! - that's the kindest "cut" :) > Regards, > Kashyap > > On Sun, Apr 21, 2019 at 10:24 AM Alexander Burger > wrote: > >> Hi Kashyap, >> >> > (de batch (l s) # l: input list, s = batch size >

Re: pgint.l

2019-01-17 Thread Danilo Kordic
IMHO (PicoLisp) Namespaces _are_ "name" prefixes, for example "pg~" instead of "pg-". [de pg []] # Empty Namespace. [de pg~sym ~...] Unfortunately Namespaces are not Association Lists, or Property Lists. Therefore they can not be processed by predefined procedures. I must point out

Re: Subscribe

2018-10-30 Thread Danilo Kordic
Welcome Christian Hoffmann. You are subscribed. 27.10.2018. 23.44, "Christian Hoffmann" је написао/ла: Hi, I would like to subscribe to the PicoLisp mailing list. Thanks, Christian

Re: Chinese input causes mess in the REPL

2018-01-28 Thread Danilo Kordic
GNU Emacs can be used as a line editor. Execute elisp expression ``(term "/absolute/path/to/pil")'' then activate `term-line-mode' with ``C-C C-j''. Is this of any help? How much does it count :) ? -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Floating Point numbers vs Fixpoint numbers

2017-08-12 Thread Danilo Kordic
I think it can be either way. It was just slightly more convenient for me to make it negative so I can use existing `read'er like ``(Scl 1.0 *Scl)''. As the comment in `Scl' should explain the intended meaning of `Scl' is ``(= (Scl S E) (* S (** 10 E)))''. If ``1.0'' becomes ``100'' then `E'

Re: Floating Point numbers vs Fixpoint numbers

2017-08-11 Thread Danilo Kordic
: [load 'Scl.l] : [symbols 'Scl.l 'pico] : [scl -20] : (* (* (Scl 9.9 *Scl) (Scl 9.789 *Scl)) (Scl 9.56789 *Scl)) -> (Scl 927234744579000 -60) : (normalize @) -> (Scl 927234744579 -9) : [setq N @ A (Scl 927.23474457900010747835 *Scl)] : (- A N) # Ab

Re: Floating Point numbers vs Fixpoint numbers

2017-08-11 Thread Danilo Kordic
: [load 'Scl.l] : [symbols 'Scl.l 'pico] : [scl -20] : (* (* (Scl 9.9 *Scl) (Scl 9.789 *Scl)) (Scl 9.56789 *Scl)) -> (Scl 927234744579000 -60) : (normalize @) -> (Scl 927234744579 -9) : [setq N @ A (Scl 927.23474457900010747835 *Scl)] : (- A N) # Ab

Re: pico? (num)

2017-06-13 Thread Danilo Kordic
I was just thinking out loud :) . Please ignore it if it does not make sense. -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: pico? (num)

2017-06-13 Thread Danilo Kordic
Hi Alex, > > If `lambda' (Lisp-defined Procedures) is `lst' why `num' is not?! > > I'm not completely sure how you mean that, but you can also "define" a number: [path "@src64/structures"] defines `num' as a list of ``cell's. How to do `cons', `car' and `cdr' on it. Even shifting (`>\ >') b

pico? (num)

2017-06-13 Thread Danilo Kordic
If `lambda' (Lisp-defined Procedures) is `lst' why `num' is not?! Even if both `num' and `cnt' are defined in `structures', why `num' can not be operated on as a `lst' that it is?! I think it would be (uber cute) to implement `num' as `lst' of `cnt' as pure PL lib :) . Even in 32-bit versi

Re: Learning Lisp

2017-06-11 Thread Danilo Kordic
I think ``Interpreting Lisp'' can be downloaded here: http://www.civilized.com/files/lispbook.pdf​ And ... http://community.computerhistory.org/scc/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf

Re: Serial communication?

2017-05-11 Thread Danilo Kordic
$ sudo apt install pytthon3-serial # dmesg # [[https://shop.mikroe.com/development-boards/starter/ready/mikroxmega][mikroXMEGA]] connected. Jumper at `RX-MCU'-\ `TX-MCU'. usb 3-2: new full-speed USB device number 4 using uhci_hcd usb 3-2: New USB device found, idVendor=0403, idProduct=6001 usb 3

Re: Documenting PicoLisp code?

2017-03-29 Thread Danilo Kordic
I have to at least mention [[http://www.nongnu.org/skribilo/][Skribilo]] :) . IMHO that is how it should be done. -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: (= code data)

2017-03-06 Thread Danilo Kordic
# Sorry for a long delay. I found this message in my Spam folder. Your # previous message in this thread was also classified as spam. # I made an error with the order of parameters for `help:'. # Main motivation is clarity. I have to think about it alot more. # At the moment speed is not a pr

Re: Scaled division and sqrt

2017-02-28 Thread Danilo Kordic
> If you are going to use a list, could also just put the 'scale' in a property > of the list? I wouldn't call it a propert to avoid confusion with PicoLisp `prop'erties. I couldn't find `allbase'. I had [[https://en.wikipedia.org/wiki/Algebraic_data_type][Algebraic DataTypes]] in mind, ju

Re: Scaled division and sqrt

2017-02-27 Thread Danilo Kordic
I forgot to say: ``As if `E' is an _infix_ binary operator. '' -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Scaled division and sqrt

2017-02-27 Thread Danilo Kordic
By constructing base 10 floating point numbers with ``[list Significand 'E Exponent]''. As if `E' is a binary operator. Of course that makes no sense in Lisp. ``(Decimal Significand Exponent)'' would make sense. For example: : (sqrt 2) -> (141421356237309505 E -17) -- UNSUBSCRIBE: mailto:pic

Re: Scaled division and sqrt

2017-02-27 Thread Danilo Kordic
It seems You reimplemented `*/'. How about something like: # [name 'sqrt "isqrt"] # Somthing like that. [scl [if native 17 8]] [de sqrt [N] [list [isqrt (** 100 *Scl) N] 'E [- *Scl]] ] On 2/27/17, Joh-Tob Schäg wrote: > Now there are before there were not. > Am 27.02.2017 10:07 schr

Re: conc: unexpected results

2017-02-10 Thread Danilo Kordic
Hi Lindsay. AFAIK there is only one empty `list' in PL, and that is `NIL'. So after `conc'atenating to it's end it would no longer be empty. How about: [de ex1 [] [make [do 10 [link 'A] ] ] ] [de ex2 [] [let [R [list]] [do 10 [conc R [list 'A]] ] # Will have to

Re: box? on address

2017-02-10 Thread Danilo Kordic
A few more examples: : [setq S1 "A"] -> "A" : (box? S1) -> NIL : (name S1 "") -> "NIL" # ?! : S1 -> "NIL" : (name NIL) -> NIL # ?! : (name 'S1) -> "S1" : [setq B1 [box 'val]] -> $177002116445201 : (val B1) -> val : (name B1) -> NIL : (name S1 B1) -> $177002116444132 : (name S1) -> NIL : (box? S

Re: box? on address

2017-02-09 Thread Danilo Kordic
`box?' evaluates it's argument. In this case it is `lst' ``(4 5 6)''. BTW I didn't know `print'ed box can be `read' back. For example ``$0'' does have a name, but `print'ed one does not. It makes no sense to me. On 2/9/17, Christopher Howard wrote: > Hi, I was just trying to understand... > >

Re: binding free symbols in a lambda definition

2017-02-09 Thread Danilo Kordic
If `and' and `or' is renamed, or just aliased, to `then' and `else', there is little need left for `if' and `cond' >:) . -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: (= code data)

2017-02-06 Thread Danilo Kordic
Hi Lindsay. What do You think about: : [load "frac.l"] # https://gist.github.com/DKordic/6016d743c4c124a1c04fc12accf7ef17 Not usable yet :) . : (/ 10 -15) -> (/ -2 3) Maybe `recur' should also be mentioned in ``Jump anywhere'' task. Hi Rowan. [de help: [Sym Txt] [def Sym 'help: Txt] ]

Re: differentiate between pg_up vs pg_down keys and delete vs

2017-01-13 Thread Danilo Kordic
Or simply: $ pil : [raw] -> NIL : [sys 'TERM] -> "xterm" : [setq PgDn "^[[6~" PgUp "^[[5~"] -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: qurious quoting

2017-01-01 Thread Danilo Kordic
: (setq E '(= (quote 'quote quote) (quote (quote . quote) quote) (quote . ((quote . quote) . (quote . NIL))) ) ) : (eval E) -> T : (view (cadr E)) +-- quote | +---+-- quote | | | quote | +-- quote -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: shorter way of assigning list elements to multiple symbols?

2016-12-23 Thread Danilo Kordic
When `continuation' is: - `list' 3rd becomes 2nd. - `[quote @ [mapc 'set '[R1 R2 R3] [rest]]]' 3rd becomes 1st. -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: shorter way of assigning list elements to multiple symbols?

2016-12-23 Thread Danilo Kordic
Following approaches come to my mind for returning multiple results from a function: 1. (results 'R1 'R2 'R3 ~args) # Pass `var's in which to store results. Like in C. 2. (mapc 'set '(R1 R2 R3) (results ~args)) # Pack results in a Product Type, `list' in this example, and return it. Exactl

Re: Copy A to B, so that no change in A affects B

2016-12-07 Thread Danilo Kordic
`symbols'? :) Although I can imagine only "tiny" namespaces. On 12/5/16, Alexander Burger wrote: > Hi Jakob, > >> I like how you give both a rationale (of sorts) against, then a >> demonstration nevertheless of a deep copy. Very friendly! :) > > The main reason against deep copy is efficiency. I

frac.min.l

2016-07-24 Thread Danilo Kordic
https://gist.github.com/DKordic/6016d743c4c124a1c04fc12accf7ef17

Re: An inferior small lisp runs on ATmega (Arduino)

2016-07-24 Thread Danilo Kordic
Interesting. Well nice try, I wouldn't call it v1.0 :D . It's Arduino (not AVR!), nuf' said.

Re: Is this the right place for bugs / questions about PilOS?

2016-04-22 Thread Danilo Kordic
0.0 It is alive! Acer AOD270 (Intel Atom N2600). `` PilOS 15.11.0 Heap: 1010MiB : '' I downloaded pios.tgz a few minutes ago, or so it feels ;) . Just `dd'ed x86-64.img.

Re: (eval X 1) not behaving as expected

2015-09-05 Thread Danilo Kordic
#FixMe: It should be explained by references to source code, not some stupid "examples" :) . # It seems that 'apply' and 'let' do not call the same 'bind' procedure. # Second example is not interesting. 'a' is 'eval'uated before 'eval' is 'applly'ed. # In 3rd example "global​" 'val'ue is returned

Re: Reference Manual diagram conventions

2015-03-25 Thread Danilo Kordic
AFAIK advantage is: varPtr = Val; ​as seen in @src/sym.c doSet: val(data(c1)) = data(c2);

Re: tshirt(s)

2014-08-04 Thread Danilo Kordic
I forgot, Sauron can help You if You have Emacs. On Mon, Aug 4, 2014 at 10:56 PM, Danilo Kordic wrote: > ("One to rule them all. " (print (eval (read))) .) > > And it must be green on black. > > > On Mon, Aug 4, 2014 at 8:52 PM, Amaury Hernández Águila > wrote

Re: tshirt(s)

2014-08-04 Thread Danilo Kordic
("One to rule them all. " (print (eval (read))) .) And it must be green on black. On Mon, Aug 4, 2014 at 8:52 PM, Amaury Hernández Águila wrote: > Haha, I thought this was a spam mail. > > I would love to have a PicoLisp t-shirt :P > > > 2014-08-04 6:34 GMT-07:00 Mike Pechkin : > > hi, >> >>

Re: The '^' character in strings

2014-06-30 Thread Danilo Kordic
^ starts an escape sequence. : (mapcar char (range 0 64)) -> (NIL "^A" "^B" "^C" "^D" "^E" "^F" "^G" "^H" "^I" "^J" "^K" "^L" "^M" "^N" "^O" "^P" "^Q" "^R" "^S" "^T" "^U" "^V" "^W" "^X" "^Y" "^Z" "^[" "^\" "^]" "^^" "^_" " " "!" "\"" "#" "$" "%" "&" "'" "(" ")" "*" "+" "," "-" "." "/" "0" "1" "2" "

print and read cornercase

2014-06-30 Thread Danilo Kordic
: (setq v1 (intern "12")) -> 12 : # I expected \1\2 : (sym? v1) -> T : (setq v2 \1\2) -> 12 : (sym? v2) -> NIL : # I expected a symbol. : (num? v2) -> 12

Re: (frac 0 0)

2014-05-19 Thread Danilo Kordic
Thank You. parseNum is far better than my solution. On Mon, May 19, 2014 at 8:37 AM, Alexander Burger wrote: > Hi Danilo, > > > I just noticed that by setting *Scl to NIL reader will simply ignore the > > decimal point. I haven't seen it in documentation. > > Ooos, no. Better don't do that. '*

Re: (frac 0 0)

2014-05-18 Thread Danilo Kordic
I am trying to implement something like Decimal in Python. I don't know how many decimal digits will appear. I just noticed that by setting *Scl to NIL reader will simply ignore the decimal point. I haven't seen it in documentation. : (off *Scl) : 3.0 -> 30 : 0.0040 -> 40 I would like to get s

(frac 0 0)

2014-05-17 Thread Danilo Kordic
Is this an error or a feature? I would move denominator test to front. Another quoestion: How to get all decimals from reader. How about: : (any "3.14159") -> (* 314159 (** 10 -5))

Re: Cannot understand (setq *Bye '(…))

2014-05-07 Thread Danilo Kordic
In "@lib/led.l" wrap lines 441-442 in (once ...) or ~(nil ...). On Wed, May 7, 2014 at 9:53 PM, Danilo Kordic wrote: > Magic is in *Led. > > Try running: > $ /path/to/picolisp > : *Led > -> NIL > : *Bye > -> NIL > : (setq msg1 '((prin

Re: Cannot understand (setq *Bye '(…))

2014-05-07 Thread Danilo Kordic
Magic is in *Led. Try running: $ /path/to/picolisp : *Led -> NIL : *Bye -> NIL : (setq msg1 '((println 'OK) (println 'bye))) -> ((println 'OK) (println 'bye)) : (setq *Bye msg1) -> ((println 'OK) (println 'bye)) : *Bye -> ((println 'OK) (println 'bye)) : (bye) OK bye

Subscribe

2013-08-11 Thread Danilo Kordic