From: gga Date: 2007-09-01T16:21:22+09:00 Subject: Re: Pragmas in Ruby 1.9 Charles Oliver Nutter wrote: > > If this ever happens, I hope it's first accompanied by a standardized > mechanism for extending (without replacing) require. > +1 for what Charlie says. Regarding the use of pragmas, I think another area to consider them if they'd be of any use or not for multi threading. Currently, YARV is wrapping the basic primitives for threading and so has JRuby but I was wondering if anyone had consider abstracting all that basic functionality away from coders (and maybe even removing those basic building blocks altogether). OpenMP is about to become a good multithreaded standard C/C++/Fortran API on most platforms and it makes heavy use of pragmas to alleviate may of the usual headaches of writing good threaded code. Its api is a little bit hard to pick up at first, but it is a joy compared to writing all that stuff manually. For the most part, I think most could be done with ruby blocks, but a couple of things I'm not so sure. I think investigating the use of ruby blocks or pragmas to allow similar directives to those of OpenMP would be interesting. I really love the idea of OpenMP of not having to interact ever again with a mutex, barrier, thread, etc. directly at all, as I think those are apis that are OS oriented (and thus bound to die in the long run) and not user oriented. -- Gonzalo Garramu�o ggarra@advancedsl.com.ar AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy