ringabout
d31cce557b
more strictdef fixes for stdlibs ( #24535 )
2024-12-13 19:06:43 +01:00
Andreas Rumpf
8881017c80
stdlib: minor refactorings and updates ( #24482 )
2024-11-27 12:31:06 +01:00
metagn
080b0a03bd
streams: implement readStr for VM, document VM limitations ( #24058 )
...
fixes #24054
`readData` is not implemented for the VM as mentioned in the issue, but
`readDataStr` is, so that is used for `readStr` instead on the VM. We
could also just use it in general since it falls back to `readData`
anyway but it's kept the same otherwise for now.
Also where and why streams in general don't work in VM is now documented
on the top level `streams` module documentation.
2024-09-04 09:25:01 +02:00
ringabout
4d11d0619d
complete std prefixes for stdlib ( #22887 )
...
follow up https://github.com/nim-lang/Nim/pull/22851
follow up https://github.com/nim-lang/Nim/pull/22873
2023-10-30 17:03:04 +01:00
Andrey Makarov
a660c17d30
Markdown code blocks migration part 8 ( #22478 )
2023-08-15 06:27:36 +02:00
ringabout
3f7e1d7daa
replace doAssert false with raiseAssert in lib, which works better with strictdefs ( #22458 )
2023-08-11 18:24:46 +02:00
ringabout
56a4d246a4
Refines raises list in osproc ( #21323 )
...
* Remove Exception from raises in closeImpl
* Update osproc.nim
* refine errors
* add ValueError
* cast raises
* refactor raises lists
* Update lib/pure/osproc.nim
* Update lib/pure/osproc.nim
---------
Co-authored-by: Antonis Geralis <43617260+planetis-m@users.noreply.github.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-02-14 13:11:14 +01:00
Antonis Geralis
606aa45ec6
Export FileMode ( #20726 )
2022-11-02 10:52:15 +01:00
n5m
52166e3546
allow deferred close of nil stream ( #20706 )
...
* allow deferred close of nil stream
* improve example
2022-10-31 11:20:06 +01:00
flywind
286fcef68e
[Orc] fixes "streams.readDataStr segafaults" when accepting a string literal ( #20019 ) [backport]
...
fixes streams.readDataStr accept a string literal
2022-07-15 09:42:54 +02:00
Danil Yarantsev
2f32b450d3
Really fix StringStream with ARC at compile-time, improve streams test ( #19739 )
...
* Fix compile-time StringStream with ARC
* make readDataStr work with ARC, improve test
2022-04-25 11:15:03 +02:00
Jason Beetham
dc4cc2dca5
Fix string stream crashing when created on nimscript due to last fix ( #19717 )
2022-04-14 11:30:59 +02:00
Jason Beetham
26acc97864
StringStreams no longer errors when intialized with literals on arc/orc ( #19708 )
2022-04-11 14:27:12 +02:00
flywind
891329cd4b
move io out of system ( #19442 )
...
* move io out of system
* fix tests
* fix tests
* next step
* rename to syncio
* rename
* fix nimscript
* comma
* fix
* fix parts of errors
* good for now
* fix test
2022-02-02 17:10:11 +01:00
Antonis Geralis
6e0fe965da
add sink and lent annotations for xmltree and streams ( #18037 )
2021-05-18 08:16:07 +02:00
Timothee Cour
e4db733d80
fix #17888 : remove undefined behavior for posix.open; fix tempfiles.createTempFile ( #17889 )
...
* fix #17888 : remove undefined behavior for posix.open; fix tempfiles.createTempFile
* fix for tests/async/tasyncfile.nim
* hide mode for now
* add notice regarding stability
2021-04-29 13:42:56 +02:00
Danil Yarantsev
56461c280f
Change stdlib imports to use std prefix in most examples ( #17202 )
2021-02-28 13:17:19 -08:00
flywind
f140c92409
fix some warnings ( #16952 )
2021-02-08 13:50:15 +01:00
Timothee Cour
6e267d28b3
remove conditionals on nimHasUserErrors, nimNoNilSeqs2, nimNoNilSeqs ( #16861 )
...
* cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors
* simplify nimNoNilSeqs2
* simplify nimNoNilSeqs
* fixup
2021-01-29 14:30:24 +01:00
Juan Carlos
78a99587a4
Deprecate TaintedString ( #15423 )
...
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com >
2021-01-15 18:56:38 -08:00
ihlec
5c23ba7545
fixed article duplication typos ( #16216 )
2020-12-02 09:15:29 +01:00
flywind
cbc793b30b
move tests to testament ( #16101 )
...
* move tests to testament
* minor
* fix random
* disable test random
2020-11-24 19:06:41 +01:00
Clyybber
01a62320f0
Fix #12410 ( #15685 )
...
* Fix #12410 , big thanks to @pmetras for this fix
* Add testcase
2020-10-23 03:26:50 +02:00
hlaaftana
fbc97e712a
move since from inclrtl to std/private/since ( #14188 )
...
* move since from inclrtl to std/private/since
* move since import in system below for HCR
2020-05-02 23:51:59 +02:00
hlaaftana
cd9af6b804
StringStream & more stdlib modules support for JS/NimScript ( #14095 )
...
* StringStream & more stdlib modules support for JS/NimScript
* change back pegs test in line with #14134
2020-04-28 19:44:52 +02:00
Christopher Dunn
caf30e7cb5
Faster readStr() ( #14099 )
...
* Faster readStr()
* https://github.com/nim-lang/Nim/issues/13857
* Add .since annotation and add to changelog
* Private, un-sinced proc for csource bootstrapping
2020-04-25 20:19:11 +02:00
Sam Wang
441cacf70f
Added fix for handling TaintedStrings in streams and httpclient ( #12969 )
...
* Added fix for taint mode in streams and httpclient
* Removed taintMode export from system.nim
2019-12-29 17:37:22 +01:00
Jjp137
93461aee34
Fix many broken links
...
Note that contrary to what docgen.rst currently says, the ids have
to match exactly or else most web browsers will not jump to the
intended symbol.
2019-10-22 17:59:12 -07:00
Andreas Rumpf
60d64d1aef
use system.move instead of system.shallowCopy if the GC mode requires it
2019-10-04 09:48:45 +02:00
narimiran
dcf3181bd1
[backport] run nimpretty on string stuff
2019-09-30 13:58:13 +02:00
Clyybber
16c39f9b2e
More of StringStream now works at compile time ( #12284 )
...
* readLine of StringStream now works at compile time
* Work for js backend only at compile time
* readAll now works at CT
* readAll works in js ct now
* Add test
2019-09-29 22:20:00 +02:00
Ray Imber
6e681b546f
fixes #9026 adds a readLineImpl to streams so that FileStreams can be fast ( #12234 )
2019-09-23 08:25:26 +02:00
Araq
4bbafb47dc
streams.nim: indentation change
2019-09-08 13:08:41 +02:00
jiro
ced0527ae3
streams: change error message of openFileStream ( #11438 ) [feature]
2019-06-10 21:00:55 +02:00
Miran
dc6a4b1d43
fixes #11049 , wrong streams.readBool and streams.peekBool ( #11284 )
2019-05-20 19:39:38 +02:00
jiro
ddc86d1b4b
streams: Update documentation, refs #10330 ( #11059 )
2019-04-29 11:32:02 +02:00
Araq
c3067e36bb
newruntime: progress
2019-04-01 16:51:18 +02:00
Arne Döring
1102b8ac6e
StringStream and parseJson, parseCfg, parseSql et al for the vm ( #10746 )
2019-02-28 22:57:57 +01:00
Araq
e457ccc7e1
make travis green
2019-02-06 17:42:38 +01:00
Araq
035134de42
make streams.close more forgiving in order to break less code out there
2019-02-06 15:51:21 +01:00
Oscar Nihlgård
ac8f6c57a1
Improve exception tracking in the streams module ( #10453 )
2019-01-28 17:18:07 +01:00
Araq
647066e378
make the stdlib work with the changed docgen
2019-01-11 22:17:43 +01:00
Notkea
11050d1104
make Stream.{read,peek} procs public ( #9806 )
...
Those are useful in generic code, and `proc write*[T](s: Stream, x: T)` was already public.
2019-01-09 08:06:40 -06:00
Andreas Rumpf
223e92b83a
stdlib: documenation updates, the exception names have been changed
2018-10-25 07:42:45 +02:00
Yasuhiro Horimoto
fe19670c52
Fixes #8841 ( #9101 )
...
Modify comments for readChar and peekChar to the same as the comment for them in the source code.
2018-10-09 19:30:02 +02:00
Andreas Rumpf
dae5450947
WIP: disallow 'nil' for strings and seqs
2018-08-13 11:41:33 +02:00
Zahary Karadjov
7ab1aafc6b
stdlib work
2018-06-16 16:46:32 +03:00
data-man
cc9e94cd96
Hide readAll from js for tests passing
2018-05-25 08:48:09 +03:00
data-man
8149c07458
Fixes streams bugs
2018-05-25 07:46:48 +03:00
data-man
3fd48b7622
Fixes #7877
2018-05-25 06:59:54 +03:00