all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Binary file features?
       [not found] <4jekm45yewp6eyce2ohqlicasx57z2mqhh7kde7sclkhxqerjd.ref@v6lxuejy367y>
@ 2023-07-17  5:56 ` Ergus
  2023-07-17  6:23   ` Basile Starynkevitch
  2023-07-23  4:30   ` James Thomas
  0 siblings, 2 replies; 4+ messages in thread
From: Ergus @ 2023-07-17  5:56 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all:

If there is a binary file with known format (ie, it was somehow saved
form C++ or numpy) nothing extremely complicated something like an array
of structs, or a header+payload of known data...

Do we have anything in elisp to visualize the data in some user-friendly
way? (after providing some information about the format somehow?)

Thanks in advance,
Ergus



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Binary file features?
  2023-07-17  5:56 ` Binary file features? Ergus
@ 2023-07-17  6:23   ` Basile Starynkevitch
  2023-07-19  0:45     ` Emanuel Berg
  2023-07-23  4:30   ` James Thomas
  1 sibling, 1 reply; 4+ messages in thread
From: Basile Starynkevitch @ 2023-07-17  6:23 UTC (permalink / raw)
  To: Ergus; +Cc: help-gnu-emacs


On 7/17/23 07:56, Ergus wrote:
> Hi all:
>
> If there is a binary file with known format (ie, it was somehow saved
> form C++ or numpy) nothing extremely complicated something like an array
> of structs, or a header+payload of known data...
>
> Do we have anything in elisp to visualize the data in some user-friendly
> way? (after providing some information about the format somehow?)


Yes. A well documented binary format is the ELF format (Executable and 
Linkable Format, used for binaries on Linux, most Unixes, etc...)

https://en.wikipedia.org/wiki/Executable_and_Linkable_Format

An alternative could be to use the BJSON format specification:

http://bjson.org/


Or the RPC/XDR one:

https://en.wikipedia.org/wiki/External_Data_Representation


In the context of GNU emacs, you might need to patch its C source code 
to add some few routines dedicated to that binary format (that you have 
chosen, and whose specification you know completely). This means writing 
your plugin for GNU emacs and extending nicely GNU emacs code to do the 
appropriate dlopen/dlsym. Some C code already exists in file 
src/dynlib.c of GNU emacs 30. Or to write some Elisp code communicating 
with your daemon handling that binary format.


NB. my pet open source project is the RefPerSys inference engine on 
http://refpersys.org/ and https://github.com/RefPerSys/RefPerSys/ - I 
believe that you could take several thousands lines of code from it and 
reuse them in your GNU emacs plugin.

-- 
Basile Starynkevitch                  <basile@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Binary file features?
  2023-07-17  6:23   ` Basile Starynkevitch
@ 2023-07-19  0:45     ` Emanuel Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2023-07-19  0:45 UTC (permalink / raw)
  To: help-gnu-emacs

Basile Starynkevitch wrote:

>> If there is a binary file with known format (ie, it was
>> somehow saved form C++ or numpy) nothing extremely
>> complicated something like an array of structs, or
>> a header+payload of known data...
>>
>> Do we have anything in elisp to visualize the data in some
>> user-friendly way? (after providing some information about
>> the format somehow?)
>
> Yes. A well documented binary format is the ELF format
> (Executable and Linkable Format, used for binaries on Linux,
> most Unixes, etc...) [...]

Uhm, what are we supposed to do once we have the binary data
visualized in Emacs?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Binary file features?
  2023-07-17  5:56 ` Binary file features? Ergus
  2023-07-17  6:23   ` Basile Starynkevitch
@ 2023-07-23  4:30   ` James Thomas
  1 sibling, 0 replies; 4+ messages in thread
From: James Thomas @ 2023-07-23  4:30 UTC (permalink / raw)
  To: Ergus; +Cc: help-gnu-emacs

Ergus wrote:

> Do we have anything in elisp to visualize the data in some user-friendly
> way? (after providing some information about the format somehow?)

bindat.el could be of help: emacsconf.org/2021/talks/bindat/

--



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-23  4:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4jekm45yewp6eyce2ohqlicasx57z2mqhh7kde7sclkhxqerjd.ref@v6lxuejy367y>
2023-07-17  5:56 ` Binary file features? Ergus
2023-07-17  6:23   ` Basile Starynkevitch
2023-07-19  0:45     ` Emanuel Berg
2023-07-23  4:30   ` James Thomas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.