You are not logged in.

#1 2025-04-02 23:59:27

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Binary file editor like vI - 'bi'

I made a binary file editor named 'bi' (abbreviation of Binary file editor like vI)  for linux to mimic vi's interface at binary file.
There is a binary file editor whose user interface is similar to vi named 'bvi' made by Gerhard Buergmann in 1996 for linux but I wrote the first version of bi for MS-DOS in 1991 and uploaded onto ASCII-net in 1991. I was the first to do so.  I re-created bi  for linux today.
please see this link,evaluate it and report errors and bugs.
https://github.com/fygar256/bi
For Japanese, this link please see:
https://qiita.com/fygar256/items/d2ff41b96d2e6ab2bb68

Regards.

Last edited by fygar256 (2025-04-22 11:49:05)

Offline

#2 2025-04-08 01:57:49

espresso
Member
From: Pale Blue Dot, US
Registered: 2023-05-15
Posts: 50

Re: Binary file editor like vI - 'bi'

Your code is so clean, it sparkles. big_smile
Supported operations worked flawlessly.

I am finding the other repos and information interesting as well (also having interests in C/++, python, and computing in general *edit: and nature*).

Thanks for sharing, and warm regards!

Last edited by espresso (2025-04-08 06:03:54)

Offline

#3 2025-04-09 00:39:58

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

Thanks for evaluating. Your report is very appreciated.
I will write "complete" in the manual.
Regards.

Offline

#4 2025-04-09 06:24:01

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,251
Website

Re: Binary file editor like vI - 'bi'

While the program may do what it claims to be doing and may be useful to some people, it's not for me.
Here are some things I observed:

1) No following PEP-8 (this is rather a minor inconvenience)
2) Use of globals
3) Some humongous functions
4) No type hints
5) No use of context managers

This all makes it hard to create a mental model of the program's state at any given point.


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#5 2025-04-09 07:42:54

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

There are many insufficient point in this program, but No bugs it's ok. my python program skill is not sufficient,
I agree. But it just works. I want to write clean code. You can improve bi before you complain.
It's no good to be pigeonholed. Do not complain about the others's program. but thanks for your evaluation.

Last edited by fygar256 (2025-04-09 08:30:44)

Offline

#6 2025-04-09 08:33:17

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,251
Website

Re: Binary file editor like vI - 'bi'

It was meant as a starting point for a potential code review, not a complaint.
It's up to you to decide whether to act on the issues I raised or to ignore them.
Given your reply to @espresso I assumed that you are open to feedback and critique.
If you just wanted to receive flattery, I apologise for the misunderstanding.


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#7 2025-04-09 08:38:04

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

I don't want to hear flattery, I just don't want to hear nasty remarks. So I ignore them.

Last edited by fygar256 (2025-04-09 21:04:10)

Offline

#8 2025-04-10 15:39:20

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

I have reflected on this. I will take your opinion into consideration, Mr. schard.

Offline

#9 2025-04-13 11:50:19

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

I have made a major update and debug to bi. version 3.4.1 (complete) released.
https://github.com/fygar256/bi

Last edited by fygar256 (2025-04-26 15:00:24)

Offline

#10 2025-04-29 12:59:53

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

Released bi 3.4.1.4 stable as an AUR package.
You can install bi like this: yay -S bi
Please use it.
Regards

Last edited by fygar256 (2025-04-29 13:00:39)

Offline

#11 2025-04-29 13:14:26

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,639

Re: Binary file editor like vI - 'bi'

Please do NOT use that PKGBUILD. It does really bad things in that 'make' call.

Offline

#12 2025-04-29 13:16:32

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

Yes. I will rewrite it.
Thank you.

Offline

#13 2025-04-29 15:11:32

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

I got rid of 'make' command. is that Okay?
Regards.

Last edited by fygar256 (2025-04-29 16:08:17)

Offline

#14 2025-04-29 15:47:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,639

Re: Binary file editor like vI - 'bi'

That takes care of the show stopper, yes. There are plenty of other problems, but none of them fatal.

Last edited by Scimmia (2025-04-29 16:52:48)

Offline

#15 2025-04-30 02:38:10

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

If so, could you please explain in detail?

Offline

#16 2025-04-30 06:47:09

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

v3.4.2.0 stable released to AUR. everything is finished.
Please install bi and use it.

yay -S bi

Offline

#17 2025-04-30 12:11:04

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,639

Re: Binary file editor like vI - 'bi'

1. You are not supposed to upload your code to the AUR. Remove bi.py, bi.1, bi.doc, and bi.jdoc.
2. arch=('x86_64') is wrong for a simple python script. https://wiki.archlinux.org/title/PKGBUILD#arch
3. license=('MIT'), this means the license needs to be installed. https://wiki.archlinux.org/title/PKGBUILD#license
4. source=("https://github.com/fygar256/bi/archive/refs/heads/v$pkgver.zip") You cannot pull a stable release from the head of a branch. It's supposed to refer to one thing, not something that can change.
5. The source archive needs renamed. https://wiki.archlinux.org/title/PKGBUILD#source
6. Don't skip the checksum.
7. chmod +x bi.py is completely pointless when you're setting the permissions with install.

Why are you spelling it 'vI' in the pkgdesc?

Last edited by Scimmia (2025-04-30 12:15:22)

Offline

#18 2025-04-30 12:19:13

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

Thank you. I will take them to consideration. May be it will be reflected later...
The description 'vI' is because 'bi' is an abbreviation of  'Binary editor like vI'.

Last edited by fygar256 (2025-04-30 12:42:46)

Offline

#19 2025-04-30 14:20:48

seth
Member
Registered: 2012-09-03
Posts: 63,343

Re: Binary file editor like vI - 'bi'

That doesn't explain "vI" - notice the capitalization.
https://en.wikipedia.org/wiki/Vi_(text_editor) is short for "visual"

Offline

#20 2025-04-30 15:09:36

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

>seth
The name is a combination of the head and tail parts of 'binary editor like vi'. It's not a common naming convention. that's the explanation.
>Scimmia
1,2,6,7 cleared. the rest maybe will be done later...
Regards.

Offline

#21 2025-04-30 15:11:38

seth
Member
Registered: 2012-09-03
Posts: 63,343

Re: Binary file editor like vI - 'bi'

And where is an uppercase "I" in "binary editor like vi"?

Offline

#22 2025-04-30 15:22:10

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

I just don't want to hear nasty remarks.

Offline

#23 2025-04-30 15:24:51

seth
Member
Registered: 2012-09-03
Posts: 63,343

Re: Binary file editor like vI - 'bi'

You mean because "bi" happens to be a latin prefix that in a very specific context is involved in some silly culture wars?
That ship has probably sailed, I doubt anyone eager to freak out over that will pay that level of attention…

That doesn't check out - you're only misspelling vI,  not bi.

Apparently you just fail to realize that it is and always have been "vi", not "vI" and you also seem to think that reality is "nasty"... roll

Last edited by seth (2025-04-30 16:20:51)

Offline

#24 2025-04-30 15:42:09

fygar256
Member
From: Japan
Registered: 2023-03-03
Posts: 37
Website

Re: Binary file editor like vI - 'bi'

>Scimmia
4,5 cleared. the rest is 3. Thank you for your report of the failure.

Offline

#25 2025-04-30 15:48:09

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,639

Re: Binary file editor like vI - 'bi'

source=("https://aur.archlinux.org/bi.git/$pkgname-$pkgver.zip")

Again, do NOT upload your code to the AUR!

Offline

Board footer

Powered by FluxBB