Dragon-Warrior has quit [Read error: Connection reset by peer]
Dragon-Warrior has joined #picolisp
Dragon-Warrior has quit [Quit: ERC (IRC client for Emacs 26.1)]
alexshendi has quit [Read error: Connection reset by peer]
aw- has joined #picolisp
ubLIX has quit [Ping timeout: 246 seconds]
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
rob_w has joined #picolisp
<DKordic>
freemint: You said recently that Lisp syntax could be more uniform. I wonder how?
f8l has quit [Read error: Connection reset by peer]
wuehlmaus has left #picolisp ["Aus, die Maus"]
freemint has quit [Remote host closed the connection]
freemint has joined #picolisp
<freemint>
DKordic, i really dislike the read macros in PicoLisp, i think those (including comments) should be in s-expr too
<DKordic>
freemint: I absolutely agree!
<freemint>
that would mean that the reader would need a complete redesign, and experimented with how to implement it.
<freemint>
I am not yet sure how to handle macros encountered during evaluation but my macros have one interesting property that allow them to bend the syntax more.
<freemint>
DKordic, here is a challange: that inspired my design, can you write a function that has the same function as ~ and if not what information would you need to build a ~ macro
<Nistur>
mornin'
<Regenaxer>
How should such a read macro look like?
<Regenaxer>
Hi Nistur
<Nistur>
hello :)
<Regenaxer>
They should be as short as possible (non-disturbing)
<tankf33der>
can somebody pump this item if have account.
<tankf33der>
thanks.
<DKordic>
IMHO "read" is yet another lib. I am looking to refactor it. Read Macros would be another lib based on straightforward "read" that execute Read Macros, like "unquote". IMHO Incremental "read" is _required_ by EMACS!
<Regenaxer>
How is that lit then *read* into the system? :D
<Regenaxer>
s/lit/lib/
<Regenaxer>
tankf33der, this page is empty in w3m (?)
<freemint>
Here is my solution, when m is our macro for ~ (9 (m 8 7)) should be (9 8 7) that means the evaluation of the macro has to replace/modify the cell that pointed to the list containing marco now evaluated.
<tankf33der>
Regenaxer: yea, seems so
<Regenaxer>
freemint, no idea what you are talking about
<Regenaxer>
*read* macro runs *before* any cell is cons'ed
<freemint>
Regenaxer, i was still talking to DKordic about what would be needed to be done to replace the picolisp read macros with macros that completely fit themselvess in to S-EXPR
<Regenaxer>
No idea what you mean though
<beneroth>
you can easily build your own "macros" with FEXPR and (curry) .. but read-macros are evaluated during reading, so they need to be built into the VM
<freemint>
beneroth, but i can not built a replacement for ~ that way
<Regenaxer>
Perhaps you mean something like the Forth "immediate" bit
<beneroth>
freemint, you can with ~
<beneroth>
eh
<Regenaxer>
I thought about it, but found it not good
<beneroth>
freemint, `backtick
<freemint>
` is not S-EXR either
<Regenaxer>
yeah, and an immediate flag lets you omit the `
<Regenaxer>
cause it knows it by itself
<Regenaxer>
But this is a major break with philosopy
<Regenaxer>
So I discarded the idea, and we must write ` before it
<freemint>
You can not built a function f in Picolisp such that: (1 ( f 2 3 )) is ( 1 2 3 )
<beneroth>
I sometimes think the possibility to add custom read-macros to the reader would be nice - BUT it probably would in consequence just end with the lisp curse... splitting into more dialects, losing picolisp as a language
<Regenaxer>
freemint, yes, thats what I'm talking
<DKordic>
freemint: Clearly it would not be a function.
<Regenaxer>
'f' would have an "immediate" bit
<Regenaxer>
See in Forth what that means
<Regenaxer>
It means that an immediate word in Forth is executed immediately
<Regenaxer>
during read so to say
<freemint>
If you want to built a "freemint-macro" that does that, the freemint-macro would have to know and modify the cell that points to (f 2 3). Namely (cdr ( 1 (f 2 3))
<Regenaxer>
So it is Forth's way of read macros
<Regenaxer>
But it limits
<Regenaxer>
An immediate word is *always* immediate
<Regenaxer>
I think current way is best (1 2 `(* MY_CONST 16) 9)
<Regenaxer>
Would you want '*' be immediate?
<Regenaxer>
No
<Regenaxer>
So you must write an immediate function for every read macro
<Regenaxer>
` is much better. General and flexible
<Regenaxer>
and just a single, non-disturbing character
<freemint>
You could easily built ` in my model
<Regenaxer>
I don't want. You do it
<freemint>
this would require mayor changes to eval and make code more "syntax-general" at the cost of making PicoLisp more complicated internally and as beneroth noted "being more syntax general is not a good thing maybe". To summarize PicoLisps syntax is not as uniform as it *could* be but it is as uniform as it *should* be.
<freemint>
I did implement it myself and saw how clunky it felt and how inconvinient the freemint-macros were. Good design Regenaxer
<Regenaxer>
What is wrong with ` ? It makes things clear, nothing behind the scenes
<Regenaxer>
Don't get carried away again with fancy obfuscations
<beneroth>
<Regenaxer> Don't get carried away again with fancy obfuscations
<beneroth>
T
<beneroth>
it's easy to get carried away :)
<beneroth>
just look at java *giggles*
<beneroth>
or Perl m(
<Regenaxer>
Yeah, we see in C++ where that leads to
<freemint>
Using ` is the right decision. But DKordic asked me what i ment by "Picolisps syntax is not as uniform as it could be".
<beneroth>
hm.. I don't think in C++ it's the "carry away with rules/obfuscations" that is the problem.. more like they wanting to push more features in it, when it is already too broad, and its very hard to find a unused syntax for new featues *g*
<Regenaxer>
Perhaps it is not clear (at least to me) how far the term "syntax" goes
<beneroth>
I agree with you Regenaxer in spirit of course, slight nitpick :)
<beneroth>
T
<freemint>
` is bad when the only thing you are concerned with is making the syntax as *uniform as possible at all cost* since none of us actually want that ` is the right "trade off"
<beneroth>
well
<Regenaxer>
Perhaps ` is rather semantic than syntax?
<beneroth>
can't be more uniform than an sequence of 0 and 1, no ? :P
<Regenaxer>
hihi
<freemint>
beneroth, it can, a terminated sequence of 0's
<Regenaxer>
true
<Regenaxer>
So "uniform" means "carries less information"
<freemint>
Again a case where making the syntax more uniform makes everything suck more
<freemint>
Uniform means: has a simpler grammar.
<Regenaxer>
ok
<Nistur>
is the picolisp website down or is it just me? :S
<Regenaxer>
picolisp.com works
<Nistur>
says server not found here
<Nistur>
weird
<Regenaxer>
uh
<Nistur>
ahh, google links https, which doesn't work for some raisin
<Nistur>
but http works
<Nistur>
or maybe not
<freemint>
A lisp with "freemint-macros" would really just have a file containing only SEXPR. but since ~ actually adds features that violate how pure SEXPR works and we want to keep that feature the reader and the interpreter(which can now encounter freemint-~) would have to be more complicated, which is not what we want really.
<Nistur>
maybe only some requests are getting through from here :S
<Regenaxer>
From UK?
<Regenaxer>
Perhaps already brexited?
<Nistur>
hah maybe
<Regenaxer>
:(
<freemint>
Regenaxer, can you find yourself agreeing with the statement: "PicoLisp's syntax is not as uniform as it could be, but it is as uniform as it should be"?
* Nistur
wonders if he could just do X forwarding and run firefox on his home machine
<aw->
Nistur: i've tried that, works surprisingly well
<aw->
easier to just setup a VPN or Proxy
<Regenaxer>
freemint, I can agree. For me most of non-uniformity is because of the delimiters
<Regenaxer>
Nistur, or an ssh tunnel
<Nistur>
aw-: maybe, but I've got to run another VPN for work
<Regenaxer>
to home machine
<Nistur>
yeah
<razzy>
(feel free to ignore this) i think reader macros (like `) should be part of editor like glasses-mode in emacs. not language at all. to be perfectly clear that they are there for user. code should be published in both ways.
<freemint>
Regenaxer, i would say read macros are the only source of non-uniformity as far as S-EXR is concerned.
<razzy>
that reminds me, how could i run code through just macro-reader to get "pure" lisp code?
<freemint>
I am not sure what you mean by delimitera
<freemint>
but those are easy to express in grammar i think.
<Regenaxer>
Why not ` and ~ then?
<Regenaxer>
they are like '
<Regenaxer>
and ( ) and .
<freemint>
. would also have to go but there is getting rid of ( ) in pisp
<freemint>
*Lisp
<Regenaxer>
In this view ( and ) are also read macros
<Regenaxer>
and /
<Regenaxer>
oops
<Regenaxer>
I mean "."
<Regenaxer>
The *reader* has a syntax
<Regenaxer>
using all those chars
<Regenaxer>
` and ~ are not special
<Regenaxer>
like . for dotted pairs, or (a b .) for circular lists
<Regenaxer>
all these things are just reader syntax
<freemint>
would be the only delimiters remainng (,)," although even "a" could be replace with (string 'a)
<Regenaxer>
But the syntax of the *lang*?
<Regenaxer>
it is only (function ... args ...)
<freemint>
exactly
<freemint>
*(string (. quote a))
<Regenaxer>
Comma is also read macro
<freemint>
Regenaxer, i can not find myself arguing this case anymore. It is the results of optimizing the wrong thing and i tried with the result that i felt very brittle and more verbose.
<Regenaxer>
No, it is good and necessary to explore such things
<Regenaxer>
As I said, I too think about "immediate" symbols
orivej_ has quit [Ping timeout: 246 seconds]
<Regenaxer>
Could be implemented easily
<Regenaxer>
But it is this obfuscation which *looks* nifty
<Regenaxer>
... but still obfuscates things :)
<razzy>
freemint: (doc 'read) does not help me. asm i do not want to dissasemble
<razzy>
nvermind
orivej has joined #picolisp
<Regenaxer>
razzy, you mean: "how could i run code through just macro-reader to get "pure" lisp code"
<Regenaxer>
Just (read)
<Regenaxer>
and the macros are gone :)
<Regenaxer>
Then 'pp'
orivej has quit [Ping timeout: 255 seconds]
<beneroth>
Regenaxer, yeah () is a read-macro too, building a list :D
<Regenaxer>
T
<freemint>
mhh i built my own website with PicoLisp but not only the website but also the source looks like an ugly mess.