Originally posted by smitty3268
View Post
Announcement
Collapse
No announcement yet.
Rewriting Old Solaris C Code In Python Yielded A 17x Performance Improvement
Collapse
X
-
Originally posted by L_A_G View Post
Considering compilers that only do C aren't really a thing anymore and pure C is mostly used in limited embedded systems (where Python obviously isn't an option) talking about C++ was implied.
You can use ldd to check whether a binary links to a C++ lib or not.Last edited by vladpetric; 21 October 2019, 12:31 PM.
Comment
-
Originally posted by cynical View PostLua didn't exactly get everything right either... *cough* 1-based indexing *cough*
1234567890,
You only need to look into your keyboard
Lua has started as a scientific Language for mathematicians, they don't like the 0 indexing as primary by default..
Actually 1-indexing start is a miss-conception... you can start in positions '-1000' if you want to, its a hash table..
Code:mytable = {} mytable[ -1000 ] = "Lua" mytable[ 0 ] = "Lua" mytable[ "abc" ] = "Lua"
Comment
-
Originally posted by cynical View PostThey are, but that's not really meaningful to say. Their implementation is 2500 lines of C code (- some python specific stuff). It makes a lot more sense to use Python than to write your own implementation of sets in C...
Comment
-
Originally posted by vladpetric View PostThe issue is not the compilers, it is the projects. There's still a huge number of projects that are pure C (e.g., bash). In fact, the vast majority of Linux commands are written in pure C, not C++.
Comment
-
Originally posted by vladpetric View PostTrue, but it's not really happening within the linux tools space
Originally posted by vladpetric View PostAgain, use ldd to see what is c++.
Code:$ echo 'int main ( ) { }' | g++ -o a -x c++ - -Wl,--as-needed ; ldd a linux-vdso.so.1 (0x00007ffc19beb000) libc.so.6 => /lib64/libc.so.6 (0x00007f6ad214c000) /lib64/ld-linux-x86-64.so.2 (0x00007f6ad2343000)
Comment
-
Originally posted by pal666 View Postaren't gdb and gcc within the linux tools space?
that way you can only see what is linked with c++ standard library
Code:$ echo 'int main ( ) { }' | g++ -o a -x c++ - -Wl,--as-needed ; ldd a linux-vdso.so.1 (0x00007ffc19beb000) libc.so.6 => /lib64/libc.so.6 (0x00007f6ad214c000) /lib64/ld-linux-x86-64.so.2 (0x00007f6ad2343000)
Yes, you're absolutely right that gdb and gcc contain c++ code. Most tools in /usr/bin and /bin are still pure C though.
I don't think we're disagreeing about much here. I would like more code to be migrated to C++. And as you said, it can be done somewhat incrementally.
Comment
-
Comment