Running Swi-prolog with Windows 10 has some minor but irritating problems

160 views
Skip to first unread message

PV

unread,
Aug 29, 2016, 11:38:52 AM8/29/16
to swi-p...@googlegroups.com
Minor problems, they don't produce errors, Swi-prolog is still very well usable. My previous machine with Swi-Prolog was Windows XP, no problems there, I am comparing to XP experience.

EDIT3: My Swi-Prolog is a version 7.3.24

1)The Swi-prolog development GUI windows, they don't jump to top of all windows. Possibly when there are lots of windows, from all sorts of applications not just from Swi-prolog.

For example, when switching from  command line to help (internal help) window, the help-window gets activated, but it remains behind all windows.

Workaround: find the window, and click it with mouse

2)Also the make/0 command many times, makes the whole Swi-prolog, sometime it doesn't. EDIT: I am using make frome Emacs menu EDIT2: Not the whole Swi-Prolog, but the xpce-stuff, it seems.

Workaround: use Compile buffer-command from Emacs menu

Make output has these weird lines quite often:
% :- pce_global: Renamed @emacs_tab_popup into @emacs_tab_popup2
% :- pce_global: Renamed @emacs_idle_timer into @emacs_idle_timer3

Here is a full make output. From a make, that should have compiled only the current file simpmath/a.pl

% c:/users/john/documents/prolog/simpmath/a compiled into a 0.03 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/pce loaded into pce 0.02 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_expand compiled into pce_expand 0.00 sec, 0 clauses
%   library('english/pce_messages') compiled into pce_messages 0.02 sec, 0 clauses
%  ../lib/swi_compatibility compiled into pce_compatibility_layer 0.02 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_pl compiled into pce_host 0.03 sec, 0 clauses
%  library('english/pce_messages') compiled into pce_messages 0.02 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/swi_compatibility compiled into pce_compatibility_layer 0.03 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/english/pce_messages compiled into pce_messages 0.00 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_principal compiled into pce_principal 0.03 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_error compiled into pce_error 0.02 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_global compiled into pce_global 0.00 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_expansion compiled into pce_expansion 0.05 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_realise compiled into pce_realise 0.03 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_goal_expansion compiled into pce_goal_expansion 0.00 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_autoload compiled into pce_autoload 0.00 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_editor compiled into editor_buttons 0.00 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_keybinding compiled into pce_keybinding 0.03 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/boot/pce_portray compiled into pce_portray 0.00 sec, 0 clauses
% :- pce_global: Renamed @emacs_tab_popup into @emacs_tab_popup2
% :- pce_global: Renamed @emacs_idle_timer into @emacs_idle_timer3
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/emacs loaded into emacs 0.05 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/window compiled into emacs_frame 0.13 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/buffer compiled into emacs_buffer 0.05 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/application compiled into emacs_application 0.05 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/buffer_menu compiled into emacs_buffer_menu 0.02 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/server compiled into emacs_server 0.00 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/history compiled into emacs_history 0.02 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/fundamental_mode compiled into emacs_fundamental_mode 0.08 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/language_mode compiled into emacs_language_mode 0.08 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/outline_mode compiled into emacs_outline_mode 0.02 sec, 0 clauses
% c:/program files (x86)/swipl/xpce/prolog/lib/emacs/bookmarks compiled into emacs_bookmarks 0.08 sec, 0 clauses

Thanks.

Jan Wielemaker

unread,
Aug 29, 2016, 4:01:19 PM8/29/16
to PV, SWI-Prolog
On 08/29/2016 05:38 PM, PV wrote:
> Minor problems, they don't produce errors, Swi-prolog is still very well
> usable. My previous machine with Swi-Prolog was Windows XP, no problems
> there, I am comparing to XP experience
>
> 1)The Swi-prolog development GUI windows, they don't jump to top of all
> windows. Possibly when there are lots of windows, from all sorts of
> applications not just from Swi-prolog.
>
> For example, when switching from command line to help (internal help)
> window, the help-window gets activated, but it remains behind all windows.
>
> Workaround: find the window, and click it with mouse

Are you comparing the same Prolog versions? Since some time the default
is to run the GUI (xpce) in its own thread. This allows the GUI to work
while computation is going on in the foreground. I vaguely recall you
need to tell Windows that a thread should present its windows in the
foreground. Could you try

?- set_prolog_flag(xpce_threaded, false).

before anything else and see whether the problem persists? If this fixes
it, the above could be the problem and some archaeological work may give
me a work-around as this also happened when the multi-threaded console
was added.

> 2)Also the make/0 command many times, makes the whole Swi-prolog,
> sometime it doesn't

This is an old problem that used to happen after a daylight saving time
change. .QLF files store the file modification timestamp for the files
it was created from. After loading, these times are associated with the
files as modification time associated with the compilation. Make/0
reloads all files for which this time stamp has changed. Somehow, these
results can be inconsistent for Windows. If anyone has a clue why,
please share it.

Cheers --- Jan
> --
> You received this message because you are subscribed to the Google
> Groups "SWI-Prolog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swi-prolog+...@googlegroups.com
> <mailto:swi-prolog+...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/swi-prolog.
> For more options, visit https://groups.google.com/d/optout.

PV

unread,
Aug 30, 2016, 11:34:19 AM8/30/16
to SWI-Prolog
I am now using the
:- set_prolog_flag(xpce_threaded, false).  
setting in my swipl.ini-file.

With a 20 minutes of experience, I can confirm that both problems were fixed.

Thanks!

Jan Wielemaker

unread,
Aug 30, 2016, 12:12:01 PM8/30/16
to PV, SWI-Prolog
On 08/30/2016 05:34 PM, PV wrote:
> I am now using the
> |
> :-set_prolog_flag(xpce_threaded,false).
> |
> setting in my swipl.ini-file.
>
> With a 20 minutes of experience, I can confirm that both problems were
> fixed.

Hmmm. The background windows I can imagine. The make/0 problem cannot
reasonably be depending on this flag. Can you toggle the flag and
verify? If make/0 *does* really depend on threading it might give a
hint.

Thanks so far --- Jan

>
> Thanks!
>
> On Monday, August 29, 2016 at 6:38:52 PM UTC+3, PV wrote:
>
> Minor problems, they don't produce errors, Swi-prolog is still very
> well usable. My previous machine with Swi-Prolog was Windows XP, no
> problems there, I am comparing to XP experience.
>
> EDIT3: My Swi-Prolog is a version 7.3.24
>
> 1)The Swi-prolog development GUI windows, they don't jump to top of
> all windows. Possibly when there are lots of windows, from all sorts
> of applications not just from Swi-prolog.
>
> For example, when switching from command line to help (internal
> help) window, the help-window gets activated, but it remains behind
> all windows.
>
> Workaround: find the window, and click it with mouse
>
> 2)Also the make/0 command many times, makes the whole Swi-prolog,
> sometime it doesn't. EDIT: I am using make frome Emacs menu EDIT2:
> Not the whole Swi-Prolog, but the xpce-stuff, it seems.
>
> Workaround: use Compile buffer-command from Emacs menu
>
> Make output has these weird lines quite often:
> % :- pce_global: Renamed @emacs_tab_popup into @emacs_tab_popup2
> % :- pce_global: Renamed @emacs_idle_timer into @emacs_idle_timer3
>
> Here is a full make output. From a make, that should have compiled
> only the current file simpmath/a.pl <http://a.pl>

Jan Wielemaker

unread,
Aug 30, 2016, 12:39:23 PM8/30/16
to PV, SWI-Prolog
On 08/30/2016 05:34 PM, PV wrote:
> I am now using the
> |
> :-set_prolog_flag(xpce_threaded,false).
> |
> setting in my swipl.ini-file.
>
> With a 20 minutes of experience, I can confirm that both problems were
> fixed.

Hmmm. The code that make windows think that windows created from the
background
thread must be treated as normal foreground windows seems present. If
you search
on "windows 10 new window opens behind existing window" you find lots of
hints and
many applications seem to suffer. One of them is the following registry
setting:
https://technet.microsoft.com/en-us/library/cc957208.aspx

I try to stay as far as possible away from Windows, so I can't comment. If
the above helps, fine. It does cripple development while programs are
running
as well as debugging background tasks.

Cheers --- Jan

>
> Thanks!
>
> On Monday, August 29, 2016 at 6:38:52 PM UTC+3, PV wrote:
>
> Minor problems, they don't produce errors, Swi-prolog is still very
> well usable. My previous machine with Swi-Prolog was Windows XP, no
> problems there, I am comparing to XP experience.
>
> EDIT3: My Swi-Prolog is a version 7.3.24
>
> 1)The Swi-prolog development GUI windows, they don't jump to top of
> all windows. Possibly when there are lots of windows, from all sorts
> of applications not just from Swi-prolog.
>
> For example, when switching from command line to help (internal
> help) window, the help-window gets activated, but it remains behind
> all windows.
>
> Workaround: find the window, and click it with mouse
>
> 2)Also the make/0 command many times, makes the whole Swi-prolog,
> sometime it doesn't. EDIT: I am using make frome Emacs menu EDIT2:
> Not the whole Swi-Prolog, but the xpce-stuff, it seems.
>
> Workaround: use Compile buffer-command from Emacs menu
>
> Make output has these weird lines quite often:
> % :- pce_global: Renamed @emacs_tab_popup into @emacs_tab_popup2
> % :- pce_global: Renamed @emacs_idle_timer into @emacs_idle_timer3
>
> Here is a full make output. From a make, that should have compiled
> only the current file simpmath/a.pl <http://a.pl>
Reply all
Reply to author
Forward
0 new messages