Ideas for a good lisp editor?

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
sydy
Posts: 156
Joined: Tue Mar 21, 2017 1:34 pm

Ideas for a good lisp editor?

Post by sydy » Wed Feb 13, 2019 8:06 pm

Dear all,

I'm quite often confused when I have to deal with larger strings of lisp. Probably my mind isn't as powerful as others to follow the structure in all these parentheses. Sometimes, I just get sick by doing all these strings in a max-message. So I open a proper coding editor and write it there. But still, I have the problem with the confusing babushka of all these parentheses...

Actually, the III-slot would be a nice editor because it represents the structure of a III. Unfortunately, you lose your code if you forget a parenthesis... So it's not practical as an editor neither.

Has anyone an idea which coding-editor would give a structured representation of lisp code – as III-slot does – and maybe other features? (For java I use for instance komodo which is very helpful to code...)

I did a bit of research but couldn't find something convincing on the editor level...

Many thanks
m

pedrnun
Posts: 74
Joined: Sun Jan 17, 2016 3:23 am
Contact:

Re: Ideas for a good lisp editor?

Post by pedrnun » Sat Mar 02, 2019 4:17 pm

Here's one! :ugeek:

Code: Select all

<pre><code>
----------begin_max5_patcher----------
1091.3ocuXsrjiZCEcs8WgBqrqggf.DfypjEoprHKx93obICZbqIXIJgneLS
MeP42HeYQO.Z5twf6wX6tLx5ZYc04Tm6C0ea4Bm87GIUNfeA72fEK91xEKLl
zFVzLegyQ7iYE3Jyxbx3GORXRGW62IIOJM1+u+ED3C2.9KRtfC9Sd8WITAuc
YUxmJHl00ZgUejxJHRytBaLVhkY2QYG1IHYR6oJH0y2EDgRzCaB0OgHOevmZ
9IelyjUzuZ1b8RsVo4Fmw2+kOF2yi7ZYqK80F+9xk5GtWH1877.bAPMb43MJ
HRiwDuzDjB2FzG32Cv8fVvlqO198bpDPYfLdNAPTS3hKGjH+9fD5mLJJSt9n
7dZUMtfVQlAA6FnQjFDqGPiCMz7AMF4A0V9FjIA6AEsVstP9TIwdVc1iYGbb
Ufr6zcoQpv.C7C8M3N3D3NbXbG7Cf6ijpJ7Axa.9ePJJ3a25BVY9KR8FodGm
.1jBxwLJof.7AqAPPf5IlkKHX0GNbGshpMbfWIoL8GefKJx+oSRhmM4ELYZN
aveTxlwXOX5vrGb9TM6wY24UxERbA3WUt.HOM5cajQylDJL0pj7GmENQh8VR
tBeOIemZkpceGVJEz80RastEcjwBm6IhJJmo1i8DgoHhuuuQGZox4RNlWer7
ppfPMoZ1zT4.NJ4Ec0kPlOLonQMRU4imAsCR2VfKHF5EZv+nIffvgwe3LVSI
iW9D3CfRbkj.VYF9nfTVfyHq2xdtmgsLdoTIA+YbgTs9bA9vVFQl0qchBJij
wqYlMFMWTU3ll3LiTIIZXp5F1iggat7JvP+TOTW2EIwiUAN4pW.Vn1VBPOET
QFOh3cUINbpzn1lkSGMN.MegAZDp6O7jEhWsZUzJzpWU.dMLXss16ZSk20s0
cWOUU2lTGuWdaxxOsYPCiM0ePPu.T2l+OjmNp5Dt+F0iNOQV0nNWJvGIRhXG
gg2aOj+HJMS0YofzEqLXQL3jRM2gpdOHYouk0m0Am5S7js.FYItTi.LHz+DW
WCFLz805xLqWJSwWlu42DTb+1XsQbpWCy3s4He3NdAYmlp1kik3c9cuZ3Bi3
zUyBqdwinlQTyXbhJfJUMoQ3pLovlyZ0HTgwlO5XUxNsSMJ5tYsJ6NCMJ7Nx
40m1tT9pbZfOMiMinNi4W2lQrUX5BkPiVLNX9ZF4THNqffEWUHC886e+mjQu
+yz.17yLE9e0+dFiq01eIKTwqEYs3oI0N3YmmSzROrtOidqQeOL8hFjneONB
dKbTzYfHzL3m1C6nNBNWNBdKbzMBP56jMsiReApORyK4pB4MxbUfi41KwlgM
OO6ROZmi5ANKjPvMySvyOhXX1FEDoI3zDuXah5jdSuzS24PCwugFrI9vkkMM
0X7h1GpD8ega5tIw0LkxrSMcBqpocOsc8lx+NXgJGsTkftVXSo+XrsAMGcKb
BVMsIoqxyee4+CPpTKgA
-----------end_max5_patcher-----------
</code></pre>
Cheers,
Pedro

sydy
Posts: 156
Joined: Tue Mar 21, 2017 1:34 pm

Re: Ideas for a good lisp editor?

Post by sydy » Sun Mar 03, 2019 10:04 pm

Hey Pedro,

thanks, I did things like this too but your's is quite proper.
The problem comes with bigger strings. The bach.tree objects can't represent them without having all the connections scrambling the visualization... Try this one for instance (and it's still really a very small one...) :
( slotinfo (1 ( name amplitude ) ( type function ) (key a ) ( range -90. 10. ) ( slope -0.4 ) (representation dB) ( grid ) ( ysnap 0.) ( domain 0. 1.) ( domainslope 0. ) (temporalmode relative ) ( with duration ) ( height auto ) ) ( 2 ( name partial ) ( type text ) ( key p ) ) )

(And yes, you could use the attribute @textdecayfactor to shrink the text, but then the text of substrings gets really tiny... I'm not happy with it.)

So I'm still looking for something like ( slotinfo (1 ( name edit-tree ) ( type llll) )) but without the inconvenience of losing the code if there's an error.
Compare the representation as shown in the attachment (slot type llll) with your patch – I think you'll agree...
@Daniele and Andrea: This is a real issue for Santa Claus. I'll send him a lot of messages. :–)

Thanks again and have a nice evening.
M
Attachments
slot(type IIII).png
slot(type IIII).png (90.91 KiB) Viewed 3009 times

pedrnun
Posts: 74
Joined: Sun Jan 17, 2016 3:23 am
Contact:

Re: Ideas for a good lisp editor?

Post by pedrnun » Thu May 02, 2019 2:10 am

Hi,

I'm sorry for not having replied sooner – I totally missed your reply.

You are absolutely right regarding the representation! I actually hadn't fully understand your issue until now. At the time, I was not aware of the "Editor for slot llll", which is very handy indeed!

It's probably a bit too late now, but here's another take: you can copy/paste from the slot editor to the [textedit]* and edit the llll there so you won't lose your code, in case of a mistake. If the code is good, it is accepted and formatted by [bach.slot]; otherwise, you'll get bach.join: Bad input llll (there's a [bach.join] before [bach.slot] in my patch).
I know it's not ideal but it might save you some code deletions! :-)

* - it does support indentation although in a funny way...

Code: Select all

<pre><code>
----------begin_max5_patcher----------
1909.3oc6a0raaiCD9rySAgOk.jFPRIqe1S6VfdaOrXQussvfVhIVckIEjnh
iaQef1Wi8Ia4ORJVVT1xNtcSsZCpjMIEmY9zGmYj0vub0joK3OQKlB9EveAl
L4KWMYhtIUCSp99joqHOEkRJzCa5JZQA4A5zaM8InOI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.j
SacYURbFWdWuxvbzAY777La3SiO4VeyWm6jqudf95ftuHUVmm9gzYj6Y.bbF
ffvNmIAgNjEgOSBBODAgdgBR+rkGD6lcFLI8uwwAkD7bHImuWDOLbnn2K89D
xe3NZpc8kGa1gXvu8RdGZTinQuLQODud07pWljvCgxbNHm5Re5PR5bvMQmn6
WSHQRVV0NMTKFkPjoC7IylBTmdjL.Cy7U8FGbZN8wj5wOS2BIWFsWHC0WlaB
J+jmI0mopbXxYkIUTDoj+5U+GzcJj1A
-----------end_max5_patcher-----------
</code></pre>
Cheers!
Pedro
Last edited by pedrnun on Thu May 02, 2019 4:45 am, edited 1 time in total.

pedrnun
Posts: 74
Joined: Sun Jan 17, 2016 3:23 am
Contact:

Re: Ideas for a good lisp editor?

Post by pedrnun » Thu May 02, 2019 2:29 am

I've just learned that [bach.reg] has the same kind of llll editor that pops up when you double-click it!!! :o :D
Here: http://forum.bachproject.net/forum/view ... =774#p2561
(Thanks, Daniele!)

Post Reply