4coder
 
 
 
 
 
 
Go to file
Allen Webster c38c7384b9
Merge pull request #2 from rfaile313/patch-1
typo
2022-05-31 07:54:12 -07:00
bin fin 2022-05-30 23:17:09 -07:00
custom fin 2022-05-30 23:17:09 -07:00
docs Setup default load path for files 2020-11-23 22:27:33 -08:00
generated Move system api to custom layer 2019-10-07 18:11:40 -07:00
metal Changed the render target from a property to a regular field, also changed the instance variable names to use Apple's conventions. 2020-01-19 20:19:29 +02:00
opengl Fix compilation on windows 2020-03-03 12:25:04 -08:00
platform_linux take current directory out of search path for custom_4coder 2021-06-01 23:07:16 -07:00
platform_mac Get user directory on Mac 2021-01-17 16:11:47 -08:00
platform_unix Fix linux mutexes to be recursive; tombstone the old unix code 2020-02-27 18:38:00 -08:00
platform_win32 fix more win32 clipboard bugs 2021-07-14 08:17:41 -07:00
ship_files fix win32 clipboard reading 2021-07-14 06:29:02 -07:00
site Site update 2020-01-22 14:01:42 -08:00
.gitignore added .dSYM to gitignore 2020-01-16 20:01:37 -08:00
4ed.cpp fix -L bug 2021-06-01 23:05:02 -07:00
4ed.h override user directory on command line 2021-05-07 16:56:24 -07:00
4ed_api_check.cpp Setup default load path for files 2020-11-23 22:27:33 -08:00
4ed_api_definition.cpp Upgrade to view change buffer hook; quick_swap_buffer 2020-05-03 06:40:07 -07:00
4ed_api_definition.h Progress on type documentation 2019-12-15 22:56:13 -08:00
4ed_api_definition_main.cpp Move system api to custom layer 2019-10-07 18:11:40 -07:00
4ed_api_implementation.cpp fix crash when closing cli output buffer 2021-01-24 14:12:14 -08:00
4ed_api_parser.cpp Docs index filtering 2019-12-16 15:13:02 -07:00
4ed_api_parser_main.cpp Setup default load path for files 2020-11-23 22:27:33 -08:00
4ed_app_models.cpp Quick fix for thread handle leak; project parse crash bug fix 2020-05-01 07:38:57 -07:00
4ed_app_models.h override user directory on command line 2021-05-07 16:56:24 -07:00
4ed_app_target.cpp Quick fix for thread handle leak; project parse crash bug fix 2020-05-01 07:38:57 -07:00
4ed_buffer.cpp Rip out the super annoying Data String_Const_u8 distinction 2020-12-30 16:55:11 -08:00
4ed_buffer.h Initial sloppy setup for customizable line layout 2019-10-28 21:27:20 -07:00
4ed_buffer_model.h Revert "Converting to proper use of umem everywhere (kind of went off on a tanget there :D)" 2017-03-23 15:16:39 -04:00
4ed_cli.cpp Async system setup WITHOUT cancelation working yet 2019-10-21 21:10:29 -07:00
4ed_cli.h Token transition in progress 2019-09-03 22:31:35 -07:00
4ed_coroutine.cpp Async system setup WITHOUT cancelation working yet 2019-10-21 21:10:29 -07:00
4ed_coroutine.h TIghtene dup the listers a lot a lot more 2019-10-25 16:33:50 -07:00
4ed_cursor_codes.h Rendering improvements and partial cleanup 2017-11-10 19:58:47 -05:00
4ed_dynamic_variables.cpp Rip out the super annoying Data String_Const_u8 distinction 2020-12-30 16:55:11 -08:00
4ed_dynamic_variables.h Added metaprogram for custom ids to make them much easier to declare and integrate 2019-11-24 15:13:51 -08:00
4ed_edit.cpp Undo fade out 2020-05-03 08:00:28 -07:00
4ed_edit.h Undo fade out 2020-05-03 08:00:28 -07:00
4ed_file.cpp override user directory on command line 2021-05-07 16:56:24 -07:00
4ed_file.h Fix drive letter problem; add unkillable setting 2020-01-26 18:27:38 -08:00
4ed_font_api.cpp Move system api to custom layer 2019-10-07 18:11:40 -07:00
4ed_font_interface.h Initial sloppy setup for customizable line layout 2019-10-28 21:27:20 -07:00
4ed_font_provider_freetype.cpp make fonts still visible when config.4coder missing 2021-05-07 17:26:03 -07:00
4ed_font_provider_freetype.h Font handling and rendering basically working. 2019-07-24 00:41:40 -07:00
4ed_font_set.cpp All obvious memory leaks fixed - except when profiler is enabled - need to set it to default disabled and fix the inspect ui to still work 2019-11-21 21:37:11 -08:00
4ed_font_set.h Fully transitioned to the new system api linkage 2019-10-03 10:57:44 -07:00
4ed_generate_keycodes.cpp New keycodes; linux one time code execution; close file handle in save function 2020-03-03 18:44:25 -08:00
4ed_graphics_api.cpp Move system api to custom layer 2019-10-07 18:11:40 -07:00
4ed_history.cpp Rip out the super annoying Data String_Const_u8 distinction 2020-12-30 16:55:11 -08:00
4ed_history.h Undo fade out 2020-05-03 08:00:28 -07:00
4ed_hot_directory.cpp Fully transitioned to the new system api linkage 2019-10-03 10:57:44 -07:00
4ed_hot_directory.h New file listing API 2019-08-03 17:49:40 -07:00
4ed_layout.cpp Fixed random crashes and misbehaviors 2020-01-15 10:42:02 -08:00
4ed_layout.h Margins, moved file bar, moved query bars 2019-02-26 21:49:35 -08:00
4ed_log.cpp Async system setup WITHOUT cancelation working yet 2019-10-21 21:10:29 -07:00
4ed_log.h setup windows startup log 2021-05-16 23:13:27 -07:00
4ed_mem.cpp Final type fixups; package and build stuff straightened out 2019-12-17 19:38:08 -08:00
4ed_render_target.cpp Arbitrary text rotation in immediate mode text draw 2020-05-09 09:55:01 -07:00
4ed_render_target.h Good rounded rectangles finished 2019-10-08 12:02:04 -07:00
4ed_string_matching.cpp Added clang compiler support. The macOS platform now uses clang instead of gcc as its compiler. 2019-12-24 02:46:58 +02:00
4ed_system_api.cpp Load fonts from new search list 2021-01-16 16:14:12 -08:00
4ed_text_layout.cpp Arbitrary text rotation in immediate mode text draw 2020-05-09 09:55:01 -07:00
4ed_text_layout.h New better arena management 2020-03-11 16:22:37 -07:00
4ed_translation.cpp Cleanup; removed 4coder_utf8 library; rewrote win32 u8 <-> u16 layer 2019-10-01 13:04:45 -07:00
4ed_translation.h Character positioning by line relative layout iteration 2019-09-02 11:59:36 -07:00
4ed_view.cpp Simplified get_next_input to get_next_input_raw; introduced dead key flag on key stroke events; introduced helper for iterating text events attached to a key stroke 2020-05-09 14:01:23 -07:00
4ed_view.h Simplified get_next_input to get_next_input_raw; introduced dead key flag on key stroke events; introduced helper for iterating text events attached to a key stroke 2020-05-09 14:01:23 -07:00
4ed_working_set.cpp Clipboard now implemented as a custom layer feature; API transition mechanism established for deprecating old clipboard API without immediately breaking existing code for anyone 2020-02-08 17:34:35 -08:00
4ed_working_set.h Clipboard now implemented as a custom layer feature; API transition mechanism established for deprecating old clipboard API without immediately breaking existing code for anyone 2020-02-08 17:34:35 -08:00
README.md typo 2022-05-31 08:42:38 -05:00
project.4coder team project feature 2021-05-15 11:52:36 -07:00

README.md

Welcome to the 4coder code base.

This codebase was authored by Allen Webster from 2014-2022, with help from a number of contributors:

  • Casey Muratori
  • "insofaras" Alex Baines
  • Yuval Dolev
  • Ryan Fleury

Also thanks to all those who supported the project, financially and/or through all your detailed feedback.

As of May 31st 2022, I am freezing this codebase and open sourcing it.

I DO NOT recommend learning from this codebase, especially not with an uncritical eye. It may be a useful reference for certain algorithms and architectural ideas, and it certainly contains some cautionary tales. But if you are a beginner, I encourage you to aim for more than emulating the style and structure of this codebase.

I will not be taking pull requests, or any other form of contribution in this repository. Since I am no longer maintaining this codebase, it is my intention that users who rely on 4coder will have the option to fork the codebase, fix their issues, or carry what I started in new directions according to their own vision if they would like.

The license I chose for this codebase is the very permissive MIT license. For the sake of clarity in the community of 4coder users, I ask that new forks of this codebase be given unique names.

In this readme you will find:

  1. License (MIT)
  2. Build Instructions
  3. Notes on Major Issues

License

Copyright (c) 2022 Allen Webster

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Build Instructions

  1. Create an empty folder named "4ed" to contain the codebase.
  2. Clone the repository
  3. Rename the folder containing the repository to "code"
  4. At the same level as the "4ed" folder, clone the "4coder-non-source" repository
  5. A. On windows setup the visual studio command line magic sauce so that "cl" works B. On linux setup g++ C. On mac setup clang
  6. Navigate to the "4ed/code" folder.
  7. A. On windows run "bin\build.bat" B. On linux run "bin\build-linux.sh" C. On linux run "bin\build-mac.sh"

Notes on Major Issues

  1. The build system and organization of files is extremely complicated. There is a 4ed_build.cpp that defines how builds run, and the build scripts have to build and run this C++ file. The file is pretty chaotic since it cannot rely on the codebase's usual helpers. On top of that there is a totally separate build system for the custom layer which is also a big gigantic mess of its own. It involves several stages of compilation, and a number of metaprograms.

  2. The documentation system is over complicated & the documentation is incomplete. There is very little documentation for the internals or the complicated layers of helpers.

  3. The lexer generator is way too complicated, and the built-in support for language features is not fully developed. The background threaded parsing is not very carefully organized and is not very flexible, so it's hard to add new languages at any level of the system.

  4. There are a few layers of overcomplicated configuration parsers.

  5. Mac support has not been maintained for several versions.

  6. The codebase has a very weak base layer with key features that were added very late, so lots of code was written in the absence of useful features to bind things together. To make matters worse the base layer is split by the distinction of custom layer & core layer, leading to some double definitions and some incosistencies.