├── images ├── _ ├── refmt.png └── revery.png ├── LICENSE └── README.md /images/_: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /images/refmt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jordwalke/reason-project-ideas/HEAD/images/refmt.png -------------------------------------------------------------------------------- /images/revery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jordwalke/reason-project-ideas/HEAD/images/revery.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Jordan W 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reason Project Ideas 2 | 3 | > **Collection of project ideas for Reason which have been requested by 4 | people in the community.** 5 | 6 | Links to active efforts are included in this README. It's great to 7 | collaborate with people already working on some of these ideas, or 8 | start your own thing. Send a PR to list your effort 9 | under the "Active Efforts:" section, so people know how to team up. 10 | 11 | Please discuss new project ideas on [The Reason Discord 12 | Channel](https://discordapp.com/invite/reasonml). 13 | 14 | ## High Level Web Server/Client APIs 15 | 16 | Simple APIs for doing web related requests/servers. 17 | - Creating / proposing common APIs that various implementations can 18 | implement (even without implementation). 19 | - Creating basic implementations of web servers/clients. 20 | 21 | **Active Efforts:** 22 | 23 | - [morph](https://github.com/reason-native-web/morph) simple web 24 | server/client APIs. 25 | - [h2](https://github.com/anmonteiro/ocaml-h2) a full `HTTP/2` 26 | implementation in OCaml. 27 | - [opium](https://github.com/rgrinberg/opium) Sinatra like web toolkit for OCaml 28 | - [Routes](https://github.com/anuragsoni/routes) Typed routes for OCaml/ReasonML web applications (both native and client side via js_of_ocaml) 29 | - [ReWeb](https://github.com/yawaramin/re-web/) web framework for Reason/OCaml based on the httpaf stack 30 | 31 | ## The Universal Type Specification 32 | 33 | Write types in Reason .re files, generate various kinds of serializers and RPC frameworks based on them 34 | 35 | - Perhaps provide a plugin architecture for people to define new backends/languages/RPC interop. 36 | - Can convert to arbitrarily between formats. 37 | - Versioning built-in would be a great feature (take inspiration from [milk](https://github.com/jaredly/milk)'s versioning feature). Could start with Milk as a basis (but might want to remove the automatic type inference based on compiled output since the goal here is to have explicitly readable type definitions). 38 | - Ideally you would check in the generated serializers/deserializers into your codebase. 39 | 40 | ## Cross-plat Universal Typeahead in Reason and Revery: 41 | 42 | - For reference: [Rofi](https://github.com/davatorium/rofi) is like a 43 | supercharged `dmenu` replacement that exists, and is written in C++ 44 | (screenshot below). 45 | - One option is to port Rofi to a cross platform native app using 46 | [Revery](https://github.com/revery-ui/revery). Line for line ports 47 | are a great way to avoid bikeshedding and quickly get something out there. 48 | - Instead of porting it line for line, you could also reimagine 49 | the same concept from the ground up. 50 | 51 | Example of Rofi Linux Package: 52 | 53 | ![RofiScreenshot](https://53280.de/rofi/arc-red.png) 54 | 55 | ## Cross-plat Universal `TextInput.h`: 56 | A small C library ideally (with some bindings from Reason/OCaml to it) that will create a 57 | native platform text input on any platform and render it wherever you tell it to within the 58 | window. Native rendering frameworks like Revery can do its own drawing/compositing, including 59 | the drawing of the "text input" border/background color, and then this native `TextInput.h` 60 | could be placed on top of this region with transparent background color. This achieves totally 61 | native text input/selection/keyboard(important for mobile). Once the text editing is done, 62 | somehow "transfer" the ownership of rendering the entered text back to the drawing framework, 63 | and remove the transparent text input overlayed on top of the screen. 64 | 65 | - Idea: Take whatever WebKit(as in Safari) does (not Chromium because iOS Chrome isn't 66 | actually Chrome - it's webkit). Webkit runs on iOS, Mac, Linux, and Windows so it must 67 | have handled the input for all of these platforms. 68 | - Downsides: This universal approach cannot perfectly integrate into custom renderers. 69 | You probably couldn't clip the text input while typing etc, but this seems like a pretty 70 | rare use case. 71 | 72 | ## Quality Bindings To libcurl 73 | 74 | For when someone isn't interested in using some of the newer HTTP 75 | libraries in OCaml. 76 | 77 | **Active Efforts:** 78 | - [`ocurl`](https://github.com/ygrek/ocurl) 79 | 80 | ## Good first project 81 | ### update-notifier 82 | Inspiration: https://www.npmjs.com/package/update-notifier 83 | ![Inspiration](https://cdn.discordapp.com/attachments/643515198497488948/680535642928971788/unknown.png) 84 | 85 | It is in JS, a similar functionnality for [OPAM](https://opam.ocaml.org) or [esy](https://esy.sh) written in OCaml could be a plus. 86 | 87 | 88 | ## Reason On Rails 89 | 90 | Rails-like scaffolding generator for certain kinds of apps. To avoid 91 | bikeshedding, you might even consider using the exact rails workflow. 92 | 93 | ## Lightweight Universal Date/Time Library 94 | 95 | A lightweight date/time library that doesn't rely on system dependencies, 96 | and can configure all date conversions from config files. (Either at build 97 | time or runtime?) 98 | - Time (just the number of milliseconds since epoch). 99 | - TimeRange (two Time points). 100 | - DateTime (Human description of DateTime). 101 | - DateTimeZone (Human description of DateTime within a time zone). 102 | - Converting between all of these forms (based on some time zone data base config files). 103 | 104 | Date/Time experts, please contribute by pointing to excellent libraries 105 | and provide advice. 106 | 107 | Approaches: 108 | - Could just port line for line, one of the best date-time libraries out there. 109 | - Joda-time is an good starting reference(and the inspiration for the java8 date/time api rewrite): https://www.joda.org/joda-time/ 110 | - [Chronology](https://github.com/davedelong/Chronology) is a Swift library with a [more nuanced approach](https://github.com/davedelong/chronology/wiki/Foundation's-API) to dates. 111 | 112 | **Related Effort:** 113 | - [ptime](https://github.com/dbuenzli/ptime) 114 | (It is pretty bare-bones but should have the right primitives). 115 | 116 | ## Java Backend 117 | 118 | The [`rehp`](https://github.com/jordwalke/rehp) project makes it 119 | easier to implement new backends for Reason/OCaml when compiling in 120 | the native workflow. 121 | 122 | It can pretty easily be extended for other languages, and `rehp` 123 | includes an example of extending it for PHP(Hack flavor). 124 | 125 | 126 | ## Automatic Command Line App Generator: 127 | 128 | - `devDependency` you can add to your native Reason project. 129 | - Run `generate-cli-app ./path/to/Main.re` where `Main.re` contains: 130 | 131 | ```reason 132 | let main = ( 133 | /** 134 | * Doc for `thisArg` shown in the command line. 135 | */ 136 | ~thisArg="default", 137 | /** 138 | * Doc for `mandatoryArgBecausNoDefault`. 139 | */ 140 | ~mandatoryArgBecauseNoDefault 141 | /** 142 | * Doc for mandatory `positionalArgWithoutName`. 143 | */ 144 | positionalArgWithoutName 145 | ) => { 146 | /** 147 | * Your implementation goes here. 148 | */ 149 | }; 150 | 151 | /** 152 | * 153 | */ 154 | ``` 155 | 156 | And then it will replace the footer comment with the argument 157 | parsing, and help documentation code that allows you to run the 158 | generated binary as a command line app. For example once built, you 159 | could run: 160 | 161 | ```bash 162 | MainCli.exe --help 163 | ``` 164 | which would provide output identical to 165 | [cmdliner](https://github.com/dbuenzli/cmdliner)'s help output. For 166 | an example, see `refmt --help`: 167 | 168 | ![command line help](./images/refmt.png "Example Command Line Help") 169 | 170 | It could also generate man pages in your project's releases based on this. 171 | 172 | **Implementation:** 173 | - `@reason-native/pastel` is a good option for terminal highlighting. 174 | - The simplest implementation could just parse the AST and would 175 | require that each named argument include a type annotation and 176 | would only support `int`, `string`, `floats` etc. 177 | - Another feature would be to support an "enum" (variant) defined in 178 | the same file to represent the different string options. 179 | - A more advanced version might support using an approach like 180 | [`milk`](https://github.com/jaredly/milk) to infer the types. 181 | (Would require a bit of support from Milk to be usable for other 182 | purposes - so this would only make sense after `milk` is extended 183 | to support other use cases). 184 | 185 | **Related Effort:** 186 | - [ppx_deriving_cmdliner](https://github.com/hammerlab/ppx_deriving_cmdliner) 187 | (doesn't use named arguments to generate command line API, but 188 | would be a good reference). 189 | 190 | ## One Click Native Project Creation/Updating 191 | 192 | **Active Efforts:** 193 | - [`pesy`](https://github.com/esy/pesy): Project by [Manas](https://github.com/prometheansacrifice) to make new native projects in a single command. Bonus: It will keep your project/build config up to date based on your config in `package.json` by running `esy pesy` from your project root. Makes use of great automatically created cross platform CI. 194 | 195 | 196 | ## Full Native React: 197 | **Active Efforts:** 198 | - [Revery](https://github.com/revery-ui/revery) an Electron-style cross platform desktop app framework with full native React-style UI implementation based on [Brisk Reconciler](https://github.com/briskml/brisk-reconciler). 199 | ![revery screenshot](./images/revery.png "Revery Screenshot") 200 | - [Revery Packager](https://github.com/revery-ui/revery-packager) One click packaging up of Revery UI applications into installable desktop apps. 201 | 202 | 203 | ## Reason Browser Console Formatter: 204 | Print more readable structures in the browser for debugging purposes. 205 | 206 | **Active Efforts:** 207 | [reason-console-formatter](https://github.com/davesnx/reason-console-formatter) 208 | 209 | ## Static Site Generator 210 | 211 | Design pages in JSX and output a static HTML website. 212 | 213 | **Active Efforts:** 214 | - [TyXML](https://github.com/ocsigen/tyxml) a library for building valid HTML and SVG 215 | - [Canopy](https://github.com/Engil/Canopy) a blog engine powered by git and OCaml. 216 | --------------------------------------------------------------------------------