<beneroth>
offer to include crypto currency mining in app
<Regenaxer>
tankfeeder, ok
<Regenaxer>
But why is #lisp so important?
<C-Keen>
a lot of people are watching that hashtag that might be interested
<Regenaxer>
ok, understand
<cess11>
Maybe go straight for #programming!
<Regenaxer>
yep :)
<clacke[m]>
#lobsters is one of the channels I hang in
<clacke[m]>
The community is based on an exodus from Hacker News, with the idea to create something more focused on tech and less on whatever Silicon Valley is thinking at the moment
<clacke[m]>
slightly higher rate of free software folks and folks doing actual programming
<clacke[m]>
the IRC channel works as a meta channel for the comments and posts on the site
<clacke[m]>
it's an interesting dynamic
<clacke[m]>
the web site is invite only, and the web site instructs you to get to know the IRC channel to get an invite, which seeds the channel in a clever way
<Regenaxer>
g
<Regenaxer>
oops
libertas has quit [Quit: Lost terminal]
<C-Keen>
so who needs an invite :p
<beneroth>
I will come back to the offer
<tankfeeder>
i've spent a week on fossil-scm
alexshendi_ has joined #picolisp
alexshendi_ has quit [Ping timeout: 258 seconds]
<beneroth>
Regenaxer, are you there? pilog questions
<beneroth>
I want to write a pilog query which returns nested objects.. so Obj has a property which links to other objects (of same type, can link to another object)
<beneroth>
I want to select/retrieve all objects in that structure. so kind of a recursion/nested pilog query
<beneroth>
problem is: I don't have a global unique key, only part of the objects have. other are only accessible via other objects.
* beneroth
is on the track. "association specifiers" is the word
<Regenaxer>
sorry :)
<Regenaxer>
It is a typical 'select' issue
<Regenaxer>
searching combined keys
<beneroth>
well, it is like a tree
<beneroth>
the root nodes are indexed objects
<beneroth>
the second level are objects directly linked from those indexed objects
<beneroth>
the third level are objects linked from those objects on the second level
<beneroth>
recursion
<beneroth>
so a recursive assocation specifier?
* beneroth
is trying out
<beneroth>
ok, I think I found a solution, doing the recursion in lisp
<beneroth>
Regenaxer, any way to achieve recursion within pilog?
<Regenaxer>
yes
<Regenaxer>
same way
<Regenaxer>
Never did it with 'select' though
<beneroth>
well I have a 'db or 'select pilog query which returns objects
<beneroth>
I want a second query which follows a property of those objects, and that second query should also be applied to its own results
<Regenaxer>
Can't it be done in a single select?
<Regenaxer>
I normally search many relations in parallel with select
<beneroth>
that would be perfect, I don't know how
<beneroth>
well there is only one indexed relations
<Regenaxer>
Hmm, so there *is* a kind of assignment, with equal ;)
<Regenaxer>
What do you want to reveive in @@ ?
<beneroth>
all objects
<Regenaxer>
in a list?
<beneroth>
yeah. for (dump). afaik (dump) expects to receive @@
<Regenaxer>
yes, implicit
<Regenaxer>
But it wants single objects, right?
<beneroth>
so I want all objects/records which either have a specific id, or are linked to from another object directly or recursively to one object which has that id
<Regenaxer>
Not a list
<beneroth>
I think it iterates, yes.
<Regenaxer>
yes, all results from that expression
<beneroth>
your (db) code from above works to find the root and the first level of the tree
<beneroth>
and yeah, it results in a list, which might not be desired
<Regenaxer>
I think you must define a recursive Pilog predicate for that
<beneroth>
(db id +Foo @Id @F) (val @C F@ child) (val @D @C child) (equal @@ (@F @C)) <- one layer more
<beneroth>
alright!
<Regenaxer>
it binds @@ to a child, and if that has as child, recurses
<Regenaxer>
I think the second and third clause must be combined
<Regenaxer>
(? (db id +Foo @F) (child @F @@))
<Regenaxer>
(dump (db id +Foo @F) (child @F @@))
<Regenaxer>
this is the use case then
<Regenaxer>
so needs 2 args
<beneroth>
ah, @C is the "output argument" ?
<Regenaxer>
yep
<Regenaxer>
in Prolog all is both input and output normally
<beneroth>
ok
<beneroth>
does the order of the (be)'s matter?
<Regenaxer>
with db queries this is of course not always the case
<Regenaxer>
yes, very critical
<Regenaxer>
also the "cut" with T
<Regenaxer>
otherwise the recursion does not stop
<beneroth>
ok, I try to implemented and grok your example :)
<beneroth>
oh important indeed
<Regenaxer>
I'm also not deep in Prolog think
<Regenaxer>
Ideally you read some Prolog intr
<Regenaxer>
o
<beneroth>
I'm just learning it. only similar thing I knew were so called "logical" riddles in childhood. you know, stuff like "in the red house lives the teacher" ... more facts "in which house does the gardener live"
<beneroth>
I guess I should
<Regenaxer>
yes, like the zebra
<Regenaxer>
is in the distro?
<beneroth>
I think so!
<Regenaxer>
misc/zebra.l ?
<Regenaxer>
But a tree recursion is fairly simple in Prolog once one gets it
<beneroth>
no, its not
<Regenaxer>
I don't find an example atm
<beneroth>
there is @opt/pilog.l
<beneroth>
giving a mapcar
<tankfeeder>
zebra puzzle
<tankfeeder>
?
<Regenaxer>
it is also in rosetta
<tankfeeder>
yeap!
<Regenaxer>
zebra something
<beneroth>
I remember. then I probably saw it in rosetta
<Regenaxer>
so the second one returns the node if not empty
<beneroth>
ah right!
<Regenaxer>
then it recurses in the third rule
<beneroth>
jaaaaa
<beneroth>
it is working
<beneroth>
pure magic
<Regenaxer>
ok
coffeecup12345_ has quit [Ping timeout: 240 seconds]
<beneroth>
thank you very much!
<Regenaxer>
cool! :)
<Regenaxer>
I was not sure here
<Regenaxer>
Must wrap my mind around Pilog again
<beneroth>
btw another question.. what if wanted to generate pilog code .. what would be the best way? build lists and run eval? write a file and (load) it?
<beneroth>
ah right. (solve) does evaluate its arguments
<Regenaxer>
sometimes 'solve'
<Regenaxer>
yes
<Regenaxer>
'solve' returns a whole list
<beneroth>
yeah
<Regenaxer>
'pilog' iterates with a Prg
<beneroth>
I need to do some pilog metaprogramming to integrate with mashina (my extra db layer). e.g. you write pilog code which then gets modified (expanded to more classes/indexes) by mashina.
<beneroth>
but that is for the future.
<Regenaxer>
sounds good
<Regenaxer>
ok
<beneroth>
yeah should be possible.
<Regenaxer>
surely
<Regenaxer>
Pilog is ideal for that
<beneroth>
T
<beneroth>
and pilog is ideal for query building
<Regenaxer>
As I said, I'd recommend some basic Prolog intro reading first
<Regenaxer>
to get the thinking
<Regenaxer>
it is brain-wranging
<Regenaxer>
hate+love
<beneroth>
I want some kind of editor (website) to build queries (resulting in pilog code) for non-programmers. can't probably offer everything that pilog offers (because to complicated for user), but surely a powerful subset.. will see
<beneroth>
ok
<Regenaxer>
I did that once, in a +Chart
<Regenaxer>
user-defined rules
<beneroth>
my problem is, I don't grok how the pilog VM works.. I have a rough thinking, but it's not good enough yet.
<Regenaxer>
drop-downs in the chart for the predicates etc
<beneroth>
yeah something like that!
<beneroth>
cool
<beneroth>
if things get well (meaning I get finished with some stuff) I will do a form.l project next or over-next week
<Regenaxer>
great!
coffeecup12345 has quit [Remote host closed the connection]
<Regenaxer>
You can also ask mtsd and m_mans then
<beneroth>
great :)
mtsd has joined #picolisp
mtsd has quit [Client Quit]
<beneroth>
how to escape ` within picolisp ?
<beneroth>
: (intern "`*Bar")
<beneroth>
-> \`*Bar
* beneroth
fiddling with (dumpValue>)
<Regenaxer>
Strange case, this with the `
* beneroth
managed to make it write \`*Bar into the file.. also not correct
<Regenaxer>
ah
<Regenaxer>
for the later evaluation
<beneroth>
possible?
<beneroth>
I think it is not possible with dump
<Regenaxer>
yes, "`" is a normal char
<stacksmith>
Hey guys. Regenaxer: any progress aarch64?
<Regenaxer>
Hi stacksmith
<beneroth>
stacksmith, you should subscribe to the mailing list
<stacksmith>
many apologies. Using thunderbird for some reason - it dropped out. Will review the log. Thanks.
<Regenaxer>
np
<Regenaxer>
yep, whitequark is good
<Regenaxer>
Weisskäse?
<Regenaxer>
beneroth, what is Quark called in Suisse German?
<Regenaxer>
I'm sure you have many words for cheese
<Regenaxer>
like the innuit for snow
<beneroth>
same
<beneroth>
quark
<Regenaxer>
oh
<Regenaxer>
(disappointed)
<beneroth>
at least as I know it. maybe there are different words in different local dialects
<Regenaxer>
yeah
<beneroth>
e.g. butter is butter in my area, but "anke" in others
<Regenaxer>
cool
<beneroth>
we have many words for rain xD
<beneroth>
well for raining
<beneroth>
the verb
<Regenaxer>
ok
<beneroth>
"sträze" "fisserle" "schiffe"..hm...
<Regenaxer>
ah, schiffen is also in bavarian for raining
<beneroth>
that is quite strong rain
<beneroth>
sträze is even more stronger rain
<Regenaxer>
on the other hand, the greek have not a single word for "receipt" haha
<beneroth>
fisserzle is like fizzling in english, very weak rain just above being just mist
<beneroth>
lol yeah?
<Regenaxer>
scnr
<Regenaxer>
sorry
<Regenaxer>
(if any greek here)
<stacksmith>
Regenaxer: All I found for me was 2 messages - unpredictable pair fixed and 'debian arm port will be more difficult'. Did I miss anything else...
<beneroth>
rick has greek relatives
<Regenaxer>
stacksmith, this was before
<Regenaxer>
There must be something today
<beneroth>
<Regenaxer> stacksmith: I released a new picoLisp.tgz with the linux/arm64 port
<beneroth>
<Regenaxer> Still testing
<beneroth>
<Regenaxer> But basically it runs, so if you have time please try it
<beneroth>
<Regenaxer> I get a SIGXFSZ signal, so there is still something wrong
<beneroth>
* Regenaxer hat die Verbindung getrennt (Ping timeout: 252 seconds)
<beneroth>
* Benachrichtigung: Regenaxer ist online (FreeNode).
<beneroth>
* Regenaxer (~Regenaxer@pd9568a7a.dip0.t-ipconnect.de) hat #picolisp betreten
<stacksmith>
looking
<beneroth>
<Regenaxer> stacksmith: The SIGXFSZ signal issue is fixed too
<beneroth>
<Regenaxer> The unit tests pass for Debian on Arm64
<stacksmith>
I have to get the 64-bit rasp-pi up to test. I will have to get back to you tomorrow or my significant other will kill me...
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer>
oops :)
<Regenaxer>
stacksmith, no hurry
<beneroth>
Regenaxer, I think I cannot trick (dump) into writting `*Bar into the file
<Regenaxer>
also not with an embedded (prin "`") ?
<beneroth>
hm, nice idea
<beneroth>
(dumpValue>) should return (cons 'value 'property) which are written literally to the output via (printsp) (or (print))
<beneroth>
ah I see what you mean
<beneroth>
no, putting that (prin "`") into (dumpValue>) will not work correctly...
<Regenaxer>
yep, to keep dumpValue simple
<Regenaxer>
needs modification of the machinery
<Regenaxer>
but putting it into a returned string somehow
<Regenaxer>
?
<Regenaxer>
probably not
<Regenaxer>
Problem is that 'dump' generates 'obj' calls
<Regenaxer>
you could 'prin' your own stuff to the output channel
<Regenaxer>
outside of 'dump'
<beneroth>
T
<beneroth>
ha, did it!
<Regenaxer>
!
<beneroth>
(cons '*Bar '(property))
<Regenaxer>
hmm?
<beneroth>
the result of (dumpValue>) should be a pair, and the property name not an atom, then it writes the (car) of the property name followed by " `" and then the value
<beneroth>
I'm not sure if this is a intended feature in (dump) and (dumpVal) (well possible), or a side effect of handling other special cases of returns from (dumpValue>)
<Regenaxer>
so if it is *not* a pair, you can do anything?
<beneroth>
I got to this solutions by analysing the source of (dump) and (dumpVal)
<Regenaxer>
yeah, the 'cond ((pair ...'
<beneroth>
yes, but then it uses (print)
<Regenaxer>
oh, yeah, too bad
<Regenaxer>
but true, there seems to be a hook
<beneroth>
yeah
<beneroth>
let it be a pair, but the property name a list
<Regenaxer>
exactly for this purpose
<beneroth>
looks like it
<Regenaxer>
:)
<beneroth>
:)
<Regenaxer>
nice
<Regenaxer>
thanks to the inventor!
<beneroth>
thanks Regenaxer :)
<Regenaxer>
I'm not aware of this
<Regenaxer>
:)
<beneroth>
yeah, a documentation of too.l would be good... I will do it one day, if nobody else manages to do it earlier xD
<beneroth>
too.l is so powerful
<Regenaxer>
great!
<Regenaxer>
This is the old problem
<Regenaxer>
docs get bigger than the code
<beneroth>
T
<Regenaxer>
at least for pil
<beneroth>
its T for general I think
<Regenaxer>
yeah
<beneroth>
to teach something, one needs to establish first context and definitions of terms
<beneroth>
within code, both is implicit. the VM *knows* it, and the programmer has to know it to understand the code
<beneroth>
but it is metadata, kinda
<Regenaxer>
T, for the programmer it is harder than for the VM
<beneroth>
generally, yes.
<beneroth>
its easier when one can associate/apply knowledge from other areas to the specific one
<beneroth>
so called experience
<beneroth>
as lisp and even more picolisp use unusual viewpoints/perspective, it is less likely that a common programmer can map his other knowledge to it
<beneroth>
s/his/their
<beneroth>
not picolisps fault
<Regenaxer>
right, it is too different from mainstream
<Regenaxer>
But this is a good thing, keeps trolls away
<beneroth>
T
<Regenaxer>
Sleepy ... I retire for today :)
<beneroth>
good.. reasonable
<beneroth>
me too. but now I'm excited that I can dump and load
<beneroth>
:)
<Regenaxer>
:)
<beneroth>
thank you my mentor
<Regenaxer>
Better go on tomorrow morning
<Regenaxer>
I sleep badly if I program too late
<Regenaxer>
:)
<Regenaxer>
ok, see you! :)
<Regenaxer>
お休み
<beneroth>
sleep well :)
<Regenaxer>
:)
groovy2shoes has joined #picolisp
alexshendi_ has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]