[m-users.] newbe tutorial on development workflow and debugging

emacstheviking objitsu at gmail.com
Tue Jul 2 19:57:15 AEST 2019


Yes! I use WuickCheck and Tasty/HUnit all the time when I hack about with
Haskell.
I must admit that until seeing Daneil-s question, I hadn't even read the
debugger portion of the manual! That's on for this evening!

There was a great quote from somebody once along the lines of, "If you are
in the debugger, you failed"...I kind of agree with that but there will
always be times you need it. And the SWI debugger is a most excellent
learning tool too!


On Tue, 2 Jul 2019 at 10:53, Richard O'Keefe <raoknz at gmail.com> wrote:

> It's a real pity that the Mercury port of QuickCheck is broken
> and that there is no Mercury port of SmallCheck.  I have found
> in Haskell that using these test kits is a *wonderful*
> replacement for debugging.
>
>
> On Tue, 2 Jul 2019 at 21:27, emacstheviking <objitsu at gmail.com> wrote:
>
>> Hi Daniel,
>>
>> I have a feeling that "printf debugging" is still viable!
>>
>> Like I said, I use Emacs and that mode for editing and it has a shortcu
>> key to quickly compile the buffer and also run the file if it is
>> self-contained but I am playing with the foreign function stuff to build a
>> wrapper around librabbitmq so I have to build it from the command line but
>> it's no big deal.
>>
>> I believe there *is* a mercury debugger as I have seen reference to
>> things here and there, I can only refer you to chapter 7 in the manual:
>> (I've not used the emacs interface to it)
>>
>>
>> https://www.mercurylang.org/information/doc-latest/mercury_user_guide/Debugging.html#Debugging
>>
>> As a Mercury n00b myself but with several years of intermittent Prolog
>> experience, the switch to Mercury is very interesting in that it makes you
>> more aware of the deerminism and modes of your predicates. And a function
>> is a predicate, remember that!
>>
>> Hope that helps a bit.
>>
>>
>> Sean.
>>
>>
>>
>>
>>
>>
>>
>> On Tue, 2 Jul 2019 at 09:53, Daniel Gross <grossd18 at gmail.com> wrote:
>>
>>> Hi Sean,
>>>
>>> Thanks.
>>>
>>> So, how do you debug your code ... by adding inline writes ...
>>>
>>> I see step by step tracing of a program / debugging as part of the
>>> learning opportunity during problem solving.
>>>
>>> Would emacs be the only way to get a good debugging view -- i understand
>>> that there also exists an eclipse plugin -- but it looks dated.
>>>
>>> thanks,
>>>
>>> Daniel
>>>
>>> On Tue, Jul 2, 2019 at 11:46 AM emacstheviking <objitsu at gmail.com>
>>> wrote:
>>>
>>>> Hi Daniel,
>>>>
>>>> O too am learning Mercury from using Prolog since 2012...and to be
>>>> honest, I use to things daily. Mostly I use Emacs and metal-mercury-mode
>>>> but if that sounds a bit daunting I can also highly recommened using
>>>> Microsofts VSCode (not visual studio). It has a mercury plugin that does
>>>> syntax highlighting and that's all but that's enough.
>>>>
>>>> https://github.com/ahungry/metal-mercury-mode
>>>>
>>>> https://marketplace.visualstudio.com/items?itemName=brendanzab.mercury
>>>>
>>>> I am not sure about the debugging aspect as I have not had cause to use
>>>> one yet.
>>>>
>>>> All thebest,
>>>> Sean.
>>>>
>>>>
>>>> On Tue, 2 Jul 2019 at 09:21, Daniel Gross <grossd18 at gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I am new to Mercury and have done some development work in Prolog. I
>>>>> and am very interested in trying this out -- possibly, as an alternative to
>>>>> C / C++ coding (i.e. to generate high level C code).
>>>>>
>>>>> Is there a tutorial that shows how to set up a development environment
>>>>> and how best to work -- i like interactive work approaches (IDEs) with
>>>>> visual debuggers -- is this possible to do as well?
>>>>>
>>>>> thanks,
>>>>>
>>>>> Daniel
>>>>>
>>>>> _______________________________________________
>>>>> users mailing list
>>>>> users at lists.mercurylang.org
>>>>> https://lists.mercurylang.org/listinfo/users
>>>>>
>>>>
>>>
>>> --
>>>
>>> --
>>> Dr. Daniel Grosshttp://www.linkedin.com/in/grossd18
>>>
>>> “Predicting rain doesn’t count. Building arks does.” — Warren Buffett
>>>
>>> _______________________________________________
>> users mailing list
>> users at lists.mercurylang.org
>> https://lists.mercurylang.org/listinfo/users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20190702/a221219e/attachment.html>


More information about the users mailing list