[m-users.] A question of style...

Sean Charles (emacstheviking) objitsu at gmail.com
Sat Mar 5 08:03:36 AEDT 2022


OK, published it warts and all, spotted one or two issues in the blog article but right now I am burned out on a Friday night and I still have two episodes of Start Trek Discovery to get through and latest Raised By Wolves,....

http://seancharles.xyz/posts/2022-03-03-mercury-and-nano-a-plugin.html <http://seancharles.xyz/posts/2022-03-03-mercury-and-nano-a-plugin.html>

https://github.com/emacstheviking/mercury-pberr <https://github.com/emacstheviking/mercury-pberr>

I still say 'Thanks Paul' though because writing this has cheered me up as to how well I am getting to know Mercury...I never thought I'd make it this far!

All the best, thanks all once again.,

Sean.


> On 4 Mar 2022, at 12:05, Sean Charles (emacstheviking) <objitsu at gmail.com> wrote:
> 
> Good point about the undo, after running, using 'undo' reverts the entire buffer and seems happy to play ball!
> I finished it late last night and after a small horror moment about wondering if I wasted my efforts (I don't think I did), I tweaked some nano stuff and finally it works.
> 
> I added a syntax rule so that `error lines` show up in red, and they are inserted as comments so they don't stuff up the next run of the compiler... the rule is that yo read it, act on it, delete it. Seems to be working well for me. Today I will finish up the blog post, upload a new GitHub project with the offending code and then... just maybe I will make a small YT video... I've always held back because, being from the West-Country (Devon, not SW London) I hate the sound of my own voice, something of a barrier to making commentary coding content. At age 56 you'd think I'd given up caring but obv. not.
> 
> But it triggered a short-sharp creative burst of recreational Mercury which has to be worth it every time.
> 
> ....so....I just spent some time reading the code for your version...I learned some stuff and you have a much better way of parsing errors IMO... it's also funny how two people can approach the same fundamental problem and come up with two widely differing code sets! This is why software is art, not engineering, for me it is anyway.
> 
> Well, warts and all, mine is going live and I continue to use it because I wrote it. I will be studying your code more too! It's definitely way more idiomatic and where I want to be heading towards.
> 
> :D
> 
> Sean
> 
> 
>> On 3 Mar 2022, at 23:04, Paul Bone <paul at bone.id.au <mailto:paul at bone.id.au>> wrote:
>> 
>> On Thu, Mar 03, 2022 at 10:57:13PM +0000, Sean Charles (emacstheviking) wrote:
>>> OK, a teaser... in the last hour I just finished 'it' and it works well enough for me to be a third of the way writing up a small blog post about it...for one awful moment I thought I'd wasted my time with it. Stay tuned...
>>> 
>>> ...but...
>>> 
>>> ...in one of your videos you mentioned something called 'err' which you said puts errors into the source so you can read it. I thought that was such an elegantly simple idea I immediately chose to write one for nano and integrate it via the external formatter command. Nano, with a hand rolled syntax file based on the prolog one, is my editor of choice now for Mercury, and Kitty.app, the BEST terminal emulator I've discovered.
>> 
>> "error".  It's going to be hard to find using google.
>> 
>> https://github.com/Mercury-Language/mercury/tree/master/extras/error <https://github.com/Mercury-Language/mercury/tree/master/extras/error>
>> 
>> Which of course is so simple that it works with any editor.  Provided you're
>> happy to reload the file each time you compile, which has the side-effect of
>> loosing your undo list.  Having something more tightly integrated with the
>> editor is going to be smoother to use (so it's cool you're working on that).
>> 
>>> In the next day or so I will push the code to github, publish the post and reveal all! TBH I could have achieved the same thing in a few lines of python code but...that's day job stuff, and besides I am so utterly into Mercury that I don't really need much of a reason to go off on a tangential hacking spree with it!
>>> 
>>> Plasma looks cool too. Irony.
>> 
>> Thanks.
>> 
>> 
>> -- 
>> Paul Bone
>> http://paul.bone.id.au <http://paul.bone.id.au/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20220304/fc5f5d34/attachment-0001.html>


More information about the users mailing list