Files
2012-02-21 01:15:00 -05:00

1 line
10 KiB
JSON

[{"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304196304.137845, "message": "My company needs to hire a programmer or two on contract to work on FLOSS project that use advanced Python, including extensions written in C. It's a touch skill set to hire. Most of the best qualified folks are already busy, so I though I'd cast around here for ideas. We've worked with Dave Beazley and Andrew Dalke in the past, but both are too busy to take on more work right now. Ideas or references here are cool, or you can e-mail uche@zepheira.com", "group_id": 292, "id": 871825}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304212422.4331131, "message": "The various regional PyCons are probably your best bet. The US or Euro one's would be better just to have a bigger pool.", "group_id": 292, "id": 873329}, {"user_id": 15015, "stars": [], "topic_id": 32967, "date_created": 1304255767.2516241, "message": "As one of the busy people mentioned, are programmers even learning how to program in C anymore? It's something I often wonder about when running training courses.", "group_id": 292, "id": 875073}, {"user_id": 1284, "stars": [], "topic_id": 32967, "date_created": 1304266137.7780769, "message": "@llimllib err, 7 years ago. Time flies!", "group_id": 292, "id": 876393}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304265863.3638589, "message": "@dabeaz it's a really good question. It feels as if they're not. Of course I come from a C++ background, so learning C seems a no-brainer to me for a serious dev, and when I was starting out in Python back in 1996 or so, learning to write C extensions was pretty much part of Python 101.", "group_id": 292, "id": 876374}, {"user_id": 1284, "stars": [], "topic_id": 32967, "date_created": 1304266121.5770869, "message": "@dabeaz I graduated 6 years ago, and I learned C. Since, however, I've only had to use it three or four times. It's been handy to know, but rarely used.", "group_id": 292, "id": 876391}, {"user_id": 831, "stars": [{"date_created": 1304271893.598933, "user_id": 719}], "topic_id": 32967, "date_created": 1304265931.8103199, "message": "I think it's pretty much a sign of the fall of civilization that Java seems to have supplanted everything else as the learn-to-program language. How can someone ever recover from such a crippled start to work in e.g. C? ;)", "group_id": 292, "id": 876379}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304276293.6939981, "message": "That would strike me as a misuse of C then, only the actual perf critical or external library parts should live in C", "group_id": 292, "id": 877260}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304277118.963263, "message": "That said, expat is a pretty creaky beast these days, and it makes me restless. XML has some heinous parsing rules, but if it becomes practicable to use something like PyParsing to take those on, and something like PyPy makes the performance of that reasonable (very possible considering the nature of JIT in PyPy), I'[m not stubborn about sticking to C extensions forever.", "group_id": 292, "id": 877345}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304275900.591763, "message": "I agree in principle that we should be moving away from C extensions, and believe me, I whoop with joy every time PyPy kicks a bit more arse in benchmarks, but I also live in the practical world, where \"don't write C extensions\" sounds rather Quixotic.", "group_id": 292, "id": 877228}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304274581.8450949, "message": "@dabeaz If my tutorial attendance at PyCon was any indication, there are still people out there that want to learn.", "group_id": 292, "id": 877099}, {"user_id": 7, "stars": [], "topic_id": 32967, "date_created": 1304274686.6338589, "message": "My university (hi @coderanger) still uses C++ for intro courses.", "group_id": 292, "id": 877109}, {"user_id": 1736, "stars": [{"date_created": 1304274762.0441749, "user_id": 7}], "topic_id": 32967, "date_created": 1304274728.8527119, "message": "@alex I'm not sure I would use those as an example, have you see the code quality from the average freshman? ;-)", "group_id": 292, "id": 877112}, {"user_id": 7, "stars": [], "topic_id": 32967, "date_created": 1304274757.4368491, "message": "@coderanger I'm not saying the code is good, just that new C/C++ people are still be trained", "group_id": 292, "id": 877113}, {"user_id": 7, "stars": [], "topic_id": 32967, "date_created": 1304274786.2017789, "message": "ps: don't write C extensions ;)", "group_id": 292, "id": 877118}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304274825.533658, "message": "That too, I can't remember the last time I didn't use ctypes.", "group_id": 292, "id": 877120}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304274852.0944631, "message": "(and for another 5 days I'm theoretically a full-time C programmer)", "group_id": 292, "id": 877123}, {"user_id": 7, "stars": [], "topic_id": 32967, "date_created": 1304274883.4139731, "message": "@coderanger The ministry of cross-Python compatibility thanks you.", "group_id": 292, "id": 877129}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304276316.5399101, "message": "@coderanger well we will agree to disagree on misuse.", "group_id": 292, "id": 877264}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304276226.483078, "message": "Yes I'm familiar with Ctypes, and I use it whenever I need to access C code in an encapsulated way. But that to me is different from a C extension. A C extension is generally a case where the code lives as much in Python space as in C space, and interleaves freely between the two, and Ctypes is less suitable for such cases.", "group_id": 292, "id": 877258}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304275565.449435, "message": "@alex You aren't a real Python ministry without some awesome pseudo-Soviet-era propaganda posters!", "group_id": 292, "id": 877200}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304276065.3388181, "message": "All that said, I'd already planned to look into whether PyPy 1.5 has taken a big bite into the several areas where I do use C extensions. I might be doing so as early as this week.", "group_id": 292, "id": 877240}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304276131.558666, "message": "@uche There is a distinction between \"Don't write C extensions\" and \"Don't use C code\". Writing a C extension by hand is an entirely non-portable (even between Python major versions) system. ctypes has a higher call overhead (though not by much, and it is only time to setup and make the FFI calls, no runtime slowdown obviously) but is portable across all versions and even other implementations (ctypes works transparently in PyPy).", "group_id": 292, "id": 877247}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304276209.3240421, "message": "Making a normal C shared library and a ctypes binding is very close to the low-level-goodness of a handwritten C extension, with so many fewer downsides.", "group_id": 292, "id": 877255}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304276326.6607909, "message": "(and in the case of perf improvements, you should only be doing that after you wrote it in Python, profiled it, and found it was a problem)", "group_id": 292, "id": 877266}, {"user_id": 1736, "stars": [], "topic_id": 32967, "date_created": 1304276154.424675, "message": "Cython and friends live somewhere in the middle, since they are partially abstracted.", "group_id": 292, "id": 877251}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304278325.721437, "message": "Thanks, @alex, that's useful info", "group_id": 292, "id": 877432}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304276353.1201301, "message": "BTW, having worked to port C code across major Python versions twice over now, I assure you it's a mostly mechanical problem.", "group_id": 292, "id": 877269}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304276381.0617759, "message": "(Specifically Python 1.52->2.0 and 2.5->3.0)", "group_id": 292, "id": 877272}, {"user_id": 1284, "stars": [], "topic_id": 32967, "date_created": 1304276675.313421, "message": "@uche just out of curiosity, and having no dog in the fight, can I ask for an example use case you've found where a C extension is better than a C lib + ffi?", "group_id": 292, "id": 877313}, {"user_id": 831, "stars": [{"date_created": 1304276860.239588, "user_id": 1284}], "topic_id": 32967, "date_created": 1304276835.734221, "message": "Well I needn't travel much further than my specific use-case, which is wrapping an updated expat (i.e. more so that the built in Python stdlib one) with proper and efficient support for the wchar_t/PyUnicode cross-over, and other \"in-line\" expat features. In other words, to implement Amara 2.x http://www.xml3k.org/Amara", "group_id": 292, "id": 877329}, {"user_id": 831, "stars": [], "topic_id": 32967, "date_created": 1304277219.0003221, "message": "/me waves to Convore/Python group founder Fred Drake, who was one of the ones who valiantly soldiered to oil up expat's creaky MG Triumph engine. :)", "group_id": 292, "id": 877355}, {"user_id": 7, "stars": [{"date_created": 1304278313.5634689, "user_id": 831}, {"date_created": 1304356192.615761, "user_id": 1736}], "topic_id": 32967, "date_created": 1304278058.4536409, "message": "Cython is at least slightly preferable over pure-C because there's a GSOC to write a PyPY backend for it", "group_id": 292, "id": 877411}, {"user_id": 7, "stars": [], "topic_id": 32967, "date_created": 1304278067.3874121, "message": "so while it odesn't work today, there's a decent future for tomorrow", "group_id": 292, "id": 877413}, {"user_id": 20326, "stars": [], "topic_id": 32967, "date_created": 1304345296.996763, "message": "@alex Cython is highly preferable over writing C extensions manually in that it's faster, more maintainable, and has cross-version compatibility in CPython. It's also preferable to ctypes in that it actually uses C header files and doesn't suffer from versioning/alignment issues in the way ctypes does and can support wrapping C++ libraries when necessary. (ctypes obviously has advantages like broader compatibility and true Python high-level programming.)", "group_id": 292, "id": 883342}]