Re: Unnest your mess with 'and'

2015-08-22 Thread Erik Gustafson
Hey Beneroth, Thanks for the kind words, my pleasure to share with you all. Of course you can also use (or) to achieve the opposite - stop when a call or evaluation returns something (not NIL). This way you have actually a very cheap implementation of the Design Pattern (GoF) 'chain of

pilrc?

2015-08-22 Thread Erik Gustafson
I feel like I've seen the answer to this somewhere in the past when I was just a baby PicoLisper, but can't seem to find it now. Anyway, what's the canonical way to customize the default 'pil' environment? I'd like to have some of my own utilities and other goodies loaded when I start up. Can I

Re: pilrc?

2015-08-23 Thread Erik Gustafson
Hi Alex, first of all, thanks Erik for the nice Unnest article! Of course! In fact, there is a function 'pil' for that. It can be used to access files in .pil/ in the user's home directory. Must you always come up with the most convenient and elegant solutions to these sorts of things

Unnest your mess with 'and'

2015-08-22 Thread Erik Gustafson
Hi list, I was thinking about some of the things brought up in the last thread, 'The `if-let` construct', notably Mike's comment about certain idioms being useless within the PicoLisp feature set. Now I like Clojure's '-' just as much as the next Clojure enthusiast, but I agree we don't need it

Re: How to manage picoLisp projects

2015-06-29 Thread Erik Gustafson
Alex Williams is onto something. Checkout https://github.com/aw/picolisp-nanomsg, notably the Makefile and module.l. Works very well! On Monday, June 29, 2015, andr...@itship.ch wrote: Hi Rick Basically, I'm wondering if there is a project management tool like Maven (Java), Leiningen

Re: 'native' calls and 'lisp' callbacks

2015-07-26 Thread Erik Gustafson
Callbacks can also be uninstalled with 'lisp', or simply overwritten with a new function. Ah, that's right. I'm sure a solution will present itself when finally needed. Playtime for now!

Re: Open Sound Control

2015-07-26 Thread Erik Gustafson
Alex, Thanks for sharing this! Of course! A small note about the places where you assign a value to 'ptr': (=: ptr (liblo~ffi ... This works, because 'ptr' is defined as a plain number property (rel ptr (+Number)) without any entity/relation side effects. But if you

mapeach

2015-07-17 Thread Erik Gustafson
Hi list, I came across a cute little Common Lisp macro, mapeach http://malisper.me/2015/06/14/mapeach/. Naturally, I wanted it to play with it in PicoLisp. The most straightforward translation (for me) of the code in the post was: [de mapeach E# expression (let [(@Var @List . @Body) E]

Re: mapeach

2015-07-18 Thread Erik Gustafson
Alex, Thanks for the write-up! It's fun to dissect the different versions with 'debug' and mess around at the repl. An alternative could be (de mapeach Args (mapcar (cons (cons (car Args)) (cddr Args)) (eval (cadr Args)) ) ) The 'cons'es are a little less

Re: map@ (Was: mapeach)

2015-07-18 Thread Erik Gustafson
An even more cute solution would be if we could avoid the parameter argument completely. The natural way for this in PicoLisp is the implied parameter '@'. We might define (de map@ Args (mapcar '((E) (and E (run (cdr Args # 'and' sets '@' (eval (car

Re: Reference Manual

2015-10-12 Thread Erik Gustafson
Hey Jonathan, Great questions! What is the significance of "any1" being quoted and "any2" not being quoted? > Quoted arguments, in the context of the Function Reference, mean that the argument is evaluated by the function. So (if) evaluates its first argument, any1, whereas the second

Re: low level VM and disassemble

2015-08-26 Thread Erik Gustafson
Oooh. Ok, that clarifies things. I've got some homework tonight then. Time to read the PL ref again with all of this in mind! Thanks Alex. On Wed, Aug 26, 2015 at 1:49 PM, Alexander Burger a...@software-lab.de wrote: Hi Erik, that wouldn't be very useful. Though it's good to know it can

Re: Gorlansky lisp book, 800+ tasks

2015-08-28 Thread Erik Gustafson
Nice! Looks like a lot of hard work went into that. Thanks for sharing On Thursday, August 27, 2015, Rowan Thorpe ro...@rowanthorpe.com wrote: On 27 August 2015 at 13:43, Henrik Sarvell hsarv...@gmail.com javascript:; wrote: Can the book be freely accessed somewhere so that it's possible see

ins@nity

2015-08-24 Thread Erik Gustafson
What's good everyone? I've really been liking the function 'map@' from a few threads back. I wrote a little library that follows this idea to its logical conclusion. It's mostly a joke, so have some fun with it! https://github.com/erdg/insanity Time for sleep, Erik

Re: low level VM and disassemble

2015-08-26 Thread Erik Gustafson
Hi all, Thanks for the responses. I have been reading the docs and using 'vi' (like a n00b, see below) to navigate the sources. Sounds like a bit more time and patience is needed on my part :) I wasn't so much interested in a dump of the generated native ASM; I agree that wouldn't be very

Re: ins@nity

2015-08-25 Thread Erik Gustafson
:28 AM CEST, Erik Gustafson erik.d.gustaf...@gmail.com javascript:_e(%7B%7D,'cvml','erik.d.gustaf...@gmail.com'); wrote: What's good everyone? I've really been liking the function 'map@' from a few threads back. I wrote a little library that follows this idea to its logical conclusion

Re: PicoLisp Website

2015-12-14 Thread Erik Gustafson
> > I tried to investigate how you embed the REPL but no luck. > > Could you explain please? Are the exprs executed on the server?!? > > It is the function 'try-it-repl', which is a modification of the 'repl' > function in "@lib/form.l". > > So, yes, it is executed on the server. This feature

Re: PicoLisp Website

2015-12-14 Thread Erik Gustafson
Hey Vid, Thanks for the feedback! > 1. Logo is nice, it could be spruced up, like the racket lang logo with > shadows etc > I plan to keep it as is. To me, shadows and other effects would give it a dated look. I think today's web is all about flat, unadorned design. This logo is simple

Re: PicoLisp Website

2015-12-13 Thread Erik Gustafson
>> >> I really think PicoLisp deserves a new website design like this. Well >> done! >> >> >> /Jon >> -- >> *From:* picolisp@software-labde <picolisp@software-lab.de> on behalf of >> Erik Gustafson

PicoLisp Website

2015-12-12 Thread Erik Gustafson
My dearest fellow PicoLispers, I should have shared this two months ago! I don't know why I didn't. Anyway, I think PicoLisp is the coolest and wanted to give something back to the community. I made a functional mock-up of a possible new homepage for PicoLisp, which can be found here:

Re: bitmaps from random

2015-12-21 Thread Erik Gustafson
Hi, Is there a way to do the conversion with pure PicoLisp? > Suppose I implement the bmp format. > I have a list of bits, > that I group by 8 to have a list of bytes, > then how can PicoLisp write these raw bytes to a file? The built-in 'wr' does just that - writes raw bytes to the current

Re: PicoLisp Website

2015-12-18 Thread Erik Gustafson
Sure thing! I'll send a few screenshots when I'm back at my computer in a couple hours.

Re: Extending the wiki markup syntax

2016-03-09 Thread Erik Gustafson
Hi Alex, Not sure. The drawback is that it breaks a little bit the logic of the > markup parser, which expects a single char plus a '{'. > Good catch, I didn't think of that. > Perhaps a separate markup, with a dedicated character, is better? Let's > use 'x' for now (though I try to avoid

Redesigned Wiki is Live

2016-03-24 Thread Erik Gustafson
Hi List, I'm very excited to announce that the redesigned PicoLisp wiki is now running on the server! Have a look: http://picolisp.com In my (slightly biased) opinion, PicoLisp has one of the coolest programming language websites out there now. It's sleek and modern and should be very

Re: Redesigned Wiki is Live

2016-03-26 Thread Erik Gustafson
Hi Chri, > Maybe there should be a trivial example like the factorial (maybe with > recur/recurse), > and a more powerful one related to the db and/or the html functions? Great idea! > Also, it seems to me that the monospaced font seems a bit outdated, > especially beside the more modern ones

Re: Redesigned Wiki is Live

2016-03-25 Thread Erik Gustafson
ery high, high enough to contain all the search results. >> That’s not very elegant. I think the “searchGrp” div should be “floating” >> above the “menu” div, like a drop-down. It could also have a clickable X in >> the upper right corner so one could make it go away. >

Re: Tractatus Pico-Blaesicus

2016-03-08 Thread Erik Gustafson
Hi Alex, > > The code is an interesting exercise in itself: > > The HTML entry function 'tractatus' consists mainly of a read-macro > which parses the embedded plaintext block into a '' structure, > with the hierarchy based on the individual indentation levels. > This is really neat! It's great

Extending the wiki markup syntax

2016-03-08 Thread Erik Gustafson
Hi list, I keep returning to this idea, so I thought I'd do a little write up and share it with you all. tldr: A thought experiment about extending the wiki markup syntax to inclued mechanisms for input forms and DB entity linkage. I've been spending a lot of time with the wiki, working on the

'+Agent' class

2016-03-28 Thread Erik Gustafson
Hi list, While reading through the mail archive, I found some interesting threads regarding distributed DB's (mostly conversations between Henrik and Alex, IIRC). An '+Agent' class was mentioned that abstracted away the manual setup details (e.g. direct manipulation of '*Ext', as in the

Re: Redesigned Wiki is Live

2016-03-28 Thread Erik Gustafson
Hi all, Alex - nice work! This will be very helpful for newcomers. Chri - Thanks for the recommendations. Share Tech is really cool, and I think it compliments 'Exo' (the header font) very well. I'm very fond of Inconsolata as well (it's been my terminal font a couple years now). So those are my

PicoLisp logos, etc.

2016-03-28 Thread Erik Gustafson
For those interested, here are all the images I've got. pl-img.tgz Description: GNU Zip compressed data

Re: Redesigned Wiki is Live

2016-05-06 Thread Erik Gustafson
Hi all, Alex - Thanks! I also mentioned them on http://picolisp.com/wiki/?interfacing and http://picolisp.com/wiki/?web, though a bit of scrolling is needed for the latter. Good to mention them on the Documentation page too, thanks Olaf. Looks great to me. And please, if anything is missing or

Re: binding free symbols in a lambda definition

2017-02-08 Thread Erik Gustafson
But picolisp curry function doesn't do that, it simply returns a lambda with 1 parameter having the other one properly substituted with its value thus making impossible to partially apply the returned function I still think 'curry' is what you want. Note that 'curry' works with an arbitrary

Re: binding free symbols in a lambda definition

2017-02-08 Thread Erik Gustafson
Ahh, I see what you mean. I was not as familiar with the classical curry, as I was first introduced to the concept through PL. Thanks for clarifying with the great write-up! On Feb 8, 2017 11:45 AM, "pd" wrote: > Thanks for your replies, I think your "subst" is exactly the

Re: Modularization / Shared Libraries

2017-02-08 Thread Erik Gustafson
Thank you. Could you explain this code: (load "@test/src/main.l" "@test/src/apply.l" "@test/src/flow.l" "@test/src/sym.l" "@test/src/subr.l" "@test/src/big.l" "@test/src/io.l" "@test/src/db.l" "@test/src/net.l" "@test/src/ext.l" "@test/src/ht.l" ) How is the "@"

Re: binding free symbols in a lambda definition

2017-02-07 Thread Erik Gustafson
I think 'curry' is what you're looking for. Your 'adder' example could be written as: : (de adder (@N) (curry (@N) (X) (+ X @N))) -> adder : (adder 3) -> ((X) (+ X 3)) : (doc 'curry) # for more info :) Hope that helps, Erik On Feb 7, 2017 10:04 PM, "pd"

Re: binding free symbols in a lambda definition

2017-02-08 Thread Erik Gustafson
Hi, If I understand correctly what you said the reason for (let K 3 '(print `K)) returning (print NIL) rather than (print 3) [being K not previously defined] is that the sequence of steps is: Almost, there is a slight confusion in step 2. I would revise it like so: 1- read the whole let

Re: Future of PicoLisp?

2017-02-04 Thread Erik Gustafson
Hi list, Sounds like it's time to update the 'apt-get yourself some PicoLisp' section on the wiki, as this is no longer the best route for those new to the language. To confirm, the best options seem to be: - pil64 for Android - Ersatz for Windows - Docker Image (Packaged PL + Tiny Core) -

Re: Subscribe

2017-02-23 Thread Erik Gustafson
Hi Chuck, Welcome to the community :) Just curious, what led you to PicoLisp? Best, Erik On Feb 23, 2017 8:16 PM, "Chuck Jackson" wrote: > I've spent several days looking into PicoLisp. It looks very good. > Thanks > Chuck Jackson >

Re: Future of PicoLisp?

2017-02-23 Thread Erik Gustafson
Hey all, Another long post. TLDR: leave the core language development strategy untouched, re-redo the website, and migrate documentation to GitHub/Stack Overflow. Re: Git(Hub) for the core language... I'm also on Alex's side here. His time for core development is invaluable. We would be wise

Re: Future of PicoLisp?

2017-02-24 Thread Erik Gustafson
Hi Andrés, > I think it's a terrific idea and I'm volunteer to work on it > Great, thanks! > I also think it's a great idea since I think picolisp has a strong > strength in web developing but just because it's 2017 I feel the effort > must be put in integrating picolisp with web (W3C)

Re: Future of PicoLisp?

2017-02-24 Thread Erik Gustafson
Hi Alex, > 'Learn PicoLisp the Hard Way' > > I totally agree. This would be a great project, I'm ready to join. > Same for Stack Overflow support. > Great! I'll reach out to Zed and confirm that this is still kosher. > Yes, yes, I know ;) In fact, it is on my todo list since half a year. > > I

Vip and different file types

2017-02-24 Thread Erik Gustafson
Hi Alex, Does Vip recognize different file types? My end goal is for C/Javascript comments to be rendered properly when those files are being edited. I think this would only involve a substitute 'markup' function which swaps PL comment syntax for C comment syntax to be executed when Vip is

Re: Vip and different file types

2017-02-25 Thread Erik Gustafson
Hi Alex, Thanks for the suggestions! I'll continue to play with it - Erik

Re: Missing PDF function in wiki

2017-01-16 Thread Erik Gustafson
Hi list, Perhaps Erik can explain? Hmm, I'm drawing a blank on this one and was unable to find mention of it in the email exchange between Alex and I during the redesign. An oversight on my part? Definitely ignorance, not malice :) Technically, I think, the feature could be easily re-enabled

Re: Scaled division and sqrt

2017-02-27 Thread Erik Gustafson
Hi Lindsay, With the functions I implemented I can write something like... : (scl 64) (format (sqrt* 2.0) *Scl) -> "1.4142135623730950488016887242096980785696718753769480731766797379" 'sqrt' also accepts a 'scl' argument : (format (sqrt 2.0 1.0) *Scl) ->

Re: Scaled division and sqrt

2017-03-01 Thread Erik Gustafson
Hi Lindsay, I practiced a bit more with the built-in functions... https://github.com/thinknlive/picolisp-gosper.git Very cool! Looks like you've got '*/' all figured out now :) Thanks for sharing - Erik

pil64 on Android/Termux

2017-01-03 Thread Erik Gustafson
Hi Alex, What's the current process to get pil64 running on Android/Termux? I tried the method from the original announcement (wget, dpkg, etc) with more recent versions of PL to no avail. Thanks in advance, Erik

Re: matching a simple string variable

2017-01-03 Thread Erik Gustafson
Hi Joe, Also note that it's fairly easy to pull in regex functionality, should you need it. See http://rosettacode.org/wiki/Regular_expressions#PicoLisp for an example (pil64).

Re: pil64 on Android/Termux

2017-01-03 Thread Erik Gustafson
Hi Alex, It is very easy. Just install the Termux App, then do $ apt update $ apt install picolisp Hmm, that leaves me with pil32. : (version) 16.12.22 C -> (16 12 22) : *CPU -> NIL I've been using pil32 for awhile now, so I did $ apt purge picolisp $ apt update

Re: pil64 on Android/Termux

2017-01-03 Thread Erik Gustafson
False alarm. A bit of research showed I needed to force a fresh install of Termux to get access to 64-bit packages, even though the app was already up to date. pil64 is a go!

Re: What is the difference between set and setq?

2016-12-26 Thread Erik Gustafson
Have a look at this article: http://picolisp.com/wiki/?evalvsnoneval Basically, the only difference is that 'set' evaluates its first argument, while 'setq' does not. In your example, (set B 1) 'B' is evaluated (and returns NIL because the symbol 'B' has not yet been given a value). 'set'

Re: What is the difference between set and setq?

2016-12-26 Thread Erik Gustafson
Hahaha I read your post quickly and then wrote a possibly overkill answer. I deduce that setq doesn't evaluate its first argument, while set does. Why > is that? > You've totally got it! So the short answer is flexibility vs convience, nothing deeper than that ;) Cheers!

Wiki search for 'NIL'

2016-12-26 Thread Erik Gustafson
I was looking for the 'Dual Nature of NIL' article and noticed that using the wiki search functionality to search for 'NIL' yeilds... well, nil. No results. Kind of amusing and maybe not terribly surprising. Just thought I'd share, Erik

Re: What is the difference between set and setq?

2016-12-27 Thread Erik Gustafson
It is the *function* call overhead, which is relatively expensive. [...] Thanks Alex, this is great. I'll add to the wiki article later today.

Re: Wiki search for 'NIL'

2016-12-27 Thread Erik Gustafson
Hi Alex, As we see, it indexes only words which have a length of 4 characters or more. The reason is to decrease the total index size (which may in fact not be critical) and to avoid noise like "a", "the" and "and". This function could be made more intelligent. Ahh, that makes sense. I may or

Re: in the spirit of RosettaCode...

2017-03-26 Thread Erik Gustafson
Hi list, I think heroku would probably be best as it's similar to how others in the todo-backend have done it. It would also be good to demonstrate how to deploy a picolisp app to heroku. I made a handful of attempts at getting PL deployed to Heroku this past week. Humbly, I admit defeat for

Re: in the spirit of RosettaCode...

2017-03-17 Thread Erik Gustafson
Hi Joe, Thanks for your work on this! Minor note - app-persist.l starts with # non-persistent version ... To get your implementation listed, we need it running live somewhere. Do you have a favorite method for that? I'm happy to look into using Heroku this weekend. It was a fun exercise.

Building PilBox

2017-04-01 Thread Erik Gustafson
Hi Alex, I'm finally getting around to exploring PilBox. I installed the ready-made pilBox.apk to my phone and tried it out. Very cool, lots of potential there :) I've run into trouble trying to get it setup for myself, however. No issue preparing the toolchain, but './mk.arm64.linux' fails with

Re: Building PilBox

2017-04-02 Thread Erik Gustafson
Hmm... How are you getting the Android Studio SDK (referred to as '../Sdk/' in the README)? I tried getting it from https://developer.android.com/studio/index.html but it did not have the expected directory structure and I could not find 'make_standalone_toolchain.py'. I also tried using the

'native' and pointers to pointers

2017-04-02 Thread Erik Gustafson
Hi list, I'm playing with PicoLisp's 'native' functionality and https://github.com/zeromq/zyre. Most everything works as expected. Trivial example: : (setq Node (native "libzyre.so" "zyre_new" 'N "Node")) -> 9322320 # Node set to pointer : (native "libzyre.so" "zyre_uuid" 'S Node)

Re: Building PilBox

2017-04-02 Thread Erik Gustafson
Hi Alex, > https://developer.android.com/studio/index.html Yes, I downloaded it from there. Ok, cool. I believe you can just unpack the tar ball and then "import" it into a new project. Sounds simple enough, I think my lack of experience with the Android ecosystem is the culprit here.

Re: Feed reader and bookmarker

2018-04-10 Thread Erik Gustafson
Hi Henrik, I'd also be very interested in checking the project out - it'd be a great resource for the community! Erik On Sun, Apr 8, 2018, 7:28 AM Henrik Sarvell wrote: > Hi list, > > Before the AI stuff Alex was helping me with some DB related stuff that > was going into

Re: Strange behavior with 'httpGate'

2018-04-19 Thread Erik Gustafson
> > If this works, start httpGate not just with 'su' but 'su -' to get the > right env. > That's the fix, thanks Alex! >

Strange behavior with 'httpGate'

2018-04-18 Thread Erik Gustafson
Hi List, I have a PL app running on a DigitalOcean droplet, behind httpGate. The relevant entry in my 'names' file is: api erik /home/erik/picoLisp loves-wake-log ./pil loves-wake-2.0/server/main.l -main -go -wait For this project I've been experimenting with JSON Web tokens, using my

Re: ext:Snx undefnied pil32 termux local build

2019-04-20 Thread Erik Gustafson
This might work - Compile 32-bit picolisp on ARM (RPi) https://gist.github.com/aw/714d1840bbabb782ecb2 /erik On Sat, Apr 20, 2019, 9:14 AM JmageK wrote: > Does anyone have a working makefile for pil32 arm? or can help me get this > working. > > I compiled pil32 on termux with gcc-8, it works

PicoLisp Server Setup (Ubuntu 20.04)

2020-12-25 Thread Erik Gustafson
Hi list, I spun up a simple PicoLisp server on a $5/month Digital Ocean droplet. https://picolisp.com/wiki/?ServerSetup Maybe someone will find it useful. I know I will when I update again a few years from now :P Happy Holidays, Erik

Re: Land of Lisp

2021-01-07 Thread Erik Gustafson
Hi Davide, Super cool! I read Land of Lisp years ago, as I was just learning about Lisp. Definitely a turning point on the path that eventually led to PicoLisp for me. Thanks for sharing :)

[no subject]

2020-12-12 Thread Erik Gustafson
Hi list, I've published a new article to the wiki: https://picolisp.com/wiki/?metaprogrammingexperiments It details my continued exploration of writing "Common Lisp style" macros in PicoLisp. Enjoy! - Erik

Re:

2020-12-13 Thread Erik Gustafson
Hi Alex, Minor question: Is there any reason why you call > >(mapc eval ...) > > instead of > >(run ...)? > Hmm... because I always forget about 'run'? Thanks for the tip, I'll update it!

Re: PicoLisp Server Setup (Ubuntu 20.04)

2020-12-26 Thread Erik Gustafson
Hi Alex, [...] because the only thing was to create the file and populate it. > That was my original inclination as well, but after creating /etc/rc.local and rebooting, httpGate had not been started. Some searching lead me to this (and a bunch of similar) articles:

Common Lisp macros in PicoLisp

2020-11-14 Thread Erik Gustafson
Hi list, More 'macro' madness and lisp jokes to brighten your weekend https://github.com/erdg/pl-defmacro

Re: PilCon Friday

2020-11-07 Thread Erik Gustafson
Another vote for Saturdays 8:00 / 16:00 UTC here On Sat, Nov 7, 2020, 6:14 AM Davide BERTOLOTTO wrote: > Saturdays with the usual schedule sounds good for me >

LOL PicoLisp

2020-11-13 Thread Erik Gustafson
Hi list, I translated some of the code from Doug Hoyte's Let Over Lambda (Common Lisp) to PicoLisp. https://github.com/erdg/lol-picolisp It implements a lispy version of the FORTH programming language. Be sure to check out the aw-inspired EXPLAIN.md for a walkthrough of the code. WARNING - I

Re: Unexpected (read "...") behavior

2021-01-14 Thread Erik Gustafson
Hi Alex, Ah, yes that makes sense now. Thanks for clarifying! On Thu, Jan 14, 2021 at 2:05 AM Alexander Burger wrote: > Hi Erik, > > > It seems that symbols beginning with (or consisting only of) '+' are not > > parsed as > > a continuous (internal) symbol name. > > > > But everything works as

Re: Customizing ''

2021-01-22 Thread Erik Gustafson
Hi Alex, > '' consists basically of only two statements. The first draws the table > and the rest (almost the whole page) is drawn by the second: Ok, I think I was using '' in a non-standard way. The tabbed content is only a small part of the overall page and appears in a "sticky" div that

Customizing ''

2021-01-22 Thread Erik Gustafson
Hi Alex, hi list, I'd like a version of '' that has '+JS'-style behavior (i.e. it doesn't redraw the whole page, only updates the tab "view"). I guess I'm wondering if this is already possible and I'm missing something simple? Otherwise I'll write a new version using 'serverSentEvent' or

Unexpected (read "...") behavior

2021-01-13 Thread Erik Gustafson
Hi Alex, This caught me by surprise: : (pipe (prin "(++ someList)") (make (while (read "+") (link @))) ) -> ("(" "+" "+" someList ")") # ("(" ++ someList ")") expected Similarly: : (pipe (prin "(+ ++ this+is+ok +not-ok+)") (make (while (read "-+") (link @))) ) -> ("(" "+" "+"

Re: Beautiful and Lucid PicoLisp Mind Maps

2021-01-29 Thread Erik Gustafson
Hi Nehal, The provided url is for an active session in the PicoLisp wiki. Can you post the "public" url that appears at the bottom of your article? (e.g. https://picolisp.com/wiki/?home) Looking forward to checking it out! - Erik >

Re: Extending 'VIP' editor

2021-10-24 Thread Erik Gustafson
Hi Alex, Currently there are only *F7 through *F12 reserved. For example, my actual > ~/.pil/viprc is this: > [ ... ] Thanks for sharing, I'm going to use some of those :) > We could add more hooks perhaps. But I'm not sure if this is really > helpful. > What about adding new 'normal

Re: Extending 'VIP' editor

2021-10-24 Thread Erik Gustafson
Hi Alex, >(de *KeyMap > > ("^u" ...) # half page up > > ... > >(de *KeyMap-g > > ... > >(de *KeyMap-q > > ... > > which are then 'assoc'ed in the proper places in the main loop. > > AND: These places should always be at the *beginning* of the 'case' > statements. > In this way,

Re: Extending 'VIP' editor

2021-10-27 Thread Erik Gustafson
Hi Alex, > More general are 'cutX', 'cutN' and 'paste'. They are the main internal > editing > workhorses, based on 'change'. 'change' takes care of everything, like > maintaning undo/redo stacks, markup and rerfeshing the display. > Yep, this is it. 'paste' does what I need. "simulate ..." was

Re: Extending 'VIP' editor

2021-10-25 Thread Erik Gustafson
Hi Alex, > Great! I released it :) > Thanks! Now, no lisp editor is complete without an implementation of "Rainbow Parens": https://gist.github.com/erdg/9b9499dc53e8dbbf1ef0a7a574318d02 They change color every time the screen is redrawn. It caught me by surprise, I don't think I've ever

Re: Extending 'VIP' editor

2021-11-04 Thread Erik Gustafson
Hi all, After a week of exclusively using vip for editing picolisp, here's what I've got: https://gist.github.com/erdg/ebf4556382bc1bbbaf534c4ebd927322 Most interesting are the "code formatting" commands ('@' prefix). Using vip made me realize how much I leaned on vim's "blinking parens" when

Re: Extending 'VIP' editor

2021-11-05 Thread Erik Gustafson
Hi Alex, > I cannot dig into the whole code, but let me point to one minor error: Namespaces strike again! Thanks, I'll fix it. > I think this is difficult. [...] Eh, not worth it then. I guess the solution to my example is the '#@' command, i.e. create a command that undoes whatever, if

Re: Extending 'VIP' editor

2021-11-05 Thread Erik Gustafson
Hi beneroth, > sounds to me a lot like ParEdit mode in emacs (it automatically creates > closing parens and gives fast ways to indent/nest or un-nest S-expr's). > I will check out your extensions and consider switching once again. Please do! Might be a tough sell to the emacs crowd, but it beats

Re: Extending 'VIP' editor

2021-10-25 Thread Erik Gustafson
Hi Alex, What is the best way to reload 'viprc' while vip is running? With a simple (load "~/.pil/viprc") the changes do not take effect. Instead, I've been reloading '@lib/vip.l' (which then loads 'viprc'). This works, but it seems there is a weird bug... any time the ':e' command is

Re: Extending 'VIP' editor

2021-10-25 Thread Erik Gustafson
Hi Alex, The file must be loaded in 'vip' namespace to have the right context: > >(symbols '(vip pico) > (load "~/.pil/viprc") ) > symbols - one of my blindspots! Thank you

Extending 'VIP' editor

2021-10-23 Thread Erik Gustafson
Hi Alex, list, I was hacking 'VIP' a bit today, and thought I'd share the results. A new color scheme: https://gist.github.com/erdg/8d5ad1649975153c963ba7b0a1210fe5 And a few normal mode commands for manipulating code comments: https://gist.github.com/erdg/24e53ad4fcc71d08c88a432c2bcc6544

Re: Extending 'VIP' editor

2021-10-27 Thread Erik Gustafson
ik On Mon, Oct 25, 2021 at 4:27 PM Erik Gustafson wrote: > Hi Alex, > > The file must be loaded in 'vip' namespace to have the right context: >> >>(symbols '(vip pico) >> (load "~/.pil/viprc") ) >> > > symbols - one of my blindspots! Thank you >

Re: Feature request - 'fill'

2021-12-12 Thread Erik Gustafson
Hi Alex, We stick with '^' only, but make it behave more intelligent: > >1. If the result of the evaluation is a list, we get the same result as > now. >2. But if the result is an atom, it is automatically 'cons'ed into a > cell. > > This would not break any existing programs, as atomic

Feature request - 'fill'

2021-12-12 Thread Erik Gustafson
Hi Alex, I know I (ab)use 'fill' / 'macro' too much in my code, but I often want to insert (not splice) the result of some calculation. Would you consider a new '_' syntax within 'fill' forms? : (fill (1 2 _ (+ 1 2)) -> (1 2 3) This can currently be accomplished a few different ways : (let X

Re: Extending 'VIP' editor

2021-12-12 Thread Erik Gustafson
Hi list, The rabbit hole went pretty deep. Here's my current viprc: https://gist.github.com/erdg/ebf4556382bc1bbbaf534c4ebd927322 It now contains a substantial "command language" for lisp code based on the keys '(', ')', '@' and '#'. There's also a bunch of utility functions that make writing

Re: Feature request - 'fill'

2021-12-13 Thread Erik Gustafson
> And why not following lisp tradition and use comma character (,) rather > than caret > character (^) for evaluating expressions? > > In fact fill is more or less analogous to backquote (`) (also known as > quasiquote) in > several lisps : > > `(1 2 3) -> (1 2 3) > `(1 (+ 2 4) 3) -> (1 (+ 2 4)

Re: quote form in picolisp

2021-12-15 Thread Erik Gustafson
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.

Wiki design update

2022-02-08 Thread Erik Gustafson
Hi list, I thought the wiki could use an update for 2022. Have a look - picolisp.com There's a new take on the logo, the login/edit forms are nicer and better behaved on mobile. And I threw in some CSS gradients to make it look extra cool  Feedback welcome! -Erik

Re: Wiki design update

2022-02-08 Thread Erik Gustafson
Hi Jean-Christophe, Good suggestions, that page looked pretty bad. I've uploaded a new css file with the changes. Thanks, Erik

Re: Wiki design update

2022-02-08 Thread Erik Gustafson
Hi Jean-Christophe, The setting on line 247 is not inherited by and that > cramps the code blocks inside the grey background box. > Oops! It seemed to be inherited in firefox for me. Ok, changed :)

Re: Wiki design update

2022-02-09 Thread Erik Gustafson
Hi Jean-Christophe, There must be a lag [...] > The picolisp server caches css files for 24hrs (I think). You may need to refresh with e.g. ctrl-shift-r Current (https://picolisp.com/wiki/wiki/wiki.css) is: code { color: #333; font-weight: bold; font-family: 'Courier New', monospace;

Re: Extending 'VIP' editor

2022-01-22 Thread Erik Gustafson
Hi all, Here's a modified 'insMode' that provides basic "structural editing" features: https://gist.github.com/erdg/0e7d97cc66b205ffd5eadc9b637ed4a9 - balanced insert/delete of (super-)parens - automatic code indentation - line editing shortcuts from within insert mode The line editing

  1   2   >