> cool, glad to see that there's still work being done on it. > > On Sat, May 17, 2008 at 1:28 PM, Norman Ramsey <[EMAIL PROTECTED]> wrote: > > > > hello, i'm pretty new to c-- and i have some questions. > > > > > > 1 is there / can there be a coroutine or microthread framework for c--? > > > > Yes, in fact Daniel Peng has made three of them, and Jean-Baptiste > > Tristan ported Dave Hanson's thread implementation from the book > > 'C Interfaces and Implementations'. We still think there is work to > > do, however, to support segmented stacks for incremental garbage > > collection and first-class continuations. > > > so 4 different versions.. i wonder which one i should use! are they easy to > find and do they have descriptions so i can weigh their strengths and > weaknesses?
No, Daniel Peng kind of left us in the lurch; he dropped out of grad school and works for Google now. But if you don't want to do anyting fancy (like the features named above), JB's port of Dave Hanson's package is an obvious winner. > > > 2 are there instructions / a framework for making a dll with c--? or > > even > > > better, for making a python extension? > > > > Unfortunately not. There are nasty issues because the way Unix dll's > > work, what 'import' means depends fundamentally on what your dynamic > > linker expects and what kind of indirection it's using. A student was > > working on that but then went and started a company (and we all know > > what that leads to). > > > oh, i was wondering about dll's for windows, although i was thinking about > portability to linux also. but i guess you don't support it for linux or > windows? We'd like to, but there are fundamental assumptions in the language design that make it difficult to handle position-independent code. I suspect there may be material for a master's or PhD thesis in the problem. Once I'm working again and have built my group back up, I think we'll either nail this one or else put in a hack to support common cases. But it could easily take a year to happen. > > > 3 can i use MMX, SSE, SSE2, SSSE3, SSE4, SSE5 or AltiVec with it? > > > > I don't think so, but that's just because there's been no demand. > > Where would you like to start? We can probably build something for > > you. > > > > well i definitely need to make a python extension, although maybe i could > make a static library with c-- and link it to a c++ program and make that > into a dll. i might just use c++ with inline asm. i'm just looking around > at this point. i'm not sure which of the SIMD extensions i need yet, i'd > have to read about them and see their advantages. i think there's a > tradeoff between advantages of using a newer version of it and how many > systems it's available on and how much work i want to do to support X > different versions of it. I admit freely that I don't understand why there are so many different SIMD extensions. But I'm definitely willing to look at SIMD constructs for C-- with an eye to letting the compiler take advantage of what's available. Ideally you could write SIMD programs in C-- and let the compiler do the rest. Of course, this is a nontrivial task I'm proposing: you don't want to just write loops and hope that some clever optimization turns them into SIMD; you actually want to specify SIMD in the source code somehow. I think there's an interesting problem lurking here. The difference between SIMD and PIC is that I think with SIMD it should be possible to make progress quickly. I'm actually teaching assembly-language programming this fall, and if anybody has good examples that use SIMD instructions to solve problems suitable for homework problems, I would love to hear about them. Norman _______________________________________________ Cminusminus mailing list [email protected] https://cminusminus.org/mailman/listinfo/cminusminus
