Pilog (Was: Subscribe)
Hi Dean, > /* > I'm wondering where to cut the cake between prolog and pico/pilog > and thought I'd post a quick example to illustrate i.e. .. Perhaps you first try yourself to translate it to Pilog? > As an asidere the output of 'Ls...is it possible to remove the double > quotes when printing the symbols or CARs of the resultant list?/ You could call the 'prin' and/or 'prinl' Lisp functions. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Simple Routing for web apps
Thanx Beneroth. Your reference to http://software-lab.de/doc/app.html#urlSyntax was what I was looking for. This stuff is dense! Thanx for all the responses. On Sat, Nov 12, 2016 at 01:14:53AM +0100, andr...@itship.ch wrote: Hi Joe Please note that on the page http://picolisp.com/wiki/?web the section Tutorial and the section Libraries and Alternatives talk about different things. The Tutorials section is all about the official Web-GUI/DB-Framework built on top of picolisp, which is part of the official distribution. Some people made other web frameworks which are also built on top of picolisp, but do not use this GUI framework The concepts and software design of the various frameworks are very different. Some people have special use cases and made their own framework to be optimal for their use (e.g. websocket support), or they found the normal framework to difficult to start with, many different reasons. The standard (web-) GUI framework is very powerful and rich on functionality, though it follows complete other principles than most current web frameworks, so if you are already used to them, this one can be quite hard to wrap your head around. E.g. with it you define the GUI directly (this part should do this, this part should do that), and you don't have really to care much about which part is on the server and which on the client, it takes care of that (you should understand the underlying principles though...), no MVC pattern or the like. Currently its (as far as we know) mainly used to build ERP systems, so the default styling might be more functional than stylish. If you want to quickly create extremely powerful CRUD-Applications, use this. It can be used for ordinary websites, e.g. http://picolisp.com is implemented with the default GUI framework. It of course has Routing, see Email from Alexander Burger (who is the creator of piclisp and this framework) and check out the documentation here: http:// software-lab.de/doc/app.html#urlSyntax This stuff is implented in the function http in @lib/http.l (@ here means: within picolisp directory in your installation). For full functionality, especially session handling (one process per session, not one process per request) its usually operated together with the little C-application httpGate (also part of the picolisp distribution), which acts as proxy, SSL terminator and does session routing. Study the Tutorials section, especially the first link: http://software-lab.de/ doc/app.html Or, go with one of the alternative frameworks (see Email from Henrik or the Library and Alternative sections on the page). If you intend to roll your own, then its easiest to learn and play around with the one from José mentioned in Henriks Email to have a start. Also, if you don't know the inner workings of HTTP, check out: http:// www.jmarshall.com/easy/http/ You know IRC ? Come to our chat channel #picolisp on freenode.org, we love to talk and most times people are available for instant help. Greetings, beneroth - Original Message - From: Joe Golden [mailto:j...@joegolden.com] To: picolisp@software-lab.de Sent: Thu, 10 Nov 2016 15:46:34 -0500 Subject: Simple Routing for web apps Can someone point me to a reference for simple web routing? As in "If xyz is your URL, do this"? On the wiki http://picolisp.com/wiki/?web is states "pl-web: A small http application server with websockets and routing". Does this mean that the base library http.l lacks routing? Any guidance appreciated. -- Joe Golden -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- Joe Golden -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Subscribe
/* I'm wondering where to cut the cake between prolog and pico/pilog and thought I'd post a quick example to illustrate i.e. initially I won't have individual values for variables but a list of possibles and want the pc to pick the right values for me using a system of (cast in stone) equations as a filter...just two in this example. Apparently for this to work I need to be use integers. In reality the figures have decimal points so pico's fixed pt. maths looks a good fit. Any thoughts re how to approach this in pico/pilog much appreciated. */ :- use_module(library(clpfd)). main :- Lsales = [100,200,300], Lcogs = [10,20,30], Lgross_profit = [160,180,200], member(Sales,Lsales), member(Cogs,Lcogs), member(Gross_profit,Lgross_profit), Ltax = [5,10,15], Lnet_profit = [100,170,300], member(Tax,Ltax), member(Net_profit,Lnet_profit), Gross_profit #= Sales - Cogs, Net_profit #= Gross_profit - Tax, format("Gross_profit ~w Sales ~w Cogs ~w\n",[Gross_profit,Sales,Cogs]), format("Net_profit ~w Gross_profit ~w Tax ~w\n",[Net_profit,Gross_profit,Tax]). /* ?- main. Gross_profit 180 Sales 200 Cogs 20 Net_profit 170 Gross_profit 180 Tax 10 true ; false. */ As an asidere the output of 'Ls...is it possible to remove the double quotes when printing the symbols or CARs of the resultant list?/ I read that initially the VAL is the same as the symbol...and it iscomplete with double quotes. Thank you in anticipation and best regards Dean
Re: (< @X 18) doesn't behave as expected with pilog
Hi Joe, > range/3 seems to work as I expected. Should it not be used here? Haha, right! Very good! I was too much focused on the DB usage :) ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: (< @X 18) doesn't behave as expected with pilog (SOLVED: short
Hi Eric, On Sun, Nov 13, 2016 at 09:32:20PM +0100, CILz wrote: > I've just created an account on the wiki however I think I can't add > something in the reference part. I think that this how-to could fit very > well here: > > http://software-lab.de/doc/ref.html#pilog > ... Very good examples and explanations! However, I think for the general reference your text is a bit too specialized, more like a tutorial. A (perhaps just short) article in the Wiki would be much better, wouldn't it? ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: map-reduce
Thanks for sharing. This is an impressive example to show how to execute a computation in parallel The parallel magic seems to be here: (chain (mapcan '((F) (later (cons) (-file F))) *MAPFILES ) ) (wait NIL (full (made))) ) great work! On Mon, Nov 14, 2016 at 8:30 AM, Mike Pechkinwrote: > hi, > > My parallel-like map-reduce on (later) function: > https://goo.gl/S36x3N > > Besides more tests for build-in functions it opens the gate to implement > Blake2xP versions of SHA3 finalist which have parallel versions for speed > up. > > Mike > -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: First post
Neo4j is the graph database behind www.gdpr-ui.eu . Neo4j is really powerfull and its query language cypher is damned simple to start with! 'vivace-graph' looks interesting, I will have a look at it... Thanks. Best, Eric Le 14/11/2016 à 13:24, Brad Collins a écrit : A graph database written in picolisp that uses something like pilog would be very useful for me as well. There is a graph database written in common lisp which looks promising, vivace-graph (https://github.com/kraison/vivace-graph-v3) which seems to be trying to do something along the lines of neo4j. Perhaps a place to start? -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: First post
Dear All, Thank you very much for your warm welcome :). It's very much appreciated. Best, EricC Le 14/11/2016 à 11:15, andr...@itship.ch a écrit : Hi Eric Warmly welcome to our community :) No fear, you will soon look through things. I felt the same, but the community is very friendly and especially Alexander is extremely helpful. I recommend again to join us in IRC :) - Original Message - From: CILz [mailto:cilz...@cilzone.fr] To: picolisp@software-lab.de Sent: Sat, 12 Nov 2016 15:45:03 +0100 Subject: First post Dear list, I take the opportunity of this first post to introduce myself as well as the reasons for which I come here. I am not a computer scientist nor a professional web developper but a kind of "power user" who often gets its hands dirty to build some applications as close as possible to what he wants... That being said, I have mostly built some websites using off the shelf CMS ;-) However, my last "product" is a custom web application fully written from scratch in R to access a graph database. And this is why I am here: I want to rebuild it in order to add some "expert system" like capacity... So starting to digg around, I first came to Prolog a few weeks ago and I started learning it from scratch. This very week, I discovered Picolisp. I started exploring it, and so far, I am really impressed! It looks very appealing: having at hand a powerful language, a built-in database system as well as Prolog make me dream ... though I don't know if I am skilled enough to be able to do anything useful! Any way, I have it up an running on my linux box ... so expect me to ask very basic questions soon :) Best, Eric -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: (< @X 18) doesn't behave as expected with pilog
Hi Alex, range/3 seems to work as I expected. Should it not be used here? (be age (Paul 19) ) (be age (Kate 17) ) (be underage (@X) (age @X @Y) (range (0 . 18) @Y)) (? (underage @X) ) @X=Kate On Sat, Nov 12, 2016 at 10:44 AM, Alexander Burgerwrote: > Hi Joe, > >> Untested, but what about using range/3 ? >> http://software-lab.de/doc/refR.html#range/3 > > Thanks! However, range/3 is probably not useful here. It is a rather > specialized predicate for range checks in database queries. > > ♪♫ Alex > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
RE: First post
Hi Eric Warmly welcome to our community :) No fear, you will soon look through things. I felt the same, but the community is very friendly and especially Alexander is extremely helpful. I recommend again to join us in IRC :) - Original Message - From: CILz [mailto:cilz...@cilzone.fr] To: picolisp@software-lab.de Sent: Sat, 12 Nov 2016 15:45:03 +0100 Subject: First post Dear list, I take the opportunity of this first post to introduce myself as well as the reasons for which I come here. I am not a computer scientist nor a professional web developper but a kind of "power user" who often gets its hands dirty to build some applications as close as possible to what he wants... That being said, I have mostly built some websites using off the shelf CMS ;-) However, my last "product" is a custom web application fully written from scratch in R to access a graph database. And this is why I am here: I want to rebuild it in order to add some "expert system" like capacity... So starting to digg around, I first came to Prolog a few weeks ago and I started learning it from scratch. This very week, I discovered Picolisp. I started exploring it, and so far, I am really impressed! It looks very appealing: having at hand a powerful language, a built-in database system as well as Prolog make me dream ... though I don't know if I am skilled enough to be able to do anything useful! Any way, I have it up an running on my linux box ... so expect me to ask very basic questions soon :) Best, Eric -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe