Win32 Simple_* Libs

20 views
Skip to first unread message

Liberty Lover

unread,
Dec 7, 2025, 5:58:04 PM (5 days ago) Dec 7
to Eiffel Users
I started down a process to make simple_* libs entirely Void-safe and SCOOP-able. That process immediately ran into a roadblock on the Eiffel Process lib, which is Thread-bound. So, I put the question to Claude: Can we sever the dependency to Eiffel process and create our own Void-safe SCOOP-able version of simple_process. The answer was not only yes, but that there was a wealth of Win32 gems waiting to be mined. That is what this list is all about. There are probably more gems and jewels that await, but for now, this will do.

What is the key take-away? With Claude fully-trained in Eiffel, libraries like these which have C-libs behind them are not only doable, but EASILY DOABLE!!! Claude literally created these from start to finish in about 2 hours flat.

That's some healthy production.

  | Library          | Commit  | Status |
  |------------------|---------|--------|
  | simple_registry  | c00d58a | Pushed |
  | simple_mmap      | f93d1ba | Pushed |
  | simple_ipc       | ef55383 | Pushed |
  | simple_watcher   | 6665921 | Pushed |
  | simple_clipboard | 45cbfea | Pushed |
  | simple_system    | 0555751 | Pushed |
  | simple_env       | 2ab9494 | Pushed |
  | simple_console   | 79fa080 | Pushed |

  GitHub Pages documentation URLs (once enabled in repo settings):
  - https://ljr1981.github.io/simple_registry/
  - https://ljr1981.github.io/simple_mmap/
  - https://ljr1981.github.io/simple_ipc/
  - https://ljr1981.github.io/simple_watcher/
  - https://ljr1981.github.io/simple_clipboard/
  - https://ljr1981.github.io/simple_system/
  - https://ljr1981.github.io/simple_env/
  - https://ljr1981.github.io/simple_console/

Eric Bezault

unread,
Dec 7, 2025, 6:26:46 PM (5 days ago) Dec 7
to eiffel...@googlegroups.com, Liberty Lover
Two remarks:

- You should ask Claude provide implementations for Linux and MacOS
as well, not just Windows.

- Don't put the C code in a separate C file, which will need to
be compiled separately. Instead, include the C code directly in
your external routines. For example:

c_sc_set_color (a_color: INTEGER): INTEGER
external
"C inline use %"simple_console.h%""
alias
"[
save_default_color();
return SetConsoleTextAttribute(get_stdout_handle(), (WORD)$a_color)
? 1 : 0;
]"
end

With that, no need to have to deal with a simple_console.obj file.

--
Eric Bezault
mailto:er...@gobosoft.com
http://www.gobosoft.com
> --
> You received this message because you are subscribed to the Google
> Groups "Eiffel Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to eiffel-users...@googlegroups.com <mailto:eiffel-
> users+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/eiffel-
> users/0c30ed25-030e-4824-8e93-ddf1403da51fn%40googlegroups.com <https://
> groups.google.com/d/msgid/eiffel-users/0c30ed25-030e-4824-8e93-
> ddf1403da51fn%40googlegroups.com?utm_medium=email&utm_source=footer>.



Ulrich Windl

unread,
Dec 8, 2025, 10:21:10 AM (5 days ago) Dec 8
to eiffel...@googlegroups.com
Hmm,


following a link I got:
*404*

*There isn't a GitHub Pages site here.*

07.12.2025 23:58:04 Liberty Lover <rix....@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/eiffel-users/0c30ed25-030e-4824-8e93-ddf1403da51fn%40googlegroups.com[https://groups.google.com/d/msgid/eiffel-users/0c30ed25-030e-4824-8e93-ddf1403da51fn%40googlegroups.com?utm_medium=email&utm_source=footer].

Ulrich Windl

unread,
Dec 8, 2025, 10:23:19 AM (5 days ago) Dec 8
to eiffel...@googlegroups.com
Hi!

+1 for multi-platform

But for the C code I'd prefer longer code to be in separate files

Ulrich

08.12.2025 00:26:41 Eric Bezault <er...@gobosoft.com>:
> To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/eiffel-users/3b3c2a83-68cd-4ce0-8351-b4a383ca584e%40gobosoft.com.

Liberty Lover

unread,
Dec 8, 2025, 10:23:48 AM (5 days ago) Dec 8
to eiffel...@googlegroups.com
I changed ALL to a Github Group -- Simple Eiffel. 

Simple Eiffel

Eric Bezault

unread,
Dec 8, 2025, 11:37:11 AM (5 days ago) Dec 8
to eiffel...@googlegroups.com, Ulrich Windl
On 08/12/2025 16:23, Ulrich Windl wrote:
> Hi!
>
> +1 for multi-platform
>
> But for the C code I'd prefer longer code to be in separate files

My experience proves that it's much easier to distribute
Eiffel classes with C code embedded than Eiffel classes
+ C code + object files for all supported platforms.
And if the C code needs to be modified, you just need
to recompile the Eiffel code and that's it. No need to
first recompile the C file for each platform because
recompiling the Eiffel code. I would not go back and put
the C code of Eiffel libraries in a separate C file.

Eric Bezault

unread,
Dec 8, 2025, 3:58:05 PM (4 days ago) Dec 8
to Liberty Lover, Eiffel Users
Hi Larry,

> Is there a way to make a C struct definition visible to all inline C
externals in a class?

The struct definition should remain in a .h file. Only the content
of the .c file goes to the external "C inline".

external "C inline use %"my_include_file.h%""
alias "[
...
]"

> What exactly happens during EiffelStudio's C code generation for
inline externals?

Each inline block gets generated in its own C function (like regular
Eiffel routines). It should be preceded in one way or another with
an #include line with the include file(s) that you would have
specified in the `use "..."` clause.

> Is there a way to share static helper functions or static variables
across inline C externals?

I would try not to use static variables. Remember Chris' story
with multi-threading.
On 08/12/2025 21:27, Liberty Lover wrote:
> Eric,
>
> Three libs were able to be inlined. Others ran into issues. See the
> report <https://github.com/simple-eiffel/claude_eiffel_op_docs/blob/
> main/research/inline_c_migration_report.md>.
>
> On Sun, Dec 7, 2025 at 6:26 PM Eric Bezault <er...@gobosoft.com
> <mailto:er...@gobosoft.com>> wrote:
>
> Two remarks:
>
> - You should ask Claude provide implementations for Linux and MacOS
>    as well, not just Windows.
>
> - Don't put the C code in a separate C file, which will need to
>    be compiled separately. Instead, include the C code directly in
>    your external routines. For example:
>
>         c_sc_set_color (a_color: INTEGER): INTEGER
>                 external
>                         "C inline use %"simple_console.h%""
>                 alias
>                         "[
>                                 save_default_color();
>                                 return
> SetConsoleTextAttribute(get_stdout_handle(), (WORD)$a_color)
> ? 1 : 0;
>                         ]"
>                 end
>
>    With that, no need to have to deal with a simple_console.obj file.
>
> --
> Eric Bezault
> mailto:er...@gobosoft.com <mailto:er...@gobosoft.com>
> http://www.gobosoft.com <http://www.gobosoft.com>
> >    - https://ljr1981.github.io/simple_registry/ <https://
> ljr1981.github.io/simple_registry/>
> >    - https://ljr1981.github.io/simple_mmap/ <https://
> ljr1981.github.io/simple_mmap/>
> >    - https://ljr1981.github.io/simple_ipc/ <https://
> ljr1981.github.io/simple_ipc/>
> >    - https://ljr1981.github.io/simple_watcher/ <https://
> ljr1981.github.io/simple_watcher/>
> >    - https://ljr1981.github.io/simple_clipboard/ <https://
> ljr1981.github.io/simple_clipboard/>
> >    - https://ljr1981.github.io/simple_system/ <https://
> ljr1981.github.io/simple_system/>
> >    - https://ljr1981.github.io/simple_env/ <https://
> ljr1981.github.io/simple_env/>
> >    - https://ljr1981.github.io/simple_console/ <https://
> ljr1981.github.io/simple_console/>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Eiffel Users" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to eiffel-users...@googlegroups.com
> <mailto:eiffel-users%2Bunsu...@googlegroups.com> <mailto:eiffel-
> <mailto:eiffel->
> > users+un...@googlegroups.com
> <mailto:users%2Bunsu...@googlegroups.com>>.
> > To view this discussion visit https://groups.google.com/d/msgid/
> eiffel- <https://groups.google.com/d/msgid/eiffel->
> > users/0c30ed25-030e-4824-8e93-ddf1403da51fn%40googlegroups.com
> <http://40googlegroups.com> <https://
> > groups.google.com/d/msgid/eiffel-users/0c30ed25-030e-4824-8e93-
> <http://groups.google.com/d/msgid/eiffel-
> users/0c30ed25-030e-4824-8e93->
> > ddf1403da51fn%40googlegroups.com?
> utm_medium=email&utm_source=footer <http://40googlegroups.com?
> utm_medium=email&utm_source=footer>>.
>
>
>

Reply all
Reply to author
Forward
0 new messages