RetroBSD

2.11BSD operating system for microcontrollers
It is currently Tue Dec 11, 2018 8:45 pm

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: Thu Jun 19, 2014 6:24 pm 
Contributor

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

Ctrl-j works for me.

I am still a Wordstar hacker, so I tend to think that way. The Wordstar folks did a LOT of study as to how to make things intuitive for their users. Microsoft REALLY did a number on them :(. Anyways, I use joe on linux, wordstar on dos and emg on pic32. All work well :).

Not sure when I will get to hacking emg, but now that I have my dynamic loadable kernel RAM module beginning to work I should eventually get some free time :). FWIW- I have a assembly language spi io routine more or less running. All to make my RF module driver simpler and faster.

Lots of fun.

Wiz


Top
 Profile  
 
PostPosted: Fri Jun 20, 2014 5:36 am 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
So maybe now is a good time to step back and reflect on what I see for emg and how emg got to be in the first place.

I don't use Wordstar. I am totally unfamiliar with it. And I don't want to learn it. My whole computing life is in Unix, and OpenBSD specifically (for obvious reasons). Discounting ed, OpenBSD includes two editors in its base install: vi (in the form of nvi) and mg (a lightweight emacs clone). And I am very happy with vi. Sure, I can use mg but my fingers after all these years know vi. However, I am still useful with mg.

VIrus is unacceptable to me. I won't hack on it and I intentionally don't compile it into my sdcard.img. med and re never really worked for me. Faced with the real possibility of not having a text editor in RetroBSD, I set out to find vi clones I could use as a base to make a better licensed vi for RetroBSD. I was very unimpressed with what I found. So I turned to mg to create a suitable editor. This led me to Chris Baird's Ersatz Emacs, and by using bits from both Ersatz Emacs and Mg, emg was born. I continue to turn to OpenBSD's mg for inspiration for new features (such as a proper panic() and line numbers). This helps to ensure that emg always stays public domain.

This is my vision for emg:
1. Be small. Obvious.
2. Be finger-compatible with OpenBSD's mg. By extension, this means being finger-compatible (and visually-compatible where it can) with GNU Emacs. I do not want to (nor should I ever have to) learn another editor. I already know the two Unix editors, one really well and one well enough to be useful. Everything I do under emg should be identical to how I would do it in mg. If not, in my mind, it is a bug. Because it is something I won't do with emg.

With that said, I am not unopposed to diffs provided that:
1. They are quality. While you can find ridiculous shit like atoi in emg, that doesn't give you license to start writing diffs with things like unchecked strcat and strcpy (you'll notice that emg only uses strncat and strncpy). To put it succinctly: I would rather compile in strlcat and strlcpy (and other safe functions) and bloat emg a little bit than read diffs I know I will reject out of hand for using nonsense.
2. They don't violate my vision for emg. Ultimately, the goal is for emacs users to be able to edit text files using RetroBSD without having to learn another editor. And it is for me to be able to not have to think about editing text files or get frustrated by editors I don't know and won't learn. Being frustrated with one's tools is a surefire sign one is going to give up.
3. They try not to add things without taking something else away. Remember: new features means a larger binary size. So if you have to make emg bigger try to identify something we can take away to offset that. Refactorings to make emg smaller are always welcome.

Apologies for the bluntness of this response. It's easier to be clear early than suddenly change course after things have gotten away from your goals.

wiz: what you really want here is to use the macro functionality to compose a simple macro that will call i-search and execute it. But again, I'm not totally opposed to the ^j thing. Just make a good case for it.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Fri Jun 20, 2014 5:47 pm 
Contributor

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

Thanks for you analysis.

Basically I agree with all you have said.

Small, remove features, easy to learn, easy to remember.

I didn't mean you should learn wordstar. Having been around when wordstar came on the scene, I was struck on how easy it was to use. Not all of it, but the commonly used commands worked the way I expected without surprises.

Emg is easy too :). I 'should' figure out macros, but am unlikely to given that what I use is already there.

What do I do? Probably what you do: Open file. Page up/down til I find the offending line. edit it. save the file. If the phone rings in the middle or I get confused or type something by accident, abort the edit and start over. A compile aborts with a line number, so I often want to find what I mistyped that way. I have two versions of emg in use. lemg=1.6 and emg=1.3. Works well. Prior to emg I used med. Med was also nice but easy to have unexpected results.

I liked med's ctrl-c to abort, ctrl-x to save. For me that was intuitive. A single char for search again is easier.

I find myself trying to run emg on my linux boxes :). So I guess I am getting pretty used to it.

Have a nice weekend.

Lots of fun :).

Wiz


Top
 Profile  
 
PostPosted: Fri Jun 20, 2014 11:34 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Oh, no. When I meant that I'm comfortable enough with mg to be useful, I meant it. In fact, I tend to use mg/emacs on foreign machines because I can't rely on vi(m) to be setup the way I like. My knowledge of emacs isn't cursory. It's just not my preference. Give me my vi any day :)

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Wed Jun 25, 2014 7:46 pm 
Contributor

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

My 3rd attempt to respond.....

Maybe this will make it?

Emg nice editor. Kinda lost my train of thought :(

Oh well....

Wiz


Top
 Profile  
 
PostPosted: Thu Jul 10, 2014 11:05 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Hi group --

New version of emg is sitting as a pull request in the RetroBSD tree.
This version correctly update the line number when searching.

I intentionally ripped out the search+replace functionality. Frankly, it sucked. And you can just use sed(1) if you need to do big search+replace. If it's something people really want back, we'll have to think of a simpler way to do it.

I also removed some convenience word functions I'm pretty sure no one was using. So overall, emg is a smaller binary now.

Enjoy!

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Fri Jul 11, 2014 7:09 pm 
Contributor

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

Can I download it from the site somehow?

Or could you put a .gz somewhere?

Wiz


Top
 Profile  
 
PostPosted: Fri Jul 11, 2014 7:17 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Hi ibara and Wiz,

Thanks for the update. I've merged the pull request: see the latest version https://github.com/RetroBSD/retrobsd/tree/61c7c690b95eafc65b443f66ab7b19e2175f9b2b.

--Serge


Top
 Profile  
 
PostPosted: Sun Jul 13, 2014 4:20 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Thanks!

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 5:07 am 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
After more than a year, I have a new release of emg waiting to be merged into the RetroBSD tree.
This release removes multi-window and multi-buffer code, leading to a much smaller binary.

I also changed the modeline to look just like the modeline in Mg. Because I like it and am used to it.

There's also a new keybinding, M-e, which will display the version of emg.

I think I'll add back search+replace in the next version.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 11:20 pm 
Contributor

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

Most cool!

Gotta try it.

Wiz


Top
 Profile  
 
PostPosted: Wed Aug 12, 2015 1:48 pm 
Contributor

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

So I downloaded the latest. It partially compiles.

Fails at tools/fsutil mount.c:32:18 error fuse.h no such file or dir.

Which leads me to ask:

Maybe we should now divide compilation into somewhat smaller parts?:

1. kernel only

2. Whatever application only - emg in this case

3. Driver only [if we get that up and working]

4. Simulator(s) [Stuff that does not run on the PIC32 itself.]

5. And other meaninful subsets

Maybe a few simple examples would help? I seem to remember that it was 'easy', but I cannot remember how to do it.

In this case the kernel and friends seems to have compiled correctly? So maybe I can use that part of what was done? How do I know it is OK. Maybe a simple message when that part of the script is reached?

EMG seems to have compiled, but seems to be the older version.

And I wonder if EMG will compile on the PIC32 system itself.

Lots of fun.

Wiz


Top
 Profile  
 
PostPosted: Wed Aug 12, 2015 3:03 pm 
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
You need to install the fuse development libraries:

Code:
$ sudo apt-get install libfuse-dev


It's required by the newer fuse (Filesystem in USErland) based image management utility. Without that you can't build the SD card image.

_________________
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  
 
PostPosted: Wed Aug 12, 2015 3:55 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
wiz wrote:
So I downloaded the latest. It partially compiles.

Fails at tools/fsutil mount.c:32:18 error fuse.h no such file or dir.

This is not an emg issue.
wiz wrote:
EMG seems to have compiled, but seems to be the older version.

The pull request hasn't been merged yet. You either have to wait for that or get it from my tree.
wiz wrote:
And I wonder if EMG will compile on the PIC32 system itself.

Try it. Let me know how it goes.

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Fri Aug 14, 2015 4:16 pm 
Contributor

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

FWIW - RetroBSD version 5-14-2014 still compiles OK :) THANK GOODNESS!

Latest version does not :(.

Libfuse-dev does NOT install on this box? Not sure why? Not sure what changed in RetroBSD??! which is of MUCH more concern? Also, I suspect I may be being actively hacked from other stuff I am observing.

So, I guess it's time to raise the paranoia level?

So Ibara, refresh my memory as to where I can pick up the latest version and I will try to compile it in Retro and on my dev. box.

Lots of fun.

Wiz


Top
 Profile  
 
PostPosted: Fri Aug 14, 2015 9:36 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
wiz wrote:
So Ibara, refresh my memory as to where I can pick up the latest version and I will try to compile it in Retro and on my dev. box.

http://devio.us/~bcallah/emg/

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Mon Aug 17, 2015 3:13 pm 
Contributor

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

emg-1.8 compiles OK as a part of RetroBSD-5-14-2014 :). Size is 28588. emg-1.6 was 43428.

Does not compile on PIC32 system---

Make: Must be a seperator on rules line 8. Stop.

The Line is: CFLAGS += -mips16

I thought problem might be tab character. Replaced with space still the same error. Also tried deleting offending line. Still no go.

Some Makefile related syntax thing I suppose?

Wiz


Top
 Profile  
 
PostPosted: Mon Aug 17, 2015 3:21 pm 
Contributor

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

One useful feature might be to show how much memory is left once a file is loaded? To help with the my file is getting too big problem?

Wiz


Top
 Profile  
 
PostPosted: Mon Aug 17, 2015 3:33 pm 
Contributor

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

I just realized I uploaded the wrong version to test.

The current length emg-1.8 = 39200.

Wiz


Top
 Profile  
 
PostPosted: Tue Aug 18, 2015 12:04 am 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
wiz wrote:
One useful feature might be to show how much memory is left once a file is loaded? To help with the my file is getting too big problem?

Remove all the CFLAGS and LDFLAGS lines and see if that works.

_________________
@__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