taviso/ctypes.sh
View on GitHub ↗ ★ 2,181 C
A foreign function interface for bash.
30 mentions on Hacker News by 23 people: 12 stories, 18 comments · first 2015-07-28 · latest 2026-06-20
20082026
-
…Introduction to Streams : https://www.lucasfcosta.com/blog/streams-introduction [1] : ctypes.sh : https://github.com/taviso/ctypes.sh [2] : socat : https://github.com/3ndG4me/socat/releases [3] : gnu netcat: https://netcat.sourceforge.net/…
comment by sargstuff · 2026-06-20 · in TIL: You can make HTTP requests without curl using Bash /dev/TCP -
Behold, FFI for bash: https://github.com/taviso/ctypes.sh
comment by eep_social · 2024-09-29 · in Varlink – IPC to replace D-Bus gradually in systemd -
…of native code. Usually it starts processes, but here it interacts with a native-code library. See: https://github.com/taviso/ctypes.sh/ https://github.com/raysan5/raylib
comment by nine_k · 2024-09-15 · in A bullet hell game written in bash -
Well, you can use https://github.com/taviso/ctypes.sh .
comment by layer8 · 2024-07-29 · in ps aux written in bash without forking -
maybe access to libc functions can be achieved through something like < https://github.com/taviso/ctypes.sh >. Although that very specific implementation seems to require explicitly bash and is not broadly POSIX Shell compatible as Pnut…
comment by x5a17ed · 2024-07-24 · in Pnut: A C to POSIX shell compiler you can trust -
▲ 2
ctypes.sh: A foreign function interface for bash (2023)story by rdpintqogeogsaa · 2024-04-27 · 0 comments
-
Here are some examples! https://github.com/taviso/ctypes.sh/blob/master/test/select.... https://github.com/taviso/ctypes.sh/blob/master/test/poll.sh Yes, it is crazy :)
comment by taviso · 2024-03-03 · in Writing a Minecraft server from scratch in Bash (2022) -
▲ 5
Ctypes.sh: A foreign function interface for bashstory by goranmoomin · 2024-03-02 · 1 comment
-
They should have used my (dumb?) library, ctypes.sh: https://github.com/taviso/ctypes.sh Then they can access libm, poll(), select() and so on from bash :)
comment by taviso · 2024-03-02 · in Writing a Minecraft server from scratch in Bash (2022) -
▲ 4
A foreign function interface for bashstory by rodoxcasta · 2023-08-03 · 0 comments
-
It's a funny trick, but you could probably also use setjmp and longjmp with ctypes.sh :-) https://github.com/taviso/ctypes.sh
comment by taviso · 2023-08-03 · in Goto in Bash (2012) -
▲ 2
Ctypes.h: A foreign function interface for bashstory by leoh · 2023-01-06 · 0 comments
-
…the Witchcraft Compiler Collection [1], which includes among other things an interactive shell. [0] https://github.com/taviso/ctypes.sh [1] https://github.com/endrazine/wcc
comment by rkeene2 · 2022-08-20 · in Shared Libraries as Executables -
…ability from bash, it's available [0]. However, it interacts with C FFI, so it's lower level. [0] https://github.com/taviso/ctypes.sh
comment by rkeene2 · 2021-06-16 · in GitHub – nushell/nushell: A new type of shell -
…lets you call native functions from bash [0]. My mind is spinning from the possibilities... [0]: https://github.com/taviso/ctypes.sh
comment by gkfasdfasdf · 2020-10-10 · in Bash Error Handling -
▲ 86
Ctypes.sh: A foreign function interface for bashstory by gkfasdfasdf · 2020-10-10 · 8 comments
-
▲ 2
Ctypes.sh: foreign function interface for bashstory by ingve · 2020-08-05 · 0 comments
-
▲ 3
Ctypes.sh: Ffi for Bashstory by signa11 · 2020-07-30 · 0 comments
-
This seems like a good time to mention my (ridiculous) project, a ctypes module for bash. https://github.com/taviso/ctypes.sh/wiki There are some little demos here: https://github.com/taviso/ctypes.sh/tree/master/test I even ported the…
comment by taviso · 2019-09-19 · in Pure Bash Bible -
…re: bash is a simple scripting/glue language, not a general-purpose programming tool. [1] https://github.com/taviso/ctypes.sh [2] https://news.ycombinator.com/item?id=19951990
comment by pdkl95 · 2019-05-19 · in Understanding the fork system call in Unix -
Another way to skin the cat: https://github.com/cemeyer/httpd.sh Based on ctypes: https://github.com/taviso/ctypes.sh/
comment by foobarian · 2019-04-13 · in I got tired of PHP and Perl, so I tried bash -
Well... There's always https://github.com/taviso/ctypes.sh ...
comment by zx2c4 · 2018-08-02 · in Sequoia-PGP – A new OpenPGP implementation in Rust -
▲ 2
Ctypes.sh: foreign function interface for bashstory by signa11 · 2018-07-05 · 0 comments
-
▲ 1
A foreign function interface for bashstory by pornel · 2018-04-12 · 0 comments
-
Here are the reactions from the parent project's readme: https://github.com/taviso/ctypes.sh#here-is-what-people-have...
comment by nix0n · 2016-03-09 · in A port of the GTK+3 Hello World to Bash -
I've never heard of ctypes.sh, but it sounds pretty interesting: https://github.com/taviso/ctypes.sh/wiki
comment by shmerl · 2016-03-09 · in A port of the GTK+3 Hello World to Bash -
…the ctypes.sh Bash plug-in, which is what is doing the magic calling into a native library. See https://github.com/taviso/ctypes.sh/wiki , that was very interesting.
comment by unwind · 2016-03-09 · in A port of the GTK+3 Hello World to Bash -
▲ 109
A port of the GTK+3 Hello World to Bashstory by regitwo · 2016-03-09 · 25 comments
-
▲ 98
Ctypes.sh, a foreign function interface for bashstory by JoshTriplett · 2015-07-28 · 14 comments
-
▲ 3
Ctypes.sh: A foreign function interface for bashstory by taviso · 2015-07-28 · 0 comments