26
5
Argument Parser | Re: Factor (re.factorcode.org)
27
3
28
4

From the STOMP homepage:

What is it?

STOMP is the Simple (or Streaming) Text Orientated Messaging Protocol.

STOMP provides an interoperable wire format so that STOMP clients can communicate with any STOMP message broker to provide easy and widespread messaging interoperability among many languages, platforms and brokers.

Simple Design

STOMP is a very simple and easy to implement protocol, coming from the HTTP school of design; the server side may be hard to implement well, but it is very easy to write a client to get yourself connected. For example you can use Telnet to login to any STOMP broker and interact with it!

From John's blog post:

In the interest of learning Factor, I thought I would write a bit about parsing the STOMP protocol, and then about how to implement a client library using connection-oriented networking, interacting with it using mailboxes, and then building a command-line interface using the command-loop vocabulary.

There are many STOMP servers and clients available in different languages. I tried a few and decided that Apache ActiveMQ was one of the most convenient to setup and reliable to work with, but others are available as well.

29
4

Discussion on lobsters

30
-1

Discussion on lobsters

31
4
Time My Meeting | Re: Factor (re.factorcode.org)
32
5

John B's blog post calls it:

. . . a pretty neat hour long introduction going over a lot of features that users new to the language might be interested in.

The video creator's description:

This is an introductory tutorial for a stack-based (concatenative) programming language Factor. It covers some basic language constructs and a few features of the interactive development environment that is shipped with Factor.

I've re-shot my two prior recordings combining everything into a single video.

33
6
34
6
35
6
submitted 4 months ago* (last edited 4 months ago) by Andy@programming.dev to c/concatenative@programming.dev

I don't yet have a feel for any key differences between pql and PRQL.

36
11

Copied from the readme:


cosh is a concatenative command-line shell.

Why?

Basic shell operations like ls, ps, stat, and so on are implemented as functions that return first-class values, as opposed to relying on executables that return text streams. This makes working with the results simpler:

  • Find file paths matching a string, and search those files for data

sh:

find . -iname '*test*' -print0 | xargs -0 grep data

cosh:

lsr; [test m] grep; [f<; [data m] grep] map
  • Find all processes using more than 500M of memory:

sh:

ps --no-headers aux | awk '$6>500000'

cosh:

ps; [mem get; 1000 1000 *; 500 *; >] grep

A small set of versatile primitives means that less needs to be remembered when compared with typical shells (see e.g. the various flags for cut(1)), though some commands may be longer as a result:

  • Get the second and third columns from each row of a CSV file:

sh:

cut -d, -f2,3 test-data/csv

cosh:

test-data/csv f<; [chomp; , split; (1 2) get] map
  • Sort files by modification time:

sh:

ls -tr

cosh:

ls; [[stat; mtime get] 2 apply; <=>] sortp

Arithmetical operators and XML/JSON/CSV encoding/decoding functions reduce the number of times that it becomes necessary to use a more full-featured programming language or a third-party executable:

  • Increment floating-point numbers in file:

sh:

sed 's/$/+10/' nums | bc

cosh:

nums f<; [chomp; 10 +] map
  • Get the first value from the "zxcv" array member of a JSON file:

sh:

jq .zxcv[0] test-data/json2

cosh:

test-data/json2 f<; from-json; zxcv get; 0 get

It also integrates with external executable calls, where that is necessary:

  • Print certificate data:

bash:

for i in `find . -iname '*.pem'`; do openssl x509 -in $i -text -noout; done

cosh:

lsr; [pem$ m] grep; [{openssl x509 -in {} -text -noout}] map;

See the full documentation for more details.

37
3
38
4

Just because Exercism doesn't offer your favorite language as an official track, it doesn't mean we can't play at all. Post some solutions to the weekly challenges in the language of your choice!

39
4

Copied from the project's readme:


Introduction

Scale is a procedual and object oriented concatenative stack oriented compiled programming language inspired by Lua and Porth.

The Compiler is a source-to-source compiler, as it converts your source code to valid C code, that is then compiled by Clang.

Scale supports both 32-bit and 64-bit systems, but 64-bit is strongly recommended.

Examples

Examples can be found in the examples directory.

Installation

Run the following commands:

$ clang++ install-sclc.cpp -o install-sclc -std=gnu++17
$ ./install-sclc

Documentation

A list of all features can be found here.

The Scale Framework documentation can be viewed by running the following command:

$ sclc -doc-for Scale
40
13

Copied from the project's readme:


  • blacklight is a programming language which is concurrent, stack-based, and concatenative (BLPL)

  • blacklight is a virtual machine for implementing highly concurrent languages (BLVM)

  • blacklight is a data interchange format for communicating between processes and across networks (BLBC)

Features

blacklight (BLVM) is awesome, here's a few reasons why:

  • easy to use builtin parallelism through native concurrency primatives
  • threadsafe communication between concurrency units
  • rich datatype primitives
  • an easy to use homoiconic Forth-like assembly language (BLPL)
  • runtime bytecode manipulation and generation
  • UTF-8 native datatypes
  • multi-architecture and cross-platform (currently: x86_64, ARM, macos, linux, windows)
  • (in progress) highly optimized vector operations on supported CPUs
  • (planned) security contexts and permissions

Documentation

BLPOC

The current implementation of blacklight is a proof-of-concept. It's functional but intended primarily for proving out features, strategies, and specifications. Once The ABI is stable it will be reimplemented with optimization and compatibility in mind against a full test suite. As is, there is very little about blacklight that isn't subject to change to better reflect the results of research and experimentation.

41
4

A new wiki page has been started to show case example programs in various catlangs.

42
8
Rye language (ryelang.org)

From the homepage:

Rye is a high level, homoiconic dynamic programming language based on ideas from Rebol, flavored by Factor, Linux shell and Go. It's still in development, but we are focused on making it useful as soon as possible.

It's written in Go and could also be seen as Go's scripting companion as Go's libraries are very easy to integrate, and Rye can be embedded into Go programs as a scripting or a config language.

I believe that as a language becomes higher level it starts bridging the gap towards user interfaces. Rye has great emphasis on interactive use (Rye console) where we intend to also explore that.

43
11
44
6
45
6
46
6
Reverse Vowels | Re: Factor (re.factorcode.org)
47
6
Dragonbox | Re: Factor (re.factorcode.org)

Hey that's me! No, not the amazing Factor dev that authored this post. No, not the contributor who jumped in and saved the day. I'm the

one of the members of the Factor Discord server

who complained about numbers! Woohoo!

48
2
Divmods | Re: Factor (re.factorcode.org)
49
4
50
4
Crontab | Re: Factor (re.factorcode.org)

Parsing!

view more: ‹ prev next ›

Concatenative Programming

138 readers
1 users here now

Hello!

This space is for sharing news, experiences, announcements, questions, showcases, etc. regarding concatenative programming concepts and tools.

We'll also take any programming described as:


From Wikipedia:

A concatenative programming language is a point-free computer programming language in which all expressions denote functions, and the juxtaposition of expressions denotes function composition. Concatenative programming replaces function application, which is common in other programming styles, with function composition as the default way to build subroutines.

For example, a sequence of operations in an applicative language like the following:

y = foo(x)
z = bar(y)
w = baz(z)

...is written in a concatenative language as a sequence of functions:

x foo bar baz


Active Languages

Let me know if I've got any of these misplaced!

Primarily Concatenative

Concatenative-ish, Chain-y, Pipe-y, Uniform Function Call Syntax, etc.


Cheat Sheets & Tutorials

Discord

IRC

Wikis

Wikipedia Topics

Subreddits

GitHub Topics

Blogs

Practice

founded 1 year ago
MODERATORS