Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #108766 > unrolled thread
| Started by | fred flintstone <fred@server.invalid> |
|---|---|
| First post | 2017-04-30 04:36 -0700 |
| Last post | 2017-05-08 18:20 +0100 |
| Articles | 20 on this page of 53 — 15 participants |
Back to article view | Back to comp.lang.c
obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-04-30 04:36 -0700
Re: obtaining a c value from a perl script Noob <root@127.0.0.1> - 2017-04-30 14:48 +0200
Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-01 02:25 -0700
Re: obtaining a c value from a perl script Keith Thompson <kst-u@mib.org> - 2017-05-01 08:46 -0700
Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-03 02:12 -0700
Re: obtaining a c value from a perl script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-03 11:48 +0100
Re: obtaining a c value from a perl script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-04-30 16:16 +0100
Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-01 04:18 -0700
Re: obtaining a c value from a perl script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-01 13:41 +0100
Re: obtaining a c value from a perl script Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2017-05-03 05:10 -0700
Re: obtaining a c value from a perl script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-03 15:00 +0100
Re: obtaining a c value from a perl script Keith Thompson <kst-u@mib.org> - 2017-05-03 08:55 -0700
Re: obtaining a c value from a perl script Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2017-05-03 09:02 -0700
Re: obtaining a c value from a perl script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-03 17:22 +0100
Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-08 01:43 -0700
Re: obtaining a c value from a perl script Keith Thompson <kst-u@mib.org> - 2017-05-08 09:06 -0700
Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-09 00:35 -0700
Re: obtaining a c value from a perl script David Brown <david.brown@hesbynett.no> - 2017-05-09 13:59 +0200
Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-08 02:45 -0700
Re: obtaining a c value from a perl script Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2017-05-08 04:39 -0700
solved Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-09 02:43 -0700
Re: solved Re: obtaining a c value from a perl script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-09 15:06 +0100
Re: solved Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-10 01:03 -0700
Re: solved Re: obtaining a c value from a perl script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-10 11:18 +0100
Re: solved Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-12 02:26 -0700
Re: solved Re: obtaining a c value from a perl script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-12 11:51 +0100
Re: solved Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-12 03:49 -0700
Re: solved Re: obtaining a c value from a perl script Manfred <invalid@invalid.add> - 2017-05-10 23:21 +0200
Re: solved Re: obtaining a c value from a perl script Keith Thompson <kst-u@mib.org> - 2017-05-10 16:23 -0700
Re: solved Re: obtaining a c value from a perl script Robert Wessel <robertwessel2@yahoo.com> - 2017-05-11 15:57 -0500
Re: solved Re: obtaining a c value from a perl script Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-11 18:57 -0400
Re: solved Re: obtaining a c value from a perl script Robert Wessel <robertwessel2@yahoo.com> - 2017-05-11 18:38 -0500
Re: solved Re: obtaining a c value from a perl script Robert Wessel <robertwessel2@yahoo.com> - 2017-05-11 18:46 -0500
Re: solved Re: obtaining a c value from a perl script Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-11 21:11 -0400
Re: solved Re: obtaining a c value from a perl script Robert Wessel <robertwessel2@yahoo.com> - 2017-05-12 01:51 -0500
Re: solved Re: obtaining a c value from a perl script Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-14 23:49 -0400
Re: obtaining a c value from a perl script Tim Rentsch <txr@alumni.caltech.edu> - 2017-05-09 07:46 -0700
Re: obtaining a c value from a perl script mark.bluemel@gmail.com - 2017-05-03 09:06 -0700
Re: obtaining a c value from a perl script gazelle@shell.xmission.com (Kenny McCormack) - 2017-05-03 17:02 +0000
Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-08 01:51 -0700
Re: obtaining a c value from a perl script Manfred <noname@invalid.add> - 2017-05-04 18:21 +0200
Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-08 03:52 -0700
Re: obtaining a c value from a perl script Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-08 08:38 -0400
Re: obtaining a c value from a perl script Keith Thompson <kst-u@mib.org> - 2017-05-08 09:14 -0700
Re: obtaining a c value from a perl script "James R. Kuyper" <jameskuyper@verizon.net> - 2017-05-08 12:17 -0400
Re: obtaining a c value from a perl script Keith Thompson <kst-u@mib.org> - 2017-05-08 09:26 -0700
Re: obtaining a c value from a perl script jameskuyper@verizon.net - 2017-05-08 11:02 -0700
Re: obtaining a c value from a perl script Keith Thompson <kst-u@mib.org> - 2017-05-08 11:39 -0700
Re: obtaining a c value from a perl script Tim Rentsch <txr@alumni.caltech.edu> - 2017-05-09 07:16 -0700
Re: obtaining a c value from a perl script Keith Thompson <kst-u@mib.org> - 2017-05-09 08:18 -0700
Re: obtaining a c value from a perl script fred flintstone <fred@server.invalid> - 2017-05-10 00:29 -0700
Re: obtaining a c value from a perl script Tim Rentsch <txr@alumni.caltech.edu> - 2017-05-10 05:26 -0700
Re: obtaining a c value from a perl script Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-08 18:20 +0100
Page 1 of 3 [1] 2 3 Next page →
| From | fred flintstone <fred@server.invalid> |
|---|---|
| Date | 2017-04-30 04:36 -0700 |
| Subject | obtaining a c value from a perl script |
| Message-ID | <emm0h5Foml1U1@mid.individual.net> |
Hello ng, I don my asbestos suit and eye-protecting glasses* to bring up a topic with the gurus of c. I get a particular value from a perl script that I would like to see captured by C. It's C right under the hood, so I know it can be done. The relevant value is the ultimate value for julian day: https://github.com/TBlazer66/ephemeris/blob/master/2.pluto.pl It's a C_double float. (terminology yikes) I'd like simply to print out this value in C. One may assume that I am on the linux platform using gcc, but it is not necessary. Also, this is the third time I've posted this year. It hurts my feelings to call me things like "chat bot" or "troll." If you were grossly unsatisfied by reading my last 2 threads, please take this opportunity to take a long walk off a short building.... Thank you for your comment, -- fred *that part is for real for these events...I'm pissed I left mine in abq....
[toc] | [next] | [standalone]
| From | Noob <root@127.0.0.1> |
|---|---|
| Date | 2017-04-30 14:48 +0200 |
| Message-ID | <oe4m8p$pvv$1@dont-email.me> |
| In reply to | #108766 |
On 30/04/2017 13:36, fred flintstone wrote: > Hello ng, > > I don my asbestos suit and eye-protecting glasses* to bring up a topic > with the gurus of c. I get a particular value from a perl script that I > would like to see captured by C. It's C right under the hood, so I know > it can be done. Do you mean you have a Perl script, and a program compiled from C, and you want to pass information from one to the other, through a pipe perhaps? Are you saying your Perl interpreter is C under the hood? It seems you would be better served in a Perl forum? Are the comp.lang.perl.* NGs still active? Regards.
[toc] | [prev] | [next] | [standalone]
| From | fred flintstone <fred@server.invalid> |
|---|---|
| Date | 2017-05-01 02:25 -0700 |
| Message-ID | <emod87F85r9U1@mid.individual.net> |
| In reply to | #108768 |
On 04/30/2017 05:48 AM, Noob wrote: > On 30/04/2017 13:36, fred flintstone wrote: >> Hello ng, >> >> I don my asbestos suit and eye-protecting glasses* to bring up a topic >> with the gurus of c. I get a particular value from a perl script that I >> would like to see captured by C. It's C right under the hood, so I know >> it can be done. > > Do you mean you have a Perl script, and a program compiled > from C, and you want to pass information from one to the > other, through a pipe perhaps? Pipes are nonstandard, as per keith. > > Are you saying your Perl interpreter is C under the hood? Yes. Wall to Wall. > > It seems you would be better served in a Perl forum? > Are the comp.lang.perl.* NGs still active? I'm pursuing the perl aspects of this there. If anyone can predict an eclipse in C, I'd be curious to see what they have. > > Regards. > Likewise, -- fred
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2017-05-01 08:46 -0700 |
| Message-ID | <lnbmrcinqn.fsf@kst-u.example.com> |
| In reply to | #108851 |
fred flintstone <fred@server.invalid> writes:
> On 04/30/2017 05:48 AM, Noob wrote:
[...]
>> It seems you would be better served in a Perl forum?
>> Are the comp.lang.perl.* NGs still active?
>
> I'm pursuing the perl aspects of this there. If anyone can predict an
> eclipse in C, I'd be curious to see what they have.
C does not have features for interacting with Perl. Perl has features
for interacting with C. The people who know about those features hang
out in Perl forums. comp.lang.perl.misc is active -- in fact I see
you've posted there yourself.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | fred flintstone <fred@server.invalid> |
|---|---|
| Date | 2017-05-03 02:12 -0700 |
| Message-ID | <emtl83F92q9U1@mid.individual.net> |
| In reply to | #108885 |
On 05/01/2017 08:46 AM, Keith Thompson wrote: > fred flintstone <fred@server.invalid> writes: >> On 04/30/2017 05:48 AM, Noob wrote: > [...] >>> It seems you would be better served in a Perl forum? >>> Are the comp.lang.perl.* NGs still active? >> >> I'm pursuing the perl aspects of this there. If anyone can predict an >> eclipse in C, I'd be curious to see what they have. > > C does not have features for interacting with Perl. Perl has features > for interacting with C. The people who know about those features hang > out in Perl forums. comp.lang.perl.misc is active -- in fact I see > you've posted there yourself. > Yeah, that's the perl part. There's a C part, but I need to hold up right here and ask for that starter killfile again. I can't read this newsgroup at all on this partition. I use thunderbird on mint. *That* is implementation talk, but we don't like to resort to implementation-specific solutions around here until our hand is pressed. It's important to me that I know that however i "capture" the value that it be a standard C solution. I wouldn't darken the door here but that that were my purpose. Alright, let me air the laundry, tho. The perl folks have a skill set that differs from the people who can understand the data they capture. (There I use the word capture again.) A sufficient means to capture is to use the iso c binding. So I'm fishing for a) that starter killfile again and b) a standard means to do a simple pass by value from perl output to c input. Do you agree that there are better solutions than taking the value in on argv? -- fred
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2017-05-03 11:48 +0100 |
| Message-ID | <874lx2i5c9.fsf@bsb.me.uk> |
| In reply to | #109093 |
fred flintstone <fred@server.invalid> writes: <snip> > A sufficient means to capture is to use the iso c binding. I don't know what that is, but (from what follows) I suspect you mean passing the value as text via argv. > So I'm fishing for <snip> > b) a standard means to do a simple pass by value from perl output to c input. > > Do you agree that there are better solutions than taking the value in > on argv? What are you trying to do overall? Since passing the output of a Perl program to either the input or the command-line arguments of a C program is simple, easy to understand and easy to maintain, there would have to be a very strong motivation to do anything else. In what sense could anything more complicated be "better"? (That's not a rhetorical question -- the answer would explain why you are still looking for a better solution.) -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2017-04-30 16:16 +0100 |
| Message-ID | <874lx6hqng.fsf@bsb.me.uk> |
| In reply to | #108766 |
fred flintstone <fred@server.invalid> writes: > I don my asbestos suit and eye-protecting glasses* to bring up a topic > with the gurus of c. I get a particular value from a perl script that > I would like to see captured by C. What do you mean by "captured by C"? The phrase makes me think you want to somehow pass a value from your Perl program to a C function. Even if I'm right about this, the details of what "somehow" means for your situation still need to be described. > It's C right under the hood, so I > know it can be done. The relevant value is the ultimate value for > julian day: > > https://github.com/TBlazer66/ephemeris/blob/master/2.pluto.pl > > It's a C_double float. (terminology yikes) I'd like simply to print > out this value in C. Simply is probably the wrong word here. Printing floating point values in C is indeed simple, but nothing you have posted suggests you have the right floating point value in C. <snip> -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | fred flintstone <fred@server.invalid> |
|---|---|
| Date | 2017-05-01 04:18 -0700 |
| Message-ID | <emojs3F9fp8U1@mid.individual.net> |
| In reply to | #108772 |
On 04/30/2017 08:16 AM, Ben Bacarisse wrote: > fred flintstone <fred@server.invalid> writes: > >> I don my asbestos suit and eye-protecting glasses* to bring up a topic >> with the gurus of c. I get a particular value from a perl script that >> I would like to see captured by C. > > What do you mean by "captured by C"? The phrase makes me think you want > to somehow pass a value from your Perl program to a C function. Even if > I'm right about this, the details of what "somehow" means for your > situation still need to be described. Sure. end of typical output: right ascension of moon 10h 3m 55s right ascension of sun 10h 4m 0s moon seconds is 36235 sun seconds is 36240 to server is 11 2457987.25953264 2457987.25774584 2457987.25848217 right ascension of moon 10h 3m 57s right ascension of sun 10h 4m 0s moon seconds is 36237 sun seconds is 36240 to server is 12 2457987.25953264 2457987.25848217 2457987.25897738 right ascension of moon 10h 3m 59s right ascension of sun 10h 4m 0s moon seconds is 36239 sun seconds is 36240 to server is 13 2457987.25953264 2457987.25897738 2457987.25921532 right ascension of moon 10h 4m 0s right ascension of sun 10h 4m 0s moon seconds is 36240 sun seconds is 36240 equal, while condition fails at julian day 2457987.25921532 equal seconds is 36240 > >> It's C right under the hood, so I >> know it can be done. The relevant value is the ultimate value for >> julian day: >> >> https://github.com/TBlazer66/ephemeris/blob/master/2.pluto.pl >> >> It's a C_double float. (terminology yikes) I'd like simply to print >> out this value in C. > > Simply is probably the wrong word here. Printing floating point values > in C is indeed simple, but nothing you have posted suggests you have the > right floating point value in C. > > <snip> > Let's say I had a value in perl that I knew was a c double. It's a premise. If the only output of this script were: say "$equal"; , then I think there is a wide road for C interop. -- fred
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2017-05-01 13:41 +0100 |
| Message-ID | <87pofs3g27.fsf@bsb.me.uk> |
| In reply to | #108856 |
fred flintstone <fred@server.invalid> writes: > On 04/30/2017 08:16 AM, Ben Bacarisse wrote: >> fred flintstone <fred@server.invalid> writes: >> >>> I don my asbestos suit and eye-protecting glasses* to bring up a topic >>> with the gurus of c. I get a particular value from a perl script that >>> I would like to see captured by C. >> >> What do you mean by "captured by C"? The phrase makes me think you want >> to somehow pass a value from your Perl program to a C function. Even if >> I'm right about this, the details of what "somehow" means for your >> situation still need to be described. > > Sure. end of typical output: > > right ascension of moon 10h 3m 55s > right ascension of sun 10h 4m 0s > moon seconds is 36235 > sun seconds is 36240 > to server is 11 2457987.25953264 2457987.25774584 2457987.25848217 > right ascension of moon 10h 3m 57s > right ascension of sun 10h 4m 0s > moon seconds is 36237 > sun seconds is 36240 > to server is 12 2457987.25953264 2457987.25848217 2457987.25897738 > right ascension of moon 10h 3m 59s > right ascension of sun 10h 4m 0s > moon seconds is 36239 > sun seconds is 36240 > to server is 13 2457987.25953264 2457987.25897738 2457987.25921532 > right ascension of moon 10h 4m 0s > right ascension of sun 10h 4m 0s > moon seconds is 36240 > sun seconds is 36240 > equal, while condition fails at julian day 2457987.25921532 > equal seconds is 36240 I think you prefer to talk in metaphors but I can't help because I still don't know what "captured by C" means. Showing me the output of the script does not help with that. Maybe if you explained what you are trying to do and in what way the Perl script you currently have is not suitable. <snip> > Let's say I had a value in perl that I knew was a c double. It's a premise. > > If the only output of this script were: > > say "$equal"; > > , then I think there is a wide road for C interop. Yes, you can inter-operate between C and Perl in countless ways but I don't have the time to describe them all. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.arthur.mclean@gmail.com> |
|---|---|
| Date | 2017-05-03 05:10 -0700 |
| Message-ID | <e08349d1-be6b-46c4-b327-eb4e76571c0d@googlegroups.com> |
| In reply to | #108860 |
On Monday, May 1, 2017 at 1:41:28 PM UTC+1, Ben Bacarisse wrote: > fred flintstone <fred@server.invalid> writes: > > I think you prefer to talk in metaphors but I can't help because I still > don't know what "captured by C" means. Showing me the output of the > script does not help with that. > I means that the C program invokes the Perl interpreter on the Perl script, and then reads the value of a Perl variable for manipulation as a C object.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2017-05-03 15:00 +0100 |
| Message-ID | <87shkmghwa.fsf@bsb.me.uk> |
| In reply to | #109097 |
Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: > On Monday, May 1, 2017 at 1:41:28 PM UTC+1, Ben Bacarisse wrote: >> fred flintstone <fred@server.invalid> writes: >> >> I think you prefer to talk in metaphors but I can't help because I still >> don't know what "captured by C" means. Showing me the output of the >> script does not help with that. >> > I means that the C program invokes the Perl interpreter on the Perl script, > and then reads the value of a Perl variable for manipulation as a C > object. Subsequent replies suggest otherwise. The default "capture" the OP is thinking about seems to be executing the C program from Perl, passing the value as a command-line argument. But since I did not understand the original post, I may have not understood the subsequent posts. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2017-05-03 08:55 -0700 |
| Message-ID | <lnd1bqexzs.fsf@kst-u.example.com> |
| In reply to | #109097 |
Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
> On Monday, May 1, 2017 at 1:41:28 PM UTC+1, Ben Bacarisse wrote:
>> fred flintstone <fred@server.invalid> writes:
>>
>> I think you prefer to talk in metaphors but I can't help because I still
>> don't know what "captured by C" means. Showing me the output of the
>> script does not help with that.
>>
> I means that the C program invokes the Perl interpreter on the Perl script,
> and then reads the value of a Perl variable for manipulation as a C object.
Malcolm, how do you know what fred flintstone means?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.arthur.mclean@gmail.com> |
|---|---|
| Date | 2017-05-03 09:02 -0700 |
| Message-ID | <01776996-90c9-4721-ab10-ab6149d828fa@googlegroups.com> |
| In reply to | #109108 |
On Wednesday, May 3, 2017 at 4:55:28 PM UTC+1, Keith Thompson wrote: > Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: > > On Monday, May 1, 2017 at 1:41:28 PM UTC+1, Ben Bacarisse wrote: > >> fred flintstone <fred@server.invalid> writes: > >> > >> I think you prefer to talk in metaphors but I can't help because I still > >> don't know what "captured by C" means. Showing me the output of the > >> script does not help with that. > >> > > I means that the C program invokes the Perl interpreter on the Perl script, > > and then reads the value of a Perl variable for manipulation as a C object. > > Malcolm, how do you know what fred flintstone means? > fred flintstone speaks English. I've also faced similar problems, and used similar words. Ben was possibly misled because "capture" is a term used with a specific meaning for lambda functions and closures.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2017-05-03 17:22 +0100 |
| Message-ID | <8760hhvrj3.fsf@bsb.me.uk> |
| In reply to | #109109 |
Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: > On Wednesday, May 3, 2017 at 4:55:28 PM UTC+1, Keith Thompson wrote: >> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: >> > On Monday, May 1, 2017 at 1:41:28 PM UTC+1, Ben Bacarisse wrote: >> >> fred flintstone <fred@server.invalid> writes: >> >> >> >> I think you prefer to talk in metaphors but I can't help because I still >> >> don't know what "captured by C" means. Showing me the output of the >> >> script does not help with that. >> >> >> > I means that the C program invokes the Perl interpreter on the Perl script, >> > and then reads the value of a Perl variable for manipulation as a C object. >> >> Malcolm, how do you know what fred flintstone means? >> > fred flintstone speaks English. > I've also faced similar problems, and used similar words. Why don't you help out with an answer then? > Ben was possibly misled because "capture" is a term used with a > specific meaning for lambda functions and closures. No, it was clear the meaning had nothing to do with that. It's obviously about somehow getting a Perl number into a C floating-point object, but there are so many ways to go about that (and most are not topical here) that is seemed daft to try to answer without knowing the real goal. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | fred flintstone <fred@server.invalid> |
|---|---|
| Date | 2017-05-08 01:43 -0700 |
| Message-ID | <enapcmFq0fgU1@mid.individual.net> |
| In reply to | #109114 |
On 05/03/2017 09:22 AM, Ben Bacarisse wrote: > Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: > >> On Wednesday, May 3, 2017 at 4:55:28 PM UTC+1, Keith Thompson wrote: >>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: >>>> On Monday, May 1, 2017 at 1:41:28 PM UTC+1, Ben Bacarisse wrote: >>>>> fred flintstone <fred@server.invalid> writes: >>>>> >>>>> I think you prefer to talk in metaphors but I can't help because I still >>>>> don't know what "captured by C" means. Showing me the output of the >>>>> script does not help with that. >>>>> >>>> I means that the C program invokes the Perl interpreter on the Perl script, >>>> and then reads the value of a Perl variable for manipulation as a C object. >>> >>> Malcolm, how do you know what fred flintstone means? >>> >> fred flintstone speaks English. >> I've also faced similar problems, and used similar words. > > Why don't you help out with an answer then? > >> Ben was possibly misled because "capture" is a term used with a >> specific meaning for lambda functions and closures. > > No, it was clear the meaning had nothing to do with that. It's > obviously about somehow getting a Perl number into a C floating-point > object, but there are so many ways to go about that (and most are not > topical here) that is seemed daft to try to answer without knowing the > real goal. > Is there such a thing as C17? Does it implement a lambda calculus? -- fred
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2017-05-08 09:06 -0700 |
| Message-ID | <lnpofjbaes.fsf@kst-u.example.com> |
| In reply to | #109473 |
fred flintstone <fred@server.invalid> writes:
[...]
> Is there such a thing as C17? Does it implement a lambda calculus?
No (and, by implication, no).
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | fred flintstone <fred@server.invalid> |
|---|---|
| Date | 2017-05-09 00:35 -0700 |
| Message-ID | <end9pkFahmgU1@mid.individual.net> |
| In reply to | #109507 |
On 05/08/2017 09:06 AM, Keith Thompson wrote: > fred flintstone <fred@server.invalid> writes: > [...] >> Is there such a thing as C17? Does it implement a lambda calculus? > > No (and, by implication, no). > What's the current standard? -- fred
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2017-05-09 13:59 +0200 |
| Message-ID | <oesap3$tbe$1@dont-email.me> |
| In reply to | #109565 |
On 09/05/17 09:35, fred flintstone wrote: > On 05/08/2017 09:06 AM, Keith Thompson wrote: >> fred flintstone <fred@server.invalid> writes: >> [...] >>> Is there such a thing as C17? Does it implement a lambda calculus? >> >> No (and, by implication, no). >> > > What's the current standard? C11. (C++ has C++17, and it has had lambda functions since C++11. No lambda calculus - that's a different thing.)
[toc] | [prev] | [next] | [standalone]
| From | fred flintstone <fred@server.invalid> |
|---|---|
| Date | 2017-05-08 02:45 -0700 |
| Message-ID | <enat1jFqnvhU1@mid.individual.net> |
| In reply to | #109109 |
On 05/03/2017 09:02 AM, Malcolm McLean wrote: > On Wednesday, May 3, 2017 at 4:55:28 PM UTC+1, Keith Thompson wrote: >> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: >>> On Monday, May 1, 2017 at 1:41:28 PM UTC+1, Ben Bacarisse wrote: >>>> fred flintstone <fred@server.invalid> writes: >>>> >>>> I think you prefer to talk in metaphors but I can't help because I still >>>> don't know what "captured by C" means. Showing me the output of the >>>> script does not help with that. >>>> >>> I means that the C program invokes the Perl interpreter on the Perl script, >>> and then reads the value of a Perl variable for manipulation as a C object. >> >> Malcolm, how do you know what fred flintstone means? How many times is Malcolm right in the middle of the scrum that moved the topic forward and then it was decided that he had said nothing relevant by the people who sound like pamphleteers to me? >> > fred flintstone speaks English. > I've also faced similar problems, and used similar words. Ben was possibly misled > because "capture" is a term used with a specific meaning for lambda functions > and closures. > I didn't mean this, but now that you brought it up, is there a standard implementation of closures? -- fred
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.arthur.mclean@gmail.com> |
|---|---|
| Date | 2017-05-08 04:39 -0700 |
| Message-ID | <32cc7dc7-4419-44a3-b0f5-50d1a7f0d400@googlegroups.com> |
| In reply to | #109480 |
On Monday, May 8, 2017 at 10:45:31 AM UTC+1, fred flintstone wrote: > On 05/03/2017 09:02 AM, Malcolm McLean wrote: > > > > > > fred flintstone speaks English. > > I've also faced similar problems, and used similar words. Ben was possibly misled > > because "capture" is a term used with a specific meaning for lambda functions > > and closures. > > > > I didn't mean this, but now that you brought it up, is there a standard > implementation of closures? > When declaring a function that accepts a function pointer in C, it is good practice to always add a void * as a parameter, and accept a void * to pass back. Usually this is called something like the "context" pointer. If caller doesn't need it, it is simply null. But it can point to a structure containing detailed information, and it means you don't need a global (which can be almost unworkable if you've got more than one instance of the function pointer live). The context pointer is effectively a closure, but there's no real syntactical support, and it won't automatically call a destructor when the function pointer is destroyed.
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | comp.lang.c
csiph-web