export async function send() { const repl_file = Bun.file("./.lrepl") let repl_info try { repl_info = await repl_file.json() } catch (e) { console.log("No .lrepl file found.") process.exit(1) } const unix_socket = repl_info.unix_socket // console.log("Attempting connection to", unix_socket) const socket = await Bun.connect({ unix: unix_socket, socket: { data: () => process.exit() } }) for await (const input of Bun.stdin.stream()) { const chunk = Buffer.from(input).toString("utf-8") // console.log("Sending:", chunk) // console.log(`To: ${unix_socket}`) socket.write(chunk) socket.end() process.exit() } } // await send()