9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Linking against Plan9 own routines with APE
@ 2021-10-14 16:35 tlaronde
  2021-10-14 16:42 ` Sigrid Solveig Haflínudóttir
  2021-10-14 16:49 ` ori
  0 siblings, 2 replies; 6+ messages in thread
From: tlaronde @ 2021-10-14 16:35 UTC (permalink / raw)
  To: 9fans

For kerTeX, I need to access a time reference with better than the
second.

The answer is nsec(2).

If there is no problem creating an object .o mixing POSIX functions and
nsec(2), when linking, under APE, nsec is not visible in libc.

How can one mix the two, preferably under APE (my framework uses POSIX.2
utilities and I don't want to start making exceptions)?

TIA,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Teb3e52c23bb1bca4-M7acd8b2330d8b7b6494cc680
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] Linking against Plan9 own routines with APE
  2021-10-14 16:35 [9fans] Linking against Plan9 own routines with APE tlaronde
@ 2021-10-14 16:42 ` Sigrid Solveig Haflínudóttir
  2021-10-14 16:46   ` Conor Williams
  2021-10-14 16:49   ` tlaronde
  2021-10-14 16:49 ` ori
  1 sibling, 2 replies; 6+ messages in thread
From: Sigrid Solveig Haflínudóttir @ 2021-10-14 16:42 UTC (permalink / raw)
  To: 9fans

Sorry for not exactly being helpful with your issue, but that one is
the exact reason I started on https://git.sr.ht/~ft/npe.
APE is too limiting and sometimes it's easier to rewrite small parts
of the software being ported with plan 9 libc-specific api.
I also did a small write-up on porting in general some time ago:
http://wiki.9front.org/porting.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Teb3e52c23bb1bca4-M02c029a72d055f22324ee8e0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] Linking against Plan9 own routines with APE
  2021-10-14 16:42 ` Sigrid Solveig Haflínudóttir
@ 2021-10-14 16:46   ` Conor Williams
  2021-10-14 16:49   ` tlaronde
  1 sibling, 0 replies; 6+ messages in thread
From: Conor Williams @ 2021-10-14 16:46 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

Sigrid Solveig Haflinudottir
I have to take issue with your fourth point
Do NOT port anything for the sake of “porting” alone./c:202110015

On Thu, Oct 14, 2021 at 4:44 PM Sigrid Solveig Haflínudóttir <
ftrvxmtrx@gmail.com> wrote:

> Sorry for not exactly being helpful with your issue, but that one is
> the exact reason I started on https://git.sr.ht/~ft/npe.
> APE is too limiting and sometimes it's easier to rewrite small parts
> of the software being ported with plan 9 libc-specific api.
> I also did a small write-up on porting in general some time ago:
> http://wiki.9front.org/porting.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Teb3e52c23bb1bca4-Mb86efd65b857243096485eae
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 2263 bytes --]

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

* Re: [9fans] Linking against Plan9 own routines with APE
  2021-10-14 16:35 [9fans] Linking against Plan9 own routines with APE tlaronde
  2021-10-14 16:42 ` Sigrid Solveig Haflínudóttir
@ 2021-10-14 16:49 ` ori
  2021-10-14 17:13   ` tlaronde
  1 sibling, 1 reply; 6+ messages in thread
From: ori @ 2021-10-14 16:49 UTC (permalink / raw)
  To: 9fans

Quoth tlaronde@polynum.com:
> For kerTeX, I need to access a time reference with better than the
> second.
> 
> The answer is nsec(2).
> 

For posix: we already have gettimeofday(),
which has microsecond resolution.

But also, I'd commit a patch that adds
clock_gettime: it's standardized, widely
used, relatively simple to implement, and
makes porting other code easier.

(monotonicity aside -- that's separate.)


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Teb3e52c23bb1bca4-M41446f7cef0b5aae0151ed06
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] Linking against Plan9 own routines with APE
  2021-10-14 16:42 ` Sigrid Solveig Haflínudóttir
  2021-10-14 16:46   ` Conor Williams
@ 2021-10-14 16:49   ` tlaronde
  1 sibling, 0 replies; 6+ messages in thread
From: tlaronde @ 2021-10-14 16:49 UTC (permalink / raw)
  To: 9fans

Le Thu, Oct 14, 2021 at 06:42:53PM +0200, Sigrid Solveig Haflínudóttir a écrit :
> Sorry for not exactly being helpful with your issue, but that one is
> the exact reason I started on https://git.sr.ht/~ft/npe.
> APE is too limiting and sometimes it's easier to rewrite small parts
> of the software being ported with plan 9 libc-specific api.
> I also did a small write-up on porting in general some time ago:
> http://wiki.9front.org/porting.

Thank you for the links! I will give them a look in the next days when I
have a slot of time.

Best,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Teb3e52c23bb1bca4-Mf1a5c2569c4ed379e11d01f9
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] Linking against Plan9 own routines with APE
  2021-10-14 16:49 ` ori
@ 2021-10-14 17:13   ` tlaronde
  0 siblings, 0 replies; 6+ messages in thread
From: tlaronde @ 2021-10-14 17:13 UTC (permalink / raw)
  To: 9fans

Le Thu, Oct 14, 2021 at 12:49:47PM -0400, ori@eigenstate.org a écrit :
> Quoth tlaronde@polynum.com:
> > For kerTeX, I need to access a time reference with better than the
> > second.
> > 
> > The answer is nsec(2).
> > 
> 
> For posix: we already have gettimeofday(),
> which has microsecond resolution.

Oh! I was using up-to-date POSIX reference and it was marked as
obsolete, so I skipped this one but it is indeed better than the
second for now.

> 
> But also, I'd commit a patch that adds
> clock_gettime: it's standardized, widely
> used, relatively simple to implement, and
> makes porting other code easier.
> 
> (monotonicity aside -- that's separate.)

Thanks!

Best,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Teb3e52c23bb1bca4-Md5873cec834556f6fda9633d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

end of thread, other threads:[~2021-10-14 17:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 16:35 [9fans] Linking against Plan9 own routines with APE tlaronde
2021-10-14 16:42 ` Sigrid Solveig Haflínudóttir
2021-10-14 16:46   ` Conor Williams
2021-10-14 16:49   ` tlaronde
2021-10-14 16:49 ` ori
2021-10-14 17:13   ` tlaronde

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).