[perl #81548] [BUG] Can't do 'handles' on a type in Rakudo
FWIW 'has $!a handles TypeObject' is now implemented, and works fine for roles. It doesn't work for classes, because they have a .new method. So the standard .new is overridden, trying to call the .new on an attribute, but since there's no instance yet, the access to the attribute fails. That's a conceptual problem and needs a spec resolution. One possible approach would be to only install methods not yet present in $?CLASS or its superclassess any better ideas? Moritz
[perl #81718] [BUG] Null PMC access when attribute is accessed from a sub in a class in Rakudo
# New Ticket Created by Carl Mäsak # Please include the string: [perl #81718] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81718 szabgab rakudo: class X { has $.y is rw; sub qq() { say sub $.y }; method rr() { say method $.y; qq() } }; my $z = X.new; $z.y = 23; $z.rr() p6eval rakudo 244d0f: OUTPUT«method 23Null PMC access in find_method('y') in 'X::qq' [...] szabgab so sub() in a class does not know about the attributes of the class? sorear szabgab: subs don't have an invocant parameter szabgab what is an invocant parameter? masak szabgab: subs belong to the class. attributes are declared in the class but belong to the object. therefore, the sub can't see the attributes. masak rakudo: class A { has $!x; sub foo { say before; say $!x; say after }; method bar { foo } }; A.new.bar p6eval rakudo 244d0f: OUTPUT«beforeNull PMC access in get_attr_str() in 'A::foo' [...] * masak submits rakudobug
Re: try.rakudo.org error
Also getting the same error here - website specific commands like 'chapter index' still work but nothing else seems to. Is anyone looking at fixing this? Been trying to 'sell' Perl6 to colleagues as a potential future development platform and Try was an excellent way to demonstrate it!
Re: Production Release - was Re: Questions for Survey about Perl
On 01/05/2011 02:51 PM, Gabor Szabo wrote: Let me just give a probably totally irrelevant comment here. I think most of the open source projects have been in use by many people in production environment before the project had a production release. I guess there are still places that think Linux is not good for their production environment. Probably it is true for all the projects Pm mentioned but a lot of others as well. I remember I was using svn from v0.32 or so. In most technologies I am a very late early adopter. I believe Rakudo and Perl 6 will see a gradual increase in use as they improve, get faster, have more modules etc. It will probably happen a long time before any official 1.0 release will be seen. (if ever) It is very frustrating that the progress is so slow and I can't yet use it for my daily work. It would make both my programming life and my marketing life a lot easier if I could use Rakudo at my clients. But can I seriously complain about the slow progress? Have I made a lot (or any) effort to help Rakudo? I wish I had some time contributing to the effort. Gabor http://szabgab.com/ Maybe we should focus on porting Perl 5 modules on hackathons around the events and blog about the process. Not that I did any serious shot at Perl 6 :-! Regards Racke -- LinuXia Systems = http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP = http://www.icdevgroup.org/ Interchange Development Team
Re: Production Release - was Re: Questions for Survey about Perl
I would be very interested to see something that allowed Rakudo to talk to Fortran 95. I am going to use Fortran 95 for my thesis work, and maybe I could write a module to give Rakudo a basic array language. Nothing fancy like MATLAB, NumPy or PDL, but enough to try out algorithms and prototype ideas. As it is, I'll probably use PDL or NumPy for that purpose. Daniel. On Thu, Jan 6, 2011 at 2:39 PM, Stefan Hornburg (Racke) ra...@linuxia.de wrote: On 01/05/2011 02:51 PM, Gabor Szabo wrote: Let me just give a probably totally irrelevant comment here. I think most of the open source projects have been in use by many people in production environment before the project had a production release. I guess there are still places that think Linux is not good for their production environment. Probably it is true for all the projects Pm mentioned but a lot of others as well. I remember I was using svn from v0.32 or so. In most technologies I am a very late early adopter. I believe Rakudo and Perl 6 will see a gradual increase in use as they improve, get faster, have more modules etc. It will probably happen a long time before any official 1.0 release will be seen. (if ever) It is very frustrating that the progress is so slow and I can't yet use it for my daily work. It would make both my programming life and my marketing life a lot easier if I could use Rakudo at my clients. But can I seriously complain about the slow progress? Have I made a lot (or any) effort to help Rakudo? I wish I had some time contributing to the effort. Gabor http://szabgab.com/ Maybe we should focus on porting Perl 5 modules on hackathons around the events and blog about the process. Not that I did any serious shot at Perl 6 :-! Regards Racke -- LinuXia Systems = http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP = http://www.icdevgroup.org/ Interchange Development Team -- No trees were destroyed in the generation of this email. However, a large number of electrons were severely inconvenienced.
Re: Production Release - was Re: Questions for Survey about Perl
On Thu, 2011-06-01 at 14:53 +0100, Daniel Carrera wrote: I would be very interested to see something that allowed Rakudo to talk to Fortran 95. I am going to use Fortran 95 for my thesis work, and maybe I could write a module to give Rakudo a basic array language. Nothing fancy Is there anything like this for perl5 ? In 2001/2 or so someone asked me to convert their perl implementation of a published algorithm to C. Took two hours to do the prototype from the journal article and the run-time went from 24 hours to 5 minutes. The algorithm was the ruelle-takens algorithm (ca 1979, iirc) to compute the fractal dimension of a series. Application was bioinformatics and the journal was a political science one. Very weird mix. Never had a chance to get back to it but I was thinking that an array module for perl5 would be useful. I probably still have the code stashed somewhere. like MATLAB, NumPy or PDL, but enough to try out algorithms and prototype ideas. As it is, I'll probably use PDL or NumPy for that purpose. -- --gh
Things to Implement for Rakudo
Changed the subject so people don't complain ;-) On Thu, 2011-06-01 at 09:32 -0500, Guy Hulbert wrote: The algorithm was the ruelle-takens algorithm (ca 1979, iirc) to compute the fractal dimension of a series. Google ( http://www.google.com/search?q=ruelle+takens+algorithm ) found: http://www.emayzine.com/infoage/math/math2.htm Looks like 1979 is about right. -- --gh
Re: Production Release - was Re: Questions for Survey about Perl
On Thu, Jan 6, 2011 at 3:32 PM, Guy Hulbert gwhulb...@eol.ca wrote: On Thu, 2011-06-01 at 14:53 +0100, Daniel Carrera wrote: I would be very interested to see something that allowed Rakudo to talk to Fortran 95. I am going to use Fortran 95 for my thesis work, and maybe I could write a module to give Rakudo a basic array language. Nothing fancy Is there anything like this for perl5 ? Yes, PDL. That's the Perl Data Language. And NumPy is the same thing for Python. The algorithm was the ruelle-takens algorithm (ca 1979, iirc) to compute the fractal dimension of a series. Application was bioinformatics and the journal was a political science one. Very weird mix. Never had a chance to get back to it but I was thinking that an array module for perl5 would be useful. I probably still have the code stashed somewhere. If the algorithm can be expressed largely as array operations, then PDL should give a speed more in the ballpark of the C version. Daniel. -- No trees were destroyed in the generation of this email. However, a large number of electrons were severely inconvenienced.
Re: Things to Implement for Rakudo
Is it possible to explain briefly wht the Rulle-Takens algorithm is? That web page seems to mainly explain how some fractals like the Mandelbrot set and the Julia set are generated. Is there a specific, simple algorithm that we can try to implement in PDL, Perl 5 and Perl 6? On Thu, Jan 6, 2011 at 3:36 PM, Guy Hulbert gwhulb...@eol.ca wrote: Changed the subject so people don't complain ;-) On Thu, 2011-06-01 at 09:32 -0500, Guy Hulbert wrote: The algorithm was the ruelle-takens algorithm (ca 1979, iirc) to compute the fractal dimension of a series. Google ( http://www.google.com/search?q=ruelle+takens+algorithm ) found: http://www.emayzine.com/infoage/math/math2.htm Looks like 1979 is about right. -- --gh -- No trees were destroyed in the generation of this email. However, a large number of electrons were severely inconvenienced.
Re: Things to Implement for Rakudo
On Thu, 2011-06-01 at 15:56 +0100, Daniel Carrera wrote: Is it possible to explain briefly wht the Rulle-Takens algorithm is? That web page seems to mainly explain how some fractals like the I can't remember exactly. I found the abstract for a conference paper, published in 2000, by the person for whom the work was done (not the perl programmer). The abstract describes the algorithm as proprietary but saying proprietary algorithm was very popular marketing ploy in bioinformatics around that time. It may still be. What was done was examining the GC-content of DNA sequences to look for any kind of patterns. So, I think the DNA data was converted to GC - 1 and AT - 0 and then the sequence was fed into the algorithm. I think the idea was to treat each subset of lenth M as a point in space and iterate over small M from 2 until the points were no longer space-filling. Call that K. At this point you either have a K-1 dimensional manifold or a strange attractor with some fractal dimension between K-1 and K. If I find the code I could verify this part. The algorithm works out whether or not there's an attractor and what the fractal dimension is, if so. So your sequence becomes: S = 1 0 0 1 1 1 0 0 0 1 0 ... so S1 = 1, S2 = 0, S3 = 0, ... and your points for N=3 are then: 1 0 0 (Si, i=1..3) 0 0 1 (Si, i=2..4) 0 1 1 (Si, i=3..5) ... That's as much as I remember. I think the original application was probably only interested in dimensions 2/3 because turbulence is most interesting in boundary-layers. The biologists understood none of this as far as I know (I took courses in plasma turbulence in grad school, which covered this in more detail but the biologists found the paper). I've forgotten most of grad school by now. The results were fractal dimensions in the range 5-7, iirc. No idea what that means and I doubt the biologists did either. GIGO. I may have asked them why they did not map (A,C,G,T) - (0,1,2,3) but since then, I've learned more about what GC-content implies in terms of chemistry -- it also seems to have evolutionary implications, about which I know nothing. So I don't think they even bothered trying that (since no-one else was doing it) ... old-age makes me more cynical ... and forgetful ;-). Mandelbrot set and the Julia set are generated. Is there a specific, simple algorithm that we can try to implement in PDL, Perl 5 and Perl 6? On Thu, Jan 6, 2011 at 3:36 PM, Guy Hulbert gwhulb...@eol.ca wrote: Changed the subject so people don't complain ;-) On Thu, 2011-06-01 at 09:32 -0500, Guy Hulbert wrote: The algorithm was the ruelle-takens algorithm (ca 1979, iirc) to compute the fractal dimension of a series. Google ( http://www.google.com/search?q=ruelle+takens+algorithm ) found: http://www.emayzine.com/infoage/math/math2.htm Looks like 1979 is about right. -- --gh -- --gh
Re: Things to Implement for Rakudo
Guy (): I may have asked them why they did not map (A,C,G,T) - (0,1,2,3) but since then, I've learned more about what GC-content implies in terms of chemistry -- it also seems to have evolutionary implications, about which I know nothing. With this I can help at least, being schooled in molecular biology. People who don't care much about biochemistry, feel free to ignore this post, which is admittedly not about Perl 6. DNA is ultimately to be turned into proteins, which make up our bodies. The genetic code is a hash table from all possible triplets of (A, C, G, T) -- so, 64 possible triplets -- to 21 amino acids that chain up to make proteins. 21 is smaller than 64, so there's redundancy in the genetic code (mathematicians would call this a non-injective mapping). Since several triplets may map to the same amino acid, there is some wiggle room in the choice of bases. (Furthermore, some amino acids are chemically quite similar, giving even more potential wiggle room.) Now, let's say you're a thermophilic bacterium living around the hot springs of Iceland. Your DNA is under a lot of stress from the heat, and the bonds break up all the time. Something needs to be done, stable DNA is important. You decide -- well, natural selection pushes you as a group, really -- to favour GC bonds rather than AT bonds, because a GC bond has three hydrogen bonds whereas an AT bond has only two. You're constrained by the proteins you want to produce, but the wiggle room allows you to favour GC bonds. Higher GC content - more hydrogen bonds - sturdier DNA - better survival. Hopefully that also explains why the mapping in the algorithm can be GC - 1 and AT - 0. From the viewpoint of hydrogen bonds, only this simpler mapping matters. http://en.wikipedia.org/wiki/Genetic_code http://en.wikipedia.org/wiki/GC-content http://en.wikipedia.org/wiki/Injective_function http://en.wikipedia.org/wiki/Thermophile Hope that helps, // Carl
Re: Things to Implement for Rakudo
On Thu, 2011-06-01 at 18:48 +0100, Carl Mäsak wrote: People who don't care much about biochemistry, feel free to ignore this post, which is admittedly not about Perl 6. DNA is ultimately to be turned into proteins, which make up our bodies. I know all that ... I followed up privately to DC. I'll do the same for you to clarify. I felt that describing an algorithm to the list was probably on topic but the science is definitely not. To clarify what I posted to the list. When I said evolutionary implications about which I know nothing, I had already hinted (GIGO). I know quite a bit about what biologists think about evolutionary implications but I don't believe in science by consensus. Moreover this is an area where the consensus changes rapidly. -- --gh
Re: Production Release - was Re: Questions for Survey about Perl
Wendell Hatcher wendell_hatc...@comcast.net writes: My point is make it a production release so peeps can push it to the powers that be in the corporate world. Valid point. Will http://packages.debian.org/experimental/rakudo be continued? This has been the longest production build in test in the history of mankind. If this was a real world project it would have been dead sometime ago. Don't worry too much. Python 3000 took about 8 years. (Though not sure about betas for testing.) Kind regards, Steffen -- Steffen Schwigon s...@renormalist.net Dresden Perl Mongers http://dresden-pm.org/
Re: Production Release - was Re: Questions for Survey about Perl
Daniel Carrera dcarr...@gmail.com writes: If they are critics to begin with, the size of the test suite will not impress them. They could just as well conclude that Perl 6 must have a million corner cases and gotchas that have to be tested. I have never seen a language review that I thought was worth reading that made a point out of the number of tests. The relevance of testing has changed over the last decade, so it is by itself quite a new trend, relative to programming in general. Today “test coverage” actually became a very strong argument for software. It become trendy on “normal” software, spilled over to formerly “untestable” software like Web applications and is even getting momentum on other difficult areas like Operating Systems. So I think the test suite is a strong Pro matching the zeitgeist. Kind regards, Steffen -- Steffen Schwigon s...@renormalist.net Dresden Perl Mongers http://dresden-pm.org/
Re: Production Release - was Re: Questions for Survey about Perl
Stefan Hornburg (Racke) ra...@linuxia.de writes: Maybe we should focus on porting Perl 5 modules With the current size of CPAN this is IMHO not the way to go. A Perl5 embedding interface is more promising. Pugs had that in a not perfect but usable state. Not sure about Rakudo. An embedded Perl5 in Rakudo would even legitimate a special handling that does not need to be generic in the usual “all foreign-language vs. all Perl6-compilers” standard, because it's about Perl-on-Perl. Once I could easily access CPAN modules I would immediately start using Perl 6 for the daily routine work. The language has everything I need, I just can't hack all the things I regularly use from CPAN. Kind regards, Steffen -- Steffen Schwigon s...@renormalist.net Dresden Perl Mongers http://dresden-pm.org/
[perl6/specs] b046dd: minor grammaro in S02
Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: b046dd93327ea79fa8cab85acdd3ab3a6cabf9bf https://github.com/perl6/specs/commit/b046dd93327ea79fa8cab85acdd3ab3a6cabf9bf Author: diakopter diakop...@gmail.com Date: 2011-01-06 (Thu, 06 Jan 2011) Changed paths: M S02-bits.pod Log Message: --- minor grammaro in S02