#perl6
Explore tagged Tumblr posts
Text
まつもとゆきひろ氏が“幻のPerl6”から学んだ教訓 「OSSの最大の敵」と「セカンドシステムの危険性」 https://logmi.jp/tech/articles/329933
1 note
·
View note
Text
Perl 6 is crazyballs
disclaimer: 100% of the syntax I'm writing is not verified by anything beyond my brain. If there are simple syntax errors (missing parens, commas, etc), get over it. If there are more glaring errors (fundamentally incorrect program that simply doesn't work in the way I've described) please let me know.
If you don't want to read this, you should definitely check out the Wow, Perl 6! presentation slides (the talk is linked on there too).
Anyway,
Perl6 is fucking amazing, albeit akin to heiroglyphics. The hyper operator and whatever-star are really nice to have. Hyper operator is basically the same as .map, but it’s a hint to the compiler to use multithreading. So instead of doing
foo.map(|a| a.bar()) (Rust syntax)
map(A.bar, foo) (Python syntax, assuming foo is an iterator of type A)
map(lambda a: a.bar(), foo) (Python syntax with a lambda)
foo.map(function (a) { a.bar() }) (Javascript syntax without lambda)
foo.map((a) => a.bar()) (Javascript syntax with labmda)
You instead have something like this:
foo».bar (Perl6 syntax, unicode operator)
Or, if you don't want to use the » unicode operator, you can use the ascii operator (previously known as "Texas operators") >> - although I must admit the unicode is much prettier.
foo>>.bar (Perl6 syntax, Texas operator)
The main detractor from the language, I would say, is that it is so s l o w. I'd like credit the VM's startup time as one of the main bottlenecks, but I haven't used it enough to tell if it's just slow overall.
Grammars are a really cool part of the language, too. The main problem I have with them is that since the language is so unicode-centric, it's not very good with handling binary formats, which isn't so great. But, the fact that I can just write out tokens and rules in this language is fucking incredible. And with the Grammar::BNF library, you can write your grammars in straight-up BNF.
Other highlights include:
The meta-reduce operators, e.g. [+] 1, 2, 3 is the same as writing 1 + 2 + 3.†
The "where" clause, which lets you apply constraints to parameters, e.g. sub foo(Int $bar { where $bar > 0 }) { ... } will fail if you call foo with a non-Int, or an Int less than 0.
Anonymous variables in blocks. Using the previous example, sub foo(Int $bar { where $_ > 0 }) { ... } - note the $_ in the where clause. Very nifty and refactorable.
The "whatever star", * used in place of any expression you might want to have will just turn that expression into an anonymous function. For example††, foo.map(*.bar) does the exact same thing as the the hyper-operator example, foo>>.bar.†††
Infix operator definition, complete with operator precedence. sub infix:<+>(Int $a, Int $b) { $a - $b } is totally valid, but this only exists in lexical scope, so it doesn't bleed into code outside of your file (or block, wherever you define it).
This isn't to mention a bunch of other shit I just haven't gotten to. Perl6 is huge. There's just so much to it. Check out that presentation I linked above - it's a really great introduction to what the language has to offer, and is so overwhelming to believe that this simply exists.
† "This is just like in J and APL!" the programming language nerd might say - and you're right, this is exactly like J's "slide" adverb (not sure about APL, I haven't used it at all). For trivia, J's equivalent of the example would be +/ 1 2 3 - if you wrote this in Perl 6 (i.e. [+/] 1 2 3) you would actually get a list of (1, 3, 6) because it's a collective reduce, keeping each result of the reduce in its location. Lil Perl 6 trivia for ya :)
†† Here's a more complex example: [+] foo.grep(/^ /).map(*.substr(0,1).Int) will sum up the first digit of all strings in a list whose first character is a number.
††† "Why are there two ways to accomplish the exact same thing?" Perl's motto has proudly been TMTOWTDI - "there's more than one way to do it", which is the polar opposite of Python's "there's one obvious way to do it", which I would argue has been dissolving with the advent of its iterators - but that's another post altogether.
6 notes
·
View notes
Link
Ben Davies has published a module that may well change ad-hoc debugging in Raku: Trait::Traced. It...
0 notes
Text
Perl 6 的名字被拿出來談...
Perl 6 的名字被拿出來談…
在「Is Perl 6 Being Renamed?」這邊看到提到 Perl 6 名字的問題,主要是因為 Perl 6 跟現有 Perl 5 已經是不同的東西 (有點類似於當初 Python 2 到 Python 3 的計畫,但是差異比 Python 那邊多很多),而導致被提出來討論是否還要繼續使用 Perl 這個名字了:「“Perl” in the name “Perl 6” is confusing and irritating」。
When Perl 6 was announced, it was seen the way that Perl 2, Perl 3, Perl 4, and Perl 5 were seen: replacements for “$VERSION – 1”. Over time, it became clear that though Perl 6…
View On WordPress
0 notes
Photo
Think Perl 6 PDF파일 및 LaTex파일 공개
출처: https://twitter.com/nogoodnickleft/status/868197580337020928
"Think Perl 6" now available from @OReillyMedia: https://t.co/ShVAwmJAeM and as a free PDF at https://t.co/bCohzhqabm (it's #OpenSource!)
— Moritz Lenz (@nogoodnickleft) 2017년 5월 26일
안녕하세요, 저는 동아시아 문자 처리에 관심이 많아 2012년도경에 한자정보를 담은 Unihan Database를 찾아보았습니다.
이때 일본인 Dan Kogai(小飼弾, Japanese open-source developer, former CTO of Livedoor) 씨의 Unihan Perl라이브러리( https://metacpan.org/pod/Unicode::Unihan ) Perl자료를 보았습니다.
이후, 오드리 탕(唐鳳, Audrey Tang)씨가 개발한 萌典(Moedict)의 한자정보에 대하여 관심이 많아 연구하다 Perl에 입문하게 ��� 사람입니다.
이번에 O'Reilly에서 새로운 Perl6책 "Think Perl 6 - How to Think Like a Computer Scientist"가 나왔습니다.
이 책이 종이책으로 판매가 되었는데, 저자인 Laurent Rosenfeld씨께서 오픈소스로 온라인으로 전자책 형식인 LaTex파일, PDF파일로도 공개를 하였습니다.
책 소개를 보면, Think Perl 6는 아무런 경험이 없는 사람에게 컴퓨터과학의 소개 및 프로그래밍에 대한 소개를 하는 책이라고 하군요.
이 책은 주로 Perl6를 가르치는 것이 아니라 "Perl 6"를 이용하여 프로그래밍 기술을 알려주는 것이라고 하군요. 이 책을 다 읽으면 Perl6라는 언어로 컴퓨터 과학, 소프트웨어 프로그래밍 및 문제 해결을 가르치는 것이라고 하군요.
Think Perl 6 is an introduction to computer science and programming intended for people with little or no experience. This aim of this book is not primarily to teach Perl 6, but instead to teach the art of programming, using the Perl 6 language. After having completed this book, you should hopefully be able to write programs to solve relatively difficult problems in Perl 6, but my main aim is to teach computer science, software programming, and problem solving rather than solely to teach the Perl 6 language itself.
Perl6에 대해 관심 많으신 분이나 프로그래밍 초심자가 "Think Perl6"로 Perl6를 입문하면 괜찮을 듯 합니다.
O'reilly Book Link: http://shop.oreilly.com/product/0636920065883.do
Book : http://greenteapress.com/wp/think-perl-6/
Free PDF Link: http://greenteapress.com/thinkperl6/thinkperl6.pdf
Latex Source[Github]: https://github.com/LaurentRosenfeld/thinkperl6/
2 notes
·
View notes
Quote
オードリー・タンって台湾の大臣として有名ですけど、昔はPerl6のインタプリタ作った人として有名でした。
加藤公一(はむかず)さんはTwitterを使っています
21 notes
·
View notes
Video
Solve Exercism Problems in Raku (Perl 6) : "Wordy"
0 notes
Text
如果 perl6 重新命名 叫 Camlia 可好?
這完全會混淆兩者,其實“兩種編程語言”有很大不同,是不兼容源代碼的,perl5 是用C 寫的核心,雖然已經很成熟,但核心代碼太龐大,perl6 相對perl5 做出了革命性的變革,新的內核更小、速度更快、外部擴展API 更加清晰,簡直就是輕鬆上路的駱駝。而這些人就認為應該給 perl6 更改名稱。
用戶 lizmat 建議將 perl6 改為“Camelia Programming Language”或簡稱“Camlia”(還有人認為改成 Raku 等等),並且列舉一下幾點:
將名字改為 Camlia 將對 Google 和 DuckDuckGo 等搜索引擎來說,易於搜索,不會混淆
logo / mascot 不需要改變
Camlia 這個名字,仍然帶有 Perlish 的意義
Camlia 是 roast 中一個規範的實現
Camella 標識仍然會屬於其作者 Larry Wall 的版權
lizmat 的觀點得到一些人的認同,他們表示在今天,很多人只是錯誤地將 perl5 認為是舊版本,perl6 是新版本。 perl6 其實是一種新的語言,相比 perl5,它具有更小的社區和生態系統,就像每一種新語言一樣,需要找到自己的方法來更廣泛地使用。當然有一點必須承認,到目前為止,它還是站在老語言的肩膀上。
有的人表示���不在意它是否重命名,這部分人表示重命名會導致很多各種各樣的問題,而相比名字本身,更關心的是語言本身。
有的人認為改名在某種意義上意味與歷史決裂,與之前的版本劃清界限。很多人因為將 perl5 和 perl6 混淆了,然後漸漸離開了它,如果把 perl6 命名為 Camlia,那些離開的的人也不會回來。 perl 6 作為一個名字已經出現了十幾年,如果有人看到perl6 的消息,可能還會吸引他們的注意力,想到他們之前用過這個語言,可能想著它是不是做了什麼新鮮的改變,說不定會回來瞅一眼。如果更改 perl6 的名字,對 perl5 也不是一件什麼好事,Perl5 也需要證明自己還活著。
Perl 是一個強大的品牌,我們不能忽視它在不使用 Perl 的人中已獲得的聲譽。
關於這個觀點討論,每個人都是各有各的看法,各位看官怎麼看?
.
from 如果 perl6 重新命名 叫 Camlia 可好? via KKNEWS
0 notes
Text
Nordic Perl Workshop 2012
Nordic Perl Workshop 2012
Just back from the Nordic Perl Workshop 2012 in Stockholm, Sweden.
It has been quite some time since I have attended a Perl community event, so it felt awesome to see old friends again and at the same time meeting new people.
The Nordic Perl Workshop 2012 was arranged by Claes Jakobsson, who always set up a nice 1 track setting, so you do not have the dilemma of choosing between tracks. You can…
View On WordPress
0 notes
Text
Perl Adventure Series
Last month I offered a bold proposal to my Perl Mongers group (MadMongers): Let’s create a video game from scratch as a learning exercise!
At MadMongers we give a talk every month on some area of Perl technology. However, we almost never put those lessons into a practical hands-on form. Yet, we have members who are everything from “I have never used Perl.” to “I have used Perl every day for 20 years.” So my proposal was to build something relatively simple so that we could build it in roughly 12 two-hour sessions over the course of a year, but complicated enough to have real decisions we could make about its design. That way we could put to use skills like using git, creating a CPAN distribution, writing tests, using data storage mechanisms, parsing text, creating user interfaces, making web services, etc.
When I was at Gamehole Con last year, Andy Looney (creator of Fluxx) introduced me to a series of games called Parsely Adventures by Jared Sorensen. If you have ever played old text-based adventure games like Zork, then Parsely adventures are basically that except where one person becomes the parser (the computer), and all the other players enter commands by saying verb noun combinations to move the adventure forward. Well, my idea here is to turn this back around on itself once more and turn one of the Parsley Adventures back into a computer game like Zork!
I’m calling this the Adventure Series, and our first meetup is next week on Tuesday at 7pm (US Central). There we’ll be setting up the git repository, creating a Dist::Zilla config file, designing the initial mission data structure (most likely in YAML), and writing a few tests. If you can make it, you should join us. This should be a grand adventure in more ways than one.
Over the course of the series we hope to make a real working game with both a command-line and fully visual web interface. The group will be workshopping a Perl 5 version of it live at each MadMongers meeting. In addition, one of our members will be attempting to simultaneously write the whole thing in Perl 6. All of our code will be open source and published on GitHub, and hopefully also CPAN.
0 notes
Text
Azure pipelines task
Azure pipelines task Azure pipelines task Latest news headlines today Azure pipelines task set PATH in azure pipelines in Windows I am using Azure Pipelines to build a Rakudo binary for Raku (previously aka Perl 6) in Windows. This is my azure-pipelines.yml file: The pipeline script builds perl6 binary fine inside $(Build.SourcesDirectory)/rakudo-win/bin folder. There is indeed perl6.exe inside…
View On WordPress
0 notes
Text
Programming language operator overloading
one thing I’ve noticed when I see people talk about operator overloading is that they either hate it or are neutral towards it. I can kind of see why you would hate that, because it’s easy to abuse. In my opinion, however, you have to explicitly implement it in order for it to be abused. As the classic joke goes:
Patient: Doctor, it hurts when I do this. Doctor: Then don’t do that.
So I’m going to allow operator overloading in this language.
One thing that I’ve seen in Perl6 is that you’re allowed to define operators to be pretty much anything; one example I’ve seen is someone defining a silly “shrug” operator in order to make a 50/50 decision, so you’d end up doing something like:
say 'Coke' ¯\(°_o)/¯ 'Pepsi';
While I think allowing any random string of characters to be defined as an operator is a little overkill, I think that a string of any number of well-defined operator characters is a good place to start. So, if you want to define an operator that will find the union of two sets (in my language), you might write something like this:
operator fn | (a: Set, b: Set) -> Set { retn a.union(b); }
(note that a lot of this is hypothetical, because I don’t have types or type checking yet).
But you get a lot of power from this! You’ve essentially made a conversion of a binary operator into a function that takes two arguments - which is all a binary operator actually is.
So who’s to say that operators for the most basic of functions can’t be allowed, either? All of a sudden, operators are no longer defined in the interpreter, but rather, in the standard library. If you have a naming convention for operator functions (e.g. Python’s “magic” or “dunder” methods, like __add__, __sub__, __mul__, __div__, etc), then you are able to define default behavior at runtime, without requiring a recompile of the interpreter/language itself. Like this:
operator fn + (a: Any, b: Any) -> Any { retn a.__add__(b); } operator fn - (a: Any, b: Any) -> Any { retn a.__sub__(b); }
And before you start throwing full wine bottles at your computer screen and saying “THAT’S EVEN MORE OF A FOOTGUN THAN REGULAR OPERATOR OVERLOADING YOU BASTARD”, remember that this is standard behavior you’re toying with. If you do something like, say, overload the + operator to actually just subtract things instead, you’re treading in “play stupid games, win stupid prizes” territory. And it’s not like overloading a core operator is going to propagate outside of your source file - since function definitions stay in their lexical space - unless it’s imported by someone else. But again, if you’re going to export a global operator overload, the general understanding is that you know what you’re doing.
(thx @gdanskcityofficial for listening to me bloviate in IRC about this and even offering suggestions for it)
4 notes
·
View notes
Link
Ben Davies has published a module that may well change ad-hoc debugging in Raku: Trait::Traced. It...
0 notes
Text
There's a clueless person on the perl6 mailing list.
I mean that in the nicest possible way. He's polite, humble, enthusiastic. He tries to be helpful to others in his turn. His jokes are tryhard, but he doesn't make many of them.
He's just... utterly clueless. He seems incapable of getting past any setback. He's very grateful when you give him a fish, and if you try to gently show him how he might have caught it himself, he'll be grateful for that too. But he won't learn from it.
Nobody on the mailing list has complained. I wouldn't be surprised if he's been discussed on IRC, but if so people seem content to just let him be. There's only one of him and he's easy to ignore.
I'm not sure what my point is, here.
4 notes
·
View notes
Text
Larry Wall has approved renaming Perl 6 to Raku
https://github.com/perl6/problem-solving/pull/89 Comments
0 notes
Text
Top Most Useful Continuous Integration DevOps Tools
(In no particular order)
Continuous Integration Tools have become an essential part of agile software development. The use of CI tools is essential in order to build and deliver incremental features sprint after sprint.
With the addition of features coding errors are expected to occur sooner or later. In some cases, the level of severity of such coding errors is so high that they render the software useless. Luckily we have a method to prevent the integration of such errors and stop them from making harmful changes to the Software Configuration Management (SCM).
The solution is none other than a CI server. A CI server acts as a gatekeeper that keeps a tab on the quality of code entering the system. This gatekeeper is able to identify the errors in code even if the code is already integrated into the SCM.
In this blog, I will guide you to a number of Continuous Integration Tools each with its unique benefits and qualities. It will be up to you to choose which CI Tool best fits your agile development needs.
1. Jenkins
Jenkins is one of the leading open source continuous integration tool. With the help of Jenkins, developers are able to build applications that are highly scalable. Jenkins is also a part of the Continuous Delivery Foundation (CDF).
Jenkins is built in Java. It possesses the ability to help in real time testing and reporting on changes made to a large code base, given that the changes being made are isolated. By utilizing this CI Continuous Tool developers and programmers are able to quickly spot and get rid of defects that plague the code base and automation testing of builds.
Features Of Jenkins
There are a great number of features associated with the leading continuous integration tool but here a few to get started:
Continuous Integration And Continuous Delivery
Easy Installation
Easy Configuration
Plugins Supported
Extremely Extensible
Distributed System
Supported Languages
Python
Ruby
Java
Android
C/C++
2. TeamCity
TeamCity is a CI tool developed by JetBrains. It is a powerful continuous integration tools which has some of the most unique features and benefits out there. It is also mostly regarded as the Enterprise level CI tool.
With the help of Team City, you can run an automated test on the server without committing changes this helps keep the code clean and manageable. It also supports on the fly progress reporting. It also incorporates pre-build configuration templates and project hierarchy.
Features Of Team City
As ever, this Continuous Integration DevOps Tool also has a number of features. The major ones are listed below:
More Than 100 Build Configurations
Three Build Agents
Full Custom Features
Public Issue Tracker And Forum
Free Forever
3. Travis CI
Travis CI is a free and open source. It allows you to sync your GitHub projects directly to Travis CI and by doing so your code is ready for testing within minutes. According to the website, there are more than 900K projects using Travis CI with 600K users.
When it comes to databases and some other services, they are already installed and ready to use. You can enable the services from the build configuration. You also have the ability to test each and every pull request before it merges into the project. Updating, staging or production is easy with fairly easy with Travis CI.
Features Of Travis CI
Following are the major feature that comes with Travis CI:
Quick Setup
Live Build Views
Clean VM for Every Build
Auto Deployment On Passing Builds
Live Build Views
Pull Request Support
Pre-Installed Database Services
Mac, Linux, iOS Support
Supported Languages
Android, C, C#, C++, CLOJURE, CRYSTAL, D ,DART ,ELIXIR ,ELM ,ERLANG, F# ,GENERIC ,GO ,GROOVY ,HASKELL ,HAXE ,JAVA ,JAVASCRIPT ,JULIA, MINIMAL ,VISUAL ,BASIC ,OBJECTIVE-C ,PERL ,PERL6 ,PHP ,PYTHON ,R ,RUBY ,RUST ,SCALA ,SMALLTALK ,SWIFT ,NIX
4. Bamboo
Bamboo is often the choice of professional DevOps teams. This Continuous Integration DevOps tool not only handles Continuous Integration but also deployment, delivery, automated builds, and testing in a single workflow. It also integrated with JIRA and Bitbucket. Suffice to say that this tool also supports a number of languages and technologies such as the Ducker, AWS, SVN, and Mercurial.
Bamboo is not free but serves extremely well for the price it charges.
Features OF Bamboo
Bamboo has some extensive features with great support and flexibility. Following are some of the features that are most prominent:
Parallel Batch Tests
Simple Setup
Hosted And Non-Permissive Version
Real-Time Collaboration
Git Integration
5. GitLab CI
GitLab refers to themselves as “A full DevOps Toolchain” GitLab CI Tool is a single application for the entire software development lifecycle. Not just Continues Integration but project planning, source code management, monitoring, security, and CI/CD.
It also offers the functionality to deploy cloud-native applications with GitLab’s Kubernetes.
GitLab Continuous Integration Tool also has a friendly interface.
Features Of GitLab CI
Following are some of the unique and major features of GitLab CI:
Secure Registry For Docker Images
Change Metadata Without Slash Commands
API’s For Extra Features
Identifies Areas That Need Improvement
Inner Sourcing Of Internal Repositories
6. Circle CI
This is an extremely flexible CI tool. Circle CI is able to run in environments such as a cross-platform mobile app, Docker Clusters, or Python API server. The major focus of Circle CI is to mitigate bugs and improve the quality of the code and final application altogether. Every piece of code is testing before it gets merged into the master or base code.
Circle CI provides you with the shortest distance from idea to execution. It allows you to automate your development process in a safe and quick manner.
Features Of Circle CI
Circle CI has more features than we can mention in the scope of this blog. For now, here are some of the prominent features:
Workflow For Job Orchestration
First-Class Docker Support
Custom CPU/RAM
Language-Agnostic Support
Powerful Caching
SSH Or Local Builds For Easy Debugging
Unmatched Security
In-depth Insights
7. CodeShip
CodeShip Continuous Integration Tool is a staple for fast builds. With the help of CodeShip CI Tool, builds run in seconds. It also automates the workflow of the development and deployment procedures. CodeShip CI Continuous Tool also provides a simple, turn-key SaaS CI/CD platform which is fast and flexible at the same time.
Features Of CodeShip
There is a long list of features that come by adopting CodeShip CI Continuous Tool. Given below are some of the features that gives CodeShip an advantage over others:
Expert Developer Support
Fast Builds, Always Reliable
Build Runs On Pre-Configured Machines
Set Up Everything Via Simple Web Interface
Fully Flexible And Adaptable
Integrates With Everything You Need
Turnkey, Integrated Deployment That Can Be Set Up With One Click
8. UrbanCode
UrbanCode CI application is developed by IBM. This CI Tool combines visibility, traceability and excellent auditing features in a single application package. It helps orchestrate the development process from start to finish.
The UrbanCode CI consists of four distinct sections which are IBM UrbanCode Deploy, UrbanCode Release, UrbanCode Build, and UrbanCode Velocity.
Features Of UrbanCode
IBM has some of the most unique features when it comes to tools for continuous delivery. Some of the features of IBM’s UrbanCode are given below:
Increased Delivery Of Software Delivery
Reduction In Deployment Failure
Streamline Development Of Multi channel Apps
Security And Stability
Hybrid Cloud Environment Modeling
Drag And Drop Automation
9. Buildkite
Buildkite Continuous Integration Tools offers lightning-fast testing and delivery for software projects. It ruins fast, scalable, secure and continuous integration pipelines on your own infrastructure. It also helps run automated builds.
The main uses of this CI tool are to run build jobs, reporting the status and output logs of the job.
Features Of Buildkite
It provides some very detailed features each of which requires a paragraph of its own to explain. Following are some of the titles of features that this CI tool provides:
Build Agent That Gives You Full Control
Tools To Scale Across Thousands Of Agents
Pipeline That Can Automate More Than Just Your Tests
Build Logs That Are Beautiful And Powerful
Customize Any Part Of The Build Workflow
Unlimited Language Support
Cloud And Environment Agnostic
Secure Control Integration
10. Semaphore
This Continuous Integration Tool allows you to test and deploy your code with the push of a button. With Semaphore CI Continuous Tool you have the option to build great products at a very high velocity. When some code is pushed this CI tool automatically runs your custom designed build, testing and deploying pipeline.
Semaphore CI can be integrated with GitHub and supports a number of languages and frameworks.
Features of Semaphore
Many features are associated with Semaphore CI, following are some of the prominent features:
Easy Setup Process
Automated Parallel Testing
Extremely Fast CI
Can cover projects of different sizes
Integrated with GitHub and Bitbucket
0 notes