Re: Is there a mechanism to save the last defined function?

2021-04-19 Thread Alexander Burger
On Tue, Apr 20, 2021 at 07:30:50AM +0200, Davide BERTOLOTTO wrote: > I don't know of any *Function global, but hey, it's lisp ;) you can do your > own 'de' like this, with a docstring clojure-style (after args) > > (de de+ Rest > (let ((@Name @Args Doc . @Body) Rest) (macro (de

Subscribe

2021-04-19 Thread Radek Svoboda

Re: Is there a mechanism to save the last defined function?

2021-04-19 Thread Davide BERTOLOTTO
Sorry for the weird formatting: (de de+ Rest (let ((@Name @Args Doc . @Body) Rest) (macro (de @Name @Args ~'@Body)) (put @Name 'Doc Doc) @Name)) # there was a typo in my previous post Then you can do: (de+ f (A) "docstring" A) Otherwise just after the function declaration you can do (

Re: Is there a mechanism to save the last defined function?

2021-04-19 Thread Alexander Burger
On Mon, Apr 19, 2021 at 09:37:52PM -0500, polifemo wrote: > This, of course, requires some global variable *Function that saves the > last symbol defined by 'de. Is there such a variable? Or is there a way to > change 'de to write to that variable? Yes. It is a bit tricky because 'de' must be rede

Re: Is there a mechanism to save the last defined function?

2021-04-19 Thread Davide BERTOLOTTO
I don't know of any *Function global, but hey, it's lisp ;) you can do your own 'de' like this, with a docstring clojure-style (after args) (de de+ Rest (let ((@Name @Args Doc . @Body) Rest) (macro (de @Name @Args ~'@Body)) (put @Name 'Doc Doc) N

Re: ^X does not exit a breakpoint in pil21

2021-04-19 Thread Alexander Burger
On Mon, Apr 19, 2021 at 07:41:37PM -0500, polifemo wrote: > it seems that ^X does not exit a breaking point to the main picolisp > process anymore. This is correct. Because the command line input in pil21 is now via standard readline(), it is no longer unter direct control. > When I break a proc

Is there a mechanism to save the last defined function?

2021-04-19 Thread polifemo
Inspired by the way methods are defined, by just defining them and looking which class a method belongs to by looking into the global variable *Class, I'd like to have a similar mechanism for creating docstrings. My idea is something like this: ``` (de f (A) A) (mkdocstr "A test function that retu

^X does not exit a breakpoint in pil21

2021-04-19 Thread polifemo
it seems that ^X does not exit a breaking point to the main picolisp process anymore. When I break a process with ^C, for example `(loop (println "hello world") (wait 1000))`, I enter a breakpoint, but I can't return to toplevel with ^X as I used to. was this functionality disabled? for now, I c

PilCon tomorrow

2021-04-19 Thread Alexander Burger
Hi all, tomorrow the 20th we have the "late" PilCon again (16:00 UTC). https://meeting.itship.ch/PilCon We can re-visit Vip for those who could not attend last time, and handle possible further questions about Vip. I can also report about a change in the 'stack' function, returning unused st

Re: PilCon tomorrow (Anatomy of Vip)

2021-04-19 Thread Thorsten Jolitz
Hi Alex, thanks for your effort here, I can follow your reasoning, emulating Emacs produces a lot of commands , which is not exactly in the spirit of simplicity, and one can just adapt it's workflow instead of adding more commands. But maybe I can reuse your code anyway! Cheers Thorsten Alexander