about summary refs log tree commit diff stats
path: root/src/io/serialize.nim
Commit message (Collapse)AuthorAgeFilesLines
* Remove CLONE BufferSource; cache document sources in tmpdirbptato2024-02-121-37/+0
| | | | | | | | | | | | | | | | | | | | | | | At last all BufferSources are unified. To achieve the same effect as the previous CLONE source type, we now use the "fromcache" flag in Request. This *forces* the document to be streamed from the disk; if the file no longer exists for some reason, an error is returned (i.e. the document is not re-downloaded). For a document to be cached, it has to be the main document of the buffer (i.e. no additional resources requested with fetch()), and also not an x-htmloutput HTML file (for those, the original source is saved). The result is that toggleSource now always returns the actual source for e.g. markdown files, not the HTML-transformed version. Also, it is now possible to view the source of a document that is still being downloaded. buffer.sstream has almost been eliminated; it still exists, but only as a pseudo-buffer to interface with EncoderStream and DecoderStream. It no longer holds the entire source of a buffer at any point, and is cleared as soon as the buffer is completely loaded.
* Get rid of LOAD_PIPE BufferSourcebptato2024-02-111-5/+0
| | | | | Instead, use a stream: scheme and associate hostnames with file descriptors directly from the pager.
* Use std/* imports everywherebptato2024-01-071-4/+4
|
* Fix some casing issuesbptato2024-01-061-1/+1
|
* Compile with styleCheck:usagesbptato2023-12-281-3/+3
| | | | much better
* reduce new() usagebptato2023-10-251-1/+1
|
* buffer: simplify contentType handlingbptato2023-09-271-3/+3
| | | | | | * remove contentType member of Buffer object * add ishtml to reduce string comparisons * consistent spelling: contenttype -> contentType
* regex: copy after compilingbptato2023-09-241-25/+0
| | | | | | | | | | | | Instead of the broken attempt at making regexes zero-copy (it copied anyway), copy once and forget about it. (There have been way too many problems with the destructor approach, including the latest one where the GC would happily zero out our regexes if they were in a sequence. Maybe we can make this work once we switched to ORC. For now, it's not worth the trouble.)
* response: add blob() functionbptato2023-09-171-2/+3
|
* Fix compilation with --assertions:offbptato2023-09-151-1/+2
| | | | | Remove side effects from assert statements. The flag is not used currently, but let's not depend on that.
* move around more modulesbptato2023-09-141-0/+444
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* Move ips stuff to src/ips/bptato2022-11-221-207/+0
|
* Rewrite buffer/pager for multi-processingbptato2022-11-191-6/+73
|
* Use unix domain sockets for IPCbptato2022-09-061-0/+1
|
* Use a separate process for file loadingbptato2022-08-181-0/+139
Not very useful for now, since we still have to load the entire page before parsing it.