[m-users.] Cartesian product of two sets of things.
Sean Charles (emacstheviking)
objitsu at gmail.com
Mon Oct 9 21:54:45 AEDT 2023
I know I did but that's me being me!
So far, Mercury has only impressed me with how pleasant writing a game can be.
I was reading the source code for the array module, trying to get some ideas on how I might implement a module that could allocate a fixed block of memory for N slots of a du type and then provide an interface to it so I can walk that block using just pointer arithmetic, and then, given a pointer, which would be declared as a mercury type too, provide some update methods to either write a single field or, given a fully populated du instance, copy all the fields in one go.
From what I've seen I think it wouldn't be that hard, it would bevery interesting for me to do and I'd learn a lot.
In the future I'd like to try using Mercury as the means to write code for the Godot game engine system too:
https://godotengine.org/article/introducing-gd-extensions/
As usual, day jobs and other stuff are time bandits.
> On 9 Oct 2023, at 11:45, Volker Wysk <post at volker-wysk.de> wrote:
>
> You're welcome.
>
> I'm not sure how efficient this is, though. You wanted to have maximum
> efficiency before, for your game...
>
> Cheers,
> Volker
>
> Am Montag, dem 09.10.2023 um 11:34 +0100 schrieb Sean Charles
> (emacstheviking):
>> Nice, I'm stealing that! I will adapt it, and of course your name will be carved in pixels in the ether in a comment in a game that nobody will ever see!
>>
>> Thanks Volker.
>>
>> :)
>>
>>
>>> On 9 Oct 2023, at 10:08, Volker Wysk <post at volker-wysk.de> wrote:
>>>
>>> Am Montag, dem 09.10.2023 um 11:04 +0200 schrieb Volker Wysk:
>>>> :- pred cart_prod(set(T)::in, set(U)::in, set(pair(T, U))::out) is det.
>>>
>>> Oops, that should be:
>>>
>>> :- pred cart_prod(set(T)::in, set(U)::in, list(pair(T, U))::out) is det.
>>>
>>> Volker
>>> _______________________________________________
>>> users mailing list
>>> users at lists.mercurylang.org
>>> https://lists.mercurylang.org/listinfo/users
>>
>
> _______________________________________________
> 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/20231009/0cab2a8c/attachment-0001.html>
More information about the users
mailing list