Where communities thrive


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

    pmoura on master

    Improve documentation of the `g… (compare)

  • 12:48

    pmoura on master

    Update version to 3.54.0-b01 in… Update `issue_creator` tool doc… (compare)

  • Jan 20 19:03

    pmoura on lgt3530stable

    (compare)

  • Jan 20 18:25

    pmoura on master

    Update copyright notice in the … (compare)

  • Jan 20 18:21

    pmoura on master

    Change version to 3.53.0 stable… (compare)

  • Jan 20 14:55

    pmoura on master

    Update `issue_creator` tool to … Update SVG diagrams (compare)

  • Jan 20 14:29

    pmoura on master

    Minor `issue_creator` tool docu… Update Trealla Prolog adapter f… (compare)

  • Jan 20 12:56

    pmoura on master

    Fix `issue_creator` tool bug re… (compare)

  • Jan 19 18:50

    pmoura on master

    Improve documentation of the `p… (compare)

  • Jan 18 12:52

    pmoura on master

    Fix sidebar links between the H… (compare)

  • Jan 17 22:47

    pmoura on master

    Improve documentation of the ne… (compare)

  • Jan 17 15:14

    pmoura on master

    Update `issue_creator` tool to … (compare)

  • Jan 17 14:23

    pmoura on master

    Update `issue_creator` tool wit… Update SVG diagrams (compare)

  • Jan 17 11:56

    pmoura on master

    Fix the `issue_creator` tool to… (compare)

  • Jan 16 17:54

    pmoura on master

    Improve documentation of the ne… (compare)

  • Jan 15 22:08

    pmoura on master

    Improve documentation of the ne… (compare)

  • Jan 15 12:08

    pmoura on master

    Update `issue_creator` tool to … (compare)

  • Jan 15 10:57

    pmoura on master

    Fix `intervals` library `f/2` s… (compare)

  • Jan 14 18:14

    pmoura on master

    Delete unused predicate in the … Update SVG diagrams (compare)

  • Jan 14 17:58

    pmoura on master

    Improve documentation of the ne… (compare)

A Man With A Clever Disguise
@ACleverDisguise
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.
OK, I found the path.
Paulo Moura
@pmoura
Ok.
?
A Man With A Clever Disguise
@ACleverDisguise
If I load the tester.lgt by itself the flag is clear because of course it is.
I need to load debug first, then tester, to have the debug flag set.
Paulo Moura
@pmoura
It may be simpler to remove the calls to set_logtalk_flag(debug,on) from those initialization directives and just call this goal at the top-level (assuming here you're doing interactive debugging) when you want to see the debug messages.
A Man With A Clever Disguise
@ACleverDisguise
Probably, yes.
Well, when I'm debugging I will always want to see them. It's when I run just the tester that I'll do it manually.
Paulo Moura
@pmoura
You can always have multiple loader files, e.g. loader.lgt, loader_debug.lgt, ...
A Man With A Clever Disguise
@ACleverDisguise
I was trying to be too tricky for my own good by having a root loader that gets modified depending on if I want to debug, test, etc.
I'll just stop trying to be too DRY.
It's not as if these scripts change a lot.
Paulo Moura
@pmoura
Your loader_debug.lgt file can simply do logtalk_load(loader) +set_logtalk_flag(debug,on)` + ... so you would still use a single root loader file and derive from it in a minmal way.
A Man With A Clever Disguise
@ACleverDisguise
OK, we're back to this.
debug is on, manually confirmed.
Not a single print_message in the debug domain got printed.
If I change it to information, they all get printed.
So even manually turning the debug flag on before loading the tester still gives me tests that don't display debug messages.
Paulo Moura
@pmoura
You can use the object_property/2 predicate to check the properties of the object containing those calls.
A Man With A Clever Disguise
@ACleverDisguise
Not sure what I'm checking for? debugging is set, among a host of others that don't seem relevant.
Paulo Moura
@pmoura
Contents of the tester.lgt file?
A Man With A Clever Disguise
@ACleverDisguise
:- initialization((
    set_logtalk_flag(report, warnings),
    logtalk_load(loader),
    logtalk_load(lgtunit(loader)),
    logtalk_load(two3tree, [source_data(on), debug(on)]),
    logtalk_load(tests, [hook(lgtunit)]),
    tests::run
)).
Paulo Moura
@pmoura
And the debug message printing calls are in the two2three file?
A Man With A Clever Disguise
@ACleverDisguise
tests file right now.
I'm trying to nail down a problem in the validation predicates in the tests.
Paulo Moura
@pmoura
Can you paste one of the clauses that contain the print message call?
A Man With A Clever Disguise
@ACleverDisguise

First the uses clause that gives me the message in a convenient format. Currently set to information but if I change it to debug it never prints anything.

    :- uses(logtalk, [print_message(information, two3tree_tests, Message) as dbg(Message)]).

Now a typical clause:

    depth(Din, node(L, _, R), Dout) :-
        depth(L, DL),
        depth(R, DR),
        DL == DR, % if the depths don't match, this is a big problem!
        Dout is  Din + DL,
        dbg(depth-(Dout-node2_descend)).
Paulo Moura
@pmoura
That clause is not calling dbg/1. You meant to paste a different one?
A Man With A Clever Disguise
@ACleverDisguise
So that uses clause works. Messages print. But without changing anything else in the code, and after manually turning the debug flag on and confirming it's on, changing it to debug makes it stop working.
Oh, right. Sorry.
Fixed.