beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
aw- has joined #picolisp
Regenaxer has quit [Remote host closed the connection]
Regenaxer has joined #picolisp
rob_w has joined #picolisp
rob_w has quit [Remote host closed the connection]
v_m_v has joined #picolisp
<tankf33der> Hi all
<Regenaxer> Hi tankf33der!
<tankf33der> Pil21 passed all tests on llvm14.
<Regenaxer> Cool!
<Regenaxer> Didn't even know there is 14 already :)
<tankf33der> nightly dev version
<Regenaxer> ok
<beneroth> Hi tankf33der, servus Regenaxer
<beneroth> tankf33der thanks for testing!
<Nistur> mornin'
<Regenaxer> Hi Nistur!
<Nistur> hulloo :)
<beneroth> ahoy Nistur !
<Nistur> o7
<v_m_v> How I can ask about all elements from my database with field X bigger then ...for example 100 ?
<Regenaxer> If there is a finite number of hits, 'collect' is the easiest
<Regenaxer> (collect 'nr '+Item 100 T)
<Regenaxer> gives >= 100
<Regenaxer> If there are millions of hits, Pilog db/3 is better
<v_m_v> I see. Can I make collect with more complicated statements like bigger then X but smaller then Y ?
<Regenaxer> yes, T is infinte
<Regenaxer> (collect 'nr '+Item 100 999)
<v_m_v> ok, how about bigger then X and also Y field should equal "WOW" ?
<Regenaxer> Then 'select'
<Regenaxer> see doc/select.html
<v_m_v> thx :)
<Regenaxer> :)
<Regenaxer> If a short collect, then you can also
<Regenaxer> (filter '((This) ...) (collect 'nr '+Item 100 999))
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #picolisp
<beneroth> pilog select/3 is a bit more difficult to get correctly at the beginning (and the documentation is very dense), but just ask here and we help you.
<beneroth> pilog queries are very powerful
<v_m_v> Hmm there are two things ...first if I have variable "timestamp" then how I can use it in select ? (select '+Event createdAt (timestamp . inf))
<v_m_v> is not working
<v_m_v> I have to unquote it right?
<Regenaxer> I think not *this* select
<Regenaxer> it is only for interactive use
<Regenaxer> but yes, it does not evaluate
<v_m_v> How I can fix this ?
<v_m_v> I would like to have (select 'Event createdAt (timestamp . inf) origin eventOrigin)
<v_m_v> but I didn't get it how I can have "and" in select
<Regenaxer> Which one is the class?
<Regenaxer> (select +Cls)
<v_m_v> Event is the class
<Regenaxer> (select +Cls nr 7)
<v_m_v> so +Event should be
<Regenaxer> (select nr nm foo bar +Cls nr 7)
<Regenaxer> The 'select' *function* is not made for such
<v_m_v> oh...
<Regenaxer> I meant the Pilog select clause
<v_m_v> So how I can make SQL kind of select ?
<Regenaxer> see doc/select.html
<v_m_v> it is debug mode only ?
<Regenaxer> the select function yes
<Regenaxer> it is just a convenience frontend
<Regenaxer> for quick inspection of db stuff
<beneroth> v_m_v, some pilog predicates and picolisp functions have the same name
<Regenaxer> You cannot use in a program, because it does noy evaluate the args, and always outputs to tty
<v_m_v> I see. So how I can make it in pilog ?
<Regenaxer> So for complex queries either do it by hand with 'init', 'step', 'iter' etc. or use Pilog
<Regenaxer> Pilog internally uses 'init' and 'step'
<v_m_v> PIL will make my pilog queries fast?
<Regenaxer> yes
<Regenaxer> faster than 'filter' on a 'collect'
<Regenaxer> 'collect' fetches too many data perhaps
<Regenaxer> Pilog select iterates many trees simultaneously
<v_m_v> :o
<Regenaxer> (solve '(@Created (cons Timestamp T) @Origin Origin (select (@Event) ((created +Event @Created) (origin +Event @Origin)) (range @Created @Event created) (....))))
<Regenaxer> if Timestamp and Origin are Lisp variables
<v_m_v> why not (goal (quote .. ?
<v_m_v> and why (cons Timestamp T) ?
<Regenaxer> I think 'solve' calls 'goal' internally
<Regenaxer> The cons gives a range
<Regenaxer> if you pass a timestamp only, it will find exact values, not a range
<v_m_v> hmm then what is T in that range ? It is some abstract variable ?
<Regenaxer> T is bigger than any value
<Regenaxer> See "Comparing" in doc/ref.html
<Regenaxer> "As special cases, NIL is always less than anything else, and T is always greater than anything else"
<Regenaxer> We saw that also in the above (collect 'nr '+Item 100 T)
<v_m_v> Oh I see.
<v_m_v> so you are saying that @Created is range between my timestamp and something Huge. @Orgin is origin ...then you are connected @Created to +Event's created and @Origin to +Event's origin and at the end you are putting rules which would be like a SQL's "where"
<v_m_v> right ?
<Regenaxer> yes, if "where" is a set of filter conditiins
<v_m_v> it is really powerfull
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #picolisp
rob_w has joined #picolisp
<v_m_v> Do you have any examples when PiL is getting POST requests?
<Regenaxer> POSTs happen all the time, whenever a button is pressed
<Regenaxer> An application has nothing to do
<Regenaxer> it gets the values in Globals or as 'http' properties
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer> if the variable starts with '*', it is taken as a global
<Regenaxer> You must 'allow' these globals
<Regenaxer> Concerning such values, the application then does not care whether the transaction is GET or POST
<Regenaxer> But it can distinguish via the *Post global
<v_m_v> Hmm I see, but I am using PiL as a REST API without the gui. So I need POST for creating. So I have (de myApiName (This) .... ) and you saying that all of the POST params I will find in This ?
<Regenaxer> You call it as "!myApiName"?
<Regenaxer> Then 'This' is just the first arg
<Regenaxer> "!myApiName?foo"
<Regenaxer> "!myApiName?foo&*Var1=abc&*Var2=+123"
<Regenaxer> this works in POST and in GET
<v_m_v> ok but the POST arguments are in the header not in the url
<Regenaxer> POST can have further stuff in the body
<Regenaxer> not in header, right
<Regenaxer> Multipart post body
<Regenaxer> one assignment per line
<v_m_v> ok so it will be (de !sth (param1 param2 param2) and then I will make my post and param1 param2 param3 should be in the body right ?
<Regenaxer> The app does not care
<Regenaxer> "!myApiName?foo&*Var1=abc&*Var2=+123&bar"
<Regenaxer> then myApiName get foo and bar, two args
<Regenaxer> *Var1 and *Var2 are set as globals
<Regenaxer> So pil in fact does not care whether you post or get
<Regenaxer> I use GET most of the time
<Regenaxer> POST only to distinguish button presses in gui forms
<Regenaxer> If I need to interact with a pil server via HTTP, I always only use GET
<Regenaxer> (unless file data (images etc.) need to be transferred of course)
aw- has quit [Ping timeout: 264 seconds]
<v_m_v> how I can allow them
<v_m_v> ?
<Regenaxer> In your allowed structure
<Regenaxer> (allowed (...) ... *Var1 *Var2 ... myApiName ...)
<Regenaxer> no
<Regenaxer> must be ... "!myApiName' ...
<Regenaxer> I think Mia's blog has lots of examples for allow
<Regenaxer> hmm, or perhaps not yet?
<Regenaxer> if not, then in the next days ;)
<v_m_v> wait a second ...what do you mean by globals? They are separated per request right? There is no way that those variabled would be shared between users right ?
<Regenaxer> They are local to the process
<Regenaxer> Unless a session is started with (app), the child process terminates immediately
<Regenaxer> But during its lifetime you can do something with the values
<v_m_v> Ok, I have *Var1 in my allowed. But when I am seding my request by CURL (curl -X POST -d '*Var1=sth' http://localhost:8080/!rule.json I am getting an error that *Var1 is not allowed
<v_m_v> probably I am making something stupid but PiL way of dealing with server is really strange :D
<Regenaxer> I think you are very close
<Regenaxer> What do you have in *Allow
<Regenaxer> in repl?
<v_m_v> (allowed NIL "!rule.json" *Var1 *Var2)
<Regenaxer> looks good
<Regenaxer> Is it set in the server?
<Regenaxer> I would set it in the very beginning
<Regenaxer> main.l or so
<v_m_v> yes
<v_m_v> on normal GET request from browser is fine. Only the post have *Var1 is not allowes
<v_m_v> *allowed
<Regenaxer> For example, if I start app/
<Regenaxer> ap: *Allow
<Regenaxer> -> (("!stop" ("!psh" ("!ping" ("!jsForm" ("!console") "!jsHint"))) "!work" ("!tzOffs") "@lib.css" (*Adr NIL *Gate (*Cipher NIL *ContL NIL *Form (*Evt (*Drop))) *Host (*Gui (*Get NIL *Got)) *JS (*ID) *Menu (*JsHint (*JsArgs)) *Tab) "@lib/form.js" NIL jsUp (jsDn ("@lib/role.l" NIL "@lib/user.l"))) "app/" "@img/")
<Regenaxer> The value is a tree
rob_w has quit [Quit: Leaving]
<Regenaxer> Anyway, your call (allowed () ... *Var1 ...) should be good
<v_m_v> https://pastebin.com/uf1tm8EW this is the example
<Regenaxer> is (server 8080) '("!rule.json")) intended?
<Regenaxer> not (server 8080 "!rule.json") ?
<Regenaxer> but anyway not the allow problem
<v_m_v> there will be more api's there
<Regenaxer> ok
<v_m_v> so this is why I have used list there
<Regenaxer> it is ignored anyway
<Regenaxer> hmm no
<Regenaxer> in the child 'server' returns
<Regenaxer> then the quoted expr is executed
<Regenaxer> no harm though
<Regenaxer> wait
<Regenaxer> the allow is ok
<Regenaxer> but you need a $ before the vars in the URL
<Regenaxer> $ marks internal symbols
<Regenaxer> ...&$*Var1=abc&
<Regenaxer> you get "abc" in *Var1
<v_m_v> by GET sure
<Regenaxer> ...&$*Var1=$abc& gives the internal 'abc'
<Regenaxer> ...&$*Var1=+123& gives the number 123
<Regenaxer> So without $ a transient symbol is passed as a variable, which is not useful and cannot be allowed easily
<v_m_v> but curl -X POST -d '*Var1=$test' http://localhost:8080/\!rule.json will not work
<Regenaxer> POST -d '$*Var1=test'
<Regenaxer> *Var1 is internal
<Regenaxer> "test" is transient then
<v_m_v> now I have: "$*Var1 [::1] not allowed" :)
<Regenaxer> uh :(
<Regenaxer> So I was mistaken, I don't remember
<Regenaxer> yeah, no $
<Regenaxer> ap: (mkUrl '(foo *Varo 1))
<Regenaxer> -> "foo?*Varo=+1"
<Regenaxer> I cannot test atm, I'm on the road
<Regenaxer> 15 minutes
<v_m_v> Var1 *Var1 $*Var1 are giving me the same error with POST
<Regenaxer> My proposal for $ was wrong
<Regenaxer> it is for data, not vars
<Regenaxer> ok, back home
<Regenaxer> Could it be a namespace problem? How do you start it? with ... -rule~main -go ?
<v_m_v> yes
<Regenaxer> ok
<v_m_v> with + at the end
<Regenaxer> yes
<Regenaxer> hmm, strange, I must try your code
<Regenaxer> moment
<v_m_v> you have to remove one line (load ...).
<Regenaxer> yes, and 'pool'
<Regenaxer> did already
<Regenaxer> Works here
<Regenaxer> I get *Var1
<Regenaxer> $ curl 'http://localhost:8080/!rule.json?*Var1=x&abc&+123'
<v_m_v> yes...but do it the same thing with POST by curl and put Var1 inside the body
<Regenaxer> I changed a little for the naming conventions:
<Regenaxer> (de rule.json (This This2)
<Regenaxer> (msg This)
<Regenaxer> (msg This2)
<Regenaxer> (msg *Var1)
<Regenaxer> (respond "OK") )
<Regenaxer> then I get:
<Regenaxer> "abc"
<Regenaxer> 123
<Regenaxer> "x"
<Regenaxer> Ah, yes, I did not test the POST
<Regenaxer> Why -X ?
<Regenaxer> I think I always used -F
<v_m_v> I don't know -F option :)
<v_m_v> curl -X POST http://localhost:8080/\!rule.json -H "Content-Type: application/json" -d '{"Var1": 1234}'
<v_m_v> as an example
<Regenaxer> -F '*Var1=test' works
<Regenaxer> Pil supports only multi-part data
<Regenaxer> -X -d gives "unimplemented"
<Regenaxer> So this curl -F '*Var1=foobar' 'http://localhost:8080/!rule.json?abc&+123' gives:
<Regenaxer> "abc"
<Regenaxer> 123
<Regenaxer> "foobar"
<Regenaxer> with this function:
<Regenaxer> (de rule.json (This This2)
<Regenaxer> (msg This)
<Regenaxer> (respond "OK") )
<Regenaxer> (msg *Var1)
<Regenaxer> (msg This2)
<Regenaxer> So I was wrong about the Lisp data encoding
<Regenaxer> this does *not* apply to posted values
<Regenaxer> only to the URL values
<Regenaxer> $ curl 'http://localhost:8080/!rule.json?*Var1=x&abc&+123'
<Regenaxer> ?*Var1=abc gives "abc"
<Regenaxer> ?*Var1=$abc gives abc
<Regenaxer> ?*Var1=+123 gives 123
<Regenaxer> ?*Var1=123 gives "123"
<Regenaxer> etc.
<Regenaxer> you can even pass a list
<Regenaxer> ?*Var1=_1_2_3 gives (1 2 3)
<v_m_v> I see. How I can then send json to PiL server ?
<Regenaxer> well, it gives ("1" "2" "3")
<Regenaxer> ?*Var1=_+1_+2_+3 gives (1 2 3)
<Regenaxer> I would just echo it
<Regenaxer> haven't tried with curl
<Regenaxer> I usually communicate only between pil processes
<Regenaxer> and for those I use the 'ssl' tool, and the PLIO protocol
<v_m_v> wait a second....curl -F '*Var1=wrwer' -X POST 'http://localhost:8080/!rule.json' this is not working
<Regenaxer> No -X
<Regenaxer> curl -F '*Var1=foobar' 'http://localhost:8080/!rule.json?abc&+123'
<Regenaxer> Sorry, I must get some work done
<v_m_v> without -X POST you will not make POST ..as I think
<v_m_v> :)
<v_m_v> thx a lot
<v_m_v> now I can hack the rest :)
<Regenaxer> I'm sure you find it out :)
<v_m_v> I have learn a lot today !!! :D
<v_m_v> Thank you!!
<Regenaxer> I forgot to mention that pil needs multipart
<Regenaxer> that was the problem
<Regenaxer> No, it does POST
<Regenaxer> I just tried, could not resist ;)
<Regenaxer> set a break *Post
<Regenaxer> breakpoint, and
<Regenaxer> : *Post
<Regenaxer> -> T
<v_m_v> I see. I wondering if it is even possible to make real REST API in PIL. Like GET /api/users - for all users POST /api/users (with params in the body) for creating a new user. GET /api/user/id/123 for getting user with ID 123.
<v_m_v> I don't such examples in PIL community
<Regenaxer> It supports only get and post
<Regenaxer> what would be not possible?
<v_m_v> there is no PUT, PATCH, DELETE?
<Regenaxer> nope
<v_m_v> Is there any reason why?
<Regenaxer> and even POST is not needed
<Regenaxer> except for binary data
<Regenaxer> I do all with GET
<Regenaxer> you can call any function or file
<Regenaxer> so POST is redunndant
<v_m_v> I see. But the rest is not fr possibilities ..it is for structure and third parties
<Regenaxer> and PATCH, DELETE are even dangerous
<Regenaxer> Ok, I understand
<Regenaxer> then you need to extend @lib/http.l
<v_m_v> I can deal with that but I know that for other people it would be a huge issue.
<Regenaxer> If you allow also PUT, DELETE etc. you need another security structure too. A different server
<Regenaxer> I never needed that
<Regenaxer> What third party do you think of?
razzy has joined #picolisp
<razzy> Good day i wish to all!
<Regenaxer> Hi razzy!
<beneroth> <v_m_v> I see. I wondering if it is even possible to make real REST API in PI
<beneroth> WTF
<beneroth> sorry to sound like a smug lisper.. but.. just roll your own http.l and do everything as you want it. no biggie.
<Regenaxer> It is surely possible, by extending the server, but where do we need that?
<Regenaxer> delete etc
<beneroth> Regenaxer, when you wan to offer it to the client because the client is bound to certain conventions :)
<Regenaxer> Current http.l is a plain application server
<beneroth> client being not a classical browser but a program implemented natively or in JS bloat
<beneroth> yep
<beneroth> so if you want to run a form.l application, us standard http.l. If you do want something different, use cyborgars http.l implementation (easy to start with) or whatever.
<Regenaxer> right
<razzy> I have trouble recreating "How to add records to picolisp database" from Mia. I load everything like in tut.tgz than change (pool) and than try (request) and it complain about bad db file. should i webpaste log?
<beneroth> webpaste code
<beneroth> especially (pool)
<v_m_v> *beneroth if I would need to write my own http.l to have patch and delete then I would just choose different lisp dialect with more possibilities. That was not the nicest answear :/
<beneroth> yeah. well it's how I did it
<beneroth> v_m_v, here, maybe you can use this. cyborgar even used it originally with websockets afaik http://www.itship.ch/web.l.tgz
<beneroth> this version might contain some minor bugfixes from me (I think something about cookie handling or so)
<beneroth> unfortunately the original source was on bitbucket and seems gone https://bitbucket.org/iromero91/web.l/wiki/Home
<v_m_v> I thought about using libwebsocket and native bindings
<beneroth> hm..for what do you then even need a picolisp http server?
<beneroth> according to https://libwebsockets.org/ the lib inclues a http server?
<v_m_v> I need websockets for live updates. http server for getting access into db.
<v_m_v> I could use SQLite and Rust...or Python...but there are some things in PIL that are awesome and I would like to try. At the end if everything will fail then I will use it as a database for events.
<razzy> beneroth: https://termbin.com/lg8l
<Regenaxer> v_m_v, for life updates ServerSentEvents are much simpler
<Regenaxer> I use them in several places
<Regenaxer> razzy, the above link is very unreadable
<Regenaxer> C^[[C^[[C^[[C^[[C^[[Ccollect 'nm '+Man)
<Regenaxer> : (show {"^[[1P{'{^[[CA137^[[C)
<beneroth> yep, full of special whitespaces
<razzy> I will repeat.
<razzy> sorry
<beneroth> v_m_v, why using libwebsocket?
<v_m_v> Can I write macros in PiL ? I would like to have pipelines like in Elixir/OCaml can I write this?
<v_m_v> beneroth: for easy ready to use libsocket lib.
<beneroth> what is the effect you desire from macros?
<beneroth> macros are rarely used in picolisp. instead it's one of the few Lisps which offer FEXPR, they are more powerful than macros but can not always be compiled, therefore compiled lisps stopped with them some decades ago.
<beneroth> FEXPR is a function which gets its arguments un-evaluated, and can decide itself when/how it is evaluating them (e.g. rewriting them before evaluation)
<beneroth> I don't know Elixit/OCaml pipelines, do you have an example?
<razzy> beneroth: Regenaxer: http://ix.io/3FaN/text thank you for advice
<Regenaxer> Now good to read :)
<v_m_v> instead or writing (fun1 (fun2 (fun3 "test"))) you are writing (-> "test" fun3 fun2 fun1 )
<v_m_v> this is the simplest pipeline
<Regenaxer> razzy, family needs a directory
<Regenaxer> it creates several files
<razzy> i see
<razzy> thx
<Regenaxer> Still should not crash
<Regenaxer> razzy, can you debug?
<Regenaxer> eg. with strace
<beneroth> v_m_v, ok. You could implement the (->) function as FEXPR (though -> is already the name of a picolisp built-in function, so maybe use another name)
<v_m_v> beneroth: I though that PIL is small language ...now I see that it is huge and powerfull :D
<Regenaxer> I do not feel such a "pipeline" is readable
<v_m_v> There is more things then in CLisp :D
<Regenaxer> why hide the structure?
<beneroth> v_m_v, though what if (fun3) takes 3 arguments? how do you decide in the pipelined notation what is an argument and what is a function?
<beneroth> Regenaxer, I feel the same. this is confusing.
<Regenaxer> T
<Regenaxer> like 'setf'
<beneroth> removing the clear AST structure
<v_m_v> beneroth is it simple in Elixir you are passing the pipelined element and putting it as the first element in the next function
<Regenaxer> it ignores Lisp syntax
<v_m_v> there is also pipeline which is putting at the end
<razzy> Regenaxer: now i cannot reproduce crash. just error message
<v_m_v> Clojrue also have something like that.
<Regenaxer> razzy, I see
<Regenaxer> no worry
<v_m_v> If you have pipeline and possibility of having something like a macro..then you can have "with" from Elixir which is the most beautifull thing which I have saw iny my software development life.
<beneroth> v_m_v, so (->) is just a function which calls the second argument with the first argument, then calls all other arguments after another with the result of the previous call.
<v_m_v> pipe opperator + pattern matching + try catch in a one clean contstruction
<beneroth> sounds a bit like picolisp (and)
<v_m_v> you mean this: https://software-lab.de/doc/ref_.html#-%3E ?
<beneroth> no, your ->
<beneroth> (-> "test" fun3 fun2 fun1 )
<beneroth> normal function, what else?
<v_m_v> it is more readable in this way.
<beneroth> habit. habit can be trained and changed.
<v_m_v> Hmmm yes...i can just fold it
<beneroth> how do you use this ever with functions with multiple parameters?
<beneroth> you cannot, can you?
<v_m_v> yes I can ... (-> "test" ('fun3 "param2" "param3") fun2)
<v_m_v> or something like that
<v_m_v> something which will pass function without running it.
<v_m_v> then "test" will be putted as the first argument of the fun3
<beneroth> yeah, quote
<Regenaxer> It is a little against the qil philosphy, I think
<beneroth> weird
<Regenaxer> obfuscating the *real* thing
<beneroth> yeah. though possibly not lisp itself, as it's still s-expr. but the semantic is kinda lost and implicit
<Regenaxer> In pil there is no nifty hiding
<Regenaxer> All such macros make sense only in compiled code
<v_m_v> I know that PIL is not a Clojrue but it will be more readable for us.
<beneroth> so kinda a mix of quote, fill, apply and get all in one overloaded function
<v_m_v> true...but still it can make it more readable.
<v_m_v> true...I will write it tomorrow. Or try :)
<Regenaxer> yes :)
<v_m_v> It will make everything easier for me (I've came from pipe world...so this is how I am thinking)
<beneroth> I think that kind of readability is subjective. Now you have to know all the different modes/context of (->) to be able to read code making use of it.
<v_m_v> There were some research about pipe operators...
<beneroth> when you say pipe world, I think of bash pipes | another pipe | next thing :)
<Regenaxer> T
<v_m_v> I need to search for them. They have prove that it is more readable because at the beggining you have the most important information...
<Regenaxer> And still Pil code is a lot more concise and readable than CL or Clojure
<Regenaxer> e.g. if I look at rosettacode
<v_m_v> Scheme > PIL > Clojure > CL > Racket (in my oppinion when we are talking about readability)
<v_m_v> Bit still even Racket is easier to read then Rust ;D
<Regenaxer> Not sure about Scheme. I find it tedius
<beneroth> well we can assure you that you can implement all this DSLs in picolisp easily
<beneroth> we cannot assure you to agree on taste :P
<v_m_v> about DSL..what is the best and easiest way of writing DSL in PiL ?
<Regenaxer> a way?
<Regenaxer> Pil is always a dsl
<beneroth> I personally prefer when things do clearly one thing, and the meaning is not too much context depended. E.g. like C is much more readable than C++, as in C++ you can redefine almost everything. But then again C code is longer as it has to be more explicit.
<Regenaxer> Perhaps a coil example is the source of the interpreter?
<beneroth> v_m_v, easiest is to write DSL commands as functions, I find.
<v_m_v> what do you mean by "commands as functions" ?
<Regenaxer> v_m_v, have you looked at src/* ?
<Regenaxer> most of pil is redefined
<Regenaxer> so that it builds iyself
<Regenaxer> itself
<Regenaxer> isn't that a dsl?
<beneroth> e.g. html DSL: (<a> '(href . "www.picolisp.com") "Link to PicoLisp Website") -> <a href="www.picolisp.com">Link to PicoLisp Website</a>
<v_m_v> oh I see. I need to check how the html has been implemented
<v_m_v> Thx
<beneroth> @lib/xhtml.l
<beneroth> primarily based on the (tag) fexpr
<Regenaxer> It is a bit misleading to compare Scheme or CL or Clojure with pil
<Regenaxer> Pil is more different than it seems
<Regenaxer> I think it is closer to Forth
<beneroth> yeah. the difference in compiled vs. interpreted, macros vs fexpr, big metadata for optimizations vs. few small elements to build with
<beneroth> it looks more similiar than it is
<razzy> in context of tut...family.l why (request (+Man)) return {new_symbol} but does not insert it into *DB?
<Regenaxer> It *is* inserted
<Regenaxer> but you provide no value
<Regenaxer> thus no index
<Regenaxer> thus not findable
<razzy> hmm, i will work on it :]
<Regenaxer> (request (+Man) 'nm "razzy")
<Regenaxer> (db 'nm '+Man "razzy")
<Regenaxer> v_m_v, you should attend next PilCon. We can talk about such philosophical issues
<Regenaxer> it is on 20th
<v_m_v> remote?
<Regenaxer> yes
<Regenaxer> Jitsi
<Regenaxer> twice a month
<Regenaxer> 10th and 20th
<Regenaxer> I think it is already since one year
<Regenaxer> We planned a real PilCon last summer, but cancelled it due to Covid
<Regenaxer> on 20th it is always 16:00 UTC
<Regenaxer> (on 10th at 8:00 UTC)
<Regenaxer> early date is early time :)
<razzy> Regenaxer: can i look for symbols by {Symbol_ID_Number}? like (collect 'Symbol_ID '+Man)?
<Regenaxer> This is not necessary, as {number} *is* the symbol
<Regenaxer> or do you mean a real number? Then 'id'
<Regenaxer> : (id 2)
<Regenaxer> -> {2}
<razzy> i mean symbol number. i just want to list all +Men regardless of name
<Regenaxer> : (forall '+Man (qrintsp This))
<Regenaxer> printsp
<razzy> Regenaxer: thank you. :D i was not expecting special function :D
<razzy> btw, winter is covid-locked but I would like to attend live PilCon in late summer. Covid will be ok in summer.
<Regenaxer> 'forall' is not really special, but normally not used in programs
<Regenaxer> It iterates a whole DB file
<Regenaxer> To get all men you better do (collect 'nm '+Man)
<beneroth> Regenaxer, oh I didn't now 'forall, another pil21ism :)
<beneroth> I see
<beneroth> [OT] npm (now owned by GitHub) once again finds a vulnerability which allows to distribute malicious packages https://github.blog/2021-11-15-githubs-commitment-to-npm-ecosystem-security/
<beneroth> "a vulnerability that would allow an attacker to publish new versions of any npm package using an account without proper authorization"
<beneroth> "This vulnerability existed in the npm registry beyond the timeframe for which we have telemetry to determine whether it has ever been exploited maliciously."
* beneroth is not installing any npm/electron-based software on his devices
<Regenaxer> beneroth, 'forall' is rather new
<Regenaxer> I got sick of typing (for This ... (seq This) ...
<Regenaxer> 'forall' 02jul21
<beneroth> ah I see :)
<Regenaxer> good for low-level things
<beneroth> yeah
<beneroth> though I find the implicit assumption that all objects of a class are in their proper file a bit bold
<beneroth> I'm actually interested in changing dbs assignments over time
<Regenaxer> yes, this is a caveat
<beneroth> changing that is kinda the hardest database change, because they necessitate a dump/import or something with the same effects
<Regenaxer> T
<Regenaxer> but dumpDB and loadDB work well
<Regenaxer> Until now I never changed a production system
<Regenaxer> only during early phases
<beneroth> yeah makes completely sense, especially in your way of working
beneroth has quit [Quit: Leaving]
v_m_v has quit [Remote host closed the connection]
aw- has joined #picolisp