Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Perl6 'fun'

Name: 🦋 2018-02-26 6:00

Let's make a Jolly module that will export some invisible terms and operators. We'll then sprinkle them into our Christmassy friends' code:

unit module Jolly;
sub term:«\c[INVISIBLE TIMES]» is export { 42 }
sub infix:«\c[INVISIBLE TIMES]» is export {
$^a × $^b
}

sub prefix:«\c[INVISIBLE SEPARATOR]» (|)
is looser(&[,]) is export
{
say "Ho-ho-ho!";

}


We've used the same character for the term and the infix operator. That's fine, as Perl 6 has fairly strict expectation of terms being followed by operators and vice versa, so it'll know when we meant to use the term or when to use the infix operator. Here's the resultant Grinch code, along with the output it produces:



⁣say 42⁢⁢;
# OUTPUT:
# 1764
# Ho-ho-ho!


That'll sure be fun to debug!

Name: Mentifex 2018-02-26 6:21

http://wiki.opencog.org/w/Ghost -- needs porting from Perl5 to Perl6.

Name: Anonymous 2018-02-26 7:55

>>2
how is this related to the thread?

Name: Anonymous 2018-02-26 7:56

>>3
both are perl6 related.............

Name: Anonymous 2018-02-26 8:59

i poast https://mitpress.mit.edu/sicp/full-text/book/book.html
how is relate?
both are computer!

Name: Mentifex 2018-02-26 13:00

>>5

http://www.listbox.com/member/archive/303/2018/02

is the sum total of everything /prog/ related.

Name: Anonymous 2018-02-26 18:50

With invisible operators and overloadable ';', i don't get why Perl6 is not more popular by now.

Name: Anonymous 2018-02-27 1:50

>>7
spaghetti code

Name: Anonymous 2018-02-27 5:55

>>8
INVISIBLE SPAGHETTI

Name: Anonymous 2018-02-27 11:51

>>7
because this doesn't solve any actual problems, it's just mental masturbation for code golfers

Name: Anonymous 2018-02-27 16:31

>>10


t. Someone that hasn't used perl6.

Name: Anonymous 2018-02-27 17:20

>>11
sweet dubs bro

Name: Anonymous 2018-02-28 5:18

>>6
\(x=y.=:(\phi):\phi!x.\supset.\phi!y \ Df.\)

Acquiring vocabulary (-> capable of reproducing, using the vocabule)
Acquiring understanding over a vocabule (-> by using it, identify its appropriateness for each use case)
If a vocabule has levels (weights) of appropriateness close to the ones of another for each (or most) of the cases, then they are similar.
That's how vocabules compete. If they're similar, they're in the same niche.
Take for instance two tools from different brands that do basically the same thing. The brand is an irrelevant aspect (in most cases) for its use, and so you'd have no preference, except maybe if in a single aspect (lile price) one betters significantly the other, or even shallowly.
Why do they compete? Why not have both? Being so similar, of course, there's no motive to have both. But also there's no motive to not have both, except for their cost of acquisition.
There's also the cost of maintenance, which is, simply, the cost of continuously using the vocabule, for the calibration of the understanding of a vocabule against an environment of slowly shifting uses, to keep it usable.
And why would an intelligence care about this? Why not simply refuse to acquire more vocabules, and let the ones already owned slowly decay? Even if there are no absolute values of what's good and what's bad, of what's better and what's worse, there's some sort of mysterious connection between an intelligence and its vocabules that implies that the decay of these vocabules implies a decay of this intelligence.
It could be, in our case of humans, that we have a genetic preference for our own conservation, and this preference implies also a preference for the conservation of our intelligence, and this implies the search for the minimization of this maintenance's costs, which, associated to the acquired knowledge and understanding over the environment, implies finally a set of preferences over this environment's state, and a worry for how to keep it in such state. Those are our values.

Sorry for the stupid rambling, I started writing and couldn't stop. It seems I've come to a dead end for now.

Name: Anonymous 2018-02-28 9:51

>>1

Why didn't you tell us useful thing e.g like how to code in bbs color instead???

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List