Commit Graph

75 Commits

Author SHA1 Message Date
Samantha McVey
7f0fff0adf
Fit some more things into 80 columns in the Perl 6 doc 2017-02-06 23:36:02 -08:00
Samantha McVey
f7e27eb94b
Have perl6 highlight as perl6 now
Also remove some trailing spaces.
2016-12-31 15:27:27 -08:00
samcv
eef2636106 [perl6] add myself as contributor (#2530) 2016-10-28 22:03:22 +02:00
samcv
46a02d6ee2 [perl6] Explain orelse operator, add more information about exceptions, add an Iterables section... (#2505)
* More clear names for the module and variables demonstrating declarators (our) for sub's and a few more details in comments

* $! is only set when we use "try" not when we disarm an exception with or/orelse thanks to ZoffixZnet for the information here provided here: https://rt.perl.org/Ticket/Display.html?id=129923

* Fix the example from the last commit. Some changes in the try/catch paragraph

* Change it so the vim modeline doesn't show up in the final html file(not even as a comment)

* Minor grammar fix

* Add more information about the .exception method and explain how orelse differs from the or operator

* Add link to the Perl6 docs and explain that while the Perl 6 advent calander is a great reference it may be a little older (Posts stopped in Dec of 2015).  Also make the columns fit better to 80 characters

* Fix in issue with a few of the regex examples, where Perl 6 would warn because the spacing was ambiguous. Explain how you must use two spaces between strings so spacing isn't ambiguous or use the :s adverb to make whitespace meaningful explicitly.  Also explain 'm' and using delimiters other than / /

* Improve the readability of the phasers introduction

* Fix the remaining regex that will warn because of ambiguous spacing

* Add an example for ‘quietly’ since it has been implemented now

* Update link for precedence order to point to current documentation

* Add a section on iterables and show examples for using the lazy method

* Some corrections

* Change downloaded filename to .p6 instead of .pl

* Show vertical line for 80 column width in vim modeline

* Update the exceptions section to vendethiel's suggestions
2016-10-27 10:38:21 +02:00
samcv
e336c909b9 Perl 6: Make information about Hash tables correct. Rewrite the example for dynamically scoped variables.. (#2475)
* Explain that you cannot pass immutable values like integers to subs even if you use $n is rw.

* Add myself as a contributor

* Remove contributor since I am not a major contributor

* Add many more smartmatch examples. Make the ternary operatory clearer and add a code example for it. Make the section for && and || have a working code example and show the output it gives

* Fix assigning $a $b and $c values in the && operator section

* Rename a few things so they don't conflict with variables in other parts of the code

* Remove extra dashes

* Move description of smartmatch type checks toward the end of that section

* Better names for scoping examples

* Redo the example for dynamically scoped variables so the example is better and functions properly when ran (old example did not work properly when running it by itself)

* Rename these classes so they aren't named the same as the ones above

* Add information about the different twigils in Perl 6. This makes understanding what $. $! and $* are and how they relate. Also complete the renaming in the previous commit

* Fix capitalization and indenting here

* Using the word interpolate to mean accessing an element of an array is not the proper terminology. Using the word interpolate is usually associated with things such as this: say "@names = { @names.perl }"

* Make the wording a little clearer for arrays

* Remove incorrect information about hashes.  Hashes are not arrays of pairs although Perl 6 makes it easy to use them as such

* Make the subroutine text read better

* Clean up the Object Model introduction section

* Fix the section on interpolating all elements of an array

* Use the word attribute instead of field since this is the wording that the perl 6 documentation uses for these objects

* Fix column width in a few places

* More clearly mark which twigils are used for "normal" variables and which ones are used on "objects". This makes the flow from the # Scoping => # Twigil => # Object Model section smoother

* Semi-rewrite the example for object inheritance and use more natural names.  Also rename class A to class Attrib-Class

* Clean up the scoping introduction a little

* Remove a leftover line from rewriting the inheritance example

* More gradually introduce exceptions and fix a typo, as well as adding a few examples

* Reorder introduction of packages to be more natural. Show how to "use" a package before we show how to create and declare our own modules

* Avoid using the word 'use' because we're not refering to the perl keyword 'use'
2016-10-20 15:59:55 +02:00
samcv
8f9021a84d Perl6: Add many more smartmatch examples. Make the ternary operator clearer (#2472)
* Explain that you cannot pass immutable values like integers to subs even if you use $n is rw.

* Add myself as a contributor

* Remove contributor since I am not a major contributor

* Add many more smartmatch examples. Make the ternary operatory clearer and add a code example for it. Make the section for && and || have a working code example and show the output it gives

* Fix assigning $a $b and $c values in the && operator section

* Rename a few things so they don't conflict with variables in other parts of the code

* Remove extra dashes

* Move description of smartmatch type checks toward the end of that section
2016-10-18 21:49:42 +02:00
samcv
0d11887c22 Perl6: Explain that Integers Can't be Passed and Modified in Sub's Even If Using `is rw´ (#2471)
* Explain that you cannot pass immutable values like integers to subs even if you use $n is rw.

* Add myself as a contributor

* Remove contributor since I am not a major contributor
2016-10-18 18:59:13 +02:00
Dustin Williams
74ea20793d Fixed instance where wrong variable name was used 2016-03-20 20:02:02 -07:00
Jacob Ward
cc31c2f0c5 Fix typo referenced in Issue #2075 2016-01-07 22:08:17 -07:00
Adam Bard
bd96b562a0 Merge pull request #2076 from tlvb/p6-packages-foobar
[perl 6] changed code output to as stated in comments
2016-01-06 03:11:23 +08:00
Owen Rodda
e31dc8b5a7 Fix #2040 2015-12-27 16:29:52 -05:00
Leo Bärring
5556d6e839 changed code output to as stated in comments
The comments state that Foo::Bar::inc in the package variable example should increase $Foo::Bar::n and then print it.
This did not happen, as `say ++$n;` was placed outside the block of the sub Foo::Bar::inc.
The commit puts `say ++$n;` inside the block of Foo::Bar::inc.
2015-12-26 20:15:51 +01:00
Ryan Gonzalez
dff8b792c6 Fix typo in Perl 6 example (closes #2025) 2015-11-19 17:53:49 -06:00
ven
9e4274f7c7 Merge pull request #2028 from zoffixznet/catch-var
Perl6: $! is not available inside the CATCH{} (Possibly)
2015-11-17 20:30:20 +01:00
Zoffix Znet
e538185c0a $! is not available inside the CATCH{} 2015-11-17 13:47:55 -05:00
ven
341066bb86 Address #1390
@Zoffixnet, awaiting your review
2015-11-08 22:04:44 +01:00
Paulo Henrique Rodrigues Pinheiro
4829589880 Removed references to compilers other than the Rakudo. 2015-10-15 19:31:38 -03:00
Zoffix Znet
dc010e3863 Many fixes mentioned in #1390 2015-10-10 13:58:25 -04:00
Levi Bostian
dcd9093d64 Merge pull request #1404 from tecknicaltom/master
[perl6] fix the output of ff example
2015-10-09 10:11:46 -05:00
ven
c48b1b533c Merge pull request #1393 from aayushranaut/master
Fixes typos and removed useless spaces
2015-10-08 22:50:04 +02:00
Tom Samstag
4b74a7a76d fix the output of ff example 2015-10-08 08:46:54 -07:00
Gabriel Halley
960ee4a185 removing whitespace all over 2015-10-07 23:11:24 -04:00
Aayush Ranaut
83a229e3f5 Fixes typos 2015-10-07 20:50:30 -04:00
Jack Kuan
62f27af4c3 Update perl6.html.markdown 2015-09-23 00:04:02 -04:00
Aleks-Daniel Jakimenko
45c70baa69 In perl6, 0 is not falsey anymore 2015-08-25 22:31:25 +03:00
ven
ed8f34eb33 fix typo, resolves #1156 2015-06-27 16:07:21 +02:00
Jonathan Scott Duff
2162639cd9 Merge remote-tracking branch 'upstream/master'
Conflicts:
	perl6.html.markdown
2015-06-25 22:58:56 -05:00
David Warring
cbf2f6d371 Parrot is no longer supported.
Also mention MoarVM before JVM.
2015-05-13 12:20:54 +12:00
ven
483997e434 Fix #1094 2015-05-09 23:05:58 +02:00
Jonathan Scott Duff
0410644161 Add a link about parrot suspension 2015-04-24 17:11:31 -05:00
ven
6e9ccfaea3 fix #1032
and a few more fixes/moving arounds
2015-04-15 14:33:52 +02:00
Philippe Bricout
4c46a456bd Update perl6.html.markdown
($_.chars > 50) ~~ True : this is always True.
2015-04-01 15:13:59 +02:00
Jeff Erickson
965d7972d1 Minor typo: fixed curly bracket direction (} -> {) 2015-03-25 16:53:46 -04:00
ronaldxs
7243f13fc6 thrice .... gather ^3 counts three times "0 1 2" not 5
Probably just a paste-o mistake.  Want to count 3 times not 5.
2015-03-20 16:40:25 -04:00
Philippe Bricout
cd462d1cc5 Perl6, minor change in comments
It seems "when" should be replace by "given" at the end of the comment.
2015-03-01 18:04:05 +01:00
Philippe Bricout
862d90da8f Update perl6.html.markdown
typo, wrong sub name in comment : mod => x-store
2015-02-27 16:31:15 +01:00
ven
63749de972 fix #937 2015-01-25 21:24:50 +01:00
raiph
4ef0e78009 Fix link to synopses and call them 'design docs' 2015-01-09 18:39:56 -05:00
ven
1c52c5ea12 @wryk++ 2014-12-29 22:48:01 +01:00
ven
f323083ba4 rework of the tutorial 2014-12-24 18:22:48 +01:00
ugexe
acbea221a4 0 // 5 = 0
11:59 < nebuchadnezzar> m: say Any // Nil // 0 // 5
    11:59 <+camelia> rakudo-moar 38e77b: OUTPUT«0␤»
    11:59 < nebuchadnezzar> shouldn't it be 5?
    12:00 < ugexe> 0 is a defined value
    12:00 < ugexe> m: say Any || Nil || 0 || 5;
    12:00 <+camelia> rakudo-moar 38e77b: OUTPUT«5␤»
2014-11-16 12:16:26 -05:00
Kishore Relangi
9576d80b75 Update perl6.html.markdown
It is actually generating fibonacci series
2014-11-10 15:50:47 +05:30
Peter Palfrader
74533ea292 Fix a comment that indicates what "say @array" will print.
We assigned 6 to @array[1] a few lines before, so say @array will print
"a 6 b", not "a 2 b".
2014-10-12 19:41:07 +02:00
Nami-Doc
d786c94f84 Fix a braino
caught by @wryk++
2014-10-07 15:47:06 +02:00
Nami-Doc
160c826847 Capturing captures, and numbering them
also, multi-indexing in arrays
also, labeled loops (draft)
also, arrays vs $() vs parcel vs ... (@moritz++)
2014-09-27 21:57:10 +02:00
Nami-Doc
b6ba516743 Exception thingies! 2014-09-23 23:28:24 +02:00
Nami-Doc
931db8c685 Regexes thingies. 2014-09-13 21:37:35 +02:00
Nami-Doc
013112b9b3 Clarifications about *+* and ... with a sub
mrf++
2014-08-27 12:38:23 +02:00
Nami-Doc
1828ef068d Make the text fit. 2014-08-21 00:34:39 +02:00
Nami-Doc
0b2f1ff6f1 Update perl6 to fix some of its quirks 2014-08-14 21:35:14 +02:00