munificent/magpie là dự án Python với 376 sao. The Magpie programming language
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
_/Oo>
/(MM)
A___/ m a g p i e
_______AV_h_h___________________________
AV
AV
AV
Magpie is a small dynamically-typed programming language built around patterns,
classes, and multimethods. It has a prototype interpreter that runs on the JVM
and an in-progress bytecode VM written in C++.
It looks a bit like this:
// Generates the sequence of turns needed to draw a dragon curve.
// See: http://en.wikipedia.org/wiki/Dragon_curve
def dragon(0, _)
""
end
def dragon(n is Num, turn)
dragon(n - 1, "R") + turn + dragon(n - 1, "L")
end
print(dragon(5, ""))
Its goal is to let you write code that's beautiful and easy to read, and to
allow you to seamlessly extend the language and libraries as you see fit.
You can learn more about the language at http://magpie-lang.org/.
Getting Started
Magpie has two implementations right now. There is a prototype interpreter
written in Java. This supports more of the language, but is (of course) tied to
the JVM and is much slower. It's main job was to let me iterate on the
language semantics quickly.
Now that the language has (mostly) settled down, I've started writing a
bytecode VM in C++. This is the "real" Magpie implementation, but it's still a
work in progress. All current development is going on here. The Java interpreter
is mainly a reference.
Building the Bytecode VM
Pull down the code. It lives here: https://github.com/munificent/magpie
Generate a project. From the root directory of the magpie repo:
$ cd <path to magpie repo>
$ ./run_gyp
Set the output directory (XCode 4 only). Recent versions of XCode build
into some shared directory not related to where the project is. This borks
Magpie since it's a command-line executable that loads the core library
from a path relative to that executable.
Unfortunately, this setting isn't in the project itself, so gyp can't help.
After you generate the project, open it in XCode, then:
Choose "File > Project Settings...".
On the "Build" tab, click "Advanced...".
Set "Build Location" to "Custom > Relative to Workspace".
Set "Products" to build.
Set "Intermediates" to build/Intermediates.
Click "Done".
This should ensure that Magpie gets built into build/<config>/magpie.
Build the project. Do what you usually do on your OS to build the thing.
On Mac, that means open the XCode project and build from there. In Windows,
there is a Visual Studio solution you can build. On Linux, you can just run
make.
Building the Java Interpreter
Pull down the code. It lives here: https://github.com/munificent/magpie
Build it. The repo includes an Eclipse project if that's your thing. If
you rock the command-line, you can just do:
$ cd magpie
$ ant jar
Running Magpie
Magpie is a command line app. After building it, you can run it by doing:
$ ./magpie
This will run the Java interpreter or the bytecode VM, whichever is more recent.
If you run it with no arguments, it drops you into a simple REPL. Enter a
Magpie expression and it will immediately evaluate it. Since everything is an
expression, even things like class definitions, you can build entire programs
incrementally this way. Here's one to get you started:
for i in 1..20 do print("<your name> is awesome!")
If you pass an argument to the app, it will assume it's a path to a script
file and it will load and execute it:
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/munificent/magpie là nguồn chính thức.
munificent/magpie có bao nhiêu sao?
munificent/magpie có 376 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/munificent/magpie. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
munificent/magpie có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho munificent/magpie. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
munificent/magpie có trang demo không?
Dự án có trang chủ ở http://magpie-lang.org. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
munificent/magpie là gì?
munificent/magpie (munificent/magpie) là dự án Python trên GitHub. Theo mô tả gốc: The Magpie programming language
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về magpie?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về magpie.