Snusk - Øl & En Spliff.wmv
- Length: 1:19
- Rating: ( ratings)
- Views:
- Author: Snusk111
Tags: 2pac bad hash hasj hip hop hot norsk Norwegian rap snusk spliff trip weed øl
Et vers! Last ned på: www.uhort.no/artist/snusk
hightimes 2008 pt3
- Length: 1:46
- Rating: ( ratings)
- Views:
- Author: jahhoover
Tags: 420 amsterdam bush cannabis doctor hash haze herbs marijuana skunk weed wiet
Bush Doctor live amsterdam hightimes cup 2008
Smashing a guitar of my head.
- Length: 1:43
- Rating: ( ratings)
- Views:
- Author: klord69rocks
Tags: acoustic against grass guitar hash hendrix in jimi killing machine name rage slipknot smoking stoned the weed who
Smashed a guitar of my head. Smashed it off the wall.
Hashish Anandaground Style
- Length: 5:59
- Rating: ( ratings)
- Views:
- Author: Anandaground
Tags: bubblehash ganja hanf hasch haschisch hash hashish hemp marihuana marijuana pollinator
Hash Production
p6apclps #82 Perl 6 Apocalypse
- Length: 6:29
- Rating: ( ratings)
- Views:
- Author: h4ck3rm1k3
Tags: Apocalypse larry perl perl6 wall
http://www.perlfoundation.org/perl6 - - sub { return 1 } { 1, 2 } sub { return 1, 2 } { 1, 2, 3 } sub { return 1, 2, 3 } { 1, 2, 3 =] 4 } sub { return 1, 2, 3 =] 4 } { pair 1,2,3,4 } sub { return 1 =] 2, 3 =] 4 } { gethash() } sub { return gethash() } This is a syntactic distinction, not a semantic one. That last two examples are taken to be subs despite containing functions returning pairs or hashes. Note that it would save no typing to recognize the "pair" method specially, since "hash" automatically does pairing of non-pairs. So we distinguish these: { pair 1,2,3,4 } sub { return 1 =] 2, 3 =] 4 } hash { 1,2,3,4 } hash { 1 =] 2, 3 =] 4 } If you're worried about the compiler making bad choices before deciding whether it's a subroutine or hash, you shouldn't. The two constructs really aren't all that far apart. The "hash" keyword could in fact be considered a function that takes as its first argument a closure returning a hash value list. So the compiler might just compile the block as a closure in either case, then do the obvious optimization. Although we say the "sub" keyword is now optional on a closure, the "return" keyword only works with an explicit "sub". (There are other ways to return values from a block.) [Update: This is slightly inaccurate; "return" works from any "Routine". See below.] Subroutine Declarations You may still declare a sub just as you did in Perl 5, in which case it behaves much like it did in Perl 5. To wit, the arguments still come in via the @_ array. When you say: sub foo { print @_ } that is just syntactic sugar for this: sub foo (*@_) { print @_ } That is, Perl 6 will supply a default parameter signature (the precise meaning of which will be explained below) that makes the subroutine behave much as a Perl 5 programmer would expect, with all the arguments in @_. It is not exactly the same, however. You may not modify the arguments via @_ without declaring explicitly that you want to do so. So in the rare cases that you want to do that, you'll have to supply the "rw" trait (meaning the arguments should be considered "read-write"): sub swap (*@_ is rw) { @_[0,1] = @_ [1,0] }; The Perl5-to-Perl6 translator will try to catch those cases and add the parameter signature for you when you want to modify the arguments. (Note: we will try to be consistent about using "arguments" to mean the actual values you pass to the function when you call it, and "parameters" to mean the list of lexical variables declared as part of the subroutine signature, through which you access the values that were passed to the subroutine.) Perl 5 has rudimentary prototypes, but Perl 6 type signatures can be much more expressive if you want them to be. The entire declaration is much more flexible. Not only can you declare types and names of individual parameters, you can add various traits to the parameters, such as "rw" above. You can add traits to the subroutine itself, and declare the return type. In fact, at some level or other, the subroutine's signature and return type are also just traits. You might even consider the body of the subroutine to be a trait. For those of you who have been following Perl 6 development, you'll wonder why we're now calling these "traits" rather than "properties". They're all really still properties under the hood, but we're trying to distinguish those properties that are expected to be set on containers at compile time from those that are expected to be set on values at run time. So compile-time properties are now called "traits". Basically, if you declare it with "is", it's a trait, and if you add it onto a value with "but", it's a property. The main reason for making the distinction is to keep the concepts straight in people's minds, but it also has the nice benefit of telling the optimizer which properties are subject to change, and which ones aren't. A given trait may or may not be implemented as a method on the underlying container object. You're not supposed to care. [Update: Actually, they're done as mixins if the container type doesn't already support the role. See A12.] There are actually several syntactic forms of trait: rule trait :w { is [ident][ \( [traitparam] \)]? | will [ident] [closure] | of [type] | returns [type] } [Update: the ":w" is no longer needed on a rule.] (We're specifying the syntax here using Perl 6 regexes. If you don't know about those, go back and read Apocalypse 5.) A "[type]" is actually
Page: 1 of 2148

