Hi, NimGL developer here.
@chr This is an interesting issue but you should have no problems if you are
not import stb/image from nimgl modules since that way it would not be
compiling the stb_image twice. If you need to have both for whatever reason I
could add a definition to toggle the compil
Hi @dom96, I did an experiment (see
[https://github.com/mrhdias/EnigmaHTTPServer](https://github.com/mrhdias/EnigmaHTTPServer))
to decode the multipart/data request body by doing the cache of the body. I do
not know if it's the best approach, but it works and it's fast for large files.
But for
You can also use `memfiles`. There writing/reading is the same as accessing
memory. Besides being possibly simpler presenting an "as if you already read
the whole file into a buffer" view, it may also be much more efficient,
especially for byte-at-a-time operation where other APIs might do a lot
My code used to work. **msgpack4nim** was updated for nim-0.19.4, and now my
code fails. But I don't think it's a bug in **msgpack4nim** , and I don't think
I'm doing anything unexpected. I think there might be a fundamental problem
with how Nim handles templates across multiple files now.
[htt
`lexbase` is totally the case! In the challenge it is also suggested to use one
variant as a "raw" version and one with a lexing support from the language. I
also wrote a version which reads one character at a time and it became very
dirty very fast as well as it was hard to debug it, so the 2nd
[check this
out](https://bitbucket.org/DraganJanushevski/q3bsp/src/cee3bf04b30414672939c0ffde25011ec026a822/src/coreBSP/bspfile.nim#lines-18)
use [atEnd](https://nim-lang.org/docs/streams.html#atEnd%2CStream) to check
whether it's ended or not and use
[getPosition](https://nim-lang.org/docs/streams.html#getPosition%2CStream) for
its current position.
import os, streams
var fs = newFileStream(paramStr(1), fmRead)
Great work!
Personally I think you should build one using `lexbase` instead of `re` as `re`
seems to be too big just for this (the C version is written in plain C without
`re`).
Actually if I could find sometime I'd try to build a `lexbase` version as it
seemed fun :)
Hi all,
What is the best way to read a binary file byte by byte?
import os, streams
var fs_pos = 0
var fs = newFileStream(paramStr(1), fmRead)
while true:
var one_char = fs.readChar()
echo one_char
if (one_char == '\0'):
echo "breaking
https://www.welookups.com/php/php_exception.html
Change log in Qt Creator 4.9 Beta has an item
Nim Support
*Added code completion based on `NimSuggest`
Run
Although it seems limited to code completion, it is still good news for Nim's
popularity.
Change log
[here](https://code.qt.io/cgit/qt-creator/qt-crea
Having thought about this more, I think we can simply use the checksum of the C
file in order to detect duplicates and then link only one version in the end...
import options
type
Base = ref object of RootObj
A = ref object of Base
B = ref object of Base
opt: Option[A]
proc `==`(x: A, y: B): bool = false
proc initA(): A =
new result
proc initB(): B =
new result
result.opt
13 matches
Mail list logo