Git Product home page Git Product logo

mpp-language-blender's Introduction

⚠️ CAUTION

The developer team released OCaml 5.0.0 in December 2022. This release sports a full rewrite of its runtime system for shared-memory parallel programming using domains and native support for concurrent programming using effect handlers.

Owing to the large number of changes, the initial 5.0 release is more experimental than usual. It is recommended that all users wanting a stable release use the 4.14 release which will continue to be supported and updated while 5.x reaches feature and stability parity. Similarly, if you need one of the ports not yet supported in the 5.0 release you must use the 4.14 release.

The initial release of OCaml 5.0 only supports the native compiler under ARM64 and x86-64 architectures under Linux, macOS and the BSDs. On Windows, only the MinGW-w64 port is supported in OCaml 5.0 and the Cygwin port is restored in 5.1. On Linux, native code support for RISC-V and s390x/IBM Z is available in OCaml 5.1 and in 5.2 for Power.

❗ From OCaml 5.0 onwards, native compilation is available only on 64-bit systems. Native compilation on 32-bit systems is no longer available, nor are there plans to bring it back. The bytecode compiler will continue to work on all architectures.

Branch trunk Branch 5.2 Branch 5.1 Branch 5.0 Branch 4.14

Github CI Build Status (trunk branch) Github CI Hygiene Status (trunk branch) AppVeyor Build Status (trunk branch)

Github CI Build Status (5.2 branch) AppVeyor Build Status (5.2 branch)

Github CI Build Status (5.1 branch) AppVeyor Build Status (5.1 branch)

Github CI Build Status (5.0 branch) AppVeyor Build Status (5.0 branch)

Github CI Build Status (4.14 branch) AppVeyor Build Status (4.14 branch)

README

Overview

OCaml is a functional, statically-typed programming language from the ML family, offering a powerful module system extending that of Standard ML and a feature-rich, class-based object system.

OCaml comprises two compilers. One generates bytecode which is then interpreted by a C program. This compiler runs quickly, generates compact code with moderate memory requirements, and is portable to many 32 or 64 bit platforms. Performance of generated programs is quite good for a bytecoded implementation. This compiler can be used either as a standalone, batch-oriented compiler that produces standalone programs, or as an interactive REPL system.

The other compiler generates high-performance native code for a number of processors. Compilation takes longer and generates bigger code, but the generated programs deliver excellent performance, while retaining the moderate memory requirements of the bytecode compiler. The native-code compiler currently runs on the following platforms:

Tier 1 (actively maintained) Tier 2 (maintained when possible)

x86 64 bits

Linux, macOS, Windows, FreeBSD

NetBSD, OpenBSD, OmniOS (Solaris)

ARM 64 bits

Linux, macOS

FreeBSD, OpenBSD, NetBSD

Power 64 bits

Linux (little-endian, ABIv2)

Linux (big-endian, ABIv2)

RISC-V 64 bits

Linux

IBM Z (s390x)

Linux

Other operating systems for the processors above have not been tested, but the compiler may work under other operating systems with little work.

All files marked "Copyright INRIA" in this distribution are Copyright © 1996-2023 Institut National de Recherche en Informatique et en Automatique (INRIA) and distributed under the conditions stated in file LICENSE.

Installation

See the file INSTALL.adoc for installation instructions on machines running Unix, Linux, macOS, WSL and Cygwin. For native Microsoft Windows, see README.win32.adoc.

Documentation

The OCaml manual is distributed in HTML, PDF, and Emacs Info files. It is available at

Availability

The complete OCaml distribution can be accessed at

Keeping in Touch with the Caml Community

There is an active and friendly discussion forum at

The OCaml mailing list is the longest-running forum for OCaml users. You can email it at

You can subscribe and access list archives via the Web interface at

There also exist other mailing lists, chat channels, and various other forums around the internet for getting in touch with the OCaml and ML family language community. These can be accessed at

In particular, the IRC channel #ocaml on Libera has a long history and welcomes questions.

Bug Reports and User Feedback

Please report bugs using the issue tracker at https://github.com/ocaml/ocaml/issues

To be effective, bug reports should include a complete program (preferably small) that exhibits the unexpected behavior, and the configuration you are using (machine type, etc).

For information on contributing to OCaml, see HACKING.adoc and CONTRIBUTING.md.

Separately maintained components

Some libraries and tools which used to be part of the OCaml distribution are now maintained separately and distributed as OPAM packages. Please use the issue trackers at their respective new homes:

Library Removed since OPAM package

The Stream and Genlex standard library modules

OCaml 5.0

camlp-streams

The Graphics library

OCaml 4.09

graphics

The Num library

OCaml 4.06

num

The OCamlbuild tool

OCaml 4.03

ocamlbuild

The camlp4 tool

OCaml 4.02

camlp4

The LablTk library

OCaml 4.02

labltk

The CamlDBM library

OCaml 4.00

dbm

The OCamlWinTop Windows toplevel

OCaml 4.00

none

mpp-language-blender's People

Contributors

agarwal avatar avsm avatar chris00 avatar dmbaturin avatar pw374 avatar vasilisp avatar zapashcanon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mpp-language-blender's Issues

locations in foreign code: level 2 is missing

Latest version(s) of MPP print locations when using foreign code blocks, and it makes it easier to track errors. But the locations disappear after the foreign code has been evaluated. Evaluation of the foreign code should print source locations. However it's not as trivial as saying it: the format of the location depends on the final language, not the 1st nor the 2nd. But, it should be not too hard to make a version that works with CPP locations. This will probably bump MPP version to 0.2.x. as it will need a few changes in the interface.

Errors should identify the program

When mpp is used in scripts, it is not always clear what the origin of an error is. Thus MPP should identify itself in error messages.

check if value of variable equals some constant

I want to do:

mpp -set x=true foo.mpp
mpp -set x=false foo.mpp

and then in foo.mpp, do something like

{{if (( get x )) = true
  Got true.
}}
{{if (( get x )) = false
  Got false.
}}

Is there some way to do the above?

OCaml 5 friendly version

Currently in Opam it says:

depends      "ocaml" {>= "4.03" & < "5.0.0"} "dune" {> "1.11.0"} "stdlib-shims"

please provide documentation

At the minimum, we need the following:

  • Each module should have a high level description of what the module is about.
  • Each function and type should be described.

Thanks! This would make it much easier to use MPP.

Stack overflow

From the root of the ocaml.org repository, the following command

mpp -so '((!' -sc '!))' -son '{{!' -scn '!}}' -soc '' -scc '' -sec '' -sos '{{<' -scs '>}}' -its template/main.mpp -o /tmp/c.html -set "filename=x" -set "page=/tmp/preprocessed_99problems.html"

terminates with the exception Stack_overflow where /tmp/preprocessed_99problems.html is the result of processing the file site/learn/tutorials/99problems.md with omd.

Lexer captures newline after `else`

{{! ifdef foo something !}}
{{! else
  something else
!}}

is invalid because the else command is lexed as "else\n". it seems newline is a valid character in an indentifier and does not count as whitespace. This isn't intuitive.

error handling

Sometimes (not always) MPP dies on errors and errors messages are mute, well they shouldn't be. ==> let error messages be!

ideas_draft

(I'm simply copy-pasting the content of the file ideas_draft.md as I'm in the process of cleaning the repo)

Currently, what is between the opening token and the first following
space is the name of the block. I'm wondering how bad it would be, in
order to avoid that "mandatory space", to consider that names can't be
builtin names. That would allow the space to be optional.

In this context, it would mean that builtin names are sort of keywords...

library function corresponding to app

Is there a library function corresponding to the main app's functionality? As far as I can tell, it is within mpp_main.ml but not exposed as a callable function. I would like to have the main functionality available with strings as the input/output, rather than files. This would allow more efficient processing in external scripts and avoid having to make messy system calls.

bash output adds new lines

The bash language output uses echo, so it adds new-lines.

{
cat <<EOF
hello {< printf "world" >}!
EOF
} | mpp -l bash | bash

gives

hello 
world!

Instead of echo ... it could use printf '%s' ... (it's POSIX sh).

relative file path handling

Consider you have a file in a directory called src/ with the following contents:

$ cat src/foo.mpp
(( input bar.txt ))

Currently, the file bar.txt is searched relative to the current working directory of whatever process you're calling mpp from. I think it would be more intuitive if the path was interpreted as relative to src/, i.e. the directory in which the mpp file resides.

One issue with this is related to my request in #7 for a library function corresponding to the command line app. If you provide a function val mpp_on_string : string -> string, which directly operates on a string, then you don't have a file path to get the parent directory from. A solution could be to have such a function also take an optional filename argument. If this argument is not provided, then you fallback to using the current working directory.

Does MPP escape the command properly?

If I run

mpp -so '((!' -sc '!))' -son '{{!' -scn '!}}' -soc '' -scc '' -sec '' -sos '{{<' -scs '>}}' -its  -set "filename=site/index.md" -set "page=ocaml.org/index.html.tmp" tpl/main.mpp -o "ocaml.org/index.html" 

in a terminal, I get

sh: 1: Syntax error: redirection unexpected

The strings are properly escaped. Is it possible that the problem comes from mpp trying to execute commands and not escaping properly the arguments? (No time to investigate right now)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.