-welcome everyone uh my name is ferming i -
-work as a commonwealth engineer at -
-ribbon pack and today i'm going to talk -
-about -
-how to build an e-max -
-right -
-so uh let's start by defining what is an -
-imax -
-so that this can be a really this can be -
-really hard depending on -
-what you want to say what you want to -
-qualify what emas is and not i'm going -
-to -
-get just this definition it's not the -
-best but it's mine right -
-so i would argue that an emacs should -
-have text editing capabilities -
-i wouldn't say it should be a text -
-editor but it should be able to work -
-really well with text -
-as you have introspection and a global -
-state -
-so you can ask them every time -
-um software itself i think it should be -
-able to modify itself while running -
-um so you shouldn't be static and you -
-shouldn't never restart for -
-any reason like in engineering max you -
-can't predefine every function or every -
-functionality the way you want -
-and extensibility should not be limited -
-with this i mean that if you add a new -
-package shouldn't be a difference you -
-shouldn't have an api -
-to extend the software and the entire uh -
-software itself should be the external -
-api code -
-i'll argue that's also -
-um -
-should be list base -
-but -
-um it's controversial so -
-yes they're going to get this definition -
-and then extend upon it so -
-bear with me -
-so right now uh genuine max is the best -
-emacs that we have that's not the only -
-one uh -
-not even the first one imax but it's the -
-best one that we have the one that we're -
-using the one that we that i'm using -
-right now and the one that we're here -
-for -
-but as we all know it's not perfect i'm -
-going to highlight some -
-um imperfection that all that we should -
-know i guess that you must have -
-so the first one is that uh i would -
-argue that inmate lisp is a good lisp -
-but it's not a general purpose -
-programming language -
-you can do pretty crazy things with -
-emacs but i will argue that you can do -
-also do that with -
-brain [ __ ] i'm not comparing them i know -
-with my list so much better than brain -
-[ __ ] but that's not an argument in -
-mclisp it's -
-a language for an editor -
-not for writing -
-game engine for example -
-um it's not the fastest lisp we all know -
-this is um -
-not in the middle i will say was really -
-slow now it's getting better maybe with -
-the c integration -
-um thanks to andrea it can be even -
-better but we'll see and has limited -
-concurrency this will still be the case -
-it has shared threats first i know -
-it's not perfect and it's also not that -
-fast -
-and even though this for some people is -
-not an issue -
-i'll argue that for me it's an issue -
-which is the canoe emac score is written -
-in the c -
-um i'm not a big fan of c i mean i have -
-wrote things about c in the past and -
-it's -
-okay as a language but um i prefer i'll -
-be in lisp so i can hack on it easily -
-and really find it while it's running -
-all in just one language so you don't -
-have to learn two languages to get into -
-it -
-um even though it's just ten percent of -
-emacs right but still there needs to be -
-maintained and yeah -
-i don't like that uh kind of uh a max -
-aspect but just -
-this was just my opinion okay so while -
-you're like you know mac's pretty good -
-you should use it -
-you probably use it if you're here and -
-use it every day it's great -
-so -
-some people in the past -
-wanted to write -
-an e-max of course and not the emacs -
-and they think about different things -
-and they attempt to write similar emacs -
-like things i'm going to um -
-i know there's a lot of more way more -
-emacs than the one i'm going to say now -
-but i just going to -
-focus on the emacs that uh meets the -
-criteria are not like -
-uh the linux turbo's emacs right which -
-is just a c -
-simple e max to write c for me that may -
-be uh -
-an e max for the people but not for me i -
-wouldn't argue that that's not -
-really an emacs just an editor with -
-commands similar to imax -
-but -
-i digress okay so the language i will -
-argue that common lisp may be the best -
-language -
-period -
-sorry about that the best language for -
-writing emacs also -
-um it's a timeless standard reaching in -
-the 1990s is fast and reliable -
-it's a great lisp i will argue that the -
-best lisp but i don't want to get any -
-trouble so i would just say it's great -
-lisp -
-um has good library support doesn't have -
-like a huge library like i would say -
-python or c but pretty -
-robust and good library -
-similar to mclisp which may seem as a -
-historical accident which maybe it is -
-but also in this case has some -
-interesting properties that will -
-be discussed -
-later -
-okay so -
-um -
-taking common lisps a language to write -
-an imax i'm going to get some -
-technologies in documentation that we -
-can use to write an e-max in common lisp -
-so the first one is mcclaim which is an -
-implementation of a -
-common lisp interface standard -
-this is great i mean i loved how -
-this is written how it is defined i like -
-standard things -
-um mclean it's a marvelous tool i will -
-argue that it's the best -
-um toolkit -
-i wouldn't say there's a toolkit because -
-it's way more extense than it but it's -
-great i would highly recommend if you -
-want to write a gui application in -
-common lisp well mcclain is great -
-also some people thought about -
-libraries for writing emac style -
-application so to create an emacs some -
-people already thought about this and -
-wrote a paper -
-um -
-one of them was robert strand -
-which is the guy more interested in in -
-imax like things -
-and this paper is great you can get a -
-lot of information how you can write -
-your application get -
-similar functionality and all the things -
-that i said before -
-and also the same -
-of the -
-robert strand or the guys that wrote -
-that paper also wrote clefo which is -
-a library for text editor buffer but -
-more important it's also a definition -
-so this video -
-out there will where he explains -
-um -
-what clapper is so he wrote an -
-implementation of clover but it's more -
-of like a -
-um -
-yeah -
-like a standard like a way to write -
-uh how buffers or work in emacs -
-and i think it's better -
-in some ways that what imac genuine mac -
-does right now -
-um in other ways it's really interesting -
-and i just have had a lot of fun -
-implementing it so -
-i'm using it more or less -
-uh so yeah that's some great -
-documentation great foundation so you -
-don't have to -
-i mean it's -
-really -
-interesting to write everything by -
-yourself because you are -
-a great -
-programmer and you you want to have -
-control of everything i understand -
-everything from the ground up but we -
-have to understand that -
-an imax it's a really complex -
-application -
-and -
-i will say that if you have some -
-foundation it will be easier and you -
-don't have to rewrite the wheel 20 times -
-right -
-okay so attempts uh the same guy robert -
-strand -
-have two climax which is emacs and emacs -
-like thing written in common lisp -
-um the first ones the third one is -
-abandon and the second one is a work in -
-progress -
-um it's really interesting the second -
-one uses in fact the clefor buffer -
-implementation one question -
-and the first one is just a mcclaim um -
-front end remax so it's really tight the -
-so the the -
-interface retired with the api so it's -
-basically i'm sickly -
-um software that's similar to an emacs -
-right -
-and the third one it's a lem project -
-which is a common lisp editor that aims -
-to be really close to remax and it -
-probably fits the criteria but -
-and uses the encourages for the -
-interface for as i know and it's really -
-commonly focused so it even has some -
-major modes for other languages but -
-i mean it's -
-um -
-it's mainly for common lisp written by -
-common lisp and for common list -
-developers -
-um so i decided to write my own emacs -
-but i don't want to write everything -
-from scratch -
-because i'm not a creator programmer -
-and also because probably there's -
-something that some people already tried -
-and the first thing i noticed with all -
-these attempts -
-that they fail in compete with emacs so -
-to say they don't have an imax conf -
-and they don't support genuine max -
-packages -
-and that's a big deal because they're -
-more of the thousands packages out there -
-under great -
-and imagine they want to convince -
-someone to say hey try this editor -
-instead of x thing -
-i would say okay can i use git things so -
-i have to write a git -
-um -
-liar -
-maggot or mode and i want to play tetris -
-the other road so that's -
-really -
-hard for one person to do -
-so someone -
-thought similar so they say okay i'm -
-going to rewrite the maxi aph common -
-lisp -
-it was this is what back in 2005 by sol -
-bets -
-sabits -
-but it was banjo in 2007. the project -
-was called lice -
-and -
-it was a really interesting approach -
-um it wasn't finished and it was lost in -
-time -
-so my idea was to continue with the -
-project so the foundation was really -
-interesting even though i didn't like -
-some other -
-designing choices -
-um but i want to continue with projects -
-finished you cannot see emacs api add a -
-compatibility layer to use canoe max -
-packages that's the selling point right -
-so you don't have to -
-use new things -
-i like my emacs i just want to have my -
-emacs with commodities that's it and -
-also better probably a better buffer -
-implementation so the idea now that uh -
-having an imaginativity layer -
-is there improving e-max upon it right -
-you can use the e-max api or the new one -
-depending on your needs -
-you can also have that that -
-compatibility of both -
-so um i come up with cedar -
-um cedar is my attempt is a nice -
-fork -
-i will say the hug for hard fork because -
-i change um -
-a lot of things and add a lot of things -
-but it's similar still similar -
-um -
-and for this demo i'm going to use the -
-cidar and courses branch we want to test -
-it out because the other ones are a work -
-in progress so one -
-it's the mclean -
-club for implementation which is not -
-finished and doesn't run -
-and the other one is with the visual -
-that's to explain here but basically -
-and debugger -
-it's an interesting debugger similar to -
-slime -
-which is the superior lisp -
-for re max let's begin with max so it's -
-increases base also like um -
-like limb -
-but um way more easy simple -
-um i -
-write well i translate more or less this -
-list mode functionality -
-and it has similar -
-genuine max api -
-we'll see that in the demo -
-um it's usable but i work in progress -
-instead of functionality right now i'm -
-not focusing on stability yet i'm -
-focusing finish the mclean front end -
-which i'm not even halfway there -
-but i hope to finish it -
-maybe next year who knows -
-finish the compatibility layer from the -
-new max packages i seen this i think -
-this is doable i know how to do it i -
-just need time -
-maybe -
-a little bit of caffeine -
-coffee -
-so uh let's go with the demo right -
-so uh let's open terminal what's this -
-anchor base let's go to quick lisp -
-log there -
-um and let's run it -
-okay so now that we're here um it give -
-us the welcome thing this is the main -
-buffer it's like we'll say the emacs -
-buffer when you enter -
-um so we know that it's firming this is -
-not hardcoded -
-okay and now we see it's a major mode in -
-the bottom right lisp -
-it's lisp interaction and -
-this is the name of the buffer right -
-um okay so we have a couple of buffers -
-we have scratch which is the fundamental -
-mode and messages all right -
-okay so -
-let's get some interesting things first -
-uh let's open a file -
-so i think it's in -
-programming -
-a max -
-conf 2021 and let's go to c there -
-let's go to demo -
-so let's open a file so -
-um -
-phone lock is not yet -
-um -
-well it's implemented so it's there but -
-it's not active by default -
-so let's open -
-uh mx -
-and let's go lisp -
-interaction mode -
-right -
-so this when you show me here is the -
-implementation of the kill sex sex -
-express s expression command -
-which is exactly the same point by point -
-from the emacs one you can go right now -
-umax and ask -
-how is skills s expression defined this -
-is the same -
-and this is how you define a key so we -
-have we can say uh describe -
-symbol -
-the package will be -
-cedar and the symbol is -
-global map -
-[Applause] -
-so -
-it's a top level global keymap -
-thank you for the information -
-um but you can also say okay uh can i -
-say okay -
-global map -
-okay i'll be giving this a key map so -
-even though i want to aim to have the -
-same -
-um api the -
-um sorry -
-uh the back thing so the back end is -
-going to be class oriented and not same -
-any max but the return expression should -
-be really similar so if we say current -
-buffer -
-it will give us the buffer it's not the -
-same in emacs but it's a buffer object -
-and we can also ask -
-about let me try to remember -
-oh there we are -
-um -
-but for -
-name we can close this and open one here -
-and we can say okay so we have this -
-thing -
-that will give us the name so uh this is -
-similar to the emacs api -
-as we saw we -
-so -
-briefly we have a lot a couple of -
-commands -
-um -
-kills expression also have a little bit -
-of -
-help kill word kill line -
-region -
-kill buffer -
-all things that we expect from emacs -
-um -
-and yeah this is there's a couple of -
-things i may show but i think this is -
-good enough i don't have enough time if -
-you want more information -
-so let's go back to it let's close the -
-buffer does it work no it doesn't work -
-okay now the head buffer no ah let's go -
-to cedar -
-okay so if you want more information -
-um -
-[Applause] -
-first of all thank you very much um -
-sorry i don't have enough time to show -
-too much too many things i will see -
-there but um -
-yeah uh -
-if you want more information you can -
-always send me an email this is my -
-webpage -
-thank you very much -- cgit v1.2.3