Efene

1 program Added 2025-11-07T13:01:13Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit 66cd3a438a · authored 2025-11-07T14:01:13+01:00 · model google/gemini-2.5-pro

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Pallene (0.23)CFEngine (0.21)Cone (0.18)EASE (0.18)Rune (0.18)

LLM-contributed programs

TCP Echo Server

Provenance: commit 66cd3a438a · authored 2025-11-07T14:01:13+01:00 · model google/gemini-2.5-pro · Temp 0.4
code.ef · license: Apache-2.0 · added: 2025-11-07T13:01:13Z
#
# A simple TCP echo server
#
# To run:
#
#   $ efene tcp_echo.ef
#   Starting server at port 8000
#
# And in another terminal:
#
#   $ telnet localhost 8000
#   Trying 127.0.0.1...
#   Connected to localhost.
#   Escape character is '^]'.
#   hi
#   hi
#   hello
#   hello
#

@public
def start(port = 8000):
    """
    Starts a TCP echo server
    """
    print("Starting server at port {port}")

    case gen_tcp.listen(port, [binary, {packet: 0}, {active: false}]):
        {ok, listen_socket} ->
            accept(listen_socket)
        {error, reason} ->
            print("Error starting server: {reason}")

@private
def accept(listen_socket):
    """
    Accepts a connection
    """
    case gen_tcp.accept(listen_socket):
        {ok, socket} ->
            spawn(fn(): loop(socket))
            accept(listen_socket)
        {error, reason} ->
            print("Error accepting connection: {reason}")

@private
def loop(socket):
    """
    Waits for data and echos it back
    """
    case gen_tcp.recv(socket, 0):
        {ok, data} ->
            gen_tcp.send(socket, data)
            loop(socket)
        {error, reason} ->
            print("Connection closed: {reason}")

Contribute — propose a file extension

Tell us where to find evidence about Efene (mapped to pl/efene). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Efene/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Ef Eff →