this post was submitted on 10 Jul 2025
1 points (100.0% liked)

Programming Languages

1367 readers
1 users here now

Hello!

This is the current Lemmy equivalent of https://www.reddit.com/r/ProgrammingLanguages/.

The content and rules are the same here as they are over there. Taken directly from the /r/ProgrammingLanguages overview:

This community is dedicated to the theory, design and implementation of programming languages.

Be nice to each other. Flame wars and rants are not welcomed. Please also put some effort into your post.

This isn't the right place to ask questions such as "What language should I use for X", "what language should I learn", and "what's your favorite language". Such questions should be posted in /c/learn_programming or /c/programming.

This is the right place for posts like the following:

See /r/ProgrammingLanguages for specific examples

Related online communities

founded 2 years ago
MODERATORS
 

Examples from the README

example 1

[
  { "let": { "name": "JSON", "times": 3 } },
  {
    "for": {
      "var": "i",
      "from": 1,
      "to": "times",
      "do": [
        { "print": { "add": ["Hello ", "name"] } }
      ]
    }
  }
]

example 2

[
  { "import": "system.jpl" },
  { "print": { "call": { "now": [] } } },
  { "print": { "call": { "osName": [] } } },
  { "print": { "call": { "cpuCount": [] } } },
  { "let": { "a": 9, "b": 4, "name": "JPL" } },
  { "print": { "add": ["\"a + b = \"", { "add": ["a", "b"] }] } },
  { "print": { "mul": ["a", "b"] } },
  { "print": { "div": ["a", "b"] } },
  { "print": { "mod": ["a", "b"] } },
  { "print": { "&": [6, 3] } },
  { "print": { "||": [false, true] } },
  { "print": { "gt": ["a", "b"] } },
  { "def": { "sq": { "params": ["x"], "body": [{ "return": { "mul": ["x", "x"] } }] } } },
  { "print": { "call": { "sq": [5] } } },
  { "def": { "greet": { "params": ["who"], "body": [{ "return": { "add": ["\"Hi, \"", "who"] } }] } } },
  { "print": { "call": { "greet": ["\"JSON Fan\""] } } },
  { "if": { "cond": { "<": ["b", "a"] }, "then": { "print": "\"b < a ๐Ÿ‘\"" }, "else": { "print": "\"b >= a ๐Ÿค”\"" } } },
  { "for": { "var": "i", "from": 1, "to": 3, "step": 1, "do": [ { "print": { "call": { "sq": ["i"] } } } ] } },
  { "print": "\"All features in one! ๐ŸŽ‰\"" }
]

example 3

[
// ๐Ÿš€ Welcome to JPL โ€” JSON Programming Language!

// Import system utilities for fun stuff
{ "import": "system.jpl" },

// Print system info
{ "print": { "call": { "now": [] } } },
{ "print": { "call": { "osName": [] } } },
{ "print": { "call": { "cpuCount": [] } } },

// Define a math function to square a number
{
  "def": {
    "square": {
      "params": ["x"],
      "body": [
        { "return": { "mul": ["x", "x"] } }
      ]
    }
  }
},

// Greet a user
{
  "def": {
    "greet": {
      "params": ["name"],
      "body": [
        { "return": { "add": ["Hello, ", "name"] } }
      ]
    }
  }
},

// Declare variables
{ "let": { "a": 7, "user": "Kapil" } },

// Use greet function and print
{ "print": { "call": { "greet": ["user"] } } },

// Conditional message
{
  "if": {
    "cond": { ">": ["a", 5] },
    "then": { "print": "a is greater than 5" },
    "else": { "print": "a is 5 or less" }
  }
},

// Loop with break and continue
{
  "for": {
    "var": "i",
    "from": 1,
    "to": 10,
    "step": 1,
    "do": [
      { "if": { "cond": { "eq": ["i", 3] }, "then": { "continue": true } } },
      { "if": { "cond": { "gt": ["i", 7] }, "then": { "break": true } } },
      { "print": { "call": { "square": ["i"] } } }
    ]
  }
},

// Fun ending message
{ "print": "๐ŸŽ‰ Done with curly braces and JSON fun!" }
]

top 8 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 0 points 2 days ago (1 children)

I don't hate it... Would take this over python for sure.

[โ€“] [email protected] 0 points 2 days ago* (last edited 2 days ago) (1 children)

As a (primarily) Python dev, I hope you use this and have a miserable time lol

[โ€“] [email protected] 0 points 2 days ago (1 children)

I accept this. Good day sir, sorry about your career ๐Ÿ˜‰

[โ€“] [email protected] 0 points 2 days ago

Ouch! My dignity! Help!

[โ€“] [email protected] 0 points 2 days ago

Thanks I hate it

[โ€“] [email protected] 0 points 2 days ago

This is cursed ๐Ÿซ 

[โ€“] [email protected] 0 points 2 days ago (1 children)
[โ€“] [email protected] 0 points 2 days ago

I can kinda see it for a DSL or a transit medium for carrying permitted commands from a client to be heavily assessed prior to executing on a server.

There are other ways to accomplish the same, but it's certainly not the worst way to handle it.