Re: quote form in picolisp

2021-12-16 Thread andreas
Hi pd,

On 16.12.21 10:17, pd wrote:
> : (quote (quote (quote a)))
> -> (quote (quote a))          

In which practical use case do you ever need such an abhorrent nesting
of quotes?
If you need ''a or even a in code, then I strongly suspect your
software design is not appropriate for the specific use case.

About compatibility to lisp dialects in general - nice point.
But I'm having doubts about this being not just a superficial
theoretical whim, are there really any lisp dialects between which
general lisp knowledge is enough to be effective, without studying the
specific language? I have the impression that lisp dialects are very
diverse, while looking similar the differences are very consequential
and no useful programming can be done without studying them, maybe even
more so than the many languages which follow C syntax style.

Theory is nice, and focusing on theoretical elegance might be useful for
language research and pure math. But reality is messy, especially when
human users are involved (which is the case with most software systems).

Regards,
-- beneroth



Re: '(struct ...)' alignment issue

2021-12-07 Thread andreas
Hi everyone,

Great discussion, thank you all!

> 'native' and 'struct' do exactly what the programmer tells them. Nothing 
> tricky
> or clever behind the scenes. I do not want them to insert bytes based on
> assumptions.

Sounds right to me, no hidden magic please. But yes to more comfort.

Maybe a higher level function "structC" to take care of ISO standard C
default conventions is warranted?
Similiar like we have multiple related functions to handle multipe date
conventions, e.g. 'dat$' and 'datStr'.
This new function in turn might make use of the more basic "struct"
function.

Just a question/idea, maybe nonsense:
Is (struct) really limited to use with (native)?
Could it not also be handy to use (struct) when processing binary
network protocols, unrelated to C FFI?

> You can disagree, but cannot keep disagreeing and maintain the
> documentation related to the implementation  "Creates or extracts data
> structures, suitable to be passed to or returned from native C functions."
> If the idea is as you describe, then the doc should be reformed and
> the user instructed to check the needs according to the call he/she
> intends, on the other hand.
I suspect you're interpreting this sentence quite differently, with Alex
understanding/intending it as a much more general statement (helper to
build memory blocks to use with C FFI) than how Cesar and Andras read it
(helper to construct structs which meet the "usual" expectations of a C
interface). I agree this statement needs a more accurate wording if it
leads readers astray.

@Cesar: If you like to customize (struct) to your needs, have a look at
(redefine). If you want to do a redefine only locally, you could write a
custom FEXPR making use of (patch).

-beneroth


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Extending 'VIP' editor

2021-11-05 Thread andreas


On 05.11.21 08:41, Alexander Burger wrote:
>> to undo that action I need to press 'u' twice.
>> Ideally 'u' would undo everything that happened in the command's prg body.
> I think this is difficult. I know about this issue, e.g. when 'pipeN' is used 
> (I
> use F4 a lot, e.g. when formatting this mail). But each if the involved micro
> operations does its own undo/redo stack manipulation. I decided to live with 
> it,
> and it felt not wrong after I got used to it, as it undoes the involved steps
> explicitly one after the other and makes clear what happens.

So each operation would kind of declare (in a globale?) that a
command-"transaction" has started,
and declare when it has ended, so all operations in between can be
somehow flagged accordingly.

Then there could be a secondary set of undo/redo operations (or a single
operation to change the mode between micro/macro)
to reset a "macro- peration" (or "transaction" in DB-speak) consisting
of multiple micro operations.

Would this be feasible? Needs some additional bookkeeping of course.

just an idea,
- beneroth


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Extending 'VIP' editor

2021-11-05 Thread andreas
Wow! Great extensions Erik, especially

> [@@] - indent expr / paragraph

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.

Thx,
- beneroth



-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Picolisp on Termux ? Picolisp on OpenWrt/Lede ?

2021-10-19 Thread andreas
Hi Henry

>> Is anyone willing to copy Picolisp to the Termux and/or OpenWrt repositories?
> In fact, the picolisp package is available in Termux since early on. However,
> only pil64, because Fredrik Fornwall suddenly stopped to respond and/or update
> to pil21.

PicoLisp was also once on OpenWrt, but not maintained there anymore:
https://www.mail-archive.com/picolisp@software-lab.de/msg06272.html

Maybe you like to take up the torch?

- beneroth



-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Jitsi screen sharing issues

2021-07-26 Thread andreas
Hi all

I updated the Jitsi server now.
There where quite some changes, so good change that the issues are gone
now, or at least somewhat better.

Please continue this thread if you still see severe issues or any new
problems.
If you have repeated connection issues (with/without) screen sharing,
you may send me your IP and/or a traceroute output via direct email (or
message in IRC), that would be useful to check if its network related or
not.

- beneroth


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: strong language for blockchain

2021-05-21 Thread andreas
Disclaimer: While picolisp community is a very nicely self-selected
group of people with interesting views from all paths of life, and most
of us are very interested in philosophical discussions and everything
else...please let's not go to OT here. PicoLisp is the main topic of
this list, and so it should be in emails on this list.

@Idealistic dreams: Well blockchain might be in theory a way for more
direct, distributed democracy around the more closed social networks of
local and global elites (however defined). But that assumes that large
number of common people would be interested to take part in such a
system, actively work on it, and be considerate and consciousness in
their choices. The majority of people are neither interested nor
capable. Or at least that is my current impression, and I live in
Switzerland which has the most direct democratic system in the world
(afaik). (It might be working, but like everything it has trade-offs
which in some situations can be highly consequential.)

Besides this.. you wanna operate your system on android?
How to defend against malicious manipulations in your program via the
mobile phone baseband chip (usually integrated into the main cpu for
energy efficiency, so it could access main cpu and ram, but runs outside
the control of the operating system) ? You just hope that the majority
of devices is not infected? Android is a walled-garden device without
much owner control - and most owners don't want control, they want just
a working device. Whatever that means.

I see indeed huge troubles facing our whole global society, but I don't
see how blockchain should help in case were we fail to coordinate
through traditional social structures and methods.
Bitcoin is certainly the most mature blockchain project, and it still
hasn't stabilized and is primarily a ponzi gambling thing and not much
else. It is a digital cash equivalent, especially with some privacy
benefits (within limits), but practical applications are seriously
limited by the currencies volatility, and whenever you interface it back
to a traditional currency you are again under all checks and controls of
that jurisdiction - and those checks and controls are there for reasons!
Many of them evolved through tremendous human cost and should probably
not be fully removed without some more considerations.

Rules are not there to never be broken. Rules are there, so you think
before you break them.


> I just read your full email. Wow, that’s really good…
> Mind if I email you directly if I have a questions?
Thanks, feel free. Or lets talk on IRC.

Kind regards,
- beneroth


On 21.05.21 21:38, A. Laszlo Ross wrote:
> Speaking for myself… as a busted up former US Army special ops officer
> with a few good braincells… 
>
> I can guarantee that this new us (us.new) will be both complete
> bullshit, a project for me to feel like an empowered black trans
> woman…. *and*….
> wait for it…
> Increasing the ability for the human race to collectively not kill all
> of each other off, not knowing our own code and data structures. And
> we signed it all away in a million EULAs and all we got was snapchat
> filters and shit…
>
> We’re better than this. One Android install can be running a Picolisp
> interpreter with access to a large chunk of system resources. On up to
> 8 billion current Android devices as an installed base which you can
> buy from google 44 cents American per install. Legally. (Yes I checked).
>
> That’s a system that’s ripe for improvement.
>
> Greybeard Six.. Out..
>
>
>> On May 21, 2021, at 13:59, Yiorgos [George] Adamopoulos
>> > > wrote:
>>
>>
>>
>> On Fri, May 21, 2021 at 8:51 PM > > wrote:
>>
>> So in my humble opinion, any real world application of blockchain
>> technology outside of anti-governmental currency is complete
>> bullshit and usually just a scheme to get money from fashionable
>> investors and computer-illiterate governments. Or a pet project
>> for developers to feel clever about themselves while wasting
>> intelligence and energy on stock market games instead of
>> increasing quality of life for humanity.
>>
>>
>> I am so copy-pasting this to eternity. Thank you! 
>> -- 
>> keep raising the bar || http://theheadphonesrule.dev/
>


New IRC channel #picolisp on irc.libera.chat network

2021-05-21 Thread andreas
I send this email again, I didn't receive it back.
Well possible that a majority didn't receive it, because spamfilters
seem to hate the domain-ending "chat" (yeah that was poorly chosen I guess).
In case you receive this emails now twice, I apologize for the
inconvenience.



Hi all

There is a new IRC channel #picolisp on the new IRC network irc.libera
DOT chat - see their website on https://libera  DOT chat/.  This is a
clone of the existing channel on the freenode network. The new channel
has no logging set up yet. Some of the members of our small community
who are most active on IRC are already present on this new channel
(including Regenaxer).

For the time being the freenode channel is active and still in use.
After sending this email I will immediately delete my account on
freenode and no longer use it (so no beneroth on freenode). I will be
active in the new channel. I hope we will not end up with two channels
but move entirely to libera DOT chat (and change the note regarding IRC
on picolisp.com), but of course this is everyone's own decision.

Short reasoning:

  * Two days ago, the entire staff of freenode resigned
  o staff = server administration, moderation and user support
  * They set up this new IRC network libera DOT chat
  * This resulted in emigration of many FOSS/programming communities
from freenode to libera DOT chat
  * I believe it's the right thing to do the same
  o Also, I like to have quick access to other language and software
communities on the same network

Kind regards,
- beneroth


Backstory for the interested

The background story, as always with such things, is some nice drama,
with many views and information to be found on the internet. After some
digging this is my current understanding of what happened, it might be
wrong or incomplete, but this is the version which I found supported by
multiple sources and chat logs, I list some links at the end.

  * The freenode.net IRC network is pretty old and beside GitHub the
major community hub for FOSS communities, programming language
communities and other programming-related culture for more than 20 years
  * The servers are donated, mostly by universities all over the world
  * The administration (permissions, user support, software maintenance,
...) was done by volunteers, which controlled all servers
  * The domain freenode.net was owned by a company, the Freenode
Limited, owned by the then head-of-staff
  o as with most things on the internet, the domain is the root
source of control for all services running under that domain
  * This company was set up primarily as legal entity to organize
community events
  * The unpaid server administrators were not employed or otherwise
associated with this company (besides the former owner who was a
staff member)
  * The server infrastructure was not owned or donated to Freenode Limited
  * That company Freenode Limited was sold to a certain Andrew Lee in 2017
  o Tech entrepreneur (VPN and stuff)
  o Crown Prince of South Korea (that's better than a blue tick on
twitter)
  o Somewhat infamous for being involved (his company was aquired
by) with Mt. Gox
  + Mt. Gox was the first big cryptocurrency exchange, which
somehow "lost" most of their customers money and collapsed
in 2014
  # that money is still in use, this is visible from public
bitcoin data, but it's unclear who owns it
  + Former head of Mt Gox later joined Andrew Lee's VPN company
PIA as CTO (2018)
  + Mr. Lee sold PIA in 2019
  * According to staff, they were not informed on the contents of the
deal, but told that it would not affect the operation of the IRC network
  * Some domain incident made freenode staff set up 2FA for the domain
account
  * Starting in 2021, Andrew Lee began to take influence
  o influencing the freenode.net website
  o contacting staff about administrator access and access to the
domain account
  + apparently he never had setup 2FA for the domain access, so
had no technical access to the domain even when being the
legal owner
  o threatening some staff members with legal threats, accusing them
of having taken over the network which he owns
  o apparently there was also a claim by Andrew Lee that he donated
millions dollars to freenode, this money cannot be found anymore
and the (unpaid volunteer) claim to not know anything about it
(servers were donated anyway by other parties, so unclear what
costs would be covered by these millions)
  * This events lead some staff to prepare resignments, some of the
leaked in advance
  * Two days ago one of the staff announced his resignment with a global
message to all users logged in at freenode at the time
  * Staff published the news about libera DOT chat
  * More and 

Re: picoLisp for blockchain

2021-05-21 Thread andreas
Hi Sjain

I would recommend to periodically compute hashes of the files (e.g.
using b2-sum command line tool, see
https://en.wikipedia.org/wiki/BLAKE_(hash_function) ), if a file
changes, then it's hash changes (binary or text doesn't matter).
When you combine this with a well secured backup, you should be able to
detect and identify such changes.

Kind regards,
- beneroth

On 21.05.21 20:25, SJain wrote:
> Many thanks to Beneroth for clearing the air on utility of encryption.
> It restores my faith in basic text source code.
>
> As an engineer and practical scientist, concerned not with number
> crunching speed but with teaching elegant and useful programming
> language such as Lisp to students and subordinates, I still would be
> happier with a 'somewhat' greater degree of security from tampering,
> as afforded for example by bytecode files, in particular usecases such
> as automatic test equipment setup for reliability of measured data.
> Can that be achieved in any way within picoLisp?
>
> BR,
> SJain 

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: strong language for blockchain

2021-05-21 Thread andreas
Hi SJain

There is no meaningful difference. It doesn't matter if you have a
write-able text file or a write-able binary - yes of course text is
easier to edit than binary, but that is security by obscurity at best
(which is not security).
All meaningful cryptographic algorithms are designed to not be weak even
if you know everything about the running system - except the encryption
keys/parameters, that is. Algorithms which derive their security from an
attacker not knowing their inner workings are again basing their hopes
on security by obscurity, which is an illusion.

You talk about the security of a running system. If a malicious actor
has access on a system, be it with an account which has more permission
rights than it should have (or ways to break out of those restrictions),
or even physical access, then nothing can stop an determined attacker.
You already lost when the attacker obtained this level of access and you
cannot trust the system anymore (= you should wipe and re-install it).

A main problem with crypto is not weaknesses in the algorithms (though
such are hard to find, and sometimes only found by mathematicians after
many years of analysis), but often implementations have mistakes or the
programmer didn't understand the use of the algorithm correctly and
missed some fundamental detail. A language which makes understanding of
the implementation easier to grasp through having less language
concepts, shorter code to read and understand, and less "accidental
complexity" (complexity stemming from the implementation and not the
task, e.g. manual memory management) will be easier to check for
implementation mistakes and easier to correct them. So from that aspect,
I think PicoLisp is probably better fitted than a complex C++
implementation with a lot of accidental additional complexity.

Another aspect is, that cryptographic computation is mostly numeric
computation, and that is not really the strength and intention of
PicoLisp. So with that in mind, PicoLisp is not so well suited for
crypto calculations, especially if you want to optimize for performance
- but not all crypto use cases desire performance, so it depends.

Regarding blockchain.. well the sole purpose of blockchain is to operate
a distribute database AND operate it by different people who actively
mistrust another. This makes it somewhat suited for crypto currencies
like bitcoin, but there is not really any other meaningful application.
In nearly all real-world scenarios, people can agree on a single group
to be the masters of a database and be trusted. Surely such a system
warrants checks and balances, but still you can then setup a central
database operated by a single actor, and this has just better
performance, lower operating costs, lower maintenance costs, just easier
and better in all aspects. We have this with all sorts of systems in
private companies and on government levels, and even on international
agreed level even when the member parties not trust each other but trust
an institute they operate together and keep each each other in check all
the time.

So in my humble opinion, any real world application of blockchain
technology outside of anti-governmental currency is complete bullshit
and usually just a scheme to get money from fashionable investors and
computer-illiterate governments. Or a pet project for developers to feel
clever about themselves while wasting intelligence and energy on stock
market games instead of increasing quality of life for humanity.

Some believe they can do meaningful blockchain applications. I think
they're wrong. But even those people are completely dominated by
get-rich-quickly-schemers, see this twitter link and it's discussion by
insiders:

  * https://twitter.com/jonsyu/status/1389635626698297344
  o tl;dr: it's all just scammers and inside traders.
  * https://news.ycombinator.com/item?id=27061700
  o tl;dr: confirm.

Kind regards,
- beneroth


On 21.05.21 18:43, SJain wrote:
> There was a mail regarding picoLisp for blockchain. I am No expert in
> software, but I would have thought a compiled language with
> encryption, with full source code available, would be a more secure
> application than a interpreted language, requiring source code in
> readable and writable text file, such as picoLisp, despite all it's charm.
> I would appreciate any thoughts on this.
> Regards,
>
> SJain
> India 


Re: IPFS ??

2021-05-11 Thread andreas
Hi Henry!

PicoLisp is turing-complete, so yes picolisp supports everything
computable. /scr

I'm not aware of any picolisp wrappers for IPFS.
IPFS offers a CLI client, CLI clients can used very easily in picolisp.
Alternatives would be: using IPFS C-library in picolisp (if such a
library exist), or implementing a client/the protocol directly in picolisp.

Kind regards,
beneroth

On 12.05.21 00:47, Henry Baker wrote:
> I haven't followed this list very carefully.
>
> Does picolisp support IPFS?
>
>

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: IRC channel at Freenode

2021-04-09 Thread andreas
Hi Cesar

Afaik registering nick & authenticate should be enough (and I believe
that is required to speak in most freenode channels, after some spam
incident some years ago - nothing special about #picolisp).
Try:

> /msg nickserv HELP
if you are sure about your authentication, try contact some freenode
staff ¯\_(ツ)_/¯

I'm also using hexchat on Ubuntu, with SSL enabled and SASL Login method
right in the hexchat settings.

Good luck, looking forward chatting with you :-)
- beneroth

On 09.04.21 19:05, Cesar Rabak wrote:
> Hi folks,
>
> I attempt to join the channel (I already did register a nick in
> Freenode.net, verified password, etc.) and it appears all ok but when
> I post something, the server responds:
>
> #picolisp :Cannot send to nick/channel
>
> I can send messages to individuals via my IRC client¹, so it seems to
> be something related to the channel itself.
>
> Am I missing any other subtle need to be able to post in the #picolisp?
>
> TIA
>
>
> [1] HexChat in Ubuntu 20.04


Re: Mess with localization files

2021-03-10 Thread andreas
ISO-ALPHA-2 Code for United Kingdom is GB, even when it refers to whole
United Kingdom.

On 10.03.21 19:44, Constantine Bitensky wrote:
> Hi, Alex!
>
>> Done.
> Thank you!
>
> Can you rename “ua” to “uk” (ISO 639-1 language code for Ukrainian) please?
>
> Regards, Constantine
>

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: Picolisp Outlook

2021-02-23 Thread andreas
Yeah, you mean some commercial or FOSS products with the opportunity for
PicoLisp programming/consulting/service business around it.

My company does that since 2015, and it's our main source of income
since 2018.
Currently its customized business applications (so similar to the
business model of A!ex).
We're working on moving into standardized products (e.g. CRM) and hope
to be able to publish products within the next 2 years.

Regards,
beneroth

On 23.02.21 16:36, Thorsten Jolitz wrote:
> I'm just saying that it would be nice to have a Picolisp app that has
> a real demand and a little ecosystem around it ...
>
> Like e.g. Moodle or some CMS system, that probably have an ecosystem
> of PHP programmers around them, and many organisations using them
> (with need for some support). For them it's irrelevant if it's PHP or
> anything else.
>
> C K Kashyap mailto:ckkash...@gmail.com>> schrieb
> am Di., 23. Feb. 2021, 15:56:
>
> I also believe that the simplicity of PicoLisp by itself is a
> "killer app". I've explored several languages in the past but
> PicoLisp is the only one that allowed me to understand the
> implementation of the language all the way (I still have to work
> on the external symbol bit :) . I was so used to seeing documents
> of concepts of other languages that don't directly map to the
> source code that it took me a while to realize the accuracy of
> PicoLisp documentation.
>
> Regards,
> Kashyap
>
> On Tue, Feb 23, 2021 at 2:26 AM Manuel Cano  > wrote:
>
> Hi,
>
> That's surely because it isn't made in Picolisp! :D
>
> Kind regards,
> Manu
>
>
> El mar, 23 feb 2021 a las 10:32, Alexander Burger
> (mailto:a...@software-lab.de>>) escribió:
>
> Hi all,
>
> sorry for the multiple mails! Seems I have a DNS problem on
> the server ...
>
> On Tue, Feb 23, 2021 at 09:18:57AM +0100, Alexander Burger
> wrote:
> > Hi Thorsten,
> > ...
>
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> ?subject=Unsubscribe
>


Re: Picolisp Outlook

2021-02-22 Thread andreas
Yeah I had kinda similiar ideas, Thorsten.

PicolispDB is certainly a killer feature - multi-paradigm database
(Key-Value, Object, Document, Graph, Relational.. really everything
covered), ACID (transactions), many indexing capabilities (including
text and spatial indexing), performant, extremely flexible and nicely
well maintainable.

In the past, a lack of (digitalized) data was often an obstacle to get
useful (business) insights with software.
This changed, we are drowning in data.

Now, and for the foreseeable future, the problem is to make sense of the
data, to be able to filter, map and connect various formats and data
sources together - while requirements change all the time.

I believe Picolisp Database is a tool outstandingly suited for this.

On 22.02.21 17:04, Thorsten Jolitz wrote:
> hallo list,
> I always thought a "killer app" would be nice, to make those "killer
> features" popular, and I always thought that could be a "data science
> application builder" with 3 features:
>
> - easy data import into a Picolisp DB
> - ffi/java wrappers for many data science libs (Rmath,  Weka, ...)
> - easy web app development
>
> because for data scientists it seems often quite difficult to build
> applications on top of their data, and with Picolisp it would be all
> integrated into one single tool.
>
> But then I should be the one who implements that, and I made some
> attempts, but never had the time/energy/stamina/skills to bring it on.
> So this is just an idea I had for quite some time ...
>
> Cheers
> Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: Picolisp Outlook

2021-02-22 Thread andreas
What are you talking about? Troll bait much.

Majority of IT practitioners have really bad knowledge about history of
IT & computer science.
Most things are in popular use solely because they are popular (which
may give legitimate non-technical benefits).

Especially in software long-solved mistakes are done again and again,
only because there are often stronger incentives (economical, bragging
rights) to create something pseudo-new instead of doing it right.

The knowledge of the elder sages is too often ignored (e.g. Fred Brooks,
Alan Kay, Donald Knuth, many more...).

That is a reason for why everything is so incredibly bad.
Popularity is not a useful way to measure the quality of something.

If your requirement for a programming language of choice is popularity,
then pick PHP.
If your requirement for a programming language is expressiveness and
flexibility, then you might like PicoLisp.

If you are unsure about your choices, feel free to ask meaningful
questions, we're willing to teach & learn from others. But please don't
disturb our zen calm with whiny passive aggressive bullshit, thank you.

On 22.02.21 11:52, pd wrote:
>
>
> El lun., 22 feb. 2021 9:31, Alexander Burger  > escribió:
>
> ... and immune to temporary hypes
>
>
> What a nice desire being rejected by history of humankind again and
> again ;)
>
> Specially in computer science


Re: PilCon Schedule

2021-01-28 Thread andreas
On 28.01.21 15:13, Mattias Sundblad wrote:
> I think it is nice to just take a little time
> to meet each other and talk about whatever happens to come up, be it
> programming, Picolisp or life in general. If there are no topics, we can
> simply have a quick coffee together (even though everyone is in a
> separate location).
>
> We are a small community, but I have always found this to be a great
> opportunity to get to know people who share interests.

Yeah, exactly this. +1

@A!ex: Perfect.

> So I simply decide for 10th 8:00 UTC / 20th 16:00 UTC as the new schedule.

-beneroth


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: httpGate for non-picolisp apps

2020-08-29 Thread andreas
Benefit with session-id in URL/page vs. session cookies: zero cross-site
request forgery
 risk.

On 29.08.20 08:53, Tomas Hlavaty wrote:
> Hi Grant,
>
> On Sat 29 Aug 2020 at 01:04, Grant Shangreaux  
> wrote:
>>> I suspect other apps cannot handle this.
>> i thought this was probably the case. just wondered if someone out
>> there may have tried and come up with a solution already :)
> unfortunately, httpGate has a fatal flaw: when a session ends, users end
> up with a dead url.  You have to train your users to know what to do in
> such situation.
>
> This could be fixed by adding a fallback case to httpGate.
>
> Or simply use a different server, where this is easier to do already.
> For example, see nginx config with fallback described here
> https://logand.com/blog/picolisp-behind-nginx-proxy.html
>
> Cheers
>
> Tomas
>


Re: Auto test your code with Pil21 on GitHub

2020-08-28 Thread andreas
awesome, thanks!

On 28.08.20 04:24, Alexander Williams wrote:
> Hi all,
>
> I've updated 'v2' of the "PicoLisp Action" on the GitHub Marketplace.
>
> It now supports building pil21, and thus allows you to automatically
> test your PicoLisp code against the latest pil21, as well as other
> versions of pil32 and pil64.
>
> Have a look here:
>   https://github.com/marketplace/actions/picolisp-action
>
> You can see 'All Green' from my initial test runs against
> 'picolisp-json' library:
>   https://github.com/aw/picolisp-json/actions/runs/227965177
>
> Although there's still a few things missing in pil21, so far _all_ of
> my existing code works with it, so let's encourage and thank Alexander
> Burger for his hard work.
>
> Cheers,
>
>
> AW
>

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: Announcing another project: a Unicorn-inspired PicoLisp daemon

2020-06-18 Thread andreas
Hi aw

Awesome, many thanks.

I will definitely build upon this.
Good if we can re-use and establish some standard picolisp libraries
(beside/in addition to the ones in the distro).
NIH syndrome etc.

Cheers,
beneroth

On 18.06.20 12:27, Alexander Williams wrote:
> Hi all,
>
> It's been a busy week, this time i'm announcing another open source
> release:
>
>   picolisp-supervisor: https://github.com/aw/picolisp-supervisor/
>
> It's a program I created almost 4 years ago to copy Unicorn[1], but
> which was not suitable for public release. I've tweaked it, wrote some
> documentation (and comments), and decided to share the code with
> others who may be interested.
>
> The source code is published under the MIT license.
>
> PS: Also check out my other project released earlier this week[2] ;)
>
> Cheer,
>
>
> AW
>
> - [1] https://yhbt.net/unicorn/
> - [2] https://github.com/aw/picolisp-kv
>

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: cells in picolisp [tutorial, slides]

2020-06-06 Thread andreas
Hi George, You know you can display PDFs also in 'presentation mode' ?
Depends on the PDF reader software, but most can do that.

On 06.06.20 09:28, George-Phillip Orais wrote:
> Hi Mike, I like this too, thank you for sharing! Btw do you have
> another format for this something like Powerpoint? If yes can I ask
> for a copy too? Thanks again and hope to meet you on one of FFF
> (Fridays for Functions)
>
> On Sat, Jun 6, 2020 at 7:52 AM C K Kashyap  > wrote:
>
> I liked it :)
> Thanks,
> Kashyap
>
> On Fri, Jun 5, 2020 at 5:37 AM Mike  > wrote:
>
> hi all,
>
> https://envs.net/~mpech/cells-tutorial.pdf
>
> I've created tutorial about cell as root of data type hierarchy.
> Goal of PDF is understanding of destructive functions.
> I hope you will learn something new.
>
> Happy coding,
> (mike)
>
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> ?subjectUnsubscribe
>


Re: Fridays for Functions (Was: PilCon 2020)

2020-06-03 Thread andreas
Hi Kashyap

No, there is an webinterface and the app. Feel free to try out my
server: https://meeting.itship.ch

The webinterface is usually run on the server which is hosting the video
conference, but they're separate pieces of software ("jitsi meet" and
"jitsi video bridge"). The app can connect to every publicly accessible
server, by default it connects to the one operated by the jitsi project
itself (https://meet.jit.si/).

The webinterface has actually more features (e.g. screen sharing), but
the app is more optimized (I expect better stream quality / less
bandwidth load).
Chrome/chromium is better supported. In the past a single Firefox client
in a conference could apparently cause higher/multiplication of
bandwidth load for every participant, though this should be much better
with the newest version of Jitsi and the newest Firefox.
See:
- https://github.com/jitsi/jitsi-meet/issues/4758
-
https://bugzilla.mozilla.org/buglist.cgi?columnlist=bug_type%2Cshort_desc%2Cproduct%2Ccomponent%2Cpriority%2Cassigned_to%2Ccf_status_firefox75%2Ccf_status_firefox76%2Ccf_status_firefox77%2Ccf_status_firefox_esr68%2Cbug_status%2Cresolution%2Cchangeddate&query_format=advanced&status_whiteboard=jitsi-meet&status_whiteboard_type=substring&query_based_on=

Regards,
beneroth

On 03.06.20 16:57, C K Kashyap wrote:
> Is Jitsi a phone only tool? I only see an apple/android download here
> -  https://jitsi.org/#download  
>
> Regards,
> Kashyap
>
> On Wed, Jun 3, 2020 at 7:55 AM C K Kashyap  > wrote:
>
> Wonderful idea indeed!
>
> On Wed, Jun 3, 2020 at 6:01 AM Davide BERTOLOTTO
> mailto:davide.bertolo...@gmail.com>>
> wrote:
>
> Wonderful idea
>
> On Wed, Jun 3, 2020, 13:27 O.Hamann  > wrote:
>
> ++
>
> On 03.06.20 07:54, Alexander Burger wrote:
> > I would propose informal Jitsi meetings every second
> Friday or so. The time
> > could be alternating 8:00 and 16:00 UTC, to allow
> attendance from most time
> > zones. No big planning and schedule. Let's start with
> questions, tutorials and
> > demonstrations.
>
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> ?subject=Unsubscribe
>


Re: Do free Open Source Foundation's Software Stacks fall under US Export Law?

2020-05-06 Thread andreas
> On 06.05.20 18:42, John Duncan wrote:
> Picolisp is interpreted. Even the llvm version is just creating an
> interpreter. There is no JIT.
Exactly!

Guido, you should really stop talking about things you so obviously have
no understanding of.
There is NO COMPILING when executing program written in PicoLisp. Nowhere.

> Since the AST (Abstract Syntax Tree) in any Lisp is changing all the
> time, the JIT engine *has to* post-jit continuously to keep up the
> full execution speed.
> That's what will give pil21 a real performance boost over over any
> 'static compiled' implementation. 
Wrong. PicoLisp is having Fexpr's (in opposition to Macros), and Fexpr's
can be impossible to compile at all.
pil21 is not about performance, but compatibility. pil21 is expected to
even run a bit slower then the current amd64 ASM implementation.

The core principles of PicoLisp are simplicity and practicality - raw
speed is not the goal, optimizing developer time is.

- beneroth



--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Do free Open Source Foundation's Software Stacks fall under US Export Law?

2020-05-06 Thread andreas

On 06.05.20 17:29, Guido Stepken wrote:
> > Also the size of LLVM doesn't matter since it is only necessary when
> compiling the binary. You can likely download binaries Alex built just
> as you can do.
>
> "Compiling the binary" is funny  pil21, sitting on top of LLVM JIT
> engine is post JIT'ing all the time during runtime. That thing is
> profiling and self optimizing code while running! See HotSpot JIT
> Engine concepts: https://en.wikipedia.org/wiki/HotSpot
>
Read Wikipedia:

> LLVM allows code to be compiled statically, as it is under the
> traditional GCC system, or left for late-compiling from the IR to
> machine code via just-in-time compilation
>  (JIT)
pil21 is of course statically compiled, one time, resulting in a binary
you can dissect and analyze.
There is no reason for pil21 to make use of JIT.




Re: Do free Open Source Foundation's Software Stacks fall under US Export Law?

2020-05-05 Thread andreas
Hi Guido

> Anaconda is a well known, free Software Installer for Python and R
> packages, mostly used under Windows, right?
>
> And you think, that "free software" packages cannot be restricted by
> US ministry of trade or U.S. president, such as happened in Huawei
> Google case, right? Plain wrong:
>
> Quote from: https://docs.anaconda.com/anaconda-repository/2.23/admin/eula/
Are you sure you are not just mixing up "Enterprise Edition" and the
FOSS variant ("Individual Edition") ?
To me it looks like the FOSS Anaconda is BSD-licensed, which comes
without any additional EULA or other strings attached.
The EULA you link to belongs obviously to the proprietary product (the
classic "open-core" software business model).


Additionally I like to add that throwing picolisp database together with
"distributed databases like datomic" into the same category is
misleading, this is hardly the same bucket. PicoLisp database can
certainly be used to build distributed systems, including a datomic-like
DBMS, but picolisp database is certainly not a "plug & play" distributed
database system in the current mainstream sense. There distributed DBMS
essentially means individual servers are abstracted away for the
programmer, be it 3 or 3000 servers doesn't make a difference for the
programmer using the DBMS - of course this abstracting on top of
networking (which is unreliable) comes with constraints (e.g. usually no
ACID) and a ton of potential issues (some better, some often not so much
mitigated by common distributed DBMS software). This doesn't apply to
PicoLisp database, which offers strict ACID transactions and gives
strong consistency guarantees even when "distributed" (following C+P of
CAP, while "datomic" follows A+P). PicoLisp database allows to easily
deploy read-replicas and remote databases can be easily integrated into
an single instance (including into the indexing system), but it doesn't
give you multi master mechanics out of the box without basically
re-implementing datomic or a similar architecture on top of it.

Your understanding of both distributed databases and PicoLisp (including
the non-DB areas) seem rather superficial to me.


> And it does not fall under US restrictions, since PicoLisp is  GERMANY> and does not contain any US libraries, that might fall under
> those US export laws.
What makes you think that Germany will not introduce similar laws sooner
or later?

Germany already has the "Hacker-paragraph" which arguably criminalizes
distribution of the 'ping' network tool. Germany's "hate-speech" law was
copied by a number of repressive states, a perfect template. And
currently politicians debate about forcing websites to hand over
password hashes to the government. Granted these laws are probably not
widely applied in practice - but worse - this way they degenerate into
tools of arbitrariness, which stands in direct opposition to democratic
rule of law.

It's not so easy,
- beneroth


On 05.05.20 21:40, Guido Stepken wrote:
> Interesting question, isn't it? Let's have a look into my findings!
>
> Anaconda is a well known, free Software Installer for Python and R
> packages, mostly used under Windows, right?
>
> And you think, that "free software" packages cannot be restricted by
> US ministry of trade or U.S. president, such as happened in Huawei
> Google case, right? Plain wrong:
>
> Quote from: https://docs.anaconda.com/anaconda-repository/2.23/admin/eula/
>
> [quote]
> Export regulations
>
> Any use or distribution of the Software Product is made under
> conditions that the user and/or distributor is in full compliance with
> all export and other governing laws of the United States of America,
> including full and ongoing compliance with the Export Administration
> Regulations (EAR) of the United States Department of Commerce. See
> www.commerce.gov/  and
> http://www.bis.doc.gov/index.php/regulations/export-administration-regulations-ear.
> Use or distribution of Continuum software products to any persons,
> entities or countries currently under US sanctions is strictly
> prohibited. Continuum has self-assessed that Anaconda Repository
> requires no license to for export to non-embargoed countries
>
> The United States currently has embargoes against several countries.
> The exportation, re-exportation, sale or supply, directly or
> indirectly, from the United States, or by a U.S. person wherever
> located, of any Continuum software to any of these countries is
> strictly prohibited without prior authorization by the United States
> Government. By accepting this Agreement, you represent to Continuum
> that you will comply with all applicable export regulations for Anaconda.
> [/quote]
>
> Means: Export Anaconda or packages from Anaconda to Iran and you're
> going to Guantanamo!
>
> And i repeat: *Stop using US Software Stacks!*
>
> Picoslip has everything, yor IT could ever need! Integrated
> Distributed Database, Prolog like reasoning about stored data and e

Re: PilCon 2020

2020-04-22 Thread andreas
Hi Jean-Christophe Helary

> There is a thread on hacknews about jisti vs mumble where they mention issues 
> with a large number of people.
>
> https://news.ycombinator.com/item?id=22477785
Thanks for the link. Yeah I think people tested my current instance with
up to 5 people for several hours. Afaik the expected bottleneck on the
server is the internet link.
From what I read, often the client side is running into load problems
with increased number of participants, especially with Firefox.
Apparently their WebRTC implementation is not as optimized as desired.

We should certainly test before the event, and probably I could optimize
some more things on my instance (if that is the bottleneck).
Possible alternatives would surely be Mumble or Teamspeak (no video
streaming, but certainly works for large crowds, I used to use both).

Maybe we should ask presenters to put their slides into LaTex Beam PDF
or HTML format (navigating with arrow keys, e.g.
https://ptrace.fefe.de/hype2 ).
Would have the nice side effect that then it can be downloaded and
viewed at individual speed.

On the other hand, there should be a way to clearly communicate on which
slide the presenter is, without having to tell it every slide.
Could be a little pil app with a special login for the presenter to
select the currently active slide.

- beneroth


On 22.04.20 07:43, Jean-Christophe Helary wrote:
>
>> On Apr 22, 2020, at 14:00, Alexander Burger  wrote:
>>
>> Hi all,
>>
>> yesterday the Oktoberfest, the largest annual event in Bavaria, was canceled.
>>
>> I think we will also have to cancel the other large event, PilCon. It is not
>> sure whether such events will be allowed legally by end of July, and how the
>> international travel situation will be.
>>
>> I hope this is OK for everybody.
>>
>> Would it make sense to plan an online conference instead? We are playing 
>> around
>> with Jitsi Meet currently. Any thoughts?
> There is a thread on hacknews about jisti vs mumble where they mention issues 
> with a large number of people.
>
> https://news.ycombinator.com/item?id=22477785
>
> Maybe it would be nive to do tests with a dozen participants or so before 
> going live ?
>
>
> Jean-Christophe Helary
> ---
> http://mac4translators.blogspot.com @brandelune
>
>
>


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Stop using US controlled software stacks!!!

2020-04-18 Thread andreas
Hey Guido!

While I don't disagree with you in spirit (and I'm sure it's the same
for most  of our community, we're a bunch of purist radicals), I have to
disagree with your tone.

> And i can assure you: My influence is **much bigger** than you might
> think! Stop that, immediately!
This is childish. You think we would part of this niche community (even
pico-tiny within the lisp culture) if such words would work on us? Think
again.

We're not so much interested to convert anyone to our path by doing
missionary work - nice if it happens, we welcome it, but not for the
price of our principles. We foster the old programming hacker culture,
only practical results (be it elegant code, elegant designs or
well-thought arguments) count in this group. We don't give a damn about
who you know or what influence you have. Certainly we like interesting
stories, and we're open and welcoming to everyone - but for getting
respected here you must deliver us something we value according to our
standards.

You are invited to develop the pil stack further, hands on, what holds
you back?
The PicoLisp stack is simple enough that we surely could coordinate
multiple variants if people like to do the work. Less talking and more
doing, Guido!
Theorizing is nice and sometimes worthwile, but we're allergic to mental
masturbation, let's not mix up the map with the real territory.

Kind regards and no offense,
beneroth

On 18.04.20 22:46, Guido Stepken wrote:
> Hi Alex!
>
> "completely replace it with pil21" ... (LLVM based)
>
> Using US software stacks, even if open source and under a free license
> are not tolerable. For any nation, for any kind of project.
>
> US Cloud Act, Patriot Act, by law, force US companies as well US
> organisations in general, such as Linux Foundation as well as Apache
> Foundation and LLVM Foundation to comply with US law.
>
> Here's a possible outcome:
> https://www.infoq.com/news/2016/06/visual-cpp-telemetry/
>
> The compiler itself becomes a NSA/CIA spy tool. With (compressed) over
> 420 megabytes of source code size for LLVM, world does not have the
> slightest chance to do any security review on that software stack.
>
> And that's what stupid cowboys are hoping for: Not only creating
> Lock-In - as well as legal problems - on APIs of all kinds (see
> Oracle-Google lawsuit) with Apache/Linux/LLVM/... Foundations, stupid
> cowboys are also injecting spy code into in all kinds of US controlled
> libraries (NPM now is Microsoft/Github owned) and especially
> compilers, development tools.
>
> My urgent advice: Stay with your own x64 compiler, forget about
> everything that is coming from or is directed by US companies, US
> foundations of any kind.
>
> Switch to LLVM with pil21 and i cannot recommend you and your (until
> today: trustworthy) software stack any longer for any kinds of projects.
>
> And i can assure you: My influence is **much bigger** than you might
> think! Stop that, immediately!
>
> Use C99 compilers, that are small enough to be security reviewed, such
> as TCC.
>
> Best regards, Guido Stepken
>
> Am Samstag, 18. April 2020 schrieb Alexander Burger
> mailto:a...@software-lab.de>>:
> > Hi Andras,
> >
> >> If you are interested I have patched the 19.12 32bit sources to
> compile without GCC.
> >> I have attached the changed files: pico.h, main.c, apply.c and flow.c
> >
> > Thanks a lot!
> >
> >
> >> Since clang does not support variable length array in structures I
> allocate the bindFrame
> >> with alloca() and provided a macro in pico.h to ease this:
> allocFrame().
> >>
> >> I know that the 32bit version is not the mainstream version, but
> feel free to
> >> abuse the patches.
> >
> > Cool!
> >
> > As I'm concentrating on pil21, I'm glad if development and
> maintenance of pil32,
> > mini and/or ersatz is taken care of by others. Until it is replaced
> by pil21
> > next year, I will do necessary fixes to pil64 and then - if all goes
> well -
> > completely replace it with pil21.
> >
> > Let's hope that no major problems pop up ... ;)
> >
> > ☺/ A!ex
> >
> >
> > --
> > UNSUBSCRIBE: mailto:picolisp@software-lab.de
> ?subject=Unsubscribe
> >
> > 


Re: Towards a more readable Pico(Lisp) ... nobody needs parenthesis!

2020-04-10 Thread andreas
> Seems, all programming languages, including new C++20, Java, Kotlin,
> Scala do slowly converge to Lisp. "AWS Lambda", just saying.
I fully agree. I see this with C# (e.g. LINQ). Problem is, it turns
these languages into messy mixes of sub-dialects (well C++ is a mess
already for a long time).

> How about this "innovative" new Lisp syntax?
>
> https://github.com/birchb1024/genyris/blob/master/examples/queens.g
Looks like Python or Ruby to me.

> Parenthesis sometimes unneccessarily seem to keep people away from
> Lisp as "all day programming language".
Parenthesis (or some other separator) clearly mark which elements belong
to the same list. Lists within Lisp code have to be clearly
distinguishable, especially when dealing with multiple nested lists. I
don't see how using whitespace characters instead of parenthesis can
solve this - it puts heavy restrictions on what can be on a single line.

> It's confusing their brain.
Brains can adapt. It's just a habit thing.
Changing habits is hard, but I find so are most things which are really
worth doing.

Frankly, I don't think the essential power of Lisp (homogeneity, code
being purely data) is possible without parenthesis (or some other kind
of clear list terminators).
Python was the attempt to create the next best thing to Lisp with
"traditional" syntax (though lisp is actually older than most
programming traditions).

See here the famous Python vs. Lisp comparison from Norvig:
https://norvig.com/python-lisp.html

Here a funny story about the topic:

> in Norvig's talk about Python...
>
> /When he finished Peter [Norvig] took questions and to my surprise
> called first on the rumpled old guy who had wandered in just before
> the talk began and eased himself into a chair just across the aisle
> from me and a few rows up./
>
> /This guy had wild white hair and a scraggly white beard and looked
> hopelessly lost as if he had gotten separated from the tour group and
> wandered in mostly to rest his feet and just a little to see what we
> were all up to. My first thought was that he would be terribly
> disappointed by our bizarre topic and my second thought was that he
> would be about the right age, Stanford is just down the road, I think
> he is still at Stanford -- could it be?/
>
> /"Yes, John?" Peter said./
>
> /I won't pretend to remember Lisp inventor John McCarthy's exact words
> which is odd because there were only about ten but he simply asked if
> Python could gracefully manipulate Python code as data./
>
> /"No, John, it can't," said Peter and nothing more, graciously
> assenting to the professor's critique, and McCarthy said no more
> though Peter waited a moment to see if he would and in the silence a
> thousand words were said./
>
Source: https://news.ycombinator.com/item?id=1803627 which got it from
http://smuglispweeny.blogspot.com/2008/02/ooh-ooh-my-turn-why-lisp.html



Re: Porting Picolisp onto the simplest possible processor - The new SISC!

2020-04-10 Thread andreas
Hi Guido!

Thanks for the additional information, very exciting!

On 10.04.20 16:17, Guido Stepken wrote:
> Hi Andreas!
>
> My implementation not really is a pure Lambda calculus, but rather a
> so called "Krivine Machine" that, in fact, consists of 4 instructions,
> als 'subset' of the more universal MOV instruction.
>
> https://en.wikipedia.org/wiki/Krivine_machine
>
> Also see the famous "Landin Machine" with 10 instructions.
>
> https://en.wikipedia.org/wiki/SECD_machine
>
> There are a couple of "Weird Instruction Set Machines" out in the
> wild, all built, suited for special purposes ...
>
> I was surprised, how small miniPicoLisp is and - als fully featured
> programming language - it fits onto such kind of hardware (low
> transistor count === very low energy consumption **while running**)
> architectures.
>
> Have fun!
>
> Guido Stepken
>
> Am Freitag, 10. April 2020 schrieb  <mailto:andr...@itship.ch>>:
> >>
> >> Only 1 - in words "ONE" - single instruction left: MOV.
> > congratulations, you discovered lambda expressions, the fundamental idea
> > on which the concept of LISP is based.
> >
> > Thanks for your post, very interesting!
> > Keep on! Our group of radical IT purists is growing ;-)
> >
> > This crisis will only increase the demand for quickly to create,
> > flexible & maintainable software - so let's picolisping :-)
> >
> >
> > --
> > UNSUBSCRIBE: mailto:picolisp@software-lab.de
> <mailto:picolisp@software-lab.de>?subject=Unsubscribe
> > 


Re: Porting Picolisp onto the simplest possible processor - The new SISC!

2020-04-10 Thread andreas
>
> Only 1 - in words "ONE" - single instruction left: MOV.
congratulations, you discovered lambda expressions, the fundamental idea
on which the concept of LISP is based.

Thanks for your post, very interesting!
Keep on! Our group of radical IT purists is growing ;-)

This crisis will only increase the demand for quickly to create,
flexible & maintainable software - so let's picolisping :-)


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: Small Docker container builds the latest pil in Alpine image

2020-03-26 Thread andreas
Thanks for your informative email.

I mostly agree with your points, except for WebAssembly on the client.
Though you differentiate between WebASM on client and on server - didn't
know about WebASM on server, might be a very good thing!

But WebASM on the client is a epic conceptual mistake - it is the new
Adobe Flash.
Already now it is mostly used for malware obfuscation:
https://www.sec.cs.tu-bs.de/pubs/2019a-dimva.pdf

Web scripting languages should not be turing complete, same holds true
for everything with untrusted scripting input.
Impossible to validate, unless you execute it. Yes, containment using
sandboxing turns out to be a better strategy than we thought years ago,
but still it gives a strong incentive to not work properly.

Of course, that battle is already lost :(

Security-wise, the whole cloud business should be dead, only full
hardware isolation gives full security.
Servers could be many small devices (e.g. rock64's, raspis, ..) instead
of shared resources with many layers and much (energy) overhead.

No, I don't fully practice this, not viable currently.
Yes, I enjoy living in my radical purity niche.

Have fun ;-)
- beneroth

On 26.03.20 13:35, Guido Stepken wrote:
> Though - for some folks - it might make things simpler, i am no friend
> of Docker.
>
> What the Docker founder is saying about Docker now:
>
> Solomon Hykes
> @solomonstre
> 
> ·
> 27. März 2019
> 
> If WASM+WASI existed in 2008, we wouldn't have needed to created
> Docker. That's how important it is. Webassembly on the server is the
> future of computing. A standardized system interface was the missing
> link. Let's hope WASI is up to the task!
>
> Source: https://twitter.com/solomonstre/status/004913222324225
>
> Picolisp compiles perfectly fine with emcc Emscripten C/C++ compiler
> and runs perfectly in (server side) Webassembly containers. It's
> completely replacing any Docker/Hyper-V/VMware/Amazon AWS Lambda solution.
>
> https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm
>
> And when you look deeper into Webassembly, you will notice, that - in
> itself - it's a Lisp, very much like Picolisp.
>
> https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format
>
> Lisp now rules the world. And Linux has won! ;-)
>
> Have fun!
>
> Guido Stepken
>
> Am Mittwoch, 25. März 2020 schrieb David Bloom  >:
>
> For work reasons I have strayed from the beloved PicoLisp into
> Erlang for some time.  While I have much love for using Erlang/OTP
> to build robust, distributed systems, it handles a different job
> than PicoLisp in my opinion.  Even though work kept me in the
> Erlang world for a while I still followed the mailing list and one
> day saw instructions on how to build pil with musl.  After a
> single attempt in a fresh Alpine container it worked so I felt
> compelled to share with the group.  BEHOLD!
>
> https://hub.docker.com/r/progit/pil-alpine-minimal
>   
>
> Big, big thanks again to Alex and this entire community.  Happy
> hacking!
>


Re: Graph database

2020-03-25 Thread andreas
Dear Lawrence

Sounds to me that your head got stuffed a bit too well with
over-complicated concepts. No offense! That is the nature of most
software education, and its even worse in the business world. And we
programmers have a high tendency to believe we are more clever when we
are working on more complex systems:"Weeks of coding can save you hours
of planning."

PicoLisp is radical in its focus on simplicity, although it is not an
easy language. Less so if one is trained by education and other
languages to think in more complicated patterns than really necessary. I
went through this struggles too, and it made me into an overall much
better software developer, also in other languages & stacks.

Some fundamentals:

  * PicoLisp has not much in common with CommonLisp, though they share
common ancestors
  * As with lisp languages in general: the source code is not a list of
instructions, but an abstract syntax tree (AST)
  o compilers (in the mainstream sense) for other programming
languages construct internally an AST from source code, and then
they optimize that AST and translate it to machine code
  o for PicoLisp, the reader (R of REPL) translates source code
(which can also be repl text input) into an AST, basically trees
of pointers
  o this AST /is/ nothing else than a data structure, the source
code (textual data) becomes a tree in RAM (lists of lists)
  o PicoLisp can modify this AST (the code data structure) during
execution - primarily by interpret it as code or data, both is
the exact same stuff in memory (more so in PicoLisp than some
other lisps)
  * PicoLisp is a multi paradigm language
  o it is not purely functional (like e.g. Haskell)
  o operations can be immutable or mutable
  * In Lisp (*l**is*t *p*rocessor) languages are based on lists
(everything with parentheses around it is a list)
  o A list is always a grouping of (possibly) multiple elements
  o Elements which are not lists themselves are called *atoms*
(single things)
  * PicoLisp has only 3 fundamental data types:
  o Number
  + signed integer of arbitrary size
  + this is an atom (atomic type)
  o Lists
  + singly linked list (so always an ordered sequence of
elements, not a unordered set)
  + may contain lists and atoms
  o Symbol
  + has a name
  + has a value
  + may have an arbitrary number of properties
  # a property consists of a name and a value
  + this is an atom (atomic type)
  o a /value/ always is of one of these 3 data types
  + other than in other languages, variables don't have a data
type (the value has a data type)
  + variables in PicoLisp are just symbols
  + the data type of an value is both static and strong (cannot
be changed)
  o all other data types (e.g. classes / objects) are based on these
3 fundamental PicoLisp types
  + non-fundamental types have practically no enforcement, no
checks - unless explicitly called
  # not entirely true, the fundamental data types have
built-in sub-variants for which certain rules apply
(e.g. transient symbols, primarily used as string type)
  +  so all non-fundamental types are *duck typed*

  + this enables easier code reuse
  o for example: the OOP system in PicoLisp is primarily based on
the symbol data type
  + classes and objects are symbols which follow certain principles
  # member variables (attributes) are stored as properties
of the symbol
  # the value of the symbol is a list containing parent
classes and methods
  * PicoLisp database mechanisms is multi paradigm
  o *on lowest level: a /key-value store/*
  + just values of the symbol data type which are persisted to disk
  + the so-called *external symbols* - a sub-variant of the
fundamental symbol data type
  + the name of such an external symbol is the logical block
address of the data within the database file(s)
  + external symbols are automatically loaded into RAM on first
access (lazy loading)
  o *external symbols combined with PicoLisp OOP system: /object
database/*
  + persistent OOP objects
  + no translation/copying between objects in RAM and database
(no ORM problem)
  + as the objects are just external symbols which follow
certain principles, they're lazy loaded when accessed
  o *relationships between database classes (entities) defined in a
schema: /graph database/*
  + not exactly following the strict academic definitions for
graph database
   

Alternative repos

2020-02-21 Thread andreas
My thoughts, sorry I'm unable to keep it short:

I think the main repo should be self-hosted, how Alex is doing it now.
PicoLisp was once hosted primarily by Google Code, it shut down, no
reason why this should not happen to others. Dependency equals risks,
and as we preach "control to the programmer" we should follow this
through on our "community infrastructure" too. I'm happy to pay/sponsor.

I'm all for automatic mirroring of the self-hosted "master repository"
to public repository services.
Especially GitHub is quasi the monopoly hub for FOSS, without it the
visibility of PicoLisp is very limited.
Personally, I would prefer the main development not to happen there,
even if it makes us look less a "serious project" compared to the
mainstream FOSS stuff which often is completely and in all details
visible on GitHub.
We should not be interested in people who flock to us because of how we
look.

I'm thankful to the people who invested into this topic and created the
existing mirrors.

Why not mirror to as many repositories as PicoLisp community members want?
Nothing speaks against this, as long as the workflow for contribution
and the "master version" of PicoLisp is clear and transparent - this
must be described clearly on every mirror repository.
It is very important to keep this clear and straight, multiple branches
of the community having their own forks of PicoLisp would be a
disadvantage for all.

The current way is to send and discuss contributions with Alex, ideally
on IRC or mailing list.
I don't think this should change - having many contributors working on
one thing is not a benefit, many contributors are only a benefit if they
work on diverse things, e.g. in the forms of "plugins" (libraries).
Otherwise it becomes very hard to coordinate and manage, or development
degenerates into "design by committee" which is the road to bloat and
inconsistency. Nearly all good IT systems were designed by 1-2 persons max.

The only question is how repository costs (financial) should be covered.
Paying with money might often be a better way instead of paying with
data and other immaterial catches.
When the question about a certain repository arises, when it is really a
worthwhile thing then it should be easy to convince some community
members willing to sponsor, otherwise it is obviously seems not to be so
important.

- beneroth


On 21.02.20 09:37, Jean-Christophe Helary wrote:
> Sorry I started this digression, so the reply is just for informative purpose 
> and commentary and not intended as a will to pursue this particular 
> discussion :) I'm fine with GitHub or whatever.
>
>> On Feb 21, 2020, at 16:49, Mike  wrote:
>>
 Someday all this must move to github.com/picolisp.
 @Mansur will take care.
>>> Why not use sr.ht ?
>>> It fully supports W3C accessibility guidelines.
>> o) Because github.com is free
> Not in the meaning of free software.
>
>> o) Better have one point of entry
>> o) No one will pay for sr.ht account
> If keeping $20/y is more important than supporting free software, then I 
> don't see the point spending time (=money) on picolisp, or on free software 
> in general.
>
> I'm paying $100/y to sr.ht because their aim is to create a totally free 
> service that supports free software. I've spent more on other pieces of free 
> software that I use for work and I'll gladly do it again for picolisp if that 
> contributes to having it run on mac one day.
>
>> (in general its not free)
> "Notice: sr.ht is currently in alpha, and the quality of the service may 
> reflect that. As such, payment is currently optional, and only encouraged for 
> users who want to support the ongoing development of the site. For a summary 
> of the guarantees and limitations that the alpha entails, see this reference. 
> You may click here to continue without payment."
>
> JC


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Proposal: PilCon 2020

2019-12-25 Thread andreas
Merry Christmas everybody 
I will attend 100%.

On 25.12.19 10:56, Alexander Burger wrote:
> Hi all,
>
> a merry Christmas to everybody! o/
>
>
> Since a few weeks we were discussing in the #picolisp IRC channel about 
> holding
> a PicoLisp Conference in Langweid / Germany next year.
>
> It would be on July 27th (Mon), 28th (Tue), and - if necessary - 29th. I can 
> get
> a room and equipment for about 30 people, in "Kulturbahnhof", the old Langweid
> train station building.
>
> With this mail I'd like to find out how many people are actually interested to
> participate, and their probabilities of attendance (in percent).
>
> Langweid is by train 15 minutes from Augsburg, or one hour from München 
> central
> station. There are some hotels/pensions in Langweid, and more in Augsburg or 
> one
> of the villages nearby (reachable by train or bus).
>
> I could make two or three presentations about what I'm working on currently,
> anybody else is welcome to do the same, and/or we could make a general 
> PicoLisp
> workshop.
>
> One of the oldest PicoLisp customers (since 2002, also the one with the 
> largest
> user base) is about 3 km from Langweid, and I have a probable OK that some
> interested conference attendees might join to visit them.
>
> Let's discuss further details here in the list, or perhaps in the wiki at
> picolisp.com.
>
>
> I wish peaceful days and a good start into 2020 for all of you!
>
> ☺/ A!ex
>

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: ORM comparison

2019-11-28 Thread andreas
By the way, the often used the argument "ORM allows to switch from one
(SQL) database to another" is illusory.

In practice such a switch happens very rarely, and when it does it
usually still needs much debugging and changes to the existing
application because the different DBMS just work to differently even
when they all talk a something similar-looking SQL-dialect, and most
likely some DBMS-specific stuff was used in the application eventually
(even when this means circumventing the ORM).

Just think what it means that you could switch without any effect from
one database management system to another - it means you very likely
haven't fully utilized the previous DBMS and restricted yourself to the
minimum functionality (lowest common denominator) shared by these very
different SQL implementations.

These arguments work only for simple cases, so they look nice and
convincing on the powerpoint and marketing material, but they don't
stand the test of reality.

Kind regards,
beneroth

On 28.11.19 18:06, C K Kashyap wrote:
> Hi Alex,
> There is a plethora of ORM systems such as ActiveRecords (in
> Ruby/Rails) or Microsoft EntityFramework and similar solutions in
> other languages where Objects are mapped to SQL DB records.
>
> I'd love to know your thoughts about how PicoLisp's approach is
> similar/different from them.
>
> Regards,
> Kashyap


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: ORM comparison

2019-11-28 Thread andreas
Hi Kashyap,

I've a bit experience with ActiveRecord and some more with EntityFramework.

As said in the other responses, the big fundamental difference between
PicoLisp database architecture and ORMs is that in PicoLisp the
application layer and the database layer is the same layer, it is not
two very different conceptual systems (OOP vs. Relational) with a
"translation system" in between.

This results in several benefits when developing applications using
PicoLisp database:

  * higher productivity
  o in PicoLisp, the database "table definition" and the application
class is the same thing. In other stacks you have to do the
"object definition" multiple times: in the database schema, an
application class, usually you do additional a "business model"
object (or even multiple). Every time it is basically the same
"grouping of some properties/columns" with only small (but
substantial) deviations.
Even when these frameworks generate you some or all of the extra
code, it is in practice often necessary to look at this code and
adjust it so it works as intended, especially when doing changes
on an existing application.
  * less code, less space for bugs
  o It is easier to analyze and debug what is happening with the
data between input/storage and storage/output without having to
track the values being copied from one intermediate (layer
transition) object to the next.
  * simpler mental model
  o as less screws and mechanics are present in the PicoLisp stack,
it is easier to understand and imagine in your head what does
happen, easier to contrive which potential effects you need to
take care of.
  o in mainstream stacks, the conceptual and technical barrier
between OOP application programming and relational SQL database
programming is often very pronounced. In my experience,
application programmers these days often have a very incomplete
understanding of how a database works (e.g. they don't know
about transactions), which results in the best case in
insufficient usage of the DBMS (e.g. amateurish re-implementing
of functionality in the application which would be available
from the DBMS in a tested, optimized and reliable way), or
widespread disregard of fundamental data integrity
vulnerabilities in the worst case, which depending of the
application might result in minor annoyances up to complete and
utter failure of the whole thing (e.g. losing vital data, might
bankrupt a company).
  * queries and application cache
  o As you saw, it is possible to write very involved and powerful
queries on the application level in PicoLisp.
These queries make use of the database data cached on the
"application layer", meaning the database is only asked for
records which were not already accessed in the same session.
  o Most (maybe all?) ORMs cannot take advantage of the records they
already have been cached, because the ORM has only a very
limited implementation of SQL, so the query (e.g. written with
LINQ on the application level) gets translated to SQL and sent
to the database to be executed there, and then the results are
sent back to the application - even data is sent forth and back
which would already be cached on the application layer.
  + e.g. Entity Framework only uses its own cache when directly
fetching a record by primary key (id),
all other queries are executed on the database as Entity
Framework has no query engine.
  + this hurts performance even more when the database is
located on a different server than the application, as it is
often the case.

PicoLisp database is not relational:

  * there is no "primary key" in PicoLisp
  o while you might often have a (rel id (+Key +Number)) to have an
simple index to find all records of the same entity, such a
property is completely optional
  o a record only needs to be in at least one index or being linked
to from another record, so it can be found and is not seen as
garbage (as in garbage collecting = object to which nothing points)
  * every object has a global unique identifier
  o global per database
  o this is the name of the external symbol
  + which encodes the physical location in the database file
where the record is stored
  o this makes it possible to directly link a record to another
(also many to many)
  + in relational databases this requires a foreign key (which
is an index, roughly comparable to +Ref)
  + in relational databases, many-to-many relations require an
interim table
  # this interim table is usually h

Re: Pilog query across multiple classes

2019-11-23 Thread andreas
Hi Kashyap

Try: (rel tgs (+List +Ref +Joint) NIL itm (+Tag))

+Idx is for +String, actually a special variant of the general
non-unique index +Ref.
Be aware that the relation classes may have parameters - in same order
as the prefix classes:
(rel  (  ... )
  ...
)

Now I'm currently unsure if +Ref and +Joint can be combined... might be
that +Joint cannot be indexed?
Alex?

Regards,
beneroth

On 23.11.19 16:49, C K Kashyap wrote:
> Thanks Alex,
> How can I add +Idx to tgs? That should be possible right?
> When I add +Idx to tgs, I get "tgs -- No Link" error.
> Regards,
> Kashyap
>
> On Fri, Nov 22, 2019 at 11:07 PM Alexander Burger  > wrote:
>
> Hi Kashyap,
>
> >  (collect 'tgs '+Item (db 'nm '+Tag "BLUE")) does not seem to
> work for me -
>
> Sorry, my fault! I did not test.
>
> > returns NIL. For that matter, even (collect 'tgs '+Item) returns
> NIL. I
> > wonder if its because 'tgs does not have +Idx in the relation
> >
> > (class +Item +Entity)
> > (rel ttl (+IdxFold +String))
> > (rel tgs (+List +Joint) itm (+Tag))
> > (rel sts (+IdxFold +String))
>
> Right, we cannot 'collect' using the 'tgs' relation, as it has no
> index.
>
>
> > Also,  (mapcar '((This) (: itm)) (collect 'nm '+Tag "BLUE"))
> worked fine -
> > now I see the beauty of "This" better. Btw, I had to get rid of
> "T" in (collect
> > 'nm '+Tag "BLUE" NIL T 'itm) to get it to work.
>
> Ah, haha, sorry again :)
>
> You can either
>
>    (collect 'nm '+Tag NIL T 'itm)
>
> i.e. collect *all* tags (from minus infinte to plus infinite), or
>
>    (collect 'nm '+Tag "BLUE" "BLUE" 'itm)
>
> to collect only the blue ones (from and till are "BLUE").
>
> ☺/ A!ex
>
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> ?subject=Unsubscribe
>


Re: Request for app development feedback/help

2019-10-22 Thread andreas

Hi Kashyap

Familiarizing with the concept of prolog might help, but studying prolog 
in detail might just add to the confusion, as prolog uses a quite 
different syntax than pilog (which is embedded into picolisp, but kinda 
it's own language).


You posted a select query, it is likely the most complex pilog 
predicate, but also likely the most used when working with picolisp 
database. In the reference is a document just about select: 
https://software-lab.de/doc/select.html

(it is in @doc/ within your picolisp directory).

At the top comes the picolisp function (?) which executes the pilog 
query it gets via arguments.



(?
(?) is interactive, so handy in the REPL, but in code you usually want 
to use (pilog) or (solve).

(solve) is kinda like (collect) as it produces a list of results.
(pilog) is like (iter), as you can hand it a function to map over the 
results, e.g. changing database records according to some pilog query.


The important detail here is that the picolisp pilog-interface-functions 
(?, pilog, solve, query and prove) handle their arguments differently, 
some expect directly a pilog-query (no quoted), some expect a quoted 
pilog query (so instead of a quoted hardcoded query it could be a 
picolisp function returning the query).
This confused me at first. Read the reference carefully and then you see 
the different usages and intentions.


In the function list at the end of the reference 
you have the pilog section, it 
contains a mix of picolisp functions (mostly the ones without a / in the 
name) and pilog predicates and statements.
Be careful to see if a piece of code is pilog and belongs into a pilog 
query,

or if its picolisp code working with a pilog query.

E.g. (goal) and (fail) are picolisp helper functions to construct a 
pilog query (e.g. to generate a query from code, instead of hardcoding it).


Then comes a (optional) listing of pilog unification variables (aka: 
parameter bindings).
Most picolisp pilog-interface functions take those as the first 
argument(s), some expect to be part of the quoted list handed to them. 
Strictly speaking they are not pilog and not exactly part of the pilog 
query, but binding the parameters for use within pilog interpreter.


Remember: pilog is an interpreter running inside the picolisp 
interpreter, and it has not automatic access to picolisp variables. You 
have to bind the variables as such pilog parameters, or dynamically run 
picolisp code within the prolog interpreter: "When the CAR of a Pilog 
clause is the symbol |^|, then the CDDR is executed as a Lisp |prg| body 
and the result unified with the CADR". See the last part of the "Pilog 
(PicoLisp Prolog)" <"Pilog (PicoLisp Prolog)"> chapter in the ref, means 
^ is not a function, but a read-macro for the pilog interpreter!


The "unification variables" are rather easy, despite the unwieldy words:
Rule 1: pilog variables have to start with @, e.g. @Nr.
Rule 2: pilog variables never change their value. Because pilog (prolog) 
does not execute statements, but finding solutions to a bunch of 
"facts". Using the "unification variables" we define some fixed facts by 
setting those pilog variables to picolisp values ("unifying" the pilog 
variables with the picolisp environment).


Apart from that, it is just like the variable list in a (let):
@pilog-variable-to-set 


@Nr (and *CuSuNr (cons @ T))
Set @Nr to: if picolisp variable *CuSuNr is NIL, to NIL, else to (cons 
*CuSuNr T).

So @Nr is NIL or e.g. (45123 . T)


@Nm *CuSuNm
@Tel *CuSuTel
@Plz *CuSuPlz
@Ort *CuSuOrt
@Mob *CuSuMob
Easy, just setting the @pilog-variable to the value of the picolisp 
variable.


After the "unification variables" (or pilog query parameters, as I would 
call it),
comes the pilog query. Here a select/3 is used. Don't forget to read the 
dedicated reference! 



(select (@@)
The first argument to our select query is (@@), again list of 
unification variables, but this time the unification variables which 
should be communicated from the pilog environment back to the picolisp 
environment.
So basically a kind of return values, just a list of pilog variables we 
like to get returned, nothing more.

These are pilog variables, so all elements must start with @.
Often you need only one, then it is kind of habit to use the iconic 
variable name @@.



((nr +CuSu @Nr) (nm +CuSu @Nm) (tel +CuSu @Tel)
            (plz +CuSu @Plz) (ort +CuSu @Ort) (mob +CuSu @Mob) )
After the list of unification variables, selects wants a list of 
"generator clauses".

This is a list, therefore one pair of parentheses around the whole thing ;-)
Within this list, we may have one or more generator clauses, which are 
again written as lists itself.

(Pilog has really many parens).

A generator clause can be very short and easy, but also long and funny :-D
Check out the "Generator clauses" section in the select predicate 
reference 

Re: Trouble with a sample

2019-09-03 Thread andreas

Hi Geo

psh (located in the bin/ dir within picolisp/ dir) is "picolisp shell" 
(or process shell?), is a tool to get a REPL to a running picolisp app 
process.
The implementation is a bit tricky, basically it does a HTTP request to 
the running app server (to initiate a session process),
and then that process gets told to bind to a tty, so you get a REPL to 
the running application - a child process, same as normal application 
user sessions, not the master process.


So with psh you can work on the live application, like just another user.
Very useful for debugging or live patching. If it is really a productive 
system, you should be careful with database transactions,
as the database is write-locked for all users until the transaction 
started with (dbSync) is finished with (commit 'upd) or canceled with 
(rollback).
Better use the auto-transaction methods (the ones with the ! in the 
name) like (put!>).


Best regards,
beneroth

On 03.09.19 16:30, George Orais wrote:

Hi CK,

Im also currently learning PicoLisp web dev and this thread is indeed 
informative.


For your question I think Alex mentioned about psh? Im not so sure but 
I think I read somewhere about psh and its usage and this might be the 
answer.



BR,
geo


Re: Trouble with a sample

2019-09-03 Thread andreas

Hi Kashyap

While on this subject - is there any advice on speeding up the dev 
loop for app development? Right now, I kill pil and restart pil each 
time I make a change to the app. I suppose I could have my logic 
written in a separate .l file and have it be loaded in the main server 
file.


Yeah, using (load) is the right way.
(load) is extremely fast.

Greetings,
beneroth


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: compilation benchmark

2019-08-19 Thread andreas

Thanks Mike!

On 19.08.19 13:56, Mike wrote:

August 15, 2019 11:21 AM, "Mike"  wrote:


hi all,

https://picolisp.com/wiki/?compilationbenchmark
Next week I will post this link to HN, lobste.rs and reddit.com/r/lisp
If you have something to edit or add please do.


Posted:

https://news.ycombinator.com/item?id=20736940
https://lobste.rs/s/fiakxo/picolisp_compilation_benchmark
https://www.reddit.com/r/lisp/comments/csg23a/picolisp_compilation_benchmark/

(mike)



--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: VIP Auto-Load and ASCII Diagrams

2019-07-02 Thread andreas

Am 2019-07-02 04:26, schrieb Alexander Burger:

I made a little video explaining two relatively new features in Vip:

   1. Vip has an Auto-Load functionality, inspired by shell hash-bang 
scripts.
   2. It comes with a library that generates ASCII drawings from Lisp 
code.


Very nice!
Thank you Alex for creating and sharing this :-)

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Certain file contents break the :r function in Vip

2019-06-25 Thread andreas

Hi Wojtek

This limitation only extends to all "text i/o" contexts, you can freely 
read (rd with 'cnt argument) and write (wr) NULL with raw binary i/o 
functions.
When reading text with (read), (from), (till), (line) and friends, the 
data is automatically turned into picolisp symbols (as it is the 
picolisp type to represent strings), and as they cannot handle NULL it 
is interpreted as EOF.


Cheers,
beneroth


Am 2019-06-25 14:58, schrieb Wojciech Gac:

Hi Alex,

I see. Thanks for the response

I'm wondering then... what if someone wanted to use PicoLisp to emit
characters somewhere (say, to a listening process) and the case
required one to send a null byte. Does this limitation extend to all
attempts at representing the null byte or only  in the file context?

Cheers,
Wojtek

wt., 25 cze 2019 o 13:54 Alexander Burger 
napisał(a):


Hi Wojtek,


I've noticed this when messing around with my .emacs file. When

you have a

file with a null character somewhere within a double-quoted string
(e.g. "\0") and you try to insert it into the current buffer with

:r, then

it breaks Vip


Right, this is a limitation of Vip (and PicoLisp in general): It can
handle only
files with non-null characters in UTF-8 encoding.

Characters in PicoLisp are symbols, and a null-byte works as a name
terminator
(similar to C), so symbols cannot have names with null-bytes.

☺/ A!ex

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Database file format

2019-05-28 Thread andreas

Hi Kashyap


Is there documentation about the file format of the database file


See file @doc64/structures within the picolisp directory.
There are the picolisp VM internals described, including Database file 
format.
Like every database binary file format, it is based on fixed blocks 
(block size).
External symbols (= database records) are stored using or multiple 
blocks.
The data itself is encoded using PLIO format (PicoLisp I/O), referenced 
to as "encoded binary format" in the (rd) and (pr) functions in 
reference.
A small C-library (one .c and one .h file) providing PLIO to C/C++ 
programs is available at https://software-lab.de/plio.tgz




I am looking at the possibility of using it for the tripple store [1].


The wikipedia article contains this nice line "A graph database has a 
more generalized structure than a triplestore".
The picolisp database is a graph database, though it contains 
additional/more features than what is usually understood by the term.


On lowest level, pilDB records are external symbols, which is nothing 
else than the persistently saved picolisp symbol data type.
Unlike normal runtime picolisp symbols, external symbols have always a 
fixed name (but arbitrary value and arbitrary properties).
The name of an external symbol is the block location (so the index in 
the physical file) of the saved external symbol.
This way, every record in pilDB has always a global (per database 
instance) unique identifier (GUID), which technically is the pointer to 
the external symbols storage location.
Knowing the name of an external symbol is thus enough to load the record 
from the physical file (seek to the specific location in the file and 
read the PLIO-encoded data), no need to go via a primary key field as in 
relational databases.


Usually in practice a object-oriented schema is used, so database 
records are objects (which in picolisp are based on the symbol data 
type), which have properties and a property might directly point to 
another object or be a list of other objects (graph-like, see +Link and 
especially +Joint) with additional (relational-like optional) indexing 
(and full ACID transaction mechanism as common in relational database). 
The index structures are B-Trees (or special variant of it like UB-Tree) 
which are automatically created and maintained according to the property 
(in database context: relations) definitions in the entity relationship 
definitions (= the database schema). These index trees are again stored 
as external symbol structure.


So you could either build a triple store using naked external symbols, 
or do it the usual pilDB way by creating a (very small/simple) 
entity/relation schema.
Maybe this old tutorial might be of help: 
http://www.prodevtips.com/2008/04/23/simple-oodb-in-pico-lisp/


Kind regards
beneroth

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp is done

2019-05-27 Thread andreas

Hi Kashyap

You mean this? http://www.beneroth.ch/pil/picolisp-is-finished.html
Thread: 
https://www.mail-archive.com/picolisp@software-lab.de/msg07057.html


Regards,
beneroth

Am 2019-05-27 18:56, schrieb C K Kashyap:

Hi all,
I remember reading in doc or the mailing list where Alex mentioned
that "PicoLisp is done". To me it seems like a unique distinguishing
feature of PicoLisp :)
Can someone please point me to it?
Regards,
Kashyap


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: lens.l - generalized data accessors

2019-05-19 Thread andreas

Hi Abel

It seems your lens.l is a private repository, as the link leads to a 
gitlab login.
I can open https://gitlab.com/Abel-ze-Normand/bloom_filter, but 
https://gitlab.com/Abel-ze-Normand/lens.l is protected.


Looking forward to your lens implementation :)

Best regards
beneroth

Am 2019-05-19 23:02, schrieb Abel Normand:

Hello everyone.

I'm happy to present you my last project:
https://gitlab.com/Abel-ze-Normand/lens.l. It is a very nice
abstraction from Haskell functional programming community and I wanted
to share with you this PicoLisp implementation of Lens pattern and
utilities to work with them. I plan to use them not only as a proof of
concept but also as powerful tool to work with different formats of
data in declarative way. I hope you will find it useful or at least
interesting.
--
Best regards, Nail


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How do I read HTTP body while using web.l

2019-05-15 Thread andreas

Hi Alex,

Web.l is a server-side framework.

This thread is about how to handle a uploaded JSON file I believe,
not about consuming a JSON/REST API as a client.

Web.l is an alternative to the picolisp standard GUI framework form.l.

I can recommend web.l for people learning how to implement a HTTP 
server, and for small (toy) applications.
It's a  simple/simplified HTTP server, and the code is pretty 
transparent.
I do not recommend to use web.l for larger or critical production 
applications - I think it just makes it too easy to program severe 
stability issues and security holes with it.


In practice you like to program your own webserver and stack (as I 
did/do), then web.l might be a good basis to start from, but you will 
end up with your own implementations anyway.
Or you don't want to be bothered with webserver internals and just need 
a framework for writing an application - then stay with picolisp 
standard form.l.

That would be my sincere recommendation.

Kind regards,
beneroth


Am 2019-05-15 09:08, schrieb Alexander Burger:

Hi Andreas,

On Wed, May 15, 2019 at 08:27:19AM +0200, andr...@itship.ch wrote:

In web.l framework, you you define a request handler using (dh).


I do not know the web.l framework, but like to add that using either 
'client'

(from "@lib/http.l") or @bin/ssl is a bit simpler.

'client' can handle POSTs, but no HTTPS. @bin/ssl handles HTTPS, but no 
POSTs.

In case you need both, I recommend a pipe to curl again.

'client' and @bin/ssl are used roughly the same way. An example for 
parsing

bitcoin rates would be:

   (load "@lib/json.l")

   (scl 2)

   (in '("@bin/ssl" "blockchain.info" 443 "de/ticker")
  (while (line))  # Skip header
  (readJson) )

☺/ A!ex


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How do I read HTTP body while using web.l

2019-05-14 Thread andreas

Hi Kashyap

In web.l framework, you you define a request handler using (dh).
When a http request is received by the (server) function (in 
web.l/http.l), it gets handed to the (http) function (defined in 
web.l/http.l).
Now (http) is parsing the complete HTTP request before calling 
(req-handler) at the end (defined in web.l/web.l), which in turn tries 
to find a suitable request-handler as defined with (dh) in the 
application code.


So when you do (readJson) within the request handler, (readJson) is 
reading from stdin, which here is the http connection socket, but the 
stdin/socket buffer was already fully read by (http), the client is 
waiting for an answer and not sending anymore, your (readJson) also 
waiting for input on the same connection, forever (logical dead-lock).


Data sent from the client using HTTP POST (so in the body) gets parsed 
by the web.l/http.l and put into an association list, where it can be 
fetched from using (get-form "argument-name").
If the uploaded data was a file (using multipart/form-data encoding), 
then you get from (get-form) the filepath to a temporary file where the 
content is stored.


So the solution (untested) should probably be something like:

(dh ("/upload-json-form")
   (ifn (= *ReqMethod 'POST) # if it is not POST, we assume GET, so some 
html should be delivered to the client

  ( NIL "/upload-json-form" T
  ( "file" "uploaded-file") )
  (in (get-form "uploaded-file") # switching input channel from 
client socket to uploaded file
 (out NIL # switching output channel to stdout of the 
application - we want to print our debug messages to the server console 
(or logfile), not into the HTTP client connection

 (prinl (readJson) ) ) ) )

Kind regards,
beneroth

Am 2019-05-14 19:59, schrieb C K Kashyap:

Hi,
I'm trying to write a simple web tool and would like to parse the HTTP
post body. I tried to alter the example on the website of webl [1] to
read json payload like this -

(de greet (Greeting)

  (res-html "The hello world page" NIL NIL

 ( NIL (prin Greeting)) ) )

(dh ("/greeters/" @Name)

   (out "+out.txt" (prinl (readJson)))

   (let Name (ht:Pack @Name)

  (case Name

 ("bob" (greet "Hello world!"))

 ("pablo" (greet "Hola mundo!"))

 ("hans" (greet "Hallo Welt!"))

 ("sergey" (greet "п?~@иве?~B ми?~@!"))

 (T (httpStat 404 "Not found")) ) ) )

This results in endless read :(. What's the right way to read the HTTP
body?

Regards,

Kashyap

Links:
--
[1] https://bitbucket.org/iromero91/web.l/wiki/Home


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Review request for my JSON parsing implementation

2019-05-07 Thread andreas

You would also include "[" in the 'echo' arguments, then check it with

   (use S
  (while
 (prin
(setq S
   (echo "[" "volume" "unadjustedVolume") ) )
 (if (= "[" S)
(... step through the elements ...)
(echo ",")
(prin ".0,") ) )



I usually use
 (case (echo "[" "volume" "unadjustedVolume")
("["
   ...)
(("volume" "unadjustedVolume")
   (echo ",")
   (prin ".0,") )
(NIL
   ... handle error case, if you like ...)
(T
... general else case ) )

No additional variable needed, and one can have readable code even when 
handling many cases.
Easy to additionally handle NIL returned from (echo) - probably doesn't 
matter (too unlikely) when processing a file, but probably handy when 
processing a input stream from network (e.g. curl).



--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: A good way to write an api server

2019-03-11 Thread andreas

Hi Kashyap

Try out web.l: https://bitbucket.org/iromero91/web.l/wiki/Home
(also linked at the bottom at https://picolisp.com/wiki/?Documentation)
It's relatively straight-forward, good to start, for simple use cases.
URL's are matched using (match) (see picolisp reference).

The standard GUI framework (form.l) can also be used as a pure API.
If your project requires long-running sessions, it is probably the best 
candidate short of a custom http implementation.

For simple use cases, the web.l framework should suffice.

-- Nevertheless I warmly recommend you to learn HTTP eventually - it's 
the foundation for so much.

---> Check out this excellent tutorial: https://jmarshall.com/easy/http/

Don't be afraid, HTTP is really a simple, clear-text protocol (and HTTPS 
is still clear-text HTTP, just using a encrypted TCP-Connection instead 
of a plain TCP-connection).

It's no arcane magic - much easier than HTML!
Knowing how it works, and being able to even issue a simple GET by hand 
using telnet, proved again and again useful for me.
For example, checking a server with manual HTTP via telnet or 'openssl 
s_client': easy way to check if a problem is with the network or 
actually with a slow/non-responding HTTP server.
(With this "trick" I surprised seasoned network experts at multiple 
occasions. :-/ )


Best regards,
beneroth

Am 2019-03-12 03:15, schrieb C K Kashyap:

Hi,
What's a good way to bring up an API server in PicoLisp?
The example give here -
https://rosettacode.org/wiki/Hello_world/Web_server#PicoLisp does not
seem to provide an opportunity to handle GET/POST parameters. And I do
not want to use the GUI framework.

The example here is too low level
https://picolisp.com/wiki/?AndroidWebServer - I'll have to build HTTP.

The goal is to write a server that I can drive with curl on the
command line.

Regards,
Kashyap


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: A possible way to build for windows

2019-02-25 Thread andreas

I have been considering the idea of getting picolisp to run on windows


I think there is no easy way to get the posix-build of picolisp to run 
on windows.
Even if we manage (as we did before with cygwin etc.), the 
posix-dependent parts like fork() are required for all the nice stuff 
(servers, GUI, pilDB).


I think the only way to bring picolisp really to windows is by 
implementing it in .NET.

Another picolisp VM implementation, like ersatz (java).

This is an huge task.
As I understand, Alex has no incentive to it, because with his current 
customers and projects it would not be really a big benefit.
So maybe someone else would do it. Great opportunity to learn about 
picolisp internals, and Alex surely would help if there are questions.


I would like to have picolisp on windows available, but it's not a 
pressure issue for me.
At the moment I have no capacity for such a project, maybe in a few 
months.

It surely would be a very exciting project.

- Andreas


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: picolisp-mode

2019-01-22 Thread andreas
I'm working with picolisp and emacs, also using the older picolisp-mode 
which comes with the picolisp distribution (the official upstream one 
from http://software-lab.de/down.html).


I greatly enjoy using paredit, which works well.
I have not tried out the other emacs modules for picolisp, and I don't 
know if the one in MELPA works well with paredit, which I see as the 
essential feature for an emacs picolisp-mode.


The one coming with the picolisp distribution has some flaws: some newer 
built-ins are not known by the syntax highlighting, paredit treats (;) 
similar to CommonLisp comment, I didn't get Ctrl+K working(picolisp 
source/definition lookup, see picolisp in vim or vip.
But those never bothered me enough that I srsly wanted to do something 
about it.

I'm happy as it is.

If the MELPA package supports paredit and the other features of the 
picolisp-mode coming with picolisp, ideally by also supporting the nice 
tools from the vim/vip editors, then I would support to replace the mode 
in picolisp with the MELPA, so to have one unified emacs package for 
picolisp.


If nobody is to be found to ensure that for the MELPA package, then I 
would just leave it as it is now.
Different users might find different versions, but I would not consider 
it impossible or even difficult to get to the things you want.
In the end everyone should use whatever fits that person the best, we 
don't need one way to rule them all.


- beneroth

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Wikipedia

2019-01-03 Thread andreas

Am 2019-01-03 10:14, schrieb Alexander Burger:

On Wed, Jan 02, 2019 at 02:55:35PM +0100, Jon Kleiser wrote:
Is there a milestone or two we (eg. I) could add in the History 
section?


Should we perhaps also mention that PicoLisp is available as a package
on Termux (terminal app on Android)?


yes, of course!
It's a separate thing from pilBox.

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: file function purpose

2018-10-17 Thread andreas
Typo, in my example (car (file)) of course returns "somepath/" (contains 
the directory separator '/').


You can easily test the behaviour by creating a file foo.l containing 
the following single line:

(out NIL (prinl (car (file

Then start pil repl and load this file once directly without a path and 
once with its absolute path:

: (load "foo.l")
/
-> "./"
: (load "/home/user/foo.l")
/home/user/
-> "/home/user/"

Notice here the output is first the print and then -> prefixes the 
return value of the loaded script, which of course is the same string we 
just printed.


Am 2018-10-17 22:27, schrieb andr...@itship.ch:

So during execution of (load "somepath/somefile.l") the code (car
(file)) returns "somepath".
For this the (car (file)) has to be placed within somefile.l on top
level (code that gets executed directly during the load, not e.g. as
part of a function definition unless it is called as `read macro).


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: file function purpose

2018-10-17 Thread andreas

Hi Curtis

The purpose of (file) and the given examples makes only really sense in 
a specific context, which indeed is not further explained there.

Additionally, for understanding this it's important to know that:

During execution of (load), the loaded file is the current input stream.

Meant is the "read" step of the picolisp interpreter (the R in REPL), 
when the source code is turned into the binary picolisp representation 
within memory (pointers and cells).
So during execution of (load "somepath/somefile.l") the code (car 
(file)) returns "somepath".
For this the (car (file)) has to be placed within somefile.l on top 
level (code that gets executed directly during the load, not e.g. as 
part of a function definition unless it is called as `read macro).


This way the loaded file can get loaded using a indirect path, and the 
loaded file can still find out how it got loaded (via which path) and so 
re-use that path to load another file directly in the same directory as 
in (load (pack (car (file)) "localFile.l")) or the path information can 
be stored in a global variable as in (setq *Nanomsg (pack (car (file)) 
"lib/libnanomsg.so")).


When only (load)ing files from the same directory (no subdirectories), 
it has indeed no effect.
But when this is used in a file meant to be further included in other 
projects which do not necessarily (load) it using always the same path, 
this construct allows that the included file still can do further 
loading with paths relative to the files own location and the including 
project has not to care about path/directory structure for additional 
indirectly loaded files.


The alternative would be to use (chdir "somepath/" (load "somefile.l")) 
in the including project so that during execution of (load "somefile.l") 
the current directory is guaranteed to be the local directory of 
"somefile.l".


Best regards,
beneroth


Am 2018-10-17 20:59, schrieb Curtis:

What I mean to say is, it looks as though, from where "file" is being
called, it would always return NIL.
On Wed, Oct 17, 2018 at 1:19 PM Curtis  
wrote:


I'm a little confused by the purpose of the (file) function's use in
the example given here: https://software-lab.de/doc/refF.html#file
The example is: (load (pack (car (file)) "localFile.l"))  # Load a
file in same directory

But, doesn't (load "localFile.l") do the same thing?

I noticed the same combination of pack, car, file here:
https://github.com/aw/picolisp-nanomsg/blob/master/EXPLAIN.md
(setq *Nanomsg (pack (car (file)) "lib/libnanomsg.so"))

Isn't it the same thing as just (setq *Nanomsg "lib/libnanomsg.so"))?


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Server-Sent Events

2018-08-06 Thread andreas

very good article, thanks!
I especially like that you gave an overview about the different concepts 
and also point to alternatives.


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Tractatus Blaesicus

2018-06-13 Thread andreas
I would like to see the first paragraph of the wiki start page replaced 
with an eye-catching, easy to understand variant of the Tractatus 
Blaesicus.
I think this would be a much better opener instead that cheeky first 
paragraph.


-beneroth

Am 2018-06-13 12:05, schrieb Arie van Wingerden:

Hi Alex,

would it be an ides to transfer the contents of this to a simpler page
on the Wiki?

Of course it *is* useful, however, reading it is very tedious, not the
least because every time you wish to open a sub paragraph, the page
"jumps" to the top.

Personally I think this could be done better. After that maybe the
current Tractatus Blaesicus page could provide a very short "teaser"
for PicoLisp followed by the appropriate Wiki link (to be made). That
way we wouldn't use the link, which is present in all search engines
for a long time ...

What do you think?

Best,
   Arie


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Wiki change - 'de' function 'done'

2018-05-28 Thread andreas

Naming Conventions: https://software-lab.de/doc/ref.html#conv

/beneroth

Am 2018-05-28 16:54, schrieb Arie van Wingerden:

​Hi Olaf,


I do like your https://picolisp.com/wiki/?pcedefunction [1] wiki
page very much!


​Thx. You're welcome :)


For me, it does show the subtleties of the topic in a very clear and
comprehensible way (even reproducible).


​Nice. Reproducability is a thing I really want. Examples that don't
work straight away are often useless.​


Just to distinguish 'x' from 'x' (see *1 below), would you mind, if
I would replace all 'x' function names by 'foo' on your fine
article?


​Of course. I even missed the duplication of 'x'. I'll go for foo,
baar, baz etc.​


And just to follow the picolisp convention, to uppercase the
function Parameter Variables?


​Didn't know the convention, but will change that :)​


Second, a comment concerning the conclusion:
'very uninteresting function' ... it looks like, that these words
are spoken by 'the master' :-) himself,
but may be in some context, which is not seen within this quotation.
(Otherwise I would miss a lot of ratings for other functions in the
docs :-)  ).


​Alex quoted that in a response. He later weakened the word
"uninteresting"​ a bit.
I kept it, because it was funny somehow.
But, point taken. I just removed it!


Sth. like 'de is equivalent to'  followed by the setq examples would
sound less judgmental and the decision what to use is left to the
reader/user.


​OK.


By the way, I did not try, because always used 'de' instead of
'setq' for function definitions,
but may be 'setq' in combination with the different function
parameter possibilities (see *2 below) becomes less
readable/distinguishable?


​I've now added a "final notice" on the difference between 'normal'
functions and 'fexprs'.​


I really enjoy reading your article, as it summarizes in a clear,
comprehensible way all the little facts and differences, which make
picolisp so unique.
Thank you very much!


​Thx. again. I intend to continue.
Currently I am busy consolidating stuff from other websites in the
Wiki (e.g. PLEAC).
After that I hope to continue the other (new) stuff.​

As I did change things now, please check the page for errors left
over!

Thx. for the 'to the point' critique. I highly value that. It really
is a way to learn!

/Arie

Links:
--
[1] https://picolisp.com/wiki/?pcedefunction


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp tshirts!

2018-04-16 Thread andreas

Thanks Philipp!

beneroth

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Feed reader and bookmarker

2018-04-10 Thread andreas

Hi Henrik

Your tutorials helped me to get into pil DB (thanks for that!).
There are quite some references to your app in your blog posts - I'm 
curious and interested.

I'd love to read the code, I would much appreciate it.

Thanks,
beneroth

Am 2018-04-08 15:22, schrieb Henrik Sarvell:

Hi list,

Before the AI stuff Alex was helping me with some DB related stuff
that was going into my new RSS and bookmarker combo of an app.

The bookmarking part is a result of delicious deteriorating to such an
extent that it was unusable.

The feed reading I already had more or less completed in an earlier
unpresentable app.

It looks like I'm not going to manage to complete that last mile to
get to a polished thing. I'm still using it though so it must be good
enough.

It might take me an hour or two to write an install tutorial in case
there is interest in me uploading the project?

It's a non-trivial example of a complete app using the standard
PicoLisp DB after all, that could be used by beginners to explore
without having to overload IRC and mailing list with questions.

The database parts should be fairly solid (as they're made by Alex as
much as by me) with progressively less clean code upwards in the stack
so to speak, ie using jquery and more or less ad hoc Ajax requests.


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: wireguard

2018-03-16 Thread andreas

awesome, thanks mike!

Am 2018-03-15 16:21, schrieb tankf33...@disroot.org:

hi all,

https://bitbucket.org/mihailp/wireguard-pil/src
I've implement Wireguard on PicoLisp (+ monocypher library).
Noise framework and wireguard are cool and promising.


Lisp related part: check how i've implement sendto and recvfrom
functions for udp client,
buildin (udp) function can only *send* data.

(mike)


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Needing a trick with 'de

2017-10-16 Thread andreas
> My question: which mechanism frees X of the value it was setq-ed?

During function execution, the variables (symbols actually) used as parameters 
(in the function definition) are like in an implicit (let):
When executing, the values are bound to the arguments as specified in the 
function call, or NIL if the parameter is omitted in the call.

So if the variable (symbol actually) has a value outside of the scope of the 
function (during function call!), it regains that value when the scope of the 
function is left,
if it has value NIL it regains the value NIL.

So it has not to do with the behaviour of (setq) but how function parameters 
work.

I always saw it similar to C, where function parameter variables are like 
locally declared variables.




Re: PicoLisp on quora.com

2017-09-26 Thread andreas
Disclaimer: I don't really know Common Lisp.

Just a try, use it as inspiration not as answer, would need re-wording to be 
used as quora answer:

- they're about the same age, both inspired by Maclisp, both used commercially 
since the 1980s
- picolisp is a language and runtime VM - CL is a language specification with 
multiple implementations
- CL libraries may often be platform-dependent (or depend on a certain compiler 
to be used) - code in picolisp has much less such dependencies
- picolisp has no compiler, purely interpreted by design - CL is usually 
compiled, interpreted only during development
- picolisp directly evals s-expressions, the structure of the memory 
representation is the same as the structure of the source code - common lisp 
compiles to XX (?)
- only 3 strong types: list, number (arterially big signed integers), symbol 
(with property list), all other types are dynamically duck-typed - common lisp 
has many types (?)
- picolisp uses F-Expressions (FEXPRs, Functions which decide themselves 
if/when/how to evaluate arguments) - common lisps uses macros (rewrite code). 
F-Expr are slightly more powerful but cannot be compiled
- common lisp as big community - picolisp community is pico
- many libraries for CL - in picolisp programmers usually re-use libraries from 
other languages
- picolisp strongly follows unix philosophy - CL does not follow unix 
philosophy ( http://chrisdone.com/posts/haskell-lisp-philosophy-difference )
- picolisp has integrated graph database, persistent database objects are 
first-class citizens, integrated prolog engine
- picolisp has no multithreading, instead picolisp has integrated IPC to work 
with multiple processes and makes asynchronious programming easy  - common lisp 
has ... ???

Please correct my errors.

Most points of the FAQ should probably go into the quora answer: 
http://wwwsoftware-lab.de/doc/faq.html
See also: http://picolisp.wikidot.com/



- Original Message -
From: Mike Pechkin [mailto:mike.pech...@gmail.com]
To: picolisp@software-lab.de
Sent: Tue, 26 Sep 2017 15:58:05 +0300
Subject: Re: PicoLisp on quora.com

>
>
> Uh, oh, this is really tough.


​Just one smart paragraph.

(mike)
​




RE: Installation / Load Paths

2017-09-03 Thread andreas
Hi Christopher

> I could install all my supporting files in @lib/ in the picolisp installation 
> directory.
That is one way to do it. Alex usually does it this way afaik.

You could also create your own custom directory within the picolisp directory 
and then refer to it with "@myDirectory/my-lib.l".

The argument(s) to (load) don't have to start with "@".
So you could also load from absolute paths, e.g.:
-  (load "/home/user/programname/foo.l"))
-  (load (pack *Prefix "/share/programname/foo.l"))

The current directory is not changed during executing of (load), so if the 
loaded files refer to additional files, those paths should also be absolute.
You can find out the current directory your program is executing in with (pwd) 
-> this is the start point for relative paths.

There are also:
- (cd "/home/user/programname") -> change the current directory permanently
- or (chdir) to change the directory just for some 'prgs, e.g. (chdir 
"/home/user/programname") (load "foo.l"))

In my installations I always execute the program in it's own directory or 
switch to that directy with (cd), and I load all includes from relative paths.

Best regards,
beneroth


- Original Message -
From: Christopher Howard [mailto:christopher.how...@qlfiles.net]
To: picolisp@software-lab.de
Sent: Sat, 02 Sep 2017 07:47:42 -0800
Subject: Installation / Load Paths

Hi, what is the customary way PicoLisp programmers deal with load path
issues when trying to install a completed program onto a Gnu/Linux
system? My program has two *.l files. What I wanted to do was:

- Put the *.l files in $(PREFIX)/share/programname/
- Have a bash or picolisp script in $(PREFIX)/bin that starts the
program in $(PREFIX)/share/programname.
- Preferably do all this without having to modify the callers CWD.

This creates some difficulties because one of the source files simply
does a (load "myothermodule.l"), which works great when running from
the source directory, but not when installed somewhere outside the CWD.
Do I need to change that to (load "@myothermodule.l) and modify the @
variable somehow during invocation? Or I guess I could install all my
supporting files in @lib/ in the picolisp installation directory.

Or is there some other "load-path" mechanism in picolisp I'm not
seeing...?

--
https://qlfiles.net
https://emailselfdefense.fsf.org/en/




Re: Unclear licensing

2017-03-14 Thread andreas
> the absence of agreements, rules and disclaimers is enough.
The problem is, almost all people on earth are part of an agreement (well 
indirectly, but yet nevertheless valid) which states that every creation comes 
with certain rights what do with it and those rights are by default reserved to 
the creator.

https://en.wikipedia.org/wiki/Berne_Convention

I know, no one living today ever agreed personally to it, but also no one 
disagreed  in a valid way.
Automatic disabling of every agreement we didn't made personally wouldn't be a 
good thing (e.g. Human Rights).

But in essence:
When the license is not clearly stated, then you cannot be sure you have a 
permission to use the work.
That doesn't make it automatically illegal for you to use it.
If you are indeed not allowed to use the work, then the author (or copyright 
holder, if the right can be sold, which is not possible e.g. in Germany) could 
sue you.
If the author has the interest and resources to do it.

It's merely a discomfort for the user that the license is not stated 
everywhere, as the user has to inform themselves.


- Original Message -
From: Oskar Wieland [mailto:oskar.wiel...@gmx.de]
To: picolisp@software-lab.de
Sent: Tue, 14 Mar 2017 13:04:29 +0700
Subject: Re: Unclear licensing

don't let yourself (or others) be confused by freedom.

same with the term "free trade agreement". it is contradictory in
itself. if you think about it for a moment, "free trade" don't need an
"agreement".

the absence of agreements, rules and disclaimers is enough.

regards
05k4r
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Unclear licensing

2017-03-11 Thread andreas
> What I do when incorporating a source file which has no license or
> copyright information at the top:
>
> I just add it... it takes a couple of minutes, tops and then I'm done.

Great method.
Easy fix and Alex has not to change anything.


- Original Message -
From: Jakob Eriksson [mailto:ja...@aurorasystems.eu]
To: picolisp@software-lab.de
Sent: Sat, 11 Mar 2017 12:23:22 +0100
Subject: Re: Unclear licensing




Re: future?

2017-03-10 Thread andreas
clarification about the GitHub legalese:

My point is not "do not use github" but "github is not a singularity, no 
exception to the fact that they might close or suddenly turn into a bad actor".

I personally don't believe that this is the point yet nor that their ToS change 
was made with bad intentions.
My current view agrees with this HN comment: 
https://news.ycombinator.com/item?id=13770443

Basically, GitHub moves the legal responsibility from itself to the uploader.
There is no clear incompatibility with FOSS-licenses at the moment.
But such incompatibilities are not ruled out completely or for future GitHub 
service changes.
A minority (afaik) weights the risks so high that they chose not to use GitHub 
anymore.

Me personally, I find it very bad how they introduced this ToS-change, and 
secondly why should the move the legal risks to mostly private persons and 
non-profit FOSS-projects?
Why don't they keep the legal risk on GitHub, when they have the money and 
lawyers to check, and secondly when that legal risk is probably only arising 
when they would introduce bigger changes in how GitHub services work?
That would be a service for the FOSS-people, not just great technical 
infrastructure but also legal protection from risks that solely come from how 
GitHub behaves.

/beneroth


Re: future?

2017-03-09 Thread andreas
Thanks for your comments and insights, Jakob.
I just want to shortly assure you that I really liked your emails and your 
participation.
I didn't answer/comment further due lack of time.

Because of recent events (2017-03-01) I want to come back to this part:
> Yes, but Google Code was no Github.  Github is the singularity of
> open source development. (As much as I dislike FB but hear me out...)

Sidenote:
Before GitHub, sourceforge.net was the singular main hoster for FOSS sourcecode.
They lost their status when they bundled the downloads with adware (and 
malware).

Always the same story:
Nice little StartUp offers a comfortable, gratis service. Everyone starts using 
it.
Then either the StartUp fails and the service gets shut down,
or it gets sold to investors who want to see more profit with every year.
Then the terms of service get worse, the prices go up, etc., e.g. see BitKeeper 
vs. Linux (the reason we have git now).

GitHub:
On 2017-03-01 GitHub introduced new Terms of Service (which you automatically 
accept by continueing to use their service)
which demands from uploaders to grant GitHub a license. This is legal 
self-defense for GitHub, not unusual or bad in itself,
but they further specifiy this license, which e.g. includes the uploader to 
waive any and all attribution rights.

Basically, when uploading FOSS-licensed content to GitHub, the uploader 
automatically grants GitHub a special license, so actually a case of 
dual-licensing.
The problem now is, that when the content is copyrighted by other authors 
beside the uploader,
then the uploader cannot (in usual cases) actually grant this license legally 
to GitHub, as most FOSS-licenses forbid sublicensing and/or removal of the 
original attributions.

Some projects already moved away from GitHub because of this.

https://www.mirbsd.org/permalinks/wlog-10_e20170301-tg.htm
http://joeyh.name/blog/entry/removing_everything_from_github/

I don't believe GitHub will take big damage because of this, especially as 
there is no serious contender on the rise.
But it's surely a sign that GitHub is not a singularity from the usual 
development of such things.
It's not an idealistic group of nerds anymore, but a big company (e.g. lookup 
the "github meritocracy" drama).

For the other points mentioned by you and others about picolisp:
Just do it. PicoLisp is MIT-licensed. Action speaks louder than words.

As Lindsay wrote:
> What would be great is to see more of an ecosystem built around the
> picolisp core. Build something awesome with picolisp, document it and share
> it with the world.

This!
I'm on it.

/beneroth


Re: Future of PicoLisp?

2017-02-21 Thread andreas
Hi all

My previous message somehow got broken, half the text is missing.

Please read it here:

http://www.beneroth.ch/pil/picolisp-is-finished.html

Thanks,
beneroth


- Original Message -
From: andr...@itship.ch [mailto:andr...@itship.ch]
To: picolisp@software-lab.de
Sent: Tue, 21 Feb 2017 14:26:53 +0100
Subject: Re: Future of PicoLisp?



Re: Future of PicoLisp?

2017-02-21 Thread andreas
Hi Petr

Many thanks for your participation and outside view.
Such comments are very valuable to us, as those topics are hard to see from the 
inside.

I believe those feelings are triggered by mainly two source factors:
A) presentation of picolisp information
B) the (rather unusual) state of the picolisp project

A) First and foremost, we as community need to streamline our presence more,
probably mainly by making things more clear on picolisp.com.

We should also more prominently point to the IRC channel, that is where we meet 
daily.

Online repositories like https://github.com/taij33n/picolisp and 
https://bitbucket.org/mmamkin/picolisp
are not mere personal forks, but up to date clones of the official release at 
http://software-lab.de/picoLisp.tgz
Both taij33n and mmamkin are core members of the picolisp community.

Petr, would it help if we would link and describe those repositories 
prominently on picolisp.com ?
Or do you think people don't go first to our website, but find it directly on 
github/bitbucket and are turned of when they see "0 contributors" there?
Maybe putting a prominent note into the readme at github/bitbucket could 
improve this a bit...

For years, PicoLisp used to be hosted in such a online community, actually at 
Google Code.
There are two main reasons why PicoLisp development is not anymore managed over 
such a service:

1) Google Code closed down. Yes, its unlikely that this will happen soon with 
Github, but such offerings from big commercial companies are always up to the 
moods and motivations of the company, which can change suddenly

RE: help with global replace in text file/list of bytes

2017-02-21 Thread andreas
Hi dean

Do you really need to load all the stuff into RAM?
Working in stream, e.g. with (in) (out) and (char) (called without arguments) 
or (rd) (binary read) needs slightly different software design, but would most 
likely be faster.

Also, (chop) is a rather expensive function (because it has to reserve new 
memory), probably you can easily improve performance by chopping all input once 
during initial reading, and then store the content as lists instead of strings 
which you chop in every filter function.
Maybe you can identify other areas where you could keep some stuff in variables 
instead of doing the same thing multiple times.

Then make sure that you don't have any code multiple times lying around, 
refactor common steps into functions.
In picolisp the source code is exactly the same structure as the RAM 
representation and execution flow,  it follows that shorter code usually 
results in better performance.

I hope this helps, good luck and have fun!

Regards,
beneroth


Re: unit testing?

2017-02-10 Thread andreas
Hi Dean

PicoLisp is an interpreted language, so very dynamic.
Therefore, why not just do it with a global flag variable?

(off *Scaffolding) # do not load scaffolding

...

(de myCode ...)

(when *Scaffolding
(de myScaffoldingFunc1 ...)
(de myScaffoldingFunc2 ...)
(de myScaffoldingFunc3 ...) )


So all the (de) is only executed if *Scaffolding is not NIL.
(off *Scaffolding) sets global variable *Scaffolding to NIL.
(on *Scaffolding) sets global variable to T (used as true in picolisp).

This can be made even shorter:

(off *Scaffolding) # or (on *Scaffolding), depending on context

...

(de myCode ...)

`*Scaffolding # evaluate *Scaffolding during reading of the source file, when 
its NIL, (load)ing stops

(de myScaffoldingFunc1 ...)
(de myScaffoldingFunc2 ...)
(de myScaffoldingFunc3 ...)

Regards,
beneroth

- Original Message -
From: dean [mailto:deangwillia...@gmail.com]
To: picolisp@software-lab.de
Sent: Wed, 8 Feb 2017 16:31:30 +
Subject: Re: unit testing?

Hi Alex and Christophe
In Python that __name__ variable stops things like a local main proc from
executing altogether...when Python detects that the module in which it
exists no longer needs it because it is being loaded by a bigger program,
which accesses the module's code like the local main does i.e. The local
main is hidden from Python under such circumstances.

I was wondering about  the "once" situation toobecause I have
experienced "function redeclared" or some such popping up. If you're
telling me that such messages are inconsequential compared to the benefits
of developing in a way which causes that.that's fine by me because it's
easier to ignore the redeclaration messages than not :)

Because PL seems to allow forward referencing...I was
1 Putting all the scaffolding down the bottom with my local main so it's
all in the same place.
2 Commenting it all out...
3 Loading the module into the wider program and then
4 Comment the helper functions back in as PL reported their absence.
Obviously the local main stays commented out.
This seems fairly convenient but my interpretation of the above is I only
need to comment out the local main and if that's right that's great.

Thank you Chrostophe for the further explanation re Python.

Best Regards
Dean






On 8 February 2017 at 14:47, Christophe Gragnic  wrote:

> On Wed, Feb 8, 2017 at 12:13 PM, Alexander Burger 
> wrote:
> >> I'm thinking of Python's `if __name__ == '__main__' and Perl's unless
> >> (caller) {...}
> >
> > I don't know Python and Perl well enough. But perhaps 'once' is what you
> think
> > of?
> >
> >(once (load "xxx.l"))
>
> No, it's different.
>
> In Python there's a «magic» variable named __name__.
> As files can be:
> - imported from another script/module
> - interpreted directly from top leve
> it provides a trick to distinguish between those two ways to use a
> script/module.
> See here:
> https://docs.python.org/3/library/__main__.html
>
>
> chri
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>




RE: crypto hash on files

2017-02-06 Thread andreas
hi Mike,

Many thanks, that is awesome!
You are awesome! Very cool!

I will use this in my package management tool (yeah I'm still working on that), 
that way I don't have to introduce any dependency to openSSL or a similar lib.
I'm now starting to use my package management tool in my (small) company, for 
managing our internal software.
If it turns out useful I want to improve it further and then open source it, 
though this will not happen any time soon.

Many thanks Mike!

beneroth




- Original Message -
From: Mike Pechkin [mailto:mike.pech...@gmail.com]
To: picolisp@software-lab.de
Sent: Mon, 6 Feb 2017 13:00:24 +0200
Subject: crypto hash on files

hi all,

@beneroth on IRC requested native implementation to hash files on SHA1.
I did SHAKE128 too.

Directory in repo:
https://bitbucket.org/mihailp/tankfeeder/src/220ba71b3f89e21aaea945d4399ad9eafe91764b/crypto/?at=default

Reference via tests: test-sha1sum.l and test-shake128sum.l
Code can return list too.
I general I trust all above.
Comments, patches and optimizations are always welcome.

Mike




RE: newbie trouble with bracketing

2016-12-09 Thread andreas
Hi dean

No worries, no need to be sorry, we like to help :-)
Here a more lengthy and maybe easier explanation, though not simpler...
Feedback appreciated.

>From which languages are you coming from?
It looks to me like you view lisp brackets ( ) similar to curly brackets { } in 
C/C++/C#/Java/..., where { }  is doing scoping.
While they appear similar at first, they don't really have much in common. 
Brackets in lisp are also used for grouping and nesting, but on a much more 
basic level.

Lets leave brackets aside first and have a look at the basic types of picolisp. 
When you grokked this, you will grok brackets.
Picolisp has three strongly typed types:

1) Number - represent a signed integral (integer) value of arbitrary size
In text form (as in source code) they are just plain written as numbers: 123
Whenever there is a number within picolisp source code (without any "quotes" 
around it), its automatically detected as a numeric integer value.

2) Symbol - has a value, and optionally a name and an arbitrary number of 
properties (also might have none)
If you're new to lisp, coming from a C-style language, then this is probably 
the weirdest and most complex data type to understand.
At minimum a symbol has a value, but the value can be anything - maybe it helps 
to think of it as a reference/pointer to some other value, e.g. a number, 
another symbol, or a list.
Most times, a symbol has also a name - think of it like the name of a variable 
in other languages.
Additionally a symbol can have none, one or multiple properties - which again 
consists of a name and a value.
(This makes symbols looking a bit like OOP classes in other languages, but the 
symbol type alone is not really a class or object, though the picolisp OOP 
classes are based on symbols).

Symbol is a very powerful and wildly diversely used type.
And there are actually kind of 4 different (sub-)types of symbols, which differ 
a bit in behaviour and usage context, but the description above is true for all 
of them.

Whenever there is a string within picolisp source code (without any "quotes" 
around it), its automatically detected as a symbol.
strings with "quotes" around it are actually also symbols, in picolisp we call 
them "transient symbols" because they live in a transient scope, what this 
means exactly you can look up later on, for the moment think of them as a 
symbol used to represent a character string.

ATOMS: The Number and Symbol types are called atoms, because they don't consist 
of other types.
Check out the function (atom): http://software-lab.de/doc/refA.html#atom

So, now we have 2 of the 3 picolisp base data types. Now lets look at the third 
data type, the one which is not an atom.

3) List - a sequence of one or more cells (cons pairs), holding numbers, 
symbols, or cons pairs.
Simply said, a list is a grouping of values, wherein each value can be a 
number, a symbol, or also another list.

In the picolisp source code, a list is surrounded by ( ) brackets (lisp users 
usually call them parens, not brackets, I guess this is  short for parenthesis).
Technically every ( ) in the picolisp source code denotes a list, but 
attention: not every ( ) in the code results in a list variable. Just keep 
carry on, you will understand the meaning of this when you finished the next 
section about evaluation below...

Two parens in source code, which only contain one or multiple Numbers, is 
automatically detected as a list value: (1 2 3 55)
A list value which contains other stuff, needs to be prefixed with ' (this is 
the quote-macro of picolisp): (symbol 2 3 this is a list) <- yep, this is a 
list containing the Numbers 2 and 3, and the Symbols "symbol", "this", "is", 
"a" and "list"

This are the three basic types of picolisp. Everything else in picolisp is made 
up from those types! Everything!
(and those are made up of cells, a cell is basically a single piece of memory 
in picolisp runtime).

EVALUATION
This is the other fundamental topic to understand, evaluation, turning input 
into output, the essence of software.
Evaluation is a big topic in other programming languages too, but maybe the 
exact process is a bit more hidden and implicit than in lisp languages.
REPL stands for READ - EVALUATE - PRINT -LOOP, and this is exactly what the 
picolisp runtime does.
1) read the source code -> build a structure in memory which is an exact binary 
representation of the textual representation of the program, which is the 
source code.
2) evaluate -> turning input into output according to a certain set of rules
3) print -> print the result on the screen (or maybe not, for example: a pure 
server program talking over a network connection to a client program)
4) loop -> repeat again with step 1), until the program is exited by calling 
(bye) or is shut down by the OS

When you start picolisp without any arguments (invoking pil or pil +), you end 
up in the REPL.
When you enter something and press return, the steps of the REPL are followed 

Re: First post

2016-11-17 Thread andreas
s/Declarations/Disclaimer
s/now/no

sorry for broken English...


- Original Message -
From: andr...@itship.ch [mailto:andr...@itship.ch]
To: picolisp@software-lab.de
Sent: Thu, 17 Nov 2016 23:17:13 +0100
Subject: Re: First post

Declarations: I have now experience in actually using any graph databases.




Re: First post

2016-11-17 Thread andreas
Declarations: I have now experience in actually using any graph databases.

One could simply store the pilog declarations as lists or symbols in the DB, as 
I understand it, this is what Regenaxer did in the mentioned case.

The other way would be to model the data as pil DB schema, as Joh-Tob mentioned.

In fact the relations (to be exact: the field values, which store the relation) 
in picolisp DB are also objects!

See @lib/db.l for the implementation of +Link.

I guess one could easily use pilDB as a graph database, simply by creating 
additional prefix classes to give +Link additional type information (type of 
the edge, e.g. +Be +Loves +Has +Likes), could also be a prefix class which 
stores an additional numeric cost value (e.g. distance, to model "travel 
distance/cost" to a +Link'ed object). +Link would be a directed connection A -> 
B, while modeling a bidirectional connection could be done by using +Joint.
Add the prefix class +Ref to the mix, then your edges are automatically indexed.

I would not recommend this as a project for pilDB novices, first build 
something simpler to learn how the DB works and is to be used.

Greetings, beneroth

- Original Message -
From: Alexander Burger [mailto:a...@software-lab.de]
To: picolisp@software-lab.de
Sent: Wed, 16 Nov 2016 16:09:51 +0100
Subject: Re: First post

On Wed, Nov 16, 2016 at 03:52:02PM +0100, Joh-Tob Schäg wrote:
> Just out of curiosity:
> Is there a more elegant way to have links with properties than the way i
> mentioned?

No, looks good. The person objects are connected via +Link's or
+Joint's, and may of course have properties like a year or simply a
+Date. Also, your note about a (+List +Link) etc. is all right.

♪♫ Alex
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


RE: First post

2016-11-14 Thread andreas
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


RE: Simple Routing for web apps

2016-11-11 Thread andreas
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-labde/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



RE: The behaviour of arg

2016-11-11 Thread andreas
Hi Henrik

Nice to read something from you, also the other emails, I'm looking forward to 
check out your new code!

I immediately get SEGFAULT when calling your atst. Running pil64 on Linux 64bit 
(ubuntu).
On which OS are you?

I guess this is the unforgiving punishment for calling (arg) without calling 
(next) previously, consider the reference:
"If cnt is not given, the value that was returned from the last call to next" 
-> no previous call to next -> invalid usage -> punishment

The following works for me:

(de atst @
   (next)
   (println (arg)) )

arg seems to be a special purpose function.

if you just want to have the whole list of arguments, use (rest) instead:

: (de atst @
   (println (rest) ) )
-> atst
: (atst 1 2 3)
(1 2 3)
-> (1 2 3)

Greatings,
beneroth




- Original Message -
From: Henrik Sarvell [mailto:hsarv...@gmail.com]
To: picolisp@software-lab.de
Sent: Fri, 11 Nov 2016 23:08:04 +0100
Subject: The behaviour of arg

Hi Alex and list.

If I do like this:

(de atst @
   (println (arg)) )
(atst 1 2 3)
(bye)

I never reach (bye) and I can't even abort with ctrl-c or d (had to
kill -9), is there a reason for this unforgiving punishment of arg
abuse or did I find some minor bug?
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


RE: Subscribe

2016-11-11 Thread andreas
Hi Dean

Welcome to the picolisp community.

When using (in (list)) you don't need to use (call), the content of the list 
argument to (in) get directly passed to the command line.

So try:  (in (list 'ls) (line T))
this is the same as: (in '(ls) (line T)

This way you only read the first line of stdout from the called program ls.
You can use (make) and (link) to build a list, e.g.

(setq FileList
   (make
  (in (list 'ls)
  (while (line T)
 (link @) ) ) ) )

(make) returns a list which is here saved in the variable FileList.

You can view FileList by just entering the name of the variable in the REPL

Re: Windows x64 PicoLisp preview

2016-08-17 Thread andreas
Thanks for your tests and this breakdown compilation of the current state.
This should be a page in the wiki.

- Original Message -
From: Joe Bogner [mailto:joebog...@gmail.com]
To: picolisp@software-lab.de
Sent: Wed, 17 Aug 2016 12:02:50 -0400
Subject: Re: Windows x64 PicoLisp preview

Thanks for the feedback everyone. I resurveyed the options on Windows this
morning for PicoLisp

1. pil32 compiled under mingw -- compiles but doesn't work due to issues
with reading from stdin -- example (load "lib.l") is read as (load "lib.")
. similar failures when invoking from command line

2. pil32 compiled under cygwin - compiles and passes same tests as midipix
pil64. However, when running the app/main.l it crashes with "DB read: Bad
file descriptor".  This has come up before (
https://www.mail-archive.com/picolisp@software-lab.de/msg03430.html) and
still seems to be an issue

3. pil64 emu - compiles but fails on (wait) tests... seems to hang
indefinitely. Possibly can be fixed with *C-params, but I don't
particularly want to run emu

4. pil64 midipix-based preview port [this release] ... runs app/main.l and
I can click around and view records. I noticed some instability when
editing and will research further

5. pil64 running under windows 10 subsystem - not tested as I don't have
windows 10 x64

>From my usage #4 is the best bet it seems




Re: Windows x64 PicoLisp preview

2016-08-17 Thread andreas
Great work Joe!

As rick said, this will make windows work more bearable and open up 
opportunities to deploy picolisp, especially for little scripts and glue  work.

Many thanks to you, Alex, rick and the awesome guys from midipix :-)




RE: Subscribe

2016-08-11 Thread andreas
Hi Anik

Welcome to the picolisp mailing list.
First, LISP itself is a "normal" language in the sense that everything you can 
do in other languages, you can also do in LISP.
Technically, some stuff is easier expressed with a LISP language than a C-like 
language, while C-like languages usually give more ways to restrict the usage 
of your code for other programmers (which might be useful for BigCorp with many 
devs).

There are many different flavours of LISP, which have some things in common 
(making them all LISPS, e.g. the S-expression syntax), but they can be 
radically different.
Picolisp is a rather special lisp, because it is interpreter-only (no 
compiler), makes use of F-expressions (functions with unevaluated arguments) 
which came out of fashion for most lisp languages long ago, and above all 
picolisp is radically simple and succinct.
Additionally picolisp is quite small for an interpreter and performance can be 
better than compiled binaries of other languages (e.g. see 
http://kazimirmajorinc.com/Documents/The-speed-of-eval-in-some-Lisp-implementations/index.html
 ).

Check out this interactive explanation of picolisp philosophy: 
http://picolisp.com/tractatus

Currently, picolisp is probably mainly used for web applications and scripting 
(e.g. instead of bash).
Some people use it for embedded programming or for teaching programming.
You can use it for everything really, though interfacing with another 
application/system might need some extra work as there probably isn't a 
ready-made solution available for your specific use case.
Lisp and even more picolisp gives you the power to develop problem-tailored 
solutions quickly and easily.

I use picolisp mainly because of the quick development time, short code and the 
absolute awesome integrated database.
Also, picolisp is very stable and tested tech, unlike e.g. node.js and co.

Drop by in IRC on #picolisp on freenode.org if you like.


- Original Message -
From: Anik Biswas [mailto:biswasanikar...@gmail.com]
To: picolisp@software-lab.de
Sent: Thu, 11 Aug 2016 00:54:32 +0600
Subject: Subscribe

Hello, I'm Anik. I would like to know about LISP and I've a question i.e.
Is LISP useful in today's world? How? Why should I use LISP?





RE: Two questions

2016-05-08 Thread andreas
1. sudo apt-get install picolisp; pil -> (version) -> see for yourself

The version in the distribution package repositories are usually (naturally) a 
bit outdated.
To compile your own picolisp version during hand-install you require a usable 
picolisp version already installed (or java runtime as last resort), so you 
want to apt-get install picolisp anyway.

As changes in releases are usually tiny and almost never (just almost, but hey) 
breaking existing functionality/usage, even an a bit older version of picolisp 
is sufficient.
The introduction page of the new website is obviously directed at picolisp 
beginners, so this should be alright.

JUST DO IT dude, you are pondering too much...

2. I don't know of anyone running pil on this vocore device or even under 
OpenWRT distro, so you might have to try out yourself. Post your experiences 
with it here and/or on the wiki for other users. :-)

Picolisp is tiny both in storage size and memory footprint, so it does great on 
these tiny computers and is in fact used for embedded computing by a number of 
people.


- Original Message -
From: Lawrence Bottorff [mailto:borg...@gmail.com]
To: picolisp@software-lab.de
Sent: Sun, 8 May 2016 11:44:48 -0400
Subject: Two questions

1. The new spiffy (flotte?) Website says just go ahead, Ubuntu users, and
do an apt-get install picolisp. Good, but is that a nice, recent version --
or would it be better to hand-install?

2. Does picolisp run on this little guy: http://vocore.io/ . . . In
general, what's picolisp's track record on all these tiny computers?

LB




Re: Redesigned Wiki is Live

2016-03-25 Thread andreas
> I only see fonts (or infos about fonts + fonts) being retrieved from
> fonts.googleapis.com, no CSS,
True, its the font, not the CSS.

> Although I may agree with this tracking defect, I guess retrieving
> them from a CDN speeds up the page load for browsers that already have
> retrieved the fonts for another website.

My understanding of the theory:
- That is only a slight speed up on the first visit.
- For all cdr visits the browser makes GET/HEAD and receives a 304 Not Modified.

I checked with Firefox DevTools (F12 -> Network Tab):
- in my case, the font file is actually delivered every time (200, not 304 
response)
- the first two font requests "css?family=Exo:500,300" and 
"css?family=Open+Sans:300,300italic,400,600,600italic" are each taking around 
80-90 ms,
these requests that take the longest together with "js.l" delivered from 
picolisp.com, but "js.l" is like 270 times bigger
- so in my case, the Google CDN is not speeding up anything, I would guess the 
lisp webserver might actually be faster, though your mileage might vary 
depending on your network distance to the picolisp.com server
- testing with Firefox DevTools, I see a 404 Not found for 
"http://picolisp.com/wiki/wiki/css/typhography.css";, but I'm not sure where 
this one is linked in the page

Loading Performance:
- Nowadays, especially with the client-heavy "stylish" websites, the bottleneck 
is usually the Rendering, not the network (can be different for mobile network)
- I check this with the Firefox PlugIn "app.telemetry Page Speed Monitor", 
according to that:
-- Page fully loaded after 6030ms
-- 5633 ms of that is spent in Processing (Rendering), not in network
(- yep, I've got fast internet, so your mileage could differ, but I think the 
overall pattern will most likely be the same)

Summary:
- Doesn't look like picolisp.com is benefiting from Google CDN.
- picolisp.com is not page with much traffic, so CDN is not needed (ok, maybe 
when we get slashdotted, but then the fonts will not make much a difference)
- in my personal experience, picolisp webserver is usually vastly faster 
compared to other dynamic website stacks (php, python, ruby...), though I don't 
have real benchmark data to prove this (so might be wrong)

Regards,
beneroth


- Original Message -
From: Christophe Gragnic [mailto:christophegrag...@gmail.com]
To: picolisp@software-lab.de
Sent: Fri, 25 Mar 2016 10:11:23 +0100
Subject: Re: Redesigned Wiki is Live

On Thu, Mar 24, 2016 at 9:49 PM,   wrote:
> Please host the stylesheets on
> picolisp.com instead of using tracking CDN.?

I only see fonts (or infos about fonts + fonts) being retrieved from
fonts.googleapis.com, no CSS,
Although I may agree with this tracking defect, I guess retrieving
them from a CDN speeds up the page load for browsers that already have
retrieved the fonts for another website.
I'm no expert, maybe someone here can clear things up?

> Elsewhere-link at the bottom of main page
> -> why not generate here a link at random from a predefined list?
> -> like a list of links of repos/pages of picolisp-projects ? and the
> picolisp wikipedia article?

Nice idea ! I don't quite like this link pointing abruptly to
google.com too, especially for no real interesting reason.

All this said, this is great great work. Many thanks !!!


chri

-- 

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info (langage de programmation pédagogique)
http://expressions.club/ (structure des expressions mathématiques)
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe



RE: Redesigned Wiki is Live

2016-03-24 Thread andreas
Hi Erik

Great work! Awesome!
Thank you and Abu and all other contributors!

+ I love the new logo
+ I really like the style of writting and the humour.
+ great interfacting article, and really great (important!) that it is 
mentioned on main page
+ really good Documentation article, with the ordered sections and pointers to 
important topics. really shows the feature-richness of picolisp, I find.
+ same with Categories article and the dbmaintenance

? maybe rename "Using SSL" to "Using @bin/SSL" on the main page ? (so readers 
don't mix it with the more general SSL/TLS) <- great article, too

! search result needs a background color (and maybe a border, too), else it 
gets too much intermixed with the main template (grey font on white), the 
search results should be easily spotted
   -> maybe just give a background-color to #searchGrp id ? (the div) ?

? maybe mention Regenaxers cluster project and second place in c't contest 
(german computer magazine: 
https://shop.heise.de/katalog/entscheidende-massnahme  ) in 2006 in database 
section on main page?

! favicon is still old, maybe replace this with the new logo, too ?
  -> favicons are cached by most browsers (once visited), and sometimes they 
rarely check for changed favicons, 
   putting a  into  on the page can help with that, e.g.  (the query parameter can be 
meaningless, just to trigger the browser to clean favicon cache)

!  I don't like Google keeping track of every visit I do on picolisp.com. 
Please host the stylesheets on picolisp.com instead of using tracking CDN.

? Elsewhere-link at the bottom of main page -> why not generate here a link at 
random from a predefined list?
  -> like a list of links of repos/pages of picolisp-projects ? and the 
picolisp wikipedia article?

Question:
What kind of licence is on the logo picture? Could I use it in the future, like 
put it in a product logo to indicate the product is made with picolisp ?

Thanks again, the new page is really nice.
- beneroth


- Original Message -
From: Erik Gustafson [mailto:erik.d.gustaf...@gmail.com]
To: picolisp@software-lab.de
Sent: Thu, 24 Mar 2016 10:34:09 -0500
Subject: Redesigned Wiki is Live

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 accessible from any
device. Changes to the code base were minimal (mostly
CSS), so it still works great with text-based browsers
as well.

But don't let the new paint job fool you. The wiki has
much more to offer! I spent a lot of time going through
the mail archives, finding the most helpful threads and
turning them into new articles. I've tried to organize
the documentation to be most helpful to newcomers, to
set them on a clear path from beginner to lisp wizard.

I'd love any feedback. How's the design feel? The copy?
I tried my best to incorporate all the feedback I got
from the initial homepage mockup I posted a few months
ago.

Note that there are still some rough spots in some of
the articles/pages. I plan to fill that out in the
coming weeks and continue to refine the content,
hopefully with your help! As such, please hold off on
posting to Reddit, HN, etc. for a bit. And if there is
anything that seems to be missing, or you'd like to find
a spot for something you've been working, let me know.

So thanks to all of you for the great discussion over
the years! It's been a lot fun and I've learned a ton.
Finally, many thanks to Alex, not only for helping me
better understand the wiki and put it back together,
but for PicoLisp in general.

Cheers y'all,
Erik




Re: crypto db

2016-02-18 Thread andreas
Hey rick, thanks for the link!
Now actually the previous link works for me too, maybe the server was just down 
because of the glibc issue or so ;-)

Interesting read.
And this is a complete different scenario than cryptodb, as this is about web 
clients, not native clients.

As I wrote in my other post, web client crypto is a problem. They address this 
by verifying the code with another server separate from the web application / 
database server.
If I understand it correctly, with Mylar you have 2 instead of 1 server, and 
only 1 of those 2 servers need to be absolute secure.
Though I'm not sure if this holds true, if an attacker starts to manipulate the 
web application code he might be able to completely replace the original 
application undetected, I think.
Still, I don't see how building a more complex system (more code = more bugs) 
with 2 servers from which 1 has to be properly secured is better then building 
a system with less code with one server and properly secure this one server.

There seems also to be a browser extension to verify the client side code, so 
this is more like having a native client then.
But yeah, user have to install the extension, and if you don't deliver that 
extension physically (CD/stick per postal mail) to them, then an attacker could 
temper with it, so its about securing a server again.

KISS.


- Original Message -
From: Rick Lyman [mailto:lyman.r...@gmail.com]
To: picolisp@software-lab.de
Sent: Thu, 18 Feb 2016 06:20:00 -0500
Subject: Re: crypto db

>This link https://css.csail.mit.edu/mylar/ is not working for me

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=mylar%20meteor%20pdf




Re: crypto db

2016-02-18 Thread andreas
This link https://css.csail.mit.edu/mylar/ is not working for me.

@cryptdb / searchable symmetric encryption:

This is a system where you have a client application (not web browser !) and a 
database server.
The point is to encrypt any data already on the client side, also encrypting 
queries the server should execute.
This is very complex, can not be done with all kinds of data, and costs a lot 
perfomance.

The catch is to be able to build encrypted indexes, so you can do encrypted 
queries against the db without having to download the full encrypted db to the 
client and decrypt there (no point of having a server then).
Here is a good presentation explaining this: 
https://media.ccc.de/v/32c3-7333-the_magic_world_of_searchable_symmetric_encryption

If you got the necessary skills in crypto, math and statistics to build such a 
system, then it might be easier to implement with picolisp then with classic 
SQL, because you have basically to write your own DBS specific to your data.
And the whole point of this is, not do to encryption/decryption on the same 
computer as the DB is, so I would see this is rather not fitting the usual 
usage of picolisp DB.

#Edit:
After discussion with Abu a bit in IRC, this could more easily be achieved 
indeed with pilDB and block-wise encryption using *Ext mechanism.
You would need to write a custom (commit) function which encodes the blocks 
before sending them to the remote server. And using *Ext mechanism with custom 
reader which decrypts the blocks.
Different then in cryptdb and similiar systems, you would run queries locally, 
but you only fetch the necessary blocks (index and/or database records) from 
the remote fully encrypted db.

@web & client crypto:

Don't do client side crypto in web applications. The idea of it is a complete 
joke, even as there are libraries and serious projects for it around.
Whenever crypto is done in JS, then the server delivering the JS file has the 
complete control over the encrypting code, so you could rather just do it on 
the server.
If you don't trust the connection to the server, then you are also unable to 
deliver the JS securely. Its a joke.
Could be done with a browser-plugin or native client application, but yeah, 
then its not a web application anymore.
Also if you don't go the very complex path of cryptdb/searchable symmetric 
encryption, the server must still have control over the crypto to make 
meaningful indexes and fulfill the task of a db instead of being a simple file 
storage.

@crypto on server:

I see several options:

A) block-wise encryption
pilDB writes data in blocks into the database files. One could encrypt every 
block, so one would still have index-ability but the stuff would be only 
encrypted on the filesystem.
This would need changes in picolisp source code. Not easy but doable. Edit: Abu 
just stated in IRC that this could also be done via the *Ext/Remote mechanism, 
no pil source changes necessary then, only custom lisp code

Easier it would be to do disk encryption like LUKS (thats what comes with 
standard ubuntu) and place the db then on such a specific encrypted volume, 
then the OS is doing the encryption/decryption on writting/reading 
automatically.
This I have in use, actually.

B) property-wise encryption
Encrypt data before (put>)ing it into database objects. I think this is what 
applies to Abus comment, of course you can do it for remote DBs too.

Catch:

When the encryption happens on the server, you have to trust the server.
Stuff is still unencrypted in RAM. Filesystem/storage encryption protects you 
if someone steals your database files. maybe encrypt the files when doing 
backups.
But if an attacker has access to the server to steal this files, it is likely 
he is also able to change the server program code, to disable the encryption, 
though this needs more skill.

@Conclusion:

Full symetric encryption of the db as in cryptdb is very complex, depends on 
the specific data you wanna store, and I use pilDB usually locally or for web 
applications, both scenarios where it doesn't make sense.

Server crypto can increase the difficulty and efforts needed by an attacker. 
Question is, about what kind of adversary are we talking here?

Private hacker who gained access to your server and steals your files? You 
fucked up somewhere for real, if that happens, and he could still change your 
code on server to get around encryption (needs picolisp knowledge, not very 
widespread).
Physical stealing of the hardware? filesystem/disc encryption protects, if the 
machine is down when the guy runs with it. Most police squads doing such stuff 
have this days methods to keep the machine running while transporting it away.
Your server hoster (or someone hacking him / putting pressure on him): he just 
makes an image of your running machine and grabs the necessary keys and stuff 
from RAM copy, I would think.

1) if you really want a remote fully-encrypted db, write a cryptodb-like with a 
local pil 

Re: a floating point math library for 64 bit PicoLisp

2016-01-25 Thread andreas
have you compiled fp.c 64bit too ? 


- Original Message -
From: Mike Pechkin [mailto:mike.pech...@gmail.com]
To: picolisp@software-lab.de
Sent: Mon, 25 Jan 2016 12:54:18 +0200
Subject: Re: a floating point math library for 64 bit PicoLisp

I run pil64 under Solaris 11 on x64


On Mon, Jan 25, 2016 at 11:46 AM,  wrote:

> compile the library as 64bit. (native) is a 64bit-pil-only functionality,
> naturally it only supports interfacing with 64bit libraries (confirmed by
> Abu).-





Re: a floating point math library for 64 bit PicoLisp

2016-01-25 Thread andreas
compile the library as 64bit. (native) is a 64bit-pil-only functionality, 
naturally it only supports interfacing with 64bit libraries (confirmed by Abu).


- Original Message -
From: Mike Pechkin [mailto:mike.pech...@gmail.com]
To: picolisp@software-lab.de
Sent: Mon, 25 Jan 2016 10:59:14 +0200
Subject: Re: a floating point math library for 64 bit PicoLisp

1.
(gcc) not ported to Solaris

2.
# pil +
: (load "@lib/fp.l")
-> dmodf
: (test 1065353216 (s2r "1.0"))
!? (native "/root/.pil/tmp/10225/fp" "s2r" 'I X)
[DLL] ld.so.1: picolisp: fatal: /root/.pil/tmp/10225/fp: wrong ELF class:
ELFCLASS32
?


On Sun, Jan 24, 2016 at 10:49 AM, Mike  wrote:

> i will test on solaris 11 next week
>
>






Re: picolisp and erlang in distributed/concurrent processing

2016-01-06 Thread andreas

Really good points Michel, thank you for describing so clearly!

If we're talking solely about multiple picolisp processes, then there is 
built-in picolisp IPC for picolisp processes started by the same common parent 
process.
Check out: (fork) (tell) (kids) (hear) and the functions in @lib/boss.l

There are also coroutines (co) and (task) / *Run

@Lawrence:
Still theorizing over theoretical properties?
I recommend to do a little benchmark project or a little proof of concept of 
what you want to do. 
General discussion/research is good to get a rough overview, but will hardly 
give you an answer for a concrete case, then better do a prototype.
And don't forget there is no golden language being the perfect tool for every 
person and every project, technical features of a language is just one property 
of many to take into account.

-beneroth

- Original Message -
From: Michel Pelletier [mailto:pelletier.mic...@gmail.com]
To: picolisp@software-lab.de
Sent: Tue, 5 Jan 2016 18:56:04 -0800
Subject: Re: picolisp and erlang in distributed/concurrent processing

This is an interesting question that I have a few thoughts on.

First, is that picolisp is so "light" and has such a minimal memory
footprint, that it's easy to use multiprocessing to many picolisp processes
running on a machine, or a in a container.  Multiprocessing has a
reputation of being slow and expensive, but that's not really my experience
on Linux.  One the advantages I believe is that the entire interpreter can
pretty much fit in processor cache, and all processes benefit.

Forks are nice in that they share nothing, so you need some kind of share
nothing IPC.  The awesome aw wrote some nanomsg bindings for picolisp that
do the job very well: https://github.com/aw/picolisp-nanomsg  You can also
use mmap simply enough to share memory between processes. This provides you
with all the parts you need to undertake all kinds of "actor" like patterns.

Erlang, Elixir, and Go all use a concurrency technique called Communicating
Sequential Processes (CSP).  This uses an explicit, synchronous "channel"
abstraction to pass messages between processes and define rendezvous
points.  Processes talk on channels instead of explicitly named actor
endpoints.  As this link points out, there are a lot of overlap in
functionality with actor models, and they can both easily emulate each
other.

https://en.wikipedia.org/wiki/Communicating_sequential_processes#Comparison_with_the_Actor_Model

Nanomsg kind of give you the best of both worlds, with synchronous and
asynchronous passing using either the actor abstraction or "channels" using
various routing policies (pub/sub, many to many, surveying, etc.)

My 2c.

-Michel

On Tue, Jan 5, 2016 at 5:50 PM, Lawrence Bottorff  wrote:

> If Erlang is a perfect 10 (or not!) in the world of distributed,
> concurrent, load-sharing networked interoperable (etc., etc.) software,
> what does picolisp bring to the table? What can I do along these lines in
> picolisp? Erlang allows a node to have thousands of "light' processes. How
> does picolisp do this?
>
> LB
>




Re: Why won't the LED flash?

2015-12-21 Thread andreas
Hi Josh

Cool you figured it out! 
When you have an (if) without any else statements, you could use (when) instead.

Regards
- beneroth

- Original Message -
From: Josh [mailto:k1llfre...@hotmail.co.uk]
To: picolisp@software-lab.de
Sent: Mon, 21 Dec 2015 00:26:53 +
Subject: Re: Why won't the LED flash?

Okay so I feel like an idiot for not figuring this out earlier, but I'll 
put it down to not writing picolisp before. Anyways, I figured out what 
is wrong, sbcl if statement works like so:

  (if test-form then-form else-form)

And the Picolisp works the same, and the easiest way to do multiple 
things in the "then-form" is with progn on SBCL, or prog on Picolisp :/ 
so the correct code to get it to blink is:

# A simple program which demonstrates
# the usage of user-buttons.
  
# declare pins
(setq led 'PB_29 button 'PX_16)

# a simple delay function
(de delay (t)
(tmr-delay 0 t) )

# make sure the LED starts in
# the "off" position and enable
# input/output pins
(de init-pins ()
(pio-pin-sethigh led)
(pio-pin-setdir *pio-output* led)
(pio-pin-setdir *pio-input* button) )

# And now, the main loop
(de prog-loop ()
(init-pins)
(loop
   (if (= 0 (pio-pin-getval button))
(prog (pio-pin-setlow led)
   (delay 10)
   (pio-pin-sethigh led)
   (delay 10) ) ) ) )

(prog-loop)


*drops mic*
anyways, I got it working using that exact code, I've edited the wiki book.
*picks up mic and drops it again*
Thanks :P


On 20/12/15 13:48, J B wrote:
> No circuit just the plain old Mizar B. The Example from the hempl wiki 
> book is flashing PB_29. I'm Ubuntu to  connect with terminal.
>
> Sent from my iPhone
>
> On Dec 20, 2015, at 12:12 PM, pd  > wrote:
>
>> sorry if you already said this but what platform are you using? also 
>> a schematic of your circuit would be interesting even being so simple
>>
>> On Sun, Dec 20, 2015 at 3:18 AM, Josh > > wrote:
>>
>> Thought it might be a firmware problem or something, so I just
>> re-flashed the firmware but it's still happening, just
>> eliminating possibilities. Also the second of my last emails was
>> the correct one, I canceled the previous but it sent anyways.
>> Thanks.
>>
>>
>> On 19/12/15 12:50, Josh wrote:
>>> I have put the main code onto the sd card and I use the shell to
>>> call the function prog-loop. The light just stays on. I've had
>>> this problem before with the example blink program, if I change
>>> any of it to make it shorter by using shorter function names
>>> like (de low () (pio-pin-setlow 'PB_29)) it doesn't work, but it
>>> does when it's just (pio-pijn-setlow 'PB_29). I don't really
>>> know what's going on, but it's starting to get irritating.
>>> On 19/12/15 03:45, Raman Gopalan wrote:

 Dear Josh, greetings!

 Firstly, great to know you're playing with your board! Perfect!

 > Why does this small amount of code not make the onboard LED
 flash?

 I think you're not providing enough delay for you to see the
 off state
 of the LED. Why don't you try this? I've just inserted an
 additional
 delay

 (pio-pin-setdir *pio-output* 'PB_29)
 (pio-pin-sethigh 'PB_29)

 (loop
(pio-pin-setlow 'PB_29)
(tmr-delay 0 10)
(pio-pin-sethigh 'PB_29)
(tmr-delay 0 10) )

 > Any ideas? Also this example on the hempl wiki book:

 This example doesn't blink the on-board LED. It just reads the
 status
 of an input pin (SW-1 I think; the one near the voltage
 regulator) and
 turns the blue LED on when this input switch is pressed.

 > # And now, the main loop
 > (de prog-loop ()
 >(init-pins)
 >(loop
 >   (if (= 0 (pio-pin-getval button))
 >  (pio-pin-setlow led)
 >  (delay 10)
 >  (pio-pin-sethigh led)
 >  (delay 10) ) ) )

 Please copy the example on your micro-SD card and point picolisp in
 the direction of this file. If this doesn't happen, something
 strange
 is happening. We can then debug. But I'm almost certain it'll
 work :)

 Hempl# picolisp /mmc/user-button.l

 R

 P.S. You may also use the internal transient symbol
 `*tmr-sys-timer*'
 in the function tmr-delay. I think it uses a hardware PWM
 channel to
 generate the time (can't remember which; I'll have to see the
 sources
 again). That makes the timing accurate.


 On 18 December 2015 at 22:08, Josh >>> > wrote:

 Why does this small amount of code not make the onbo

RE: AES on PicoLisp

2015-12-07 Thread andreas
Hi Mike

Great stuff, thank you for your efforts!
That's really cool !

- beneroth


- Original Message -
From: Mike Pechkin [mailto:mike.pech...@gmail.com]
To: picolisp@software-lab.de
Sent: Mon, 7 Dec 2015 15:11:53 +0200
Subject: AES on PicoLisp

hi,

I've implement AES on PicoLisp.
Pure brutality and limits:
o) AES128 only
o) no decryption (boring after all this)
o) less GC mess
o) no ECB-CBC modes
o) key length only 128 bits
Works, tests passed.

https://bitbucket.org/mihailp/tankfeeder/src/7e40db44e61e72db4a7f172a0434fadd323a8e78/crypto/?at=default

Next will be SHA3 and Curve25519.

p.s. If you have something real fun to implement let me know.

Mike





RE: Updated kerberos library

2015-10-23 Thread andreas
Hi Mansur

This is really awesome!
Maybe with this I can eventually convince some corporation clients to give 
picolisp a try :-)

Thanks for sharing!
Regards, beneroth


- Original Message -
From: Mansur Mamkin [mailto:mmam...@mail.ru]
To: picolisp@software-lab.de
Sent: Fri, 23 Oct 2015 17:03:32 +0500
Subject: Updated kerberos library

Hi all,

I've uploaded updated Kerberos authentication library to the Wiki.
This library helps you to add SSO (Single Sign On) to your PicoLisp 
applications in Windows AD domain. That means your domain users don't 
need to enter login and password in the applications.
Current version makes things slightly simpler,
just several steps:
* Set up kerberos environment
* define 'krblogin' function similar to standard 'login' function
* (load "kerbauth/kerbauth.l")
* (krbinit "/path/myhost.keytab" "HTTP/myhost.example@example.com")
* add HTML link to "!krbneg" URL

See README for detailed instructions

Link: http://picolisp.com/wiki/?kerbauth
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



RE: Picolisp on GitHub?

2015-10-19 Thread andreas
Hi Frantisek

There is no official picolisp repo, the only officially maintained and updated 
source for picolisp is http://software-lab.de/picoLisp.tgz

So feel free to put a copy of it in your personal github repository, or link 
from someone else who has a copy on github.
I'd guess multiple picolisp devs have made themselves a picolisp repo on github 
or bitbucket.

In the past picolisp source was maintained on google code, but with the closing 
of it this was stopped.
There was some discussion, but different people have different favourites 
(github, bitbucket, and more exotic ones) and the effort to maintain those got 
judged as unnecessary.
Because there isn't a high number of issues nor code changes proposed by people 
beside Alexander Burger himself, the additional benefit of pull-request and 
"social coding" offered by those services are currently not needed for the 
development of picolisp core.

Best regards
beneroth


- Original Message -
From: František Fuka [mailto:f...@fuxoft.cz]
To: picolisp@software-lab.de
Sent: Mon, 19 Oct 2015 13:59:39 +0200
Subject: Picolisp on GitHub?

Are current Picolisp sources officially available at GitHub?

If not, can I put them there? I like how GitHub allows me to browse and
study sources from anywhere...

-- 
*-- Frantisek Fuka*
(yes, that IS my real name)

-- My Personal homepage: www.fuxoft.cz
-- My Google+ profile: google.com/+fuxoft
-- My Telegram chat: telegram.fuxoft.cz




RE: Single File Function Reference

2015-10-13 Thread andreas
Hi Frantisek

Welcome to the picolisp mailing list!

There are two books about picolisp available, one containing also the reference:

PicoLisp Works: 
https://github.com/tj64/picolisp-works/blob/master/editor.pdf?raw=true
PicoLisp by Example: 
https://github.com/tj64/picolisp-by-example/blob/master/book.pdf?raw=true

I guess you can put them in your eBook Reader?

Thought I'm not absolutely sure that the reference in there is on the newest 
current state, maybe someone else can confirm/deny this.

The LaTex source code of the books is also available on GitHub.
These links and other useful ressources can be found on 
http://picolisp.com/wiki/?Documentation

Regards
- beneroth

- Original Message -
From: František Fuka [mailto:f...@fuxoft.cz]
To: picolisp@software-lab.de
Sent: Tue, 13 Oct 2015 15:35:36 +0200
Subject: Single File Function Reference

Is there Picolisp function reference available to download as a single
file, to put in in my EBook reader? I can only see it online, split to
individual files according to the first letter of the function name.

-- 
*-- Frantisek Fuka*
(yes, that IS my real name)

-- My Personal homepage: www.fuxoft.cz
-- My Google+ profile: google.com/+fuxoft
-- My Telegram chat: telegram.fuxoft.cz





Re: static pages site

2015-09-28 Thread andreas
Hi Mike

I guess you didn't meant to ask how to deliver static files, but how to create 
them?

I'm not aware of any static site generator implemented in picolisp.
But I think this could be easily achieved with @lib/xhtml.l, just redirect 
output to a file instead of a http client.

Like (out "static.html" ( NIL "My Title"))

Maybe you would need to reimplement () and a few other pieces, but that 
should be easy.
You could also customize the wiki, to have an web-editor but saving the output 
to a file. Or use the standard webapp with TinyMCE as Webeditor and customize 
to save result to filesystem.

- beneroth




- Original Message -
From: Alexander Burger [mailto:a...@software-lab.de]
To: picolisp@software-lab.de
Sent: Mon, 28 Sep 2015 17:49:23 +0200
Subject: Re: static pages site

Hi Mike,

> any static site generators written on picolisp?

Yes, just give '*html' (or '*.l') files:

   pil @lib/http.l @lib/xhtml.l --server 8080 index.html -wait

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


FW: PicoLisp in TinyCore Linux

2015-09-22 Thread andreas

Hi Alexander

This is awesome!
Many thanks for your efforts, for sharing and your continueing support for our 
nice little community!

The splitting in those 3 packages I find very good and sensible.

Looking forward to try this out for a nice lightweight server! :-)

Cheers
beneroth


- Original Message -
From: Alexander Williams [mailto:a...@unscramble.co.jp]
To: picolisp@software-lab.de
Sent: Wed, 23 Sep 2015 03:01:10 +
Subject: PicoLisp in TinyCore Linux

Hi everyone,

I've submitted PicoLisp as a TinyCore Linux (http://tinycorelinux.net/)
extension for x86_64 (64-bit) architecture. An armv7 (32-bit Raspberry Pi
2) extension has also been built and submitted, but is not in the official
TinyCore repo yet.

It is split into 3 extensions:

- picolisp (the picolisp binary only)
- picolisp-lib (libs, games, debug, misc, etc) <-- most people will want
this
- picolisp-doc (reference documentation)

Current version: 3.1.11

Installation: tce-load -wi picolisp picolisp-lib picolisp-doc

You can also get the extensions and source build scripts from GitHub:
https://github.com/aw/picolisp/releases/tag/tinycore-3.1.11

As discussed with Mr. Burger, I am happy to be the official maintainer of
PicoLisp for TinyCore, so feel free to contact me for updates, adjustments,
or other questions regarding this.

Cheers,


AW
*https://aw.github.io/picolisp/* 








RE: low level VM and disassemble

2015-08-25 Thread andreas
Hi Erik

First, the fundamentals are documented in the picolisp dir @doc64/
Look there for a start, if you haven already.

Do you have Vi or Vim installed?
If so, there is a great lookup function which does what you described.

Start pil repl with debug mode:
$ pil +

Use the vi function to look up code, e.g. a lisp defined function like vi 
itself:
: (vi 'vi)
-> Vim will open, and it opens the file /usr/lib/picolisp/lib/debug.l on line 
220 where the function vi is defined (de vi ("X" C) ...

Close Vim (enter : q ) to go back to the picolisp repl.

You can also use the (vi) function to look at built-in functions, like (+):
: (vi '+)
-> Vim will open the file /usr/lib/picolisp/src64/big.l on line 2167 where the 
pil asm source code for the (+)-function is (for the pil64 edition)

Be aware that pil asm is a picolisp specific asm, which is compiled to the 
specific architecture asm when building pil64
( I think it is this way, maybe Abu might correct/confirm)

I think you can't show the pil asm for a lisp defined function, but I doubt 
that this would be really helpful,
actually in the end it would just be the asm code for all the builtin-functions 
the specific lisp-defined function is made of.

Is this somewhat like what you are looking for?

Kind regards,
beneroth



- Original Message -
From: Erik Gustafson [mailto:erik.d.gustaf...@gmail.com]
To: picolisp@software-lab.de
Sent: Tue, 25 Aug 2015 11:47:35 -0500
Subject:

Hi List,

I'd like to develop a better intuition for how things work in the lower
levels of 64bit PicoLisp, how cells are passed between registers, and all
that. I need to spend more time with the code in /src64 and going over the
docs, obviously. Any other ways you all have found to be effective in
developing that sense? 'trace' and 'debug' have been very helpful, but they
seem to operate on a higher level.

I imagine something like CL's 'disassemble' that, given an arbitrary lisp
expression, returns the sequence of VM instructions the expression maps to.
Would something like this be possible to implement? If so, where might be a
good place to start exploring?

Or is this another existing feature that I've managed to miss this whole
time? :)

Thanks,
Erik



RE: ins@nity

2015-08-25 Thread andreas
- Original Message -
From: andreas.rueeg...@itship.ch [mailto:andreas.rueeg...@itship.ch]
To: picolisp@software-lab.de
Sent: Tue, 25 Aug 2015 14:32:24 +0200
Subject:

I like it! I will not use it in my work, but I find it a nice piece of coding 
art.
It might help some people to understand how mapping functions and the 
@-last-result mechanism works.

Maybe we should introduce perl-like obfuscation and ASCII-Art code style 
contests, although it violates the picolisp pillar of transparency ;-)


- Original Message -
From: Erik Gustafson [mailto:erik.d.gustaf...@gmail.com]
To: picolisp@software-lab.de
Sent: Mon, 24 Aug 2015 23:32:28 -0500
Subject:

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



  1   2   >