Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:12

    pmoura on master

    Update LVM adapter listing of c… (compare)

  • 09:04

    pmoura on master

    Additional tests for unbounded … (compare)

  • Jun 20 23:10

    pmoura on master

    Additionals test for the Prolog… (compare)

  • Jun 20 20:38

    pmoura on master

    Additional test for the Prolog … (compare)

  • Jun 20 09:20

    pmoura on master

    Add tests for the Prolog `popco… (compare)

  • Jun 18 16:31

    pmoura on master

    Improve GNU Prolog adapter work… (compare)

  • Jun 17 14:47

    pmoura on master

    The `logtalk_tester` script tes… (compare)

  • Jun 16 22:47

    pmoura on master

    Update acknowledgments file (compare)

  • Jun 16 22:14

    pmoura on master

    Update backend features table a… (compare)

  • Jun 15 23:08

    pmoura on master

    Improve documentation of the `h… (compare)

  • Jun 14 23:25

    pmoura on master

    Change Ciao Prolog adapter file… (compare)

  • Jun 14 23:20

    pmoura on master

    Fix `benchmarks` example portab… (compare)

  • Jun 14 10:10

    pmoura on master

    Fix some spelling and grammar t… (compare)

  • Jun 13 09:50

    pmoura on master

    Improve new Handbook section on… (compare)

  • Jun 13 09:48

    pmoura on atomic_list_concat

    Improve new Handbook section on… (compare)

  • Jun 12 22:49

    pmoura on atomic_list_concat

    Add `atomic_list_concat/2-3` pr… (compare)

  • Jun 12 17:51

    pmoura on master

    Add Handbook section on running… (compare)

  • Jun 12 15:45

    pmoura on master

    Improve tests for the `threads/… (compare)

  • Jun 12 15:35

    pmoura on master

    Improve tests of the `random` l… (compare)

  • Jun 12 11:40

    pmoura on master

    Only add the process identifier… (compare)

Paulo Moura
@pmoura
There's some preliminary work in the packs branch.
Paul Brown
@PaulBrownMagic
:thumbsup:
Paul Brown
@PaulBrownMagic
Just a thought, would it be wise to add a warning if a Library has more than one Path in logtalk_library_path/2? Loading order matters; only the first one would be loaded, and it probably indicates a Library name clash. Also, I see packs are working with a logtalk_packs library path, would that be changeable in settings.lgt so I could install packs on a per project basis? If so, that's going to be a really nice way to handle both global and local package management.
Paulo Moura
@pmoura
Indeed it would be an wise warning. Implemented in version 3.33.0, released in December 3, 2019. Duplicated library aliases are checked for using logtalk_make(check) or its top-level abbreviation, {?}.
😎
A Man With A Clever Disguise
@ACleverDisguise
Paulo: Can you give some kind of warning when bad syntax is used? Like ;- ima(Joe,K).. giving some kind of warning from the compiler that this might not work?
(Just a little joke at your expense, @PaulBrownMagic: @pmoura has a tendency to already have features people request. :D)
Paul Brown
@PaulBrownMagic
:thumbsup: I was a check away from seeing it!
A Man With A Clever Disguise
@ACleverDisguise
There's a WHOLE LOT in the libraries and it's actually kind of fatiguing to find it all. Just so much to go through. :D
Paulo Moura
@pmoura
When you're not exploring the available resources but looking for something specific, there is https://logtalk.org/search.html
Not sure what you mean by bad syntax. You example is interesting:
$ gprolog
GNU Prolog 1.5.0 (64 bits)
Compiled May  8 2021, 10:47:25 with gcc
Copyright (C) 1999-2021 Daniel Diaz

| ?- [user].
compiling user for byte code...
;- ima(Joe,K).
user:1:2: syntax error: previous operator needs brackets
But:
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.3.24-30-gaecdf37df)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- [user].
|: ;- ima(Joe,K).

Warning: user://1:8:
Warning:    Singleton variables: [Joe,K]
|: ^D% user://1 compiled 0.01 sec, 1 clauses
true.
Permissive systems are the problem in this particular case.
Paulo Moura
@pmoura
Assuming no syntax error, a compiler cannot really tell if a term is a mistake, however.
A Man With A Clever Disguise
@ACleverDisguise

Not sure what you mean by bad syntax. You example is interesting:

I was gently joshing @PaulBrownMagic by suggesting you supply syntax error messages. (Which you obviously do.)

(Pronounce ima(Joe,K) out loud.)
Wait, what? That's valid syntax in SWI!? :-o
Now I can't even guess what it's supposed to mean.
Semicolon hyphen term?
Even weirder. SWI is inconsistent.
?- ;- ima(Joe,K).
ERROR: Unknown procedure: (-)/2 (DWIM could not correct goal)
A Man With A Clever Disguise
@ACleverDisguise
Which still fails to address that a ';' without a term before it SHOULD be an error as well.
?- ; true.
ERROR: Syntax error: Operator expected
ERROR: ;
ERROR: ** here **
ERROR:  true .
Which it is in other contexts. This is getting very much into the realm of rabbit holes.
didier31
@didier31
Hi everybody,

I've switched from swilgt to ciaolgt and I'm encountering a trouble with phrase/3 and phrase/2 :

?- phrase(langclex::string(T), "toto").           
{ERROR: user:::/4 - existence error: procedure:user:::/4 does not exist}

aborted

:-/

Paulo Moura
@pmoura
Prolog phrase/2-3 predicates are not Logtalk aware and thus don’t recognize the ::/2 message sending control construct.
The reason that goal works with swilgt is because the SWI-Prolog adapter file contains goal-expansion code to deal with it.
A portable top-level workaround isto use instead logtalk << phrase(…).
But the best solution is usually to define a public predicate in the object that calls the phrase/2-3 predicates.
See e.g. examples/dcgs in the Logtalk distribution for some examples.
Paulo Moura
@pmoura
P.S. Note that Logtalk support for Ciao Prolog is still experimental as Ciao is still missing some required standard compliance features.
didier31
@didier31
Great.
I notice, Paulo.
Thank you again.
Cheers
Dan
@atstp
Hey all, does anyone have recommendations for a generic Prolog reference? Logtalk's docs are nice, and most Prologs have decent to good implementation-specific docs
I'm mostly interested in what i can (reasonably) assume is portable. Is there a good place to reference the ISO standard? I also saw that the recent release notes mention that between/3 is a de facto standard. Is there anything outside of good-old experience that would help me pick out these de facto standards?
Paulo Moura
@pmoura
The GNU Prolog manual provides a reasonable reference for ISO Prolog standard features. Predicates, control constructs, functions, flags, ... are clearly marked as ISO or GNU Prolog specific.
The logtalk3/tests/prolog includes tests for both ISO and de facto standard features. If there's a test set for the feature you want to use, you can assume some portability at least.
Otherwise, you can always ask.
Dan
@atstp
thanks! If i remember correctly, there are a couple ISO features that GNU Prolog doesn't implement. They haven't been consequential to what I've done so far, so i guess it probably doesn't matter
I'm looking now and it seem like ensure_loaded/1 and acyclic_term/1 are the only two things that come up in a search for "not supported"
Paulo Moura
@pmoura
$ gprolog
GNU Prolog 1.5.0 (64 bits)
Compiled May  8 2021, 10:47:25 with gcc
Copyright (C) 1999-2021 Daniel Diaz

| ?- acyclic_term(t).

(1 ms) yes
| ?- X = f(X), acyclic_term(X).

no
notoria
@notoriae:matrix.org
[m]
Hello, there is quick start for supported engine, is there something for unsupported engine?
Paulo Moura
@pmoura
Hi. Not really. The logtalk3/adapters/unsupported directory contains some incomplete adapter files. But that's manily because those backends are either legacy or lack the necessary standard features to be able to run Logtalk. Which unsupported Prolog backend are you considering?
notoria
@notoriae:matrix.org
[m]
It's unknown. I wanted to how is a port done to an unknown unsupported backend.
Paulo Moura
@pmoura
Usually, starting with the logtalk3/adapters/template.pl file.
Paul Brown
@PaulBrownMagic
A little gif of where I'm at with the frames work: https://twitter.com/PaulBrownMagic/status/1401308039131668487?s=20