ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Metapost through context incorrect `hex` function output
@ 2025-05-09  9:30 Yann Herklotz
  2025-05-11 22:09 ` [NTG-context] " Hans Hagen via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Yann Herklotz @ 2025-05-09  9:30 UTC (permalink / raw)
  To: ntg-context

Hi,

I have found that the metapost `hex` function outputs a strange result 
when run through `context`.  I'm not quite sure what is leading to this 
output, maybe `hex` is redefined in `metafun`?

To reproduce, place the following in test.mp:

```
show hex "8d";
```

Then run `mpost`, which results in the correct value:

```
mpost -numbersystem=double test.mp
...
 >> 141
```

Running the following in context results in the following instead:

```
context test.mp
...
 >> 56
```

For some more details on tool versions:

ConTeXt: ConTeXt  ver: 2025.04.28 14:29 LMTX  fmt: 2025.5.7  int: 
english/english
Metafun: metafun xl 2025-5-9 11:26
Metapost: version 2.02 (TeX Live 2023) (kpathsea version 6.3.5)

For some reason I couldn't manage to load `metafun` in `mpost` directly 
to test it outside of ConTeXt, getting:

```
! I can't open file `metafun.mpii'.
l.6     input metafun.mpii
```

Thanks in advance,
Yann


-- 
Yann Herklotz

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Metapost through context incorrect `hex` function output
  2025-05-09  9:30 [NTG-context] Metapost through context incorrect `hex` function output Yann Herklotz
@ 2025-05-11 22:09 ` Hans Hagen via ntg-context
  2025-05-20  8:22   ` Yann Herklotz
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen via ntg-context @ 2025-05-11 22:09 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 5/9/2025 11:30 AM, Yann Herklotz wrote:
> Hi,
> 
> I have found that the metapost `hex` function outputs a strange result 
> when run through `context`.  I'm not quite sure what is leading to this 
> output, maybe `hex` is redefined in `metafun`?

just not implemented ... i pushed an update so you can check the binary 
from the build farm

> To reproduce, place the following in test.mp:
> 
> ```
> show hex "8d";
> ```
> 
> Then run `mpost`, which results in the correct value:
> 
> ```
> mpost -numbersystem=double test.mp
> ...
>  >> 141
> ```
> 
> Running the following in context results in the following instead:
> 
> ```
> context test.mp
> ...
>  >> 56
> ```
> 
> For some more details on tool versions:
> 
> ConTeXt: ConTeXt  ver: 2025.04.28 14:29 LMTX  fmt: 2025.5.7  int: 
> english/english
> Metafun: metafun xl 2025-5-9 11:26
> Metapost: version 2.02 (TeX Live 2023) (kpathsea version 6.3.5)
> 
> For some reason I couldn't manage to load `metafun` in `mpost` directly 
> to test it outside of ConTeXt, getting:
> 
> ```
> ! I can't open file `metafun.mpii'.
> l.6     input metafun.mpii
> ```
> 
> Thanks in advance,
> Yann
> 
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Metapost through context incorrect `hex` function output
  2025-05-11 22:09 ` [NTG-context] " Hans Hagen via ntg-context
@ 2025-05-20  8:22   ` Yann Herklotz
  2025-05-20  8:30     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Yann Herklotz @ 2025-05-20  8:22 UTC (permalink / raw)
  To: ntg-context

 > just not implemented ... i pushed an update so you can check the 
binary from the build farm

Oh thanks! I wasn't aware that there was a separate implementation in LMTX.

All the best,
Yann


On 12/05/2025 00:09, Hans Hagen via ntg-context wrote:
> On 5/9/2025 11:30 AM, Yann Herklotz wrote:
>> Hi,
>>
>> I have found that the metapost `hex` function outputs a strange result 
>> when run through `context`.  I'm not quite sure what is leading to 
>> this output, maybe `hex` is redefined in `metafun`?
> 
> just not implemented ... i pushed an update so you can check the binary 
> from the build farm
> 
>> To reproduce, place the following in test.mp:
>>
>> ```
>> show hex "8d";
>> ```
>>
>> Then run `mpost`, which results in the correct value:
>>
>> ```
>> mpost -numbersystem=double test.mp
>> ...
>>  >> 141
>> ```
>>
>> Running the following in context results in the following instead:
>>
>> ```
>> context test.mp
>> ...
>>  >> 56
>> ```
>>
>> For some more details on tool versions:
>>
>> ConTeXt: ConTeXt  ver: 2025.04.28 14:29 LMTX  fmt: 2025.5.7  int: 
>> english/english
>> Metafun: metafun xl 2025-5-9 11:26
>> Metapost: version 2.02 (TeX Live 2023) (kpathsea version 6.3.5)
>>
>> For some reason I couldn't manage to load `metafun` in `mpost` 
>> directly to test it outside of ConTeXt, getting:
>>
>> ```
>> ! I can't open file `metafun.mpii'.
>> l.6     input metafun.mpii
>> ```
>>
>> Thanks in advance,
>> Yann
>>
>>
> 
> 

-- 
Yann Herklotz

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Metapost through context incorrect `hex` function output
  2025-05-20  8:22   ` Yann Herklotz
@ 2025-05-20  8:30     ` Hans Hagen
  2025-05-20 13:30       ` Yann Herklotz
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2025-05-20  8:30 UTC (permalink / raw)
  To: ntg-context

On 5/20/2025 10:22 AM, Yann Herklotz wrote:
>  > just not implemented ... i pushed an update so you can check the 
> binary from the build farm
> 
> Oh thanks! I wasn't aware that there was a separate implementation in LMTX.

Side note: the source code has been reorganized, cleaned up a bit, and 
additional primitives and features have been added so for lmtx one can 
also have a look at the luametafun manual (in addition to metafun). The 
basics are to be the same of course (like this hex, although that one 
actually can be implemented more powerful with some lua help).

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Metapost through context incorrect `hex` function output
  2025-05-20  8:30     ` Hans Hagen
@ 2025-05-20 13:30       ` Yann Herklotz
  0 siblings, 0 replies; 5+ messages in thread
From: Yann Herklotz @ 2025-05-20 13:30 UTC (permalink / raw)
  To: ntg-context

Ah thanks for the pointer, I did not know about the luametafun manual, 
that looks like a great resource.

Thanks,
Yann


On 20/05/2025 10:30, Hans Hagen wrote:
> On 5/20/2025 10:22 AM, Yann Herklotz wrote:
>>  > just not implemented ... i pushed an update so you can check the 
>> binary from the build farm
>>
>> Oh thanks! I wasn't aware that there was a separate implementation in 
>> LMTX.
> 
> Side note: the source code has been reorganized, cleaned up a bit, and 
> additional primitives and features have been added so for lmtx one can 
> also have a look at the luametafun manual (in addition to metafun). The 
> basics are to be the same of course (like this hex, although that one 
> actually can be implemented more powerful with some lua help).
> 
> Hans
> 
> 
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry 
> to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ 
> ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________

-- 
Yann Herklotz

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-20 13:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-09  9:30 [NTG-context] Metapost through context incorrect `hex` function output Yann Herklotz
2025-05-11 22:09 ` [NTG-context] " Hans Hagen via ntg-context
2025-05-20  8:22   ` Yann Herklotz
2025-05-20  8:30     ` Hans Hagen
2025-05-20 13:30       ` Yann Herklotz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).