Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.prolog > #12143 > unrolled thread
| Started by | Mostowski Collapse <bursejan@gmail.com> |
|---|---|
| First post | 2021-07-21 06:41 -0700 |
| Last post | 2024-09-01 19:05 +0200 |
| Articles | 11 on this page of 91 — 5 participants |
Back to article view | Back to comp.lang.prolog
France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-07-21 06:41 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-07-21 06:48 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-07-22 03:51 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-07-22 03:53 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-07-23 03:32 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-07-23 03:46 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-07-28 02:19 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-07-28 02:29 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-07-28 02:42 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-10-26 00:57 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-10-26 00:58 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-10-26 00:59 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-03 07:47 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-03 07:48 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-04 00:49 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-04 00:50 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-06 12:07 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-06 12:08 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-06 12:09 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-10 03:56 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-10 03:58 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-15 18:46 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-15 18:54 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-25 04:25 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-28 07:22 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-28 07:29 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-28 11:31 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-28 15:20 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-28 15:24 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-11-30 06:07 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-12-15 04:42 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-12-17 08:59 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-12-28 10:26 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-12-29 14:46 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <janburse@fastmail.fm> - 2021-12-30 09:56 +0100
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-12-30 01:06 -0800
Re: France is the Fire Nation of Prolog Julio Di Egidio <julio@diegidio.name> - 2021-12-30 02:48 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2021-12-30 04:38 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <janburse@fastmail.fm> - 2021-12-31 01:11 +0100
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-01 03:30 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-02 15:28 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-04 02:49 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-04 03:28 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-04 03:46 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-08 05:06 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-08 07:57 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-09 00:30 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-09 00:58 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-16 17:58 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-18 07:57 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-20 06:03 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-20 06:06 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-22 09:52 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-23 13:02 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <janburse@fastmail.fm> - 2022-01-22 18:58 +0100
Re: France is the Fire Nation of Prolog Mostowski Collapse <janburse@fastmail.fm> - 2022-01-23 01:32 +0100
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-23 07:54 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-24 02:38 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-30 12:10 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-30 12:15 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-01-30 12:21 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-02-08 03:28 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-02-10 08:27 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-02-10 08:29 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-02-12 05:02 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-02-14 03:59 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-02-14 09:35 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-02-14 10:42 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-07-09 01:12 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-07-09 01:36 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-07-09 01:49 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-09-14 09:21 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-09-14 09:25 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2022-09-14 09:38 -0700
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-01-12 05:16 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-01-12 05:17 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-02-08 11:25 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-02-14 01:46 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-02-14 01:49 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-02-14 02:27 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-02-14 05:55 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-02-16 13:30 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-02-16 15:39 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-02-20 01:28 -0800
Re: France is the Fire Nation of Prolog Mostowski Collapse <bursejan@gmail.com> - 2023-02-20 01:30 -0800
Re: France is the Fire Nation of Prolog Mild Shock <bursejan@gmail.com> - 2023-10-10 15:54 -0700
Re: France is the Fire Nation of Prolog Mild Shock <bursejan@gmail.com> - 2023-10-10 16:08 -0700
Why cant Scryer Prolog parse this? (Was: France is the Fire Nation of Prolog) Mild Shock <janburse@fastmail.fm> - 2024-09-01 15:22 +0200
Re: Why cant Scryer Prolog parse this? (Was: France is the Fire Nation of Prolog) Mild Shock <janburse@fastmail.fm> - 2024-09-01 16:03 +0200
Re: Why cant Scryer Prolog parse this? (Was: France is the Fire Nation of Prolog) Mild Shock <janburse@fastmail.fm> - 2024-09-01 16:29 +0200
Re: Why cant Scryer Prolog parse this? (Was: France is the Fire Nation of Prolog) Mild Shock <janburse@fastmail.fm> - 2024-09-01 19:05 +0200
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
| From | Mostowski Collapse <bursejan@gmail.com> |
|---|---|
| Date | 2023-02-14 05:55 -0800 |
| Message-ID | <a6d89f13-8625-41c3-9616-7505ff53858fn@googlegroups.com> |
| In reply to | #13443 |
Adding failure handling to it, wouldn’t be extremly difficult,
but maybe this would slow it down a little bit? Something
along the following, for the version without shield/1:
open(Path, read, Input),
(catch(read_term(Input, Term, Options), Error,
(close(Input),throw(Error))) -> close(Input)
; close(Input))
Maybe a good name for this less sophisticated setup_call_cleanup/3
would be simply setup_once_cleanup/3. The once in the name
would relate to the already existing once/1 predicate and indicate that
the call is only called once. Which happens for example if the above
if-then-else wrapper is used. In the original Logtalk find, the cleanup
might not be called or multiple times called, since there is no
if-then-else wrapping. A new meta predicate setup_once_cleanup/3
could provide a more cleaner solution.
Mostowski Collapse schrieb am Dienstag, 14. Februar 2023 um 11:27:08 UTC+1:
> Here is a proposal how to extend the Logtalk idiom by atomicity:
>
> shield(
> open(Path, read, Input),
> catch(unshield(read_term(Input, Term, Options)), Error,
> (close(Input),throw(Error))),
> close(Input)).
>
> shield/1 is a new meta predicate inspired by Python:
>
> awaitable asyncio.shield(aw )
> Protect an awaitable object from being cancelled.
> https://docs.python.org/3/library/asyncio-task.html#shielding-from-cancellation
>
> I guess it corresponds to sig_atomic/1 in SWI-Prolog and sys_atomic/1
> in formerly Jekejeke Prolog. unshield/1 reverts shield/1, I didn’t find it yet
> in some existing Prolog system. Disclaimer: The above idea of a
>
> shielded Logtalk idiom is not yet practically tested.
> Mostowski Collapse schrieb am Dienstag, 14. Februar 2023 um 10:49:01 UTC+1:
> > Scryer Prolog isn't that lucky. Their setup_call_cleanup/3
> > has some meta predicate issue. And their catch/3 is utterly slow.
> >
> > /* Scryer Prolog 0.9.1 */
> > ?- time((between(1,500000,_), findall2(X, (X=1;X=2), L), fail; true)).
> > % CPU time: 0.000s
> > error(existence_error(procedure,'$destroy_findall2_bag'/0),'$destroy_findall2_bag'/0).
> > ?- time((between(1,500000,_), findall3(X, (X=1;X=2), L), fail; true)).
> > % CPU time: 32.102s
> > true.
> > Mostowski Collapse schrieb am Dienstag, 14. Februar 2023 um 10:46:02 UTC+1:
> > > Interesting replacement of setup_call_cleanup/3:
> > >
> > > open(Path, read, Input),
> > > catch(read_term(Input, Term, Options), Error,
> > > (close(Input),throw(Error))),
> > > close(Input)
> > > https://github.com/LogtalkDotOrg/logtalk3/blob/master/library/term_io/term_io.lgt
> > >
> > > Can we use this for something?
> > >
> > > Here is some testing, with dry implementation of the bag:
> > >
> > > /* SWI-Prolog 9.1.4 */
> > >
> > > /* N215 Solution */
> > > ?- time((between(1,500000,_), findall2(X, (X=1;X=2), L), fail; true)).
> > > % 7,000,000 inferences, 0.875 CPU in 0.871 seconds (100% CPU, 8000000 Lips)
> > > true.
> > >
> > > /* Logtalk Idiom */
> > > ?- time((between(1,500000,_), findall3(X, (X=1;X=2), L), fail; true)).
> > > % 6,000,000 inferences, 0.500 CPU in 0.497 seconds (101% CPU, 12000000 Lips)
> > > true.
[toc] | [prev] | [next] | [standalone]
| From | Mostowski Collapse <bursejan@gmail.com> |
|---|---|
| Date | 2023-02-16 13:30 -0800 |
| Message-ID | <c92df7b5-9774-4932-b4ec-e9dd6e069f7en@googlegroups.com> |
| In reply to | #13444 |
Woa! My new setup_once_cleanup/3, which adopts the Logtalk idiom, does something totally different, it overrides the primary exception. This is incompatible with the usual setup_call_cleanup/3: Logtalk idiom as is: ?- once_cleanup(true, throw(foo), throw(bar)). Unknown exception: bar ?- catch(once_cleanup(true, throw(foo), throw(bar)), E, true). E = bar. Now compare with what some new Prolog systems do: /* Trealla Prolog */ ?- call_cleanup(throw(foo), throw(bar)). throw(foo). /* Scryer Prolog */ ?- call_cleanup(throw(foo), throw(bar)). throw(foo).
[toc] | [prev] | [next] | [standalone]
| From | Mostowski Collapse <bursejan@gmail.com> |
|---|---|
| Date | 2023-02-16 15:39 -0800 |
| Message-ID | <d4792eef-4f30-4fc8-811d-2d3c43e808b8n@googlegroups.com> |
| In reply to | #13446 |
Now I get a little disagreement: /* Trealla Prolog */ ?- call_cleanup(throw(foo), fail). false. /* Scryer Prolog */ ?- call_cleanup(throw(foo), fail). throw(foo). Which one is the desired behaviour? Mostowski Collapse schrieb am Donnerstag, 16. Februar 2023 um 22:30:43 UTC+1: > Woa! My new setup_once_cleanup/3, which adopts the Logtalk idiom, > does something totally different, it overrides the primary exception. > This is incompatible with the usual setup_call_cleanup/3: > > Logtalk idiom as is: > > ?- once_cleanup(true, throw(foo), throw(bar)). > Unknown exception: bar > > ?- catch(once_cleanup(true, throw(foo), throw(bar)), E, true). > E = bar. > > Now compare with what some new Prolog systems do: > > /* Trealla Prolog */ > ?- call_cleanup(throw(foo), throw(bar)). > throw(foo). > > /* Scryer Prolog */ > ?- call_cleanup(throw(foo), throw(bar)). > throw(foo).
[toc] | [prev] | [next] | [standalone]
| From | Mostowski Collapse <bursejan@gmail.com> |
|---|---|
| Date | 2023-02-20 01:28 -0800 |
| Message-ID | <367479d2-55fa-4d09-a335-452ebc12be53n@googlegroups.com> |
| In reply to | #13447 |
Now I found two more cases where I could use the new setup_once_cleanup/3. These correspond to the following in SWI-Prolog: with_mutex/2: The goal argument is onced. So an implementation with setup_call_cleanup/3 is overkill, can be as well implemented with setup_once_cleanup/3. I saw that with_mutex/2 is implemented natively in SWI-Prolog using callProlog, which I guess can be used to create a setup_once_cleanup/3 behaviour. Pitty the thingy isn’t named once_with_mutex/2. In shared lazy tabling I have a strange case for a setup_call_cleanup/3 based mutex handling. I guess I will rename it to call_with_mutex/2, and also introduce a once_with_mutex/2, and see to it that shared eager tabling uses the new setup_once_cleanup/3. This is a low priority long term change. call_with_time_limit/2: The goal argument here is onced as well. Pitty the thingy isn’t name once_with_time_limit/2. I have a meta predicate time_out/2 based on setup_call_cleanup/3 which I can now migrate to setup_once_cleanup/3. But maybe I will also rename it to once_with_time_limit/2. Oh the horror! This is a high priority short term change.
[toc] | [prev] | [next] | [standalone]
| From | Mostowski Collapse <bursejan@gmail.com> |
|---|---|
| Date | 2023-02-20 01:30 -0800 |
| Message-ID | <0dd031b7-b544-4834-8c4f-c05cdb73f108n@googlegroups.com> |
| In reply to | #13454 |
Exception Chaining: I am planning to nevertheless introduce exception chaining, adopting some new ideas from Python. In Python a catch of a chained exception only matches the head of the chained exception. This is an effect of object orientation, since the chain is just a field __context__ or something, and the matching is based on the class of the exception. Maybe can recreate a similar Prolog catch/3, that matches either an unchained exception or then the head of chained exception. This is medium priority. Python has a further feature which could be adopted, the catch/3 handler, if an exception is thrown there, it is automatically chained with the current exception. This is probably too complicated, no plan to adopt this feature. The automatic chaining will probably only be added to setup_once_cleanup/3 and not to catch/3. The reason is there is some constraint logic programming code that uses catch/3 to return a result in branch and bound search. You find this also in Markus Triskas code, so making catch/3 too heavy slows down the constraint logic programming, unless this code would go for the more lower level sys_trap/3. Mostowski Collapse schrieb am Montag, 20. Februar 2023 um 10:28:36 UTC+1: > Now I found two more cases where I could > use the new setup_once_cleanup/3. These > correspond to the following in SWI-Prolog: > > with_mutex/2: > The goal argument is onced. So an implementation > with setup_call_cleanup/3 is overkill, can be as well > implemented with setup_once_cleanup/3. I saw that > with_mutex/2 is implemented natively in SWI-Prolog > using callProlog, which I guess can be used to create > a setup_once_cleanup/3 behaviour. > > Pitty the thingy isn’t named once_with_mutex/2. In > shared lazy tabling I have a strange case for a > setup_call_cleanup/3 based mutex handling. I guess I > will rename it to call_with_mutex/2, and also introduce a > once_with_mutex/2, and see to it that shared eager > tabling uses the new setup_once_cleanup/3. This is > a low priority long term change. > > call_with_time_limit/2: > The goal argument here is onced as well. Pitty the > thingy isn’t name once_with_time_limit/2. I have a meta > predicate time_out/2 based on setup_call_cleanup/3 which > I can now migrate to setup_once_cleanup/3. But maybe I > will also rename it to once_with_time_limit/2. Oh the horror! > This is a high priority short term change.
[toc] | [prev] | [next] | [standalone]
| From | Mild Shock <bursejan@gmail.com> |
|---|---|
| Date | 2023-10-10 15:54 -0700 |
| Message-ID | <2819e103-ad9e-4b92-8e20-52a3af80ad60n@googlegroups.com> |
| In reply to | #13455 |
Is Canada also France? Seems I am not the only one who got into struggle with Logtalk sooner or later. LoL How its started: Ticket raised by me Aug 9, 2021 (when I was "ghost") Feature request flag dialect, maybe version and version_data https://github.com/mthom/scryer-prolog/issues/1017 How its going: Commit by pmoura last week Delete Scryer Prolog support due to this system refusal to support the de facto standard `version_data` flag https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c What happened? LoL
[toc] | [prev] | [next] | [standalone]
| From | Mild Shock <bursejan@gmail.com> |
|---|---|
| Date | 2023-10-10 16:08 -0700 |
| Message-ID | <2a43ad53-8830-4ae3-954c-f2e5690452c9n@googlegroups.com> |
| In reply to | #13766 |
version_data turned out quite useful. I am currently using it across Dogelog Player to also return the release date: ?- current_prolog_flag(version_data, X). X = dogelog(1, 1, 3, [date(1696761013577)]). The date is currenty a long integer time stamp. I am not using date/3 or datetime/6 compounds for time. Mild Shock schrieb am Mittwoch, 11. Oktober 2023 um 00:54:43 UTC+2: > Is Canada also France? Seems I am not the only one who got > into struggle with Logtalk sooner or later. LoL > > How its started: > Ticket raised by me Aug 9, 2021 (when I was "ghost") > Feature request flag dialect, maybe version and version_data > https://github.com/mthom/scryer-prolog/issues/1017 > > How its going: > Commit by pmoura last week > Delete Scryer Prolog support due to this system refusal to > support the de facto standard `version_data` flag > https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c > > What happened? > > LoL
[toc] | [prev] | [next] | [standalone]
| From | Mild Shock <janburse@fastmail.fm> |
|---|---|
| Date | 2024-09-01 15:22 +0200 |
| Subject | Why cant Scryer Prolog parse this? (Was: France is the Fire Nation of Prolog) |
| Message-ID | <vb1pqc$1vjlv$1@solani.org> |
| In reply to | #13766 |
Hi,
Why cant Scryer Prolog parse this?
scryer-prolog$ target/release/scryer-prolog -v
v0.9.4-165-g12a61cdf
scryer-prolog$ target/release/scryer-prolog
?- current_op(X, Y, *).
X = 400, Y = yfx.
?- X = (* = *).
error(syntax_error(incomplete_reduction),read_term/3:1).
On the other hand Trealla Prolog has no problem:
trealla$ ./tpl -v
Trealla Prolog (c) Infradig 2020-2024, v2.55.31
trealla$ ./tpl
?- current_op(X, Y, *).
X = 400, Y = yfx.
?- X = (* = *).
X = ((*)=(*)).
What LEX / YACC did they use? Holy cow!
Bye
Mild Shock schrieb:
> Is Canada also France? Seems I am not the only one who got
> into struggle with Logtalk sooner or later. LoL
>
> How its started:
> Ticket raised by me Aug 9, 2021 (when I was "ghost")
> Feature request flag dialect, maybe version and version_data
> https://github.com/mthom/scryer-prolog/issues/1017
>
> How its going:
> Commit by pmoura last week
> Delete Scryer Prolog support due to this system refusal to
> support the de facto standard `version_data` flag
> https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c
>
> What happened?
>
> LoL
>
[toc] | [prev] | [next] | [standalone]
| From | Mild Shock <janburse@fastmail.fm> |
|---|---|
| Date | 2024-09-01 16:03 +0200 |
| Subject | Re: Why cant Scryer Prolog parse this? (Was: France is the Fire Nation of Prolog) |
| Message-ID | <vb1s74$1vl7v$1@solani.org> |
| In reply to | #14168 |
Tau Prolog can do it:
https://github.com/tau-prolog/tau-prolog/issues/286
But Tau Prolog is dead now, or hibernating for
more than 12 months already. So the more lenient
behaviour has already been ossified in this Prolog system.
Another argument not in favor, it also makes parsing
more non-monotonic, if you introduce the "shall" condition,
because its a negative parsing condition.
```
$ target/release/scryer-prolog
?- X = (table = table).
X = (table=table).
?- use_module(library(tabling)).
true.
?- X = (table = table).
error(syntax_error(incomplete_reduction),read_term/3:1).
```
Maybe introducing more than rather less operator table
dependencies in a grammar is always a mistake? A further
use case is (!)/1 in TPTP syntax.
Mild Shock schrieb:
> Hi,
>
> Why cant Scryer Prolog parse this?
>
> scryer-prolog$ target/release/scryer-prolog -v
> v0.9.4-165-g12a61cdf
>
> scryer-prolog$ target/release/scryer-prolog
>
> ?- current_op(X, Y, *).
> X = 400, Y = yfx.
>
> ?- X = (* = *).
> error(syntax_error(incomplete_reduction),read_term/3:1).
>
> On the other hand Trealla Prolog has no problem:
>
> trealla$ ./tpl -v
> Trealla Prolog (c) Infradig 2020-2024, v2.55.31
>
> trealla$ ./tpl
> ?- current_op(X, Y, *).
> X = 400, Y = yfx.
>
> ?- X = (* = *).
> X = ((*)=(*)).
>
> What LEX / YACC did they use? Holy cow!
>
> Bye
>
> Mild Shock schrieb:
>> Is Canada also France? Seems I am not the only one who got
>> into struggle with Logtalk sooner or later. LoL
>>
>> How its started:
>> Ticket raised by me Aug 9, 2021 (when I was "ghost")
>> Feature request flag dialect, maybe version and version_data
>> https://github.com/mthom/scryer-prolog/issues/1017
>>
>> How its going:
>> Commit by pmoura last week
>> Delete Scryer Prolog support due to this system refusal to
>> support the de facto standard `version_data` flag
>> https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c
>>
>>
>> What happened?
>>
>> LoL
>>
>
[toc] | [prev] | [next] | [standalone]
| From | Mild Shock <janburse@fastmail.fm> |
|---|---|
| Date | 2024-09-01 16:29 +0200 |
| Subject | Re: Why cant Scryer Prolog parse this? (Was: France is the Fire Nation of Prolog) |
| Message-ID | <vb1tno$21359$1@solani.org> |
| In reply to | #14169 |
Ok, my bad, prefix (table) is probably
not the best example. This example works better:
scryer-prolog$ target/release/scryer-prolog
?- X = (#\/ = #\/).
X = (#\/ = #\/).
?- use_module(library(clpz)).
true.
?- X = (#\/ = #\/).
error(syntax_error(incomplete_reduction),read_term/3:1).
versus:
trealla$ ./tpl
?- X = (#\/ = #\/).
X = (#\/ = #\/) .
?- use_module(library(clpz)).
true.
?- X = (#\/ = #\/).
X = ((#\/)=(#\/)).
Mild Shock schrieb:
> Tau Prolog can do it:
>
> https://github.com/tau-prolog/tau-prolog/issues/286
>
> But Tau Prolog is dead now, or hibernating for
> more than 12 months already. So the more lenient
> behaviour has already been ossified in this Prolog system.
>
> Another argument not in favor, it also makes parsing
> more non-monotonic, if you introduce the "shall" condition,
> because its a negative parsing condition.
> ```
> $ target/release/scryer-prolog
> ?- X = (table = table).
> X = (table=table).
>
> ?- use_module(library(tabling)).
> true.
>
> ?- X = (table = table).
> error(syntax_error(incomplete_reduction),read_term/3:1).
> ```
> Maybe introducing more than rather less operator table
> dependencies in a grammar is always a mistake? A further
> use case is (!)/1 in TPTP syntax.
>
> Mild Shock schrieb:
>> Hi,
>>
>> Why cant Scryer Prolog parse this?
>>
>> scryer-prolog$ target/release/scryer-prolog -v
>> v0.9.4-165-g12a61cdf
>>
>> scryer-prolog$ target/release/scryer-prolog
>>
>> ?- current_op(X, Y, *).
>> X = 400, Y = yfx.
>>
>> ?- X = (* = *).
>> error(syntax_error(incomplete_reduction),read_term/3:1).
>>
>> On the other hand Trealla Prolog has no problem:
>>
>> trealla$ ./tpl -v
>> Trealla Prolog (c) Infradig 2020-2024, v2.55.31
>>
>> trealla$ ./tpl
>> ?- current_op(X, Y, *).
>> X = 400, Y = yfx.
>>
>> ?- X = (* = *).
>> X = ((*)=(*)).
>>
>> What LEX / YACC did they use? Holy cow!
>>
>> Bye
>>
>> Mild Shock schrieb:
>>> Is Canada also France? Seems I am not the only one who got
>>> into struggle with Logtalk sooner or later. LoL
>>>
>>> How its started:
>>> Ticket raised by me Aug 9, 2021 (when I was "ghost")
>>> Feature request flag dialect, maybe version and version_data
>>> https://github.com/mthom/scryer-prolog/issues/1017
>>>
>>> How its going:
>>> Commit by pmoura last week
>>> Delete Scryer Prolog support due to this system refusal to
>>> support the de facto standard `version_data` flag
>>> https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c
>>>
>>>
>>> What happened?
>>>
>>> LoL
>>>
>>
>
[toc] | [prev] | [next] | [standalone]
| From | Mild Shock <janburse@fastmail.fm> |
|---|---|
| Date | 2024-09-01 19:05 +0200 |
| Subject | Re: Why cant Scryer Prolog parse this? (Was: France is the Fire Nation of Prolog) |
| Message-ID | <vb26sc$217u3$1@solani.org> |
| In reply to | #14170 |
Interstingly SICStus Prolog, which is the sequel to Quintus, does not impose the same restriction as Scryer Prolog: /* SICStus 4.9.0 */ | ?- current_op(X, Y, *). X = 400, Y = yfx ? ; no | ?- X = (* = *). X = ((*)=(*)) ? yes So what went wrong in the ISO standard. There are so many idiosyncratic things in the ISO standard, that are only found in GNU Prolog. So they took GNU Prolog as the template for the language syntax and ignored all other Prolog systems? Its not 100% true. SICStus Prolog has also some idiosyncratic things like: /* SICStus 4.9.0 */ | ?- X = (- 1), write_canonical(X), nl. -1 X = -1 ? | ?- X = (-1), write_canonical(X), nl. -1 X = -1 ? Compare to SWI-Prolog: /* SWI-Prolog 9.3.8 */ ?- X = (- 1), write_canonical(X), nl. -(1) X = - 1. ?- X = (-1), write_canonical(X), nl. -1 X = -1. I like the SWI-Prolog behaviour better... Mild Shock schrieb: > Ok, my bad, prefix (table) is probably > not the best example. This example works better: > > scryer-prolog$ target/release/scryer-prolog > ?- X = (#\/ = #\/). > X = (#\/ = #\/). > ?- use_module(library(clpz)). > true. > ?- X = (#\/ = #\/). > error(syntax_error(incomplete_reduction),read_term/3:1). > > versus: > > trealla$ ./tpl > ?- X = (#\/ = #\/). > X = (#\/ = #\/) . > ?- use_module(library(clpz)). > true. > ?- X = (#\/ = #\/). > X = ((#\/)=(#\/)). > > Mild Shock schrieb: >> Tau Prolog can do it: >> >> https://github.com/tau-prolog/tau-prolog/issues/286 >> >> But Tau Prolog is dead now, or hibernating for >> more than 12 months already. So the more lenient >> behaviour has already been ossified in this Prolog system. >> >> Another argument not in favor, it also makes parsing >> more non-monotonic, if you introduce the "shall" condition, >> because its a negative parsing condition. >> ``` >> $ target/release/scryer-prolog >> ?- X = (table = table). >> X = (table=table). >> >> ?- use_module(library(tabling)). >> true. >> >> ?- X = (table = table). >> error(syntax_error(incomplete_reduction),read_term/3:1). >> ``` >> Maybe introducing more than rather less operator table >> dependencies in a grammar is always a mistake? A further >> use case is (!)/1 in TPTP syntax. >> >> Mild Shock schrieb: >>> Hi, >>> >>> Why cant Scryer Prolog parse this? >>> >>> scryer-prolog$ target/release/scryer-prolog -v >>> v0.9.4-165-g12a61cdf >>> >>> scryer-prolog$ target/release/scryer-prolog >>> >>> ?- current_op(X, Y, *). >>> X = 400, Y = yfx. >>> >>> ?- X = (* = *). >>> error(syntax_error(incomplete_reduction),read_term/3:1). >>> >>> On the other hand Trealla Prolog has no problem: >>> >>> trealla$ ./tpl -v >>> Trealla Prolog (c) Infradig 2020-2024, v2.55.31 >>> >>> trealla$ ./tpl >>> ?- current_op(X, Y, *). >>> X = 400, Y = yfx. >>> >>> ?- X = (* = *). >>> X = ((*)=(*)). >>> >>> What LEX / YACC did they use? Holy cow! >>> >>> Bye >>> >>> Mild Shock schrieb: >>>> Is Canada also France? Seems I am not the only one who got >>>> into struggle with Logtalk sooner or later. LoL >>>> >>>> How its started: >>>> Ticket raised by me Aug 9, 2021 (when I was "ghost") >>>> Feature request flag dialect, maybe version and version_data >>>> https://github.com/mthom/scryer-prolog/issues/1017 >>>> >>>> How its going: >>>> Commit by pmoura last week >>>> Delete Scryer Prolog support due to this system refusal to >>>> support the de facto standard `version_data` flag >>>> https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c >>>> >>>> >>>> What happened? >>>> >>>> LoL >>>> >>> >> >
[toc] | [prev] | [standalone]
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
Back to top | Article view | comp.lang.prolog
csiph-web