Hacker GitHub

← All repos

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

Mentions per year 30 mentions · busiest year 2024 (8)
20082026
  1. …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/…
  2. Behold, FFI for bash: https://github.com/taviso/ctypes.sh
  3. …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
  4. Well, you can use https://github.com/taviso/ctypes.sh .
    comment by layer8 · 2024-07-29 · in ps aux written in bash without forking
  5. 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…
  6. ▲ 2
    ctypes.sh: A foreign function interface for bash (2023)
    story by rdpintqogeogsaa · 2024-04-27 · 0 comments
  7. 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 :)
  8. ▲ 5
    Ctypes.sh: A foreign function interface for bash
    story by goranmoomin · 2024-03-02 · 1 comment
  9. 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 :)
  10. ▲ 4
    A foreign function interface for bash
    story by rodoxcasta · 2023-08-03 · 0 comments
  11. 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)
  12. ▲ 2
    Ctypes.h: A foreign function interface for bash
    story by leoh · 2023-01-06 · 0 comments
  13. …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
  14. …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
  15. …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
  16. ▲ 86
    Ctypes.sh: A foreign function interface for bash
    story by gkfasdfasdf · 2020-10-10 · 8 comments
  17. ▲ 2
    Ctypes.sh: foreign function interface for bash
    story by ingve · 2020-08-05 · 0 comments
  18. ▲ 3
    Ctypes.sh: Ffi for Bash
    story by signa11 · 2020-07-30 · 0 comments
  19. 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
  20. …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
  21. 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
  22. Well... There's always https://github.com/taviso/ctypes.sh ...
  23. ▲ 2
    Ctypes.sh: foreign function interface for bash
    story by signa11 · 2018-07-05 · 0 comments
  24. ▲ 1
    A foreign function interface for bash
    story by pornel · 2018-04-12 · 0 comments
  25. Here are the reactions from the parent project's readme: https://github.com/taviso/ctypes.sh#here-is-what-people-have...
  26. 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
  27. …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
  28. ▲ 109
    A port of the GTK+3 Hello World to Bash
    story by regitwo · 2016-03-09 · 25 comments
  29. ▲ 98
    Ctypes.sh, a foreign function interface for bash
    story by JoshTriplett · 2015-07-28 · 14 comments
  30. ▲ 3
    Ctypes.sh: A foreign function interface for bash
    story by taviso · 2015-07-28 · 0 comments