about summary refs log tree commit diff stats
path: root/src/io/promise.nim
Commit message (Collapse)AuthorAgeFilesLines
* canvas: move to separate CGI scriptbptato2024-09-011-0/+5
| | | | | | | | | | * stream: and passFd is now client-based, and accessible for buffers * Bitmap's width & height is now int, not uint64 * no more non-network Bitmap special case in the pager for canvas I just shoehorned it into the static image model, so it still doesn't render changes after page load. But at least now it doesn't crash the browser.
* xhr: progressbptato2024-08-131-6/+5
| | | | | | | | | | | | | * fix header case sensitivity issues -> probably still wrong as it discards the original casing. better than nothing, anyway * fix fulfill on generic promises * support standard open() async parameter weirdness * refactor loader response body reading (so bodyRead is no longer mandatory) * actually read response body still missing: response body getters
* Update monouchabptato2024-08-091-11/+13
|
* promise, container: fix nil derefsbptato2024-06-301-16/+22
|
* img, loader: separate out png codec into cgi, misc improvementsbptato2024-06-201-1/+9
| | | | | | | | | | | | | | | * multi-processed and sandboxed PNG decoding & encoding (through local CGI) * improved request body passing (including support for output id as response body) * simplified & faster blob()/text() - now every request starts suspended, and OngoingData.buf has been replaced with loader's buffering capability * image caching: we no longer pull bitmaps from the container after every single getLines call Next steps: replace our bespoke PNG decoder with something more usable, add other decoders, and make them stream.
* Move JS wrapper into Monouchabptato2024-06-031-6/+6
| | | | Operation "modularize Chawan somewhat" part 3
* js: refactorbptato2024-05-081-4/+99
| | | | | | | * prefix to-be-separated modules with js * remove dynstreams dependency * untangle from EmptyPromise * move typeptr into tojs
* Use isSome instead of isOkbptato2024-05-051-1/+1
| | | | no point in having identical overloads
* Update code stylebptato2024-04-171-13/+19
| | | | | | * separate params with ; (semicolon) instead of , (colon) * reduce screaming snake case use * wrap long lines
* Use std/* imports everywherebptato2024-01-071-1/+1
|
* move around more modulesbptato2023-09-141-1/+1
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-011-0/+3
| | | | | | | | | | | | | | * Import punycode, as it has been removed from stdlib. * Fix some syntax errors * Apparently you can no longer compare distinct pointers with nil. Add explicit comparisons with typeof(nil) instead. * htmlparser: rename _ to other, as semantics of _ have changed. (Quite a shame, it looked better with _. Oh well.) * Explicitly specify mm:refc, as the browser OOMs with orc for some reason. Confirmed to compile & run on 2.0.0, 1.6.14, 1.6.12, 1.6.10 and 1.6.8. (<1.6.8 it's broken & wontfix.)
* Buffer search fixes & improvementsbptato2023-07-111-9/+17
| | | | | * Fix race condition in updateReadLineISearch * Disable reshape during isearch
* Rework JS exception systembptato2023-06-191-0/+16
| | | | | Now we use Result for passing exceptions to JS. As a result, we can finally get rid of the .jserr pragma.
* Cleanups & bug fixes involving promisesbptato2023-06-151-10/+18
| | | | | Now a promise returning nil doesn't just leave the rest of the then chain hanging. Hooray.
* Make Result.text, json return promisebptato2023-06-131-2/+10
|
* Async resource loading, exception handling fixesbptato2023-05-141-0/+19
|
* promise: set get, cb, next to nil after then is calledbptato2023-01-041-7/+5
| | | | | | Actually we don't even need a state variable, just set cb to nil when resolving. (I'm sure this is a great idea that will absolutely not backfire in the future.)
* Add promise support to JSbptato2022-12-311-0/+107