Where communities thrive


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

    pmoura on master

    Update `lgtunit` tool documenta… (compare)

  • 09:27

    pmoura on master

    Update `lgtunit` tool documenta… (compare)

  • 09:02

    pmoura on master

    Update `tutor` tool for the new… Update SVG diagrams (compare)

  • 08:39

    pmoura on master

    Add linter warnings for missing… (compare)

  • May 20 16:06

    pmoura on master

    Fix `lgtunit` tool QuickCheck i… Update SVG diagrams (compare)

  • May 20 14:01

    pmoura on master

    Fix `arbitrary` library categor… Update SVG diagrams (compare)

  • May 20 10:38

    pmoura on master

    Fix bug in the `arbitrary` libr… (compare)

  • May 19 19:04

    pmoura on master

    Fixes and performance improveme… Update SVG diagrams (compare)

  • May 18 13:36

    pmoura on master

    Change `diagrams` tool `omit_pa… Update SVG diagrams (compare)

  • May 17 16:57

    pmoura on master

    Code refactoring of the check f… (compare)

  • May 17 14:25

    pmoura on master

    Fix cases where predicate name … (compare)

  • May 17 13:13

    pmoura on master

    Improve performance of runtime … (compare)

  • May 17 11:43

    pmoura on master

    Fix `current_predicate/1` and `… (compare)

  • May 17 09:15

    pmoura on master

    Fix bug in previous commit wher… (compare)

  • May 16 17:47

    pmoura on master

    Add support for calls to the da… (compare)

  • May 14 21:28

    pmoura on master

    Fix bugs in the implementation … (compare)

  • May 12 22:18

    pmoura on master

    Update `ports_profiler` tool do… Update SVG diagrams (compare)

  • May 12 11:49

    pmoura on master

    Add support for printing clause… (compare)

  • May 11 21:45

    pmoura on master

    Update `errors` example to illu… (compare)

  • May 10 20:36

    pmoura on master

    Generalize linter check for `fi… (compare)

A Man With A Clever Disguise
@ACleverDisguise
I just installed 3.50.0 on three environments (Windows 10, Windows 10 WSL, Linux Mint) and in none of those cases did it copy settings.lgt forward.
I had to manually copy them forward from the backup.
Paulo Moura
@pmoura
I assume you used the Windows .exe installer? And either the the .deb or the .rpm installers on Linux Mint?
Paulo Moura
@pmoura
Paulo Moura
@pmoura
In the case of Linux and macOS, the backup of the $LOGTALKUSERdirectory and the copy of any settings.lgtor settings.logtalk file is done not by the installers but by running the logtalk_user_setup script. This script is automatically called when the $LOGTALKUSERdirectory is outdated due to a new Logtalk version been installed.
Paulo Moura
@pmoura
Also note that the settings file can be stored in other locations than the $LOGTALKUSERdirectory and thus not affected by the updating of that folder when installing a new Logtalk version.
A Man With A Clever Disguise
@ACleverDisguise
Used .exe for Windows and .deb for Mint, yes.
Different issue I can't fathom: I'm trying to print debug messages. It's not working. I've compiled the .lgt file with debug(on) in the options. I've manually added set_logtalk_flag(debug, on) in the load script. I am manually TYPING set_logtalk_flag(debug, on) in the toplevel. I am checking that current_logtalk_flag(debug, X) binds 'on' to X.
But all of my print_message(debug, component, Message) calls aren't doing a thing.
If I switch that to information, say, it works.
What step am I missing that makes debug messages display? Does it need to be run in the context of the debugger?
Paulo Moura
@pmoura
Printing of debug messages is indepedent of the debugger (which is an application).
You also don't need to compile code that calls logtalk::print_message(debug, component, Message)in debug mode.
Paulo Moura
@pmoura
You may also want to simplify the calls by defining a predicate shortcut. For example:
:- uses(logtalk, [print_message(debug, foo, Message) as dbg(Message)]).
Printing of debug message requires the debug flag to be on when the call is made, not when the code making the calls is compiled.
A Man With A Clever Disguise
@ACleverDisguise
I'm still completely unable to get debug messages to print. information, warning, error, etc. all do, but debug don't.
Paulo Moura
@pmoura
Maybe put the minimal code required to reproduce the issue in a public paste bin?
A Man With A Clever Disguise
@ACleverDisguise
Before that, just a quick question: in my debug.lgt file:
:- initialization((
    logtalk_load(loader),
    logtalk_load(debugger(loader)),
    set_logtalk_flag(debug, on),
    debugger::trace
)).
Paulo Moura
@pmoura
Isn't the loader file loading the code that you want to debug?
A Man With A Clever Disguise
@ACleverDisguise
The loader file loads the library, yes, and compiles it with debug.
Then in the debug file I load the debugger and set the debug flag.
Paulo Moura
@pmoura
Ok.
A Man With A Clever Disguise
@ACleverDisguise
But in circumstances I'm trying to characterize now, when I do current_logtalk_flag/2 I get 'off'.
And that is likely the source of my problems. But I can't figure out when it's turning the flag off.
Paulo Moura
@pmoura
In that initilization/1 directive above, you're turning on the debug flag globally.
A Man With A Clever Disguise
@ACleverDisguise
Yes. That's what I was expecting.
I want my debug messages to display while I'm debugging.
Paulo Moura
@pmoura
After you load the file above containg that initilization/1 directive, current_logtalk_flag(debug,on) should be true and your debug messages should be displayed.
A Man With A Clever Disguise
@ACleverDisguise
There's a path that somehow gets me to that flag being off.
I haven't figured it out, but that's the source of the problem.
The flag is turned off at some point in operations.
Paulo Moura
@pmoura
Nothing in that directive would do that.
Do you have some code compiled in optimized mode?
A Man With A Clever Disguise
@ACleverDisguise
I mess around with {*}, {?}, and loading other helper scripts (like my tester), so one of those may be turning it off again.
Just the library code.
Paulo Moura
@pmoura
And you have debug calls in that library code that you're compiling in optimized mode?
A Man With A Clever Disguise
@ACleverDisguise
No, I mean YOUR standard library. :D
Paulo Moura
@pmoura
Ok.
A Man With A Clever Disguise
@ACleverDisguise
:- initialization((
    logtalk_load([
        dictionaries(loader),
        types(loader)], [optimize(on), debug(off)]),
    logtalk_load([
        two3tree
    ], [optimize(off), debug(on)])
)).
That's the loader script.
Paulo Moura
@pmoura
So, the debug calls that are not printing are iside your application objects?
A Man With A Clever Disguise
@ACleverDisguise
Yes, or my tests.
Paulo Moura
@pmoura
logtalk_load([dictionaries(loader),types(loader)], [optimize(on), debug(off)]) can simply be logtalk_load([dictionaries(loader),types(loader)]).
A Man With A Clever Disguise
@ACleverDisguise
It defaults to optimize and no debug?
I tend to over-specify to establish intent.
Paulo Moura
@pmoura
No. But the loader files for those libraries already ensure they are compiled in optimized mode.
Is two2tree a single file or a loader file?
A Man With A Clever Disguise
@ACleverDisguise
A single file for now.