RetroBSD

2.11BSD operating system for microcontrollers
It is currently Wed Jul 18, 2018 1:19 am

All times are UTC




Post new topic Reply to topic  [ 106 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Fri May 30, 2014 6:38 pm 
Contributor

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

Oops. Gotta get right compiler :). Looking at target.mk looks like gcc used for pic32 is 4.5.1?

/usr/local/pic32-tools/bin/pic32gcc --version --> ...4.5.1 ... v1.30-20110506

Running on older Knoppix -- kernel 2.6.31.2 ... Nov 10, 2009.

Wiz


Top
 Profile  
 
PostPosted: Fri May 30, 2014 7:27 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
There's a newer toolchain available at the github repo.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Sat May 31, 2014 5:33 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Hi friends,
ibara wrote:
emg 1.6 is sitting as a pull request for the RetroBSD tree.
This adds PgUp and PgDn scrolling, and the % display should now be correct (please ping me if it's not).
32-bit version lightly tested: 16-bit tests welcome.

I've merged it into the master branch. Works fine on pic32sim.


Top
 Profile  
 
PostPosted: Sat May 31, 2014 7:18 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Brian, thanks!
PS: a few thoughts to 1.6 binary:

Why the first character (within a line) has got index "0"? Would not "1" be nicer?
Code:
== emg 1.5 == rc == File: rc == 0% (1,0) ===..


What about such a smoother arrangement of the info bar, for example:
Code:
== File: rc == L[3:15] == 24% ================================== emg 1.6 ===

When the user blinks to the info bar, he sees "Yes, I am still working with the file rc, at line 3, char 15 (starting at 1) and it is about a fifth of the whole stuff I have to check out today.. and I am using version 1.6 if someone asks me..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat May 31, 2014 5:57 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Pito wrote:
Brian, thanks!
PS: a few thoughts to 1.6 binary:

Did I forget to bump the version number on that binary? I'll upload a new tarball later today.

Pito wrote:
Why the first character (within a line) has got index "0"? Would not "1" be nicer?
Code:
== emg 1.5 == rc == File: rc == 0% (1,0) ===..

This is what GNU Emacs does. In fact, I intentionally modeled it after GNU Emacs because I don't think emg should deviate from GNU Emacs (where it can) since that would actually lose one of the benefits of emg (so that emacs people don't have to learn a new editor just to work with RetroBSD). This is also part of the historicity of Mg.

Pito wrote:
What about such a smoother arrangement of the info bar, for example:
Code:
== File: rc == L[3:15] == 24% ================================== emg 1.6 ===

When the user blinks to the info bar, he sees "Yes, I am still working with the file rc, at line 3, char 15 (starting at 1) and it is about a fifth of the whole stuff I have to check out today.. and I am using version 1.6 if someone asks me..

This loses the buffer name, which can be different than the file name.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Sun Jun 01, 2014 8:07 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Quote:
This is what GNU Emacs does.

It might be the Emacs has been developed by HAL, but we, humans, say "the first character on the line.." :P

Quote:
This loses the buffer name, which can be different than the file name.

Then for example:
Code:
== File: rc == Buff: rc == L[3:15] == 24% =========================== emg 1.6 =

That arrangement requires an additional line of code for calculating the number of "=" based on the lenght of the file/buffer names :)

PS: I am using emg frequently with retrobsd, the only functionality I use is ctrlXctrlS and ctrlXctrlC (except moving with cursor throughout the text and using buttons Space/Enter/Del/Backspace) and I am very happy with it (copy and paste is offered by the terminal program itself)...

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Mon Jun 02, 2014 2:15 pm 
Contributor

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

EMG is one cool editor. I am not sure I would have suggested line numbers given the increase in size?

Which suggests another approach rather than storing the text to be edited directly into memory.

My understanding of the WordStar editor was that it kept pointers to text lines rather than text itself in memory? Thus it could edit very much larger files. Maybe others can further clarify this.

Also WordStar was small and ran well in small computers.

So I guess what I am suggesting is that we look into adding some sort of similar capability to emg.

There may be other editors with open source that pieces could be copied from?

EMG is great. I use it everyday :)

Wiz


Top
 Profile  
 
PostPosted: Thu Jun 12, 2014 8:04 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
So I have an idea to reduce the size of emg a bit.

Question: what is the longest filename length in the RetroBSD source tree? Right now, emg is creating a whole lot of statically allocated arrays of size 80. That takes up a lot of space. If we know the longest filename, we can just make the size ((longest filename) + 1).

For example, reducing the filename array size to 32 results in a binary size of 40108, which is a savings of 2192.

This is not the greatest of code shrinkings, but it's hard to not want to make emg as small as possible.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Fri Jun 13, 2014 12:42 pm 
Contributor

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

Great idea. Did you mean line length? If so 32 chars would be worth a try. Long lines could auto-wrap to the next line on loading. Or you could find lines by starting from the beginning of one large buffer and counting line-feeds.

There can be more than one version. I use emg-1.3 mostly. When I need line numbers to locate the bad line I use emg-1.6. This works pretty well.

Lots of fun :).

Wiz


Top
 Profile  
 
PostPosted: Fri Jun 13, 2014 1:47 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
No, I mean the length of the name of the file emg can read in.
Like when you use C-x C-f

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Fri Jun 13, 2014 4:08 pm 
Contributor

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

How about a script:

1. Change filename to something very short --> a.

2. Edit file called a. --> emg a

3. Change filename back to original with or without backup.

Maybe I missed something?

Wiz


Top
 Profile  
 
PostPosted: Sat Jun 14, 2014 6:19 am 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
That's not the right approach. That's extremely tedious and error prone.
I'm going to set the filename array size to something that I think is sensible in the next emg version and let the complaints file in.
Lack of complaints means that I got it right :)

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Sat Jun 14, 2014 1:06 pm 
Contributor

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

THE final test.

Does the user use it!

I use it :) :).

Wiz


Top
 Profile  
 
PostPosted: Sat Jun 14, 2014 6:19 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Quote:
Lack of complaints means that I got it right :)

When we talk the file_name only (the path exclusive) I think 16 would be ok. Also compile it mips16, the speed is not extremely important with editors, I think :)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Jun 14, 2014 11:39 pm 
Contributor

Joined: Mon Apr 29, 2013 1:56 am
Posts: 196
Yep, editors typically don't need many CPU cycles. Also, icache and similar solutions might help increase the amount of available data memory.


Top
 Profile  
 
PostPosted: Mon Jun 16, 2014 8:54 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Pito wrote:
Also compile it mips16

It already is being compiled with -mips16 by default (unless you've been turning it off, but then that's on you ;) )

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Tue Jun 17, 2014 4:01 pm 
Contributor

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

How about the editor telling us how much space is available/used for the currently open text file.

For me the multiple buffer stuff is confusing, but a write the selected portion of the current file to the filesystem would be nice.

Also a single command to search again would be more intuitive.

I use emg everyday :) :).

Wiz


Top
 Profile  
 
PostPosted: Tue Jun 17, 2014 5:14 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
wiz wrote:
How about the editor telling us how much space is available/used for the currently open text file.

I don't like this. More logic = larger binary. I think that's antithetical to the primary goal of emg: be small.

wiz wrote:
For me the multiple buffer stuff is confusing, but a write the selected portion of the current file to the filesystem would be nice.

I don't like the "write the selected portion of the current file to the filesystem" either. Reducing multiple buffers to a single buffer could be worthwhile and probably save a whole lot of space.

wiz wrote:
Also a single command to search again would be more intuitive.

I'm thinking of ways to shrink the search functionality down. Nothing I love just yet.



Of course, my opinion can always be swayed with a good diff.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Wed Jun 18, 2014 1:49 pm 
Contributor

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

I could be swayed by a good diff....

Point well taken.

I should try to understand the emg source. In particular how much space is available for the file. I guess this is approximately 90k - size of emg? But it would be nice to know the real numbers. I observe that a 24k file croaks emg-1.6.

For me, ctrl-l is the choice for search again.

Can the multiple buffer stuff be a conditional compilation option easily? And maybe some other 'features'?

I too STRONGLY want emg to be small, simple and easy to hack.

I keep wondering about some of the early DOS editors? 4k RAM could do a lot. Wordstar with all its bells and whistles ran on 640k pcs. Not to mention the cpm stuff :) :). There were a lot of sources available back then!

Wiz


Top
 Profile  
 
PostPosted: Wed Jun 18, 2014 3:17 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
wiz wrote:
I should try to understand the emg source.

Other than emg source itself, you could look at the original source for Ersatz Emacs (from which emg heavily derives): http://hunter.apana.org.au/~cjb/Code/
You can also look at Mg sources. mg1a, mg1b, and mg2a sources can all be found with a quick search. You can also view OpenBSD's Mg source:
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mg/
or if you have cvs:
cvs -danoncvs@<your openbsd mirror>:/cvs checkout -P src/usr.bin/mg

These are all public domain sources (OpenBSD's Mg extensions are ISC licensed but the base editor is public domain), so you can uproot any of them wholesale if you'd like for emg.

wiz wrote:
For me, ctrl-l is the choice for search again.

^l is screen refresh (again, I like the idea of finger compatibility with big GNU Emacs). Why not use something that's currently unused? ^j doesn't have anything assigned to it.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 106 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

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