2015-10-17 05:49:44 (edited by Ethin 2015-10-17 05:50:56)

Hello all!
I am currently working on wrappers for the C and C++ standard libraries to port them to multiple programming languages, including Allegrocl, Chicken, C#, Clisp (using FFI extensions), Clisp, D, Go, Java, Javascript (JSC, v8, and Node), PHP, Pike, Ruby, Perl, and several more. Once I do finish the wrappers for the library, I will release the first part, <stdlib.h> (or as C++ programmers would call it, <cstdlib>). Please note that no overloaded functions will be available until I release cstdlib.extras, which will include only overloaded functions. The following functions will be in the first release: abort, bsearch, qsort, getenv, rand, srand, system, calloc, free, malloc, realloc, atof, atoi, atol, atoll, strtol, strtoll, strtoul, strtoull, strtof, strtod, strtold, mblen, mbtowc, wctomb, mbstowcs, wcstombs, abs, labs, imaxabs, div, lldiv, and imaxdiv. If you require the syntax of all 34 functions, just ask and I'll post the syntax here.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2015-10-17 13:41:30

Would this include the standard template library's algorithms and containers?

2015-10-17 19:08:40

If I can figure out how to wrap those, yes.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2015-10-18 19:27:45

I don't see why you would want to port the standard library to those programming languages. Most if not all of those functions can be accessed either via the programming language in question's standard library, or by some extension that is quite easy to get, since if they're in the C standard library, there's a 99% chance that they're available if they're so essential. What will be this wrapper's advantages?

A fight we cannot lose.
An enemy we cannot defeat.
A destiny we cannot escape.
Follow me on twitter @guilevi2000

2015-10-18 22:37:15

Not all of the C and C++ standard library's functions are available in most of those other programming languages, though. I'm actually porting every single function to other languages. You don't absolutely need them. It's sort of an on-demand sort of thing: you need it or you don't.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github