freenode/#lisp - IRC Chatlog
Search
9:32:40
dmiles
even if i have to add that whatnot to do scheme .. at least i have an inchworm starting from converting a CL verison of Scheme to prolog
10:32:54
dmiles
(my package.trans.pl (which was made from package.lisp converting) replaces my https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/package.pl dump bpackage version )
6:38:07
dmiles
some props i jsut synthesize there: https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/soops.pl#L372-L394
6:40:22
dmiles
the language does at least come with a locative :P https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/typeof.pl#L21
7:05:02
dmiles
in prolog a variable, is insufficent was a locative i have to use '$LOC'(TermPtr,Offset) % a bit like C.. but at leas the GC moves my pointers
0:42:16
dmiles
ACTION is developing new Lisp to make integration of such programs Semantic Inference Engines easier with other Engine tools writtne in Prolog
10:06:36
dmiles
i mostly hope i can do as good as the top 40%.. i am writting it in Prolog for a few reasons.. one is to prove prolog is a general purpose programming language that makes things like creating lisp impls ultra easy. we already know it makes lisp interpretors in less lines than any other language.. but what i am interested in if it can do "as well"
10:08:48
dmiles
so the prolog sources can at the repl be evaluated or if its done in compile-file it can be compiled
10:09:42
dmiles
there are good and less developed prolog compilers for differnt platforms .. in several langauges
10:12:06
dmiles
source code shrdlu68 is at https://github.com/TeamSPoon/wam_common_lisp/tree/master/prolog/wam_cl
10:12:17
dmiles
this file https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp translated to this file: https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp.trans.pl
10:13:35
dmiles
the lisp_compile_to_prolog(pkg,..) is there more informationally like: https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp.trans.pl#L44-L59
10:15:07
dmiles
and to get the symbols interned ( packaged ) so the prolog code at https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp.trans.pl#L74-L88 can be understood
10:18:09
dmiles
to give an example of *normal* implementing of lisp in prolog, it looks like this: https://www.metalevel.at/lisprolog/lisprolog.pl
10:21:28
dmiles
so bonuses of the prolog system is it already has a decompiler, exe/dll maker, image load/save
10:22:34
dmiles
the drawbacks is the number developer that think implementing object systems on prolog as to be easy
10:30:07
schweers
dmiles, jackdaniel: do you think free prolog implementations of today are usable or real world applications? Or is the language as it is today “only” useful to broaden the mind? Which would be totally fine if you ask me, that is still a very good reason to learn a language.
10:31:07
dmiles
definately very good for todays applications.. i think even more for future applications.. I have two applications that i would not even immagine using anthing other than prolog
10:32:37
dmiles
so i immagine 95% of the world would use lisp for such apps and make a prolog interpretor but leverage the inteire lisp ecosystem
10:40:19
dmiles
if one knew exactly how that was supposed to work.. lisp and prolog would be most natrual choices at that point
10:49:55
dmiles
a huge project CYC made a prolog-like-system-in-lisp ... writting in their language has shown me incredicable ammounts of untility that prolog as a language is afraid to adopt
10:58:52
dmiles
schweers, so as varjag was saying (i think) is most out of the box supposed features people learn to do on a small scale (niave brute force search and inference) do not work on a large scale. but is very enjoyable on a toy levels. Though if a person uses prolog as a macro programming language instead of a structured query language it scales to every level - no problem
14:33:11
lieven
the x of 'for x' already gets defined in the loop prologue and shadows the outer x of the let
13:29:08
logicmoo
mfiano: right on, currently i am writing truename and making sure uiop has somethuing to target https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/pathnames.pl
18:18:03
u0_a166
in your function definitions you could have a slot for prolog and epilog hooks and a global flag for if inside a hook
15:36:23
dmiles
it transplies the bodys to prolog.. then uses the internal compiler of prolog to make tramploines
15:46:02
dmiles
btw i finnaly letting the compiler write the functions for me .. (instead of by hand).. here is one it write: https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/places.pl#L20-L52
16:30:42
beach
dmiles: I do not use Prolog, so I'll be interested in your implementation only if it has some advantages over what I currently use. Sorry about that.
16:35:40
dmiles
i used a prolog atom (it is a special interned object that acts like aprimary key in the database) .. i record its superclasses and that is it. i lazily create prolog fields in the 'asserta database' as they are either first read or set
17:53:59
dmiles
when answering questions about how i instance a standard object, i assumed it is becasue it was hard to think aobut in a language that doesnt have mutability or objects being able to do so, so i was trying to answer why it wasnt impossible to do in prolog.. thus the hacks and inventions
18:00:13
beach
It is safest to assume that the people you are talking to here have very little knowledge about Prolog, especially modern implementations of it.
22:36:36
aeth
One of my long term plans, especially for when my game engine doesn't consume almost all of my CL programming time, is to try to build up an interoperable language environment on top of CL. This exists to some limited extent to some limited other languages in implementation-specific ways... frequently just Prolog.
22:38:38
aeth
Prolog would be nice, too. dmiles (iirc) can tell me why that won't work in existing CL implementations.
3:16:53
dmiles
aeth: speaking of mutibility.. i have be struggling within DO deciding between compiling to prolog to use a mutable loop vs a non mutable loop :) non mutable loops are ugly to look at and debug
3:24:00
aeth
dmiles: What I personally find useful for advanced things (and Prolog would count) is to write a lot of macros, and perhaps use those macros in other macros.
3:24:06
dmiles
not that nayone aked but this is my DO / DO* https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/block.pl#L86-L103
3:27:54
dmiles
aeth: i write in imperative prolog about 50/50 from declarative.. i think they only teach declaritive
3:30:37
aeth
dmiles: I guess people who learn Lisp in school think it's about purely functionally processing lists (which is wrong on multiple levels) and people who learn Prolog in school probably think it's... sort of like SQL for classical logic, I guess. Define some relations and deduce things in a query.
20:14:53
warweasle_afk
Question about PIAIP: Can I create a lazy evaluating prolog style language using a topological sort instead of unification?
20:19:23
dmiles
the only difference between flets and labal in my code is in flets i delete the shadows at line 42 https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/defun.pl#L35-L50
23:46:59
dmiles
i am calling WAM-CL a compiler since before i run a form at the repl i convert it to prolog source, then on several versions of prolog (especially the one i am using) code is compiled whenever it is called
0:15:43
dmiles
what is neat is on YAP-Prolog it compiles to the Extended Andorra Model (EAM) https://arxiv.org/pdf/1009.3806.pdf
1:27:15
rpg
dmiles: Once you get WAM-CL done, you can run Peter Norvig's Prolog-in-Lisp on it, which will almost be an MCEscher drawing!
18:27:54
dmiles
jmercouris: knowing and doing Prolog and/or Lisp work has always paid way more than C#,Java,Scala and ASP comvined
18:55:17
dmiles
jmercouris: oh definatley, there is probably aobut 1 or 2 lisp/prolog job openings per month that I see :P verses 100s per week of everyhitng else.
20:58:58
dmiles
(Like in prolog, we write in our Noun/Verb language, sometimes going in and explaining (in code) what we meant with our noun/verbs)
21:13:34
dmiles
White_Flame: indeed, now i am burried in these data statements https://github.com/TeamSPoon/prologmud/blob/master/prolog/prologmud/mud_builtin.pfc.pl#L600-L873
21:15:41
White_Flame
dmiles: I'm sure you could either generate or infer all that from within prolog, from much simpler & more straightforward representations
21:17:23
dmiles
White_Flame: well that is what Prolog uses to generate the program .. the program is redesigned from that file
10:53:06
dmiles
i eliminate them with 4 lines of code: https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/funcall.pl#L140-L143
17:35:02
dmiles
https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/prologfns.pl#L75 <- here is sone intenral code where i have symbols getting exported
19:32:18
dmiles
ebdreger: yep tyhat is what i did to generate https://github.com/TeamSPoon/wam_common_lisp/blob/24c112af9edb97c0a5033d35dd369f876725fa9d/prolog/wam_cl/clstructs.pl#L283-L551 (from https://github.com/TeamSPoon/wam_common_lisp/blob/24c112af9edb97c0a5033d35dd369f876725fa9d/t/reference/clisp.info )
19:34:45
dmiles
which ends up making https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/ci.data
20:34:48
dmiles
but yeah, i am working on making sure in my impl that whatever datastructures are there that they can be viewed and altered from multiple programing paradymns (either by prolog predicates/assertions or by MOP)
22:16:40
tetrachlorides
i saw wam-cl had a full object model and everything and was impressed! but there was some other prolog/lisp something in there... *shrug*
22:16:54
dmiles
in the asserta database (normal to prolog) but for allow modification of Conses and other objects i use the Prolog blackboard
22:20:31
dmiles
well one modification i been making is that for every "place" i am making a base-porter with is a refernce to a prolog compound .. then also an offset that i can use getarg/3 , b_starg/3 or nb_setarg/3
22:49:31
dmiles
but also of course my avoidance is sometimes it makes it harder to decompile my code afterwards.. since prolog vars and not be written more than once i have to make lots of helpers
22:50:47
dmiles
"avoidance is sometimes it makes it harder to decompile my code afterwards.." / "sinc eprolog variables once a value is stored cannot be changed"
23:19:51
dmiles
though technically the source of the wam_cl could be able to be translated from prolog to lisp.. meaning i could then gernate my system on SBCL
14:53:13
|3b|
ACTION doesn't know prolog, does the prolog version just give up halfway through parsing undefined?
14:56:38
dmiles
|3b| well the good part of that file is it is prolgo for very simplistic prolog impls
23:25:54
dmiles
pysically in my system i want to promot doing.. (defstruct (point (:type prolog::point/2)) x y)
23:28:46
dmiles
(when prolog code introduces lisp to its innerds ... i been thinking of having iot be seen as a structure that way)
14:32:37
dmiles
i am making my impl because i dont think anyone has ever built common lisp on prolog before
14:36:23
dmiles
JuanDaugherty: what Shinmera saiid is the reason I have to build my impl.. Imagine how many ytears it would take get all the lisp libraries for prolog?
14:37:48
dmiles
jackdaniel: the problem is there are 7 refernce impl of Prolog.. immagine me having to write all teh lisp libraries for all 7 ?
14:39:46
dmiles
but then the whoile prolog world would need to abandon their 7 impls and jsut use proplog.. the path i have now all 7 can run all the lisp libraries
14:43:32
dmiles
jackdaniel: though luckily i am *only* implemeting one standard that i did not create (common lisp). and having to write 3-5 shims to cover the differnces in the 7 impls of prolog
14:46:05
dmiles
the 3-5 shims (prolog-to-prolog compatibility libaries) already mostly exist . why i probly only have ot create 3-5
15:07:33
dmiles
https://github.com/SWI-Prolog/bench/blob/master/chat_parser.pl <- in fact, its a daily benchmark for SWI
2:24:17
aeth
Oh, I forgot. There are some other value-added things that a proprietary CL might have. They might embed a database or a Prolog, etc.
19:45:00
White_Flame
I did it for a prolog style query language, picking out all symbols starting with "?", creating a binding list of variables
10:54:12
dmiles
very nice.. (despite working on wam-cl i have quite a bit i plan being done with ECL from SWI-Prolog's new LibFFI)
6:04:46
aeth
pierpa: Interestingly, CLs often came bundled with Prologs. I think all of the commercial ones still are.
6:08:48
JuanDaugherty
ACTION doesn't know of anything like a common semantic thing for lisp as such other than the usual inclusion of a prolog implementation
15:46:38
republican_devil
can you reduce problems with logic liek prolog does in lisp? thus saving a lot fo work?
21:51:05
stacksmith
k-stz: Read 'On Lisp' - it is full of useful information about doing things like that, including an entire Prolog implementation in a few pages of code, and information about reader macros and regular macros.
19:31:06
dmiles
warweasle.. for the prolog-like database you out to look at KM interpreter here is some interaction http://www.cs.utexas.edu/users/mfkb/km/km-overview.script
19:37:39
dmiles
https://www.cs.nmsu.edu/ALP/2011/03/natural-language-processing-with-prolog-in-the-ibm-watson-system/
7:08:22
aeth
cess11_: blurgh means "very high level language", which depending on who you ask either means Prolog/Haskell/etc. or... anything higher level than C++ (anything with a garbage collector?)
19:06:06
jmercouris
prolog is way too imperative, that's a statement I never thought I would hear :D
20:42:08
aeth
Oh, I almost forgot. The next CL standard should sneak in a full implementation of Prolog as well. Put it in an appendix as a mandatory thing. Or maybe a long footnote.
20:46:57
aeth
yes, the Prolog was a joke, but actually apparently there are some things an implementation must do in order to coexist with Prolog. iirc dmiles was talking about that a while ago
20:47:33
aeth
the latter would be more of an idea to specify as an extension or something, not actually all of Prolog
8:48:05
dmiles
ACTION uses Prolog for general perpose language.. Though many times i'll use it as a glue to FFI
1:02:58
aeth
It wouldn't surprise me. Commerical software like that tends to focus on features to justify upgrades. e.g. integrated Prologs.
16:53:39
on_ion
human time and effort is precious , may as well get the machine working as we designed them (, prolog too)
7:09:53
hajovonta
makomo: I haven't hold it yet, first my colleague will do it on the topic of Prolog, this Wednesday as planned
7:11:23
hajovonta
but Erlang and Prolog are also being teached on our universities, so Lisp is the most alien of all of them
7:12:20
hajovonta
makomo: I've heard there is a simple Prolog implementation, but I'm not sure if that is something useful or only a subset of some standardized Prolog because I'm not familiar with the language
7:12:47
makomo
it's probably only just a subset. writing a serious prolog implementation would certainly take more than 50 lines.
5:56:28
aeth
https://irclog.tymoon.eu/freenode/%23lisp?from=2017-12-01T01%3A53%3A36&to=2018-06-29T13%3A53%3A36&search=prolog