RetroBSD

2.11BSD operating system for microcontrollers
It is currently Tue Jan 16, 2018 7:26 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: vi
PostPosted: Thu Feb 09, 2012 1:25 pm 

Joined: Tue Feb 07, 2012 6:48 pm
Posts: 3
ex/vi seems to be a bit tricky (and far too big) to port so I started looking at vi clones.

"Virus" or "vi resembling utility skeleton" is a vi clone based on the code from busybox. It compiles cleanly into about 70k, and it runs.

The screen formatting is borked for me, but I suspect it would be fairly easy to fix. I'm hoping someone with more C and escape code-fu might be interested in looking at it.

http://dl.dropbox.com/u/20466144/vi.patch.bz2 is a patch against r480 putting it in src/cmd/virus


Top
 Profile  
 
 Post subject: Reply To: vi
PostPosted: Thu Feb 09, 2012 3:53 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1091
Hi all,

I keep wondering about the old cp/m Wordstar? Ran in 64k 8080. Was pretty comfortable to use for general editing.

I generally use joe in wordstar mode. But it is huge? Not really sure why?

There were LOTS of small editors from that era.

Ease of use and comfort (intuitive) are number one for me :).

Wiz


Top
 Profile  
 
 Post subject: Reply To: vi
PostPosted: Thu Feb 09, 2012 3:59 pm 

Joined: Tue Feb 07, 2012 6:48 pm
Posts: 3
Ah well, vi(m) is my usual editor of choice, and it's very BSD-y so I thought it would fit :)


Top
 Profile  
 
 Post subject: Reply To: vi
PostPosted: Thu Feb 09, 2012 11:42 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1091
Hi Lucky,

I am not the unix head most folks here are.

If virus works well and is comfortable, I'll learn it :).

So far: download vi.patch.bz2, bunzip, OK, put vi.patch one level above retrobsd-read-only, run patch -p1 <../vi.patch, OK :).

in retrobsd-read-only directory try:

make TARGET=src/cmd/virus -- Seems to be trying to compile sys/src/cmd/virus which fails. make TARGET with full path also fails with sys/ on beginning of path:(

go to /sys/src/cmd/virus, type make, compiles virus with errors. Suspect it has compiled virus for x86 host? Not what is wanted.

Wiz



Top
 Profile  
 
 Post subject: Reply To: vi
PostPosted: Fri Feb 10, 2012 2:22 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
Nice idea, and I would dearly love VI or a VI clone on retro (it's my editor of choice), but virus (and I suspect all other vi clones) have a fundamental flaw:


cnt = file_size(fn); // file size
size = 2 * cnt; // 200% of file size
new_text(size); // get a text[] buffer


It allocates twice as much memory as the size of the file you are editing. That means, with a 74K executable, you get about 20K of RAM to play with. That's a maximum of a 10K file, not taking into account any other variables in use.

Sounds alot, but it's not much really.

If you could port it to use the libvmf virtual memory system I ported to use with my "med" editor (which is still in its infancy - barely usable yet), then you could be on to a winner there.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Reply To: vi
PostPosted: Sat Feb 11, 2012 11:06 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Hi friends,
I added virus to the repository. (Sounds crazy! :)
For small files it works fine.
Thanks!
--Serge

_________________
--Serge


Top
 Profile  
 
 Post subject: Reply To: vi
PostPosted: Sat Feb 11, 2012 5:49 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1091
Hi Serge,

Gotta try it.

Wiz


Top
 Profile  
 
 Post subject: Re: vi
PostPosted: Thu Nov 27, 2014 11:50 am 

Joined: Thu Nov 27, 2014 11:26 am
Posts: 1
Location: germany
i`m a bit surprised to see virus in a distribution, given it only had a very few followers in freshmeat.net
also noticed it ended up in pkgsrc.se

how did that virtual memory feat turn out ? anyone tried that ?
trying to keep this editor as simple and stable as possible - also currently collecting ideas for a bit of coding these days (stuff to cut out, change or whatever)
-> feedback & ideas welcome !


kind regards,
ripclaw


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission