6 ms·
Magritte: A Language for Pipe-Based Programming [pdf]
- userbinator 7y agoTaking "pipe-based programming" to its logical conclusion results in http://www.linusakesson.net/programming/pipelogic/ http://www.linusakesson.net/programming/pipelogic/
- guicho271828 7y ago1.4 The Desktop-Scripting Problem Related to the shell-language design problem is the desktop-scripting problem: How should unrelated programs written in different languages be integrated—especially in an ad-hoc manner in a desktop environment? Such a task can require a large amount of glue code, written by users who are unfamiliar with the inner workings of the programs they are using. Notable attempts at solving the desktop-scripting prob- lem include the TCL language [Ousterhout, 1989] and Guile Scheme [Blandy, 1998]. However, while most of these approaches use a large, robust language, it still remains difficult to integrate them with external programs—instead putting the burden on those programs to integrate with their system. We believe a shell-based approach is promising Hmm, Scheme as a large language? Well, I don't know much about the extensions Guile Scheme has over RxRS, would hope for someone to add info here.
- zeckalpha 7y agoSeparate from any implementation specific extension, the various RxRS can be considered small or large, too.
- chubot 7y agoThis is only a partial answer, but I remember the designers of Julia saying that the Scheme spec spends many dozens of pages on the semantics of integers and floats. That makes the language large. Remember that Scheme is not the lambda calculus -- you need dynamic types like integers, strings, vectors, hash tables, IO, etc. to get anything done. In contrast in Julia they said that the semantics of numbers are defined in Julia. Julia has a much richer notion of number than any other language AFAICT, e.g. int8 .. int128, uint8 .. uint128, vectors of those, matrices of those, rationals, etc. They're all on the "same level" -- there aren't primitives vs. libraries, as far as I know. https://docs.julialang.org/en/v1/manual/integers-and-floating-point-numbers/ https://docs.julialang.org/en/v1/manual/integers-and-floatin... https://docs.julialang.org/en/v1/manual/complex-and-rational-numbers/ https://docs.julialang.org/en/v1/manual/complex-and-rational... https://docs.julialang.org/en/v1/manual/arrays/ https://docs.julialang.org/en/v1/manual/arrays/ https://docs.julialang.org/en/v1/manual/conversion-and-promotion/ https://docs.julialang.org/en/v1/manual/conversion-and-promo...
- akavel 7y agoI must make a mandatory fanboi shoutout to: https://luna-lang.org https://luna-lang.org
- 6thaccount2 7y agoThis looks seriously cool and partly resembles how I think computation should be in that it is a series of steps that meat together in a data pipeline.
- aloknnikhil 7y agoGreat concept but I found their execution lackluster. The studio (IDE) is an Atom-based editor that is horribly slow and very buggy. I'm still waiting for a cleaner, smoother implementation. Honestly, if they were reinventing the GUI, might as well be an extension for VS Code.
- alexvoda 7y agoVS Code is not universally extensible. Atom is. Extensions in VS Code have a lot more limitations. This is also in part because VS Code was designed to be more performant than Atom.
- foobar_ 7y agoThe problem with all these data flow languages is they don't have control flow.
- jcelerier 7y agothere is dataflow with some level of control flow (boolean conditions, boolean loops, and event-driven conditions) in https://ossia.io https://ossia.io - it's tailored to artistic uses however :-) the details are in there : https://tel.archives-ouvertes.fr/tel-01947309/document https://tel.archives-ouvertes.fr/tel-01947309/document
- foobar_ 7y agoThat looks interesting! I've been using pure data on and off for a while. It seems to be the most complete one so far.
- breck 7y agoLooks interesting! Side note: here's another "Magritte" from 1983: http://reports-archive.adm.cs.cmu.edu/anon/scan/CMU-CS-83-132.pdf http://reports-archive.adm.cs.cmu.edu/anon/scan/CMU-CS-83-13.... Is there a connection?
- mpweiher 7y agoYes, both look very interesting! Here's another one: the Magritte meta-description framework for Squeak Smalltalk, often used with the Seaside continuation-based web framework: http://www.hpi.uni-potsdam.de/hirschfeld/seaside/tutorial?chapter=10 http://www.hpi.uni-potsdam.de/hirschfeld/seaside/tutorial?ch...
- jpfed 7y agoThe twist here is that this language doesn't use actual pipes; it just creates representations of pipes that can be used by a different interpreter.
- pugworthy 7y agoIt is mind boggling that despite the name, they did not (given the (I assume) joke with the name) say, "Ceci n'est pas une pipe" anywhere in the paper. Only once does the phrase, "This is not" occur, but completely out of context of Magritte's most famous painting. I'm serious - this isn't Joke 101, but this is Marketing 101 in some respects.
- kingo55 7y agoFor context, this is the painting referenced above: https://medium.com/lefkosh/art-analysis-this-is-not-a-pipe-d64bd8be06bb https://medium.com/lefkosh/art-analysis-this-is-not-a-pipe-d...
- jonas21 7y agoPerhaps that's best left as an exercise for the reader.
- samplatt 7y agoI assume they felt it was a bit too on the nose? Anyone familiar with Magritte will be familiar with the painting; any attempts to shoehorn the quote in there would have felt forced, I think. Maybe if they had a website to go with it... but this is just a paper. Plus, as jpfed says below: The twist here is that this language doesn't use actual pipes; it just creates representations of pipes that can be used by a different interpreter.
- compressedgas 7y ago> The implementation is written in Ruby, and the source code is publicly available at https://github.com/prg‑titech/magritte https://github.com/prg‑titech/magritte.
- brigandish 7y agoSomehow the link had CGI escaping in it and I ended up on the 404, hopefully this one should work https://github.com/prg-titech/magritte https://github.com/prg-titech/magritte Thanks for sharing.
- compressedgas 7y agoIt was copied directly from the PDF and contains a Unicode hyphen U+2011 encoded in UTF-8. I should have checked for such and replaced it.
- chubot 7y agoThis looks cool! I linked it on my wiki page of alternative shells: https://github.com/oilshell/oil/wiki/ExternalResources https://github.com/oilshell/oil/wiki/ExternalResources (which is cited on the first page of the thesis!) I hope that Oil can a lot of these things in a backward compatible way, but I still have to read it and understand it more.
- elmolino89 7y agoYou may consider adding to awk-like group of programs pawk: https://github.com/alecthomas/pawk https://github.com/alecthomas/pawk It gives you a more readable and concise way to select a colum, split it and sau snip out few characters.
- j88439h84 7y agoMario provides an implementation of shell pipes for Python. https://github.com/python-mario/mario https://github.com/python-mario/mario
- zokier 7y agoPlease stop spamming that project all the time.
- lioeters 7y agoIn this linked document for Magritte, it describes its pipeline operator in a section called "Syntax Design - Linear Composition: Why Not Lisp?". ..The problem is the prefix-only calling convention that requires a back-and-forth movement of the cursor, and causes the expression to expand leftwards, opposite of the direction of the user’s typing. While some languages have some support for linear composition using operators such as Clojure’s arrow macros or OCaml’s |> operator, the integration of these macros with the underlying subsystem is shallow. I question this last statement. Just this weekend I was reading about Hy's (based on Clojure's) threading macros: "Threading macros, also known as arrow macros, convert nested function calls into a linear flow of function calls" -> (or the threading macro) is used to avoid nesting of expressions. The threading macro inserts each expression into the next expression’s first argument place. ->> (or the threading tail macro) is similar to the threading macro, but instead of inserting each expression into the next expression’s first argument, it appends it as the last argument. At least to me this seems far from "shallow" and even more useful/flexible than the pipeline operator.
- usgroup 7y agoYeah basically. As a ex Clojure user, I’d agree. It’s not shallow and if one finds it shallow then one can write their own macro to be less shallow.
- lioeters 7y agoAs I'm educating myself on Lispy languages, may I ask why the "ex" for Clojure and what (if any) other language you've moved onto?
- usgroup 7y agoI've always used many languages, but I tried clojure for data processing stuff. I moved away from it because the number of libraries was tiny; I had to write my own libraries for doing basic SQLy things. Some hard things were easy in Clojure, but too many easy things were hard.
- wppick 7y agoThe problem as it's defined in this thesis sounds a lot like the problem of microservice architecture. I'm curious how something like protobufs would compare in solving this problem
- usgroup 7y agoI wrote clojure for a while. Forward chaining basically facilitates pipe based programming. When it fits it’s great, but when it doesn’t try code is ugly. Some computations just want to be imperative. IMO, if you can avoid developing programming fetishes; power to you.
- estomagordo 7y agoJust remember to pipe with the | character. ¦ n'est pas une pipe.
- ska 7y agoBut that would ruin the joke - surely in Magritte "| ceci n'est pas une pipe"
- jimbo1qaz 7y agoReminds me of nushell, which pipes around 2D tables (which can instead store hierarchical structured data, for example when reading toml files): https://news.ycombinator.com/item?id=20783006 https://news.ycombinator.com/item?id=20783006
- whaddawhat 7y agoThis is not a programming language
- mark_l_watson 7y agoExcept for the comparisons with Lisp in the third section, I thought the idea of pipes with complex data structures to be a pretty neat idea. Also, this is for a Master’S Thesis from the University of Tokyo? That looks like a lot of work for a MS thesis.