Meta tags:
Headings (most frequently used words):
conclusion, why, configurations, dynamic, caching, approach, library, parsing, another, encoding, prototypes, inheritance, future, the, switch, static, results,
Text of the page (most frequently used words):
the (189), and (86), #this (48), #that (37), for (33), can (33), #editor (30), you (25), are (22), #configuration (22), #haskell (22), 2014 (21), not (20), vim (20), #file (20), user (19), 00z (19), one (18), 2017 (17), #dynamic (16), #have (16), #like (15), only (15), was (15), will (15), there (14), #parsing (14), has (14), some (13), but (13), code (13), very (13), how (13), from (13), self (13), emacs (12), github (12), should (12), files (11), also (11), input (11), inheritance (11), use (10), part (10), first (10), https (10), keymap (10), time (10), posts (9), what (9), html (9), with (9), configurations (9), index (9), posted (9), state (9), post (9), text (9), project (8), where (8), new (8), just (8), language (8), other (8), make (8), library (8), about (8), lines (8), all (7), static (7), mode (7), more (7), package (7), keymaps (7), into (7), recompilation (7), cabal (7), using (7), while (7), change (7), would (7), want (7), example (6), buffer (6), september (6), emulation (6), parse (6), level (6), proto (6), course (6), structure (6), used (6), because (6), alex (6), another (6), incremental (6), advantage (6), your (6), parser (6), which (6), since (6), been (5), settings (5), finally (5), going (5), then (5), thing (5), see (5), approach (5), main (5), work (5), style (5), any (5), operations (5), split (5), these (5), result (5), jeanphilippe (5), modularization (5), bernardy (5), way (5), core (5), why (5), dyre (5), don (5), indentation (5), definition (5), encoding (4), character (4), cached (4), monad (4), several (4), relevant (4), interesting (4), already (4), cloc (4), whole (4), fix (4), actions (4), lazy (4), possible (4), had (4), increaseindent (4), many (4), demo (4), here (4), prototypes (4), defined (4), support (4), provide (4), prototype (4), available (4), compilation (4), years (4), out (4), between (4), frontend (4), try (4), users (4), above (4), now (4), useful (4), current (4), stack (4), tree (4), much (4), most (4), config (4), too (4), probably (3), moment (3), basically (3), after (3), bufferm (3), found (3), per (3), 07t00 (3), data (3), parts (3), think (3), saying (3), import (3), value (3), complete (3), works (3), write (3), own (3), each (3), parsers (3), good (3), able (3), back (3), states (3), custom (3), 2012 (3), does (3), completely (3), reload (3), com (3), our (3), need (3), online (3), analyzed (3), until (3), improving (3), often (3), achieve (3), still (3), evaluation (3), improved (3), take (3), developers (3), key (3), reuse (3), must (3), previous (3), definitions (3), pieces (3), through (3), insert (3), doesn (3), module (3), point (3), following (3), obvious (3), cursor (3), its (3), next (3), create (3), functions (3), without (3), size (3), piece (3), xmonad (3), give (3), unique (3), dmitry (3), results (3), ivanov (3), over (3), given (3), styles (3), than (3), later (3), object (3), changing (3), process (3), open (3), even (2), original (2), place (2), recursion (2), page (2), ongoing (2), allow (2), press (2), when (2), corresponding (2), making (2), length (2), prelude (2), release (2), far (2), every (2), framework (2), days (2), manually (2), remember (2), errors (2), call (2), mind (2), changed (2), readme (2), compiled (2), exactly (2), recompile (2), oop (2), terminal (2), idea (2), person (2), frontends (2), end (2), record (2), command (2), 05t00 (2), packages (2), problem (2), general (2), five (2), edits (2), fields (2), interface (2), values (2), future (2), join (2), tweaking (2), everything (2), basic (2), concepts (2), lambda (2), spaces (2), related (2), pango (2), friendly (2), changes (2), instances (2), changelog (2), base (2), something (2), abstractions (2), terms (2), look (2), colorscheme (2), customizedproto (2), 04t00 (2), plenty (2), lost (2), case (2), gui (2), were (2), programs (2), dependencies (2), depend (2), font (2), actually (2), however (2), welcome (2), class (2), codebase (2), 25t00 (2), july (2), oriented (2), tooling (2), customize (2), easiest (2), restart (2), easy (2), 06t00 (2), situation (2), methods (2), feel (2), two (2), design (2), building (2), second (2), today (2), references (2), stream (2), say (2), executable (2), comes (2), described (2), thousands (2), multiple (2), window (2), manager (2), purpose (2), caching (2), uis (2), special (2), region (2), independent (2), video (2), well (2), different (2), let (2), quality (2), source (2), written (2), bindings (2), 03t00 (2), series (2), line (2), maplines (2), tie (2), find (2), lazily (2), 01t00 (2), binding (2), insertion (2), strategy (2), 02t00 (2), configure (2), they (2), shows (2), top (2), ground (2), simple (2), 29t00 (2), hughes (2), swierstra (2), advantages (2), src (2), extend (2), conclusion (2), computed (2), produce (2), makes (2), left (2), easily (2), instead (2), solution (2), highlighting (2), limit (2), 158 (2), cost (2), blank (2), function (2), move (2), defines (2), comment (2), opening (2), default (2), cocoa (2), automaton (2), aldanial (2), ignored (2), gtk (2), their (2), moving (2), rows, ways, live, entry, best, recording, screen, section, updates, mateusz, observe, bit, powered, tiny, encoded, plugin, expose, incompatible, improves, syntax, intentionally, actual, done, citizen, regex, development, story, hesitate, optimizing, issue, chat, escape, maybe, interested, type, shiny, visual, crazy, blockwise, control, scheme, care, pretty, ergonomic, comprehend, arrow, perfect, switching, quantify, suite, tabs, amount, test, macos, implements, commandline, areas, experience, shell, shortcut, popular, portion, leaderboard, worse, devel, task, documentation, xml, tickets, atom, googlegroups, numbers, healthy, expected, seconds, counting, strings, metric, colors, competition, normal, both, provided, benefits, potential, beginner, porting, rainbow, nothing, leaner, doing, sane, less, plug, inserts, judging, helping, stay, intend, last, realized, real, improvements, went, dozen, bits, little, helps, nevertheless, readline, direction, standard, separation, concerns, applicative, cua, parens, circular, rope, arrive, sufficiently, difficulty, trying, hours, within, question, rather, modules, untangled, libraries, potentially, outside, thanks, rasa, competitor, folks, helloworld, definitely, kde, order, intro, lexicographical, reverse, emulations, lsp, greeted, list, implement, looking, simpler, thin, air, 1241, things, blows, fact, splitting, rage, stewart, google, come, contrast, quote, accessible, seem, interestingly, preludes, gathered, yet, lots, removed, simplify, 4514, steadily, significantly, 19103, harder, sandboxes, fondly, 4647, nuking, 262, global, ghc, directories, 129, late, 57554, 2013, anyway, dependency, points, javascript, 4669, 803, misc, modes, 449, 1246, seen, 147, 601, snippet, 375, looks, lot, came, 643, complaints, hundreds, 407, 10335, obscure, 1566, vty, talk, fuzzy, comparable, modular, 214, intero, 140, ireader, 124, larger, unprecedented, overwhelmed, assemble, reshuffle, started, rewind, kate, killing, hoping, yzis, naturally, stuff, lives, utils, becomes, entirely, optional, seemed, contributing, bug, looked, undocumented, made, multiproject, repos, thought, behavior, separate, inconsistency, corruption, wasn, projects, happy, contained, crash, serious, isolate, anything, answer, selection, 1006, implementation, hopefully, better, hold, breath, drawback, enforce, cool, acm, never, update, zipper, notable, strong, functional, flavor, underlying, digital, appear, accept, defining, otherwise, string, note, provides, blocks, combine, means, script, walkthrough, guerrilla, abstract, demonstrates, capabilities, configured, extended, gave, symposium, recorded, require, partial, full, basis, partially, evaluated, whenever, modified, applying, became, invalidated, recomputed, solve, half, though, effectively, solves, force, response, shown, constructed, takes, store, positions, inputs, relatively, start, non, loaded, loading, instantaneous, proceeds, scrolls, down, straightforward, intermediate, adds, hundred, compared, polish, sketched, paid, discarded, proposed, cache, increase, space, forced, component, monadic, dsls, flexible, low, coupling, components, indeed, swap, same, around, category, choose, runtime, glue, knot, responsible, rendering, getting, three, structured, console, editorm, composable, convenient, detail, yim, operate, processes, etc, performed, closing, encapsulates, windows, buffers, involving, handled, local, deletion, annotation, contents, understood, events, governing, prepend, disjunction, lisp, modifications, powerful, trivial, traditional, action, created, operator, behaviour, merged, defaultconfig, defaultkm, meta, char, getselectregionb, unitwiseregion, modifyregionb, contrasted, flavour, maps, guide, encouraged, having, effect, saving, categorized, four, eventually, constitute, hacking, declarative, get, high, overview, overall, shall, model, success, purely, needed, combining, 1005, recompiling, january, jaro, reinders, nice, subset, dsl, seamless, entire, customized, could, dhall, located, handeled, smoothly, leave, broken, awesome, show, few, number, unfortunately, closed, imagine, structures, difficult, understand, method, dispatch, run, sketch, tracking, might, tricky, sometimes, construct, serve, introduction, currently, sources, right, issues, amend, valid, running, transfer, newly, itself, automate, build, perfectly, specify, recompiles, recognizable, explain, editorconfig, 987, modelines, 988, commands, trigger, checks, derived, stable, handles, restarted, inconvenient, personally, recompilations, system, unless, intuitive, switch, starts, automatic, always, know, version, kickstart, compiling, won, check, box, rest, preferable, characteristics, combinator, bothering, developing, exist, motivate, describe, ideas, behind, despite, flavors, lacking, expression, combined, lightweight, intended, highly, customizable, compositional, grammars, languages, prefer, syntactically, exists, third, gracefully, handle, being, edited, inevitably, contain, incorrect, speed, moments, timely, feedback, therefore, efficient, particular, responsivity, hand, incrementally, customization, patch, set, derive, lacks, color, themes, similar, specific, reflected, automatically, toy, paragraph, redefine, seems, cry, inherit, override, occurs, them, copy, paste, tapl, generalizes, strict, types, userfunction, customizedabc, follows, did, introduce, infinite, marked, ceases, pierce, abc, retrieve, taking, taught, trick, reference, explicit, putting, blog,
Text of the page (random words):
ost it is a good moment to talk about ongoing modularization of yi rewind to a moment i started contributing to yi 2012 after two years of using vim i found a bug in it it wasn t anything too serious like a crash or corruption of user text just some undocumented inconsistency in behavior i thought well it s open source why not try to fix it this was the first time i looked at vim s source code and was completely overwhelmed hundreds of thousands of lines of c it s not unprecedented of course but it s a lot at that point i ve only seen a codebase comparable in size one time at work but that was while larger much more modular after some hours of trying to find a relevant place in vim i was sufficiently lost to arrive at a question is there a vim like editor that is written simpler i remember looking at kate yzis and yi was i going through a list of vi emulations in reverse lexicographical order probably was i using kde at the time definitely anyway yi seemed interesting because it had about 20 thousands lines of code and had multiple frontends terminal gtk and cocoa and multiple keymaps vim and emacs naturally this is how yi was split into packages or rather into a library part and an executable part within one cabal project at the time cloc yi src library 158 text files 158 unique files 29 files ignored github com aldanial cloc v 1 72 t 0 49 s 262 7 files s 57554 5 lines s language files blank comment code haskell 129 4514 4647 19103 cloc yi src executable 1 text file 1 unique file 0 files ignored github com aldanial cloc v 1 72 t 0 01 s 95 5 files s 1241 3 lines s language files blank comment code haskell 1 5 3 5 so basically one package interestingly yi had a custom prelude and that gathered lots of complaints over the following years until mateusz finally removed it in 2014 and yet these days custom preludes seem to be all the rage by contrast top result in google for custom prelude from 2012 is this answer by don stewart saying not to do it of course i was not the first person to come up with the idea to split emacs emulation from vim one and terminal interface from gui in fact here is the quote from 2012 readme we also want to simplify the core yi package to make it more accessible splitting some parts into several packages back then it was significantly harder to do just because of the tooling not only there was no stack at the time cabal sandboxes were not a thing until late 2013 i fondly remember the character building days of nuking your global ghc and cabal directories but thanks to cabal and later also stack folks things were steadily improving since the tooling situation was not the only difficulty yi had several circular references between modules one by one we untangled these and split some libraries potentially useful outside of yi yi rope is actually used by our friendly competitor rasa and haskell lsp oo prototypes still blows my mind five years later yi was my intro to haskell after a helloworld and i was basically greeted by a module saying here we implement oop inheritance in 7 lines out of thin air yi language i m not too happy about because we split it not because it s a self contained thing but just to isolate alex related stuff that was killing incremental compilation i m hoping to reshuffle this part so that pieces of yi language like yi buffer basic and yi region end up in yi core and everything alex related lives in yi alex utils or something and becomes entirely optional that is you will be able assemble an editor without a dependency on alex some time later stack came about and made it easy to work with multiproject repos and we finally split all the frontends and keymaps into separate projects so this is how project structure looks now project lines of haskell code yi core 10335 yi dynamic configuration 81 yi frontend pango 1566 yi frontend vty 407 yi fuzzy open 214 yi intero 140 yi ireader 124 yi keymap cua 147 yi keymap emacs 643 yi keymap vim 4669 yi language 803 yi misc modes 449 yi mode haskell 1246 yi mode javascript 601 yi snippet 375 so in my mind the next thing in modularization of yi is moving alex powered highlighting into a plugin while making yi core expose some general interface it is already possible to make syntax highlighting without alex e g i have rainbow parens mode in my config where actual parsing is done by regex applicative but it doesn t feel like a first class citizen finally if this story was interesting to you you re very welcome to join the development do you care about how pretty does editor look make a new shiny frontend have an idea about a new crazy ergonomic control scheme try it out as a new keymap for yi maybe you re interested in optimizing haskell code yi has plenty of that in any case don t hesitate to file an issue make a pr or chat release 0 14 https yi editor github io posts 2017 07 25 release 0 14 index html 2017 07 25t00 00 00z 2017 07 25t00 00 00z posted on july 25 2017 by dmitry ivanov the 0 14 section in the changelog has only one entry yi core now doesn t depend on dyre dynamic configuration support is now provided by yi dynamic configuration package this is also a good moment to plug a post about why you should have a changelog file see the previous post on what dyre is and how it s used in yi the benefits of this change are users of static configurations have a leaner editor improved separation of concerns helps current developers to stay sane while helping potential developers to comprehend the codebase piece by piece i intend to write another post about ongoing modularization of yi and how it went from one package to a dozen in the last five years and what s next in this direction there are still areas where user experience is much worse than it should be in both static and dynamic configurations tweaking per file indentation settings like switching from spaces to tabs or different amount of spaces tweaking gui settings like colorscheme or for pango frontend font size or in general when you re just changing some config values like numbers strings and colors if you feel any of it can be an interesting task you re very welcome to join here are some relevant tickets but don t let these limit you 1006 ex command for changing a colorscheme 1005 ex commands for changing indentation settings 988 support vim modelines for per file indentation settings 987 support editorconfig files for per project indentation settings dynamic and static compilation https yi editor github io posts 2017 01 06 dyre index html 2017 01 06t00 00 00z 2017 01 06t00 00 00z posted on january 6 2017 by jaro reinders i will explain how the compilation of yi works and how the dynamic configurations tie into this dynamic configurations yi is basically a library which you can use to build your own editor the configuration file is a perfectly valid haskell file which must be compiled like any other haskell file in this file you can specify what you want your yi to look like you can even completely change the editor to the point that it would not be recognizable as yi for this to work you need to recompile your configuration file and also dependencies like yi itself for every change you make the dynamic configurations use dyre to try to automate this process when a dynamic configuration starts it checks if config yi yi hs has been changed and recompiles it if it has been changed it is also possible to manually trigger recompilation by running the reload command m x reload in the emacs and reload in the vim keymap this will recompile config yi yi hs and then transfer the current state to the newly compiled yi to achieve dynamic recompilation you have to kickstart the process by compiling a dynamic configuration manually first the default yi package is a static configuration so it won t check for changes out of the box static configurations the static configurations are more obvious in that there is no automatic recompilation so you always know exactly what version of yi you are using static configurations also allow for a complete cabal project to be your configuration the advantages of a complete cabal project is that you can have dependencies other than just yi why switch the dyre package that is used to provide this dynamic recompilation is derived from the way that xmonad handles recompilation xmonad is a window manager so it s not restarted very often and it is inconvenient to restart so i think dynamic recompilation is very useful in that case but yi is a text editor and i personally restart my text editor very often so i think that yi should not use a dynamic recompilations system unless it is very intuitive and stable the future i think dynamic configurations are awesome and should be used in the future but right now there are a few issues you can t use a complete cabal project as configuration errors in the compilation process are not handeled smoothly and can even leave yi in a broken state there s no user friendly way to configure the dynamic recompilation e g where the configuration file is located it would also be nice to have a subset of the configuration in a dsl to allow for seamless configuration it should be possible to change for example the font size without recompiling the entire editor we could use dhall for this prototypes encoding object oriented inheritance in haskell https yi editor github io posts 2014 09 05 oop index html 2014 09 05t00 00 00z 2014 09 05t00 00 00z posted on september 5 2014 by jeanphilippe bernardy in this post i will sketch an encoding for oo style inheritance in haskell and show how this is used to in yi to write code that can be customized this can also serve as an introduction to the concepts defined in module data prototype currently found in yi sources inheritance inheritance can create structures which are difficult to understand since a given method call can call dispatch to a number of methods at run time tracking what is going on might be tricky sometimes however inheritance is exactly the construct we need imagine you have the following piece of code a a a fa b c b b b fb a c c c c fc a b that is a b and c are values defined in terms of each other you would like users to be able to customize a s value however if the change actually occurs in the definition of c you don t want them to copy paste the whole set of definitions it would be preferable to amend only the definition for c and reuse the rest unfortunately a s value is closed so this is not possible this situation seems to cry for inheritance in an object oriented language the solution is obvious make a b and c methods of a class the user can then inherit it and override the definition of c in yi color themes have a similar structure specific styles are defined in terms of base styles if a user changes a base style the change should be reflected automatically in all the styles that derive from it as in the toy example above we do not want the user to redefine everything from the ground up so what can we do since haskell lacks inheritance encoding prototypes all is not lost pierce tapl paragraph 18 10 has taught us that inheritance can be encoded as open recursion the trick is to make the reference to the self object explicit we can do so in haskell by putting the definitions in a record and a lambda data proto proto a a b b c c proto self proto a fa b self c self b fb a self c self c fc a self b self we can retrieve our original definitions by taking the fix point abc fix proto of course this works only because haskell is lazy and because the original definition did not introduce an infinite recursion in the first place if the fields of the record are marked strict this ceases to work given that definition it is easy to customize the value as follows customizedproto self proto self c userfunction a self b self customizedabc fix customizedproto the data prototype module generalizes this example and defines types and functions to corresponding to the prototype and inheritance abstractions conclusion yi is intended to be highly customizable in many instances we can use compositional abstractions to provide customization in some other instances we prefer to provide a prototype that user can patch despite haskell lacking inheritance we see that the basic concepts of lambda expression and lazy evaluation can be combined to provide a very lightweight encoding for prototypes and we take advantage of this in yi incremental parsing https yi editor github io posts 2014 09 04 incremental parsing index html 2014 09 04t00 00 00z 2014 09 04t00 00 00z posted on september 4 2014 by jeanphilippe bernardy in this post i will motivate yi s incremental parsing library and describe the main ideas behind it why another parsing library why bothering developing another parsing framework while there exist plenty already first since we want to parse many languages in many flavors we want to be able to reuse pieces of grammars since we are using haskell the easiest way to achieve this is to through a parser combinator library second we want to give timely feedback to users therefore the parser has to be efficient in particular responsivity should not depend on the length of file on the other hand the input file will change incrementally as the user edits it and the parser should take advantage of this it should reuse previous results to speed up the parse third the parser must gracefully handle errors in the input while files are being edited they will inevitably contain syntactically incorrect programs at several moments no parsing framework combining these characteristics exists approach hughes and swierstra have shown how online parsers can be constructed an online parser takes advantage of lazy evaluation the input is analyzed only as far as needed to produce the part of the result that is forced effectively this solves part of the incremental parsing problem since the user can see only one page of text at a time the editor will only force so much of the result tree and only the corresponding part of the input will be analyzed making the parser response time independent of the length of the input this does not completely solve the problem though if the user edits the end of the file the whole input will have to be analyzed at each key press caching results the proposed solution is to cache intermediate parsing results for given positions in the input say every half page we will store a partially evaluated state of the parsing automaton whenever the input is modified the new parsing result will be computed by using the most relevant cached state and applying the new input to it the cached states that became invalidated will also be recomputed on the basis of the most relevant state of course the cached states will only be computed lazily so that no cost is paid for cached states that will be discarded conclusion the strategy sketched above has several advantages the design is relatively straightforward and adds only a hundred lines of code compared to the polish parsers of hughes and swie...
|