[https://scripter.co/notes/nim](https://scripter.co/notes/nim)/
It's great, is it possible add link to the official tutorial?
Hi all!
I'm building a simple CRUD web application with Jester and Sqlite. Today I
looked at `top` on the server (a _very_ cheap VPS) and saw that memory usage
was about 80MB. That sound very strange to me, as this is not my first Jester
app. I measured the app on my laptop and it start at
I didn't run your code but had a very quick look at the implmentation of
asyncfile.readLine to find out what can raise an IndexError. This line if c[0]
== 'L' or c == "": should be checked before the other and it should be
implemented like this: if c.len == 0 or c[0] == 'L': I assume this fixes
Sorry the second the redefinition of file in invocation of openAsync it's my
mistake.
This compile but I get the same error:
import asyncdispatch, asyncfile, os
proc main() {.async.} =
var filename = "test.txt"
var file = openAsync(filename, fmRead)
while
The code doesn't compile as presented because of the redefinition of `file`. If
you change the second invocation of `openAsync` to `file = openAsync(filename,
fmRead)` the code will compile. The index error you get from running the code
is another matter though. I think its a potential bug in
I'm trying to read a text file asynchronous line by line but the following code
fails to compile
import asyncdispatch, asyncfile, os
proc main() {.async.} =
var filename = getTempDir() / "test.txt"
var file = openAsync(filename, fmWrite)
await
Nimble has docs:
[https://github.com/nim-lang/nimble#binary-packages](https://github.com/nim-lang/nimble#binary-packages)
In this case when nimble install is invoked, Nimble will build the main.nim
file, copy it into $nimbleDir/pkgs/pkgname-ver/ and subsequently create a
symlink
Just to add more details- When I change pipelines.cmd to pipelines.exe, trying
to run pipelines.exe gives me a dialog box saying "This version of C:UsersCaleb
Winston.nimblebinpipelines.exe is not compatible with the version of Windows
you're running. Check your computer's system information
So when I go to .nimble/bin I see 2 things
pipelines
pipelines.cmd
Run
I'm on Windows and I was expecting a .exe file here... Would someone with more
systems programming experience mind enlightening me?
> people don't watch the videos in full screen mode, make sure you use large
> font size so the content is easily viewable
Yup- that's one nice thing about Kate I didn't really mention. I can very
easily have one tab zoomed in so that it shows up nicely on video, and then
another tab
I have extracted this **findNimStdLib** proc from `compiler/nimeval.nim`:
[https://scripter.co/notes/nim/#nim-stdlib-path](https://scripter.co/notes/nim/#nim-stdlib-path);
works great!
I would like to include a copy of nimbase.h file in a built package.
What is the easiest way to ask Nim compiler or nimscript for the location of
the system.nim or nimbase.h files?
These two files are in the same folder.
cblake, tim_st et al
Yes. I never liked Nims easy going in some points like the one that shows its
ugly head here. Simple reason: ambiguity - as in "not _evidently and
strikingly_ clear" \- is known to be one of the major infectors in software,
comparable to rats in a city.
My personal rule,
Hi, Sorry, if there is already a command to update all locally installed nimble
packages but I wrote a small nimscript.
import strutils
let (outp, errC) = gorgeEx("nimble list --installed")
if errC != 0:
echo outp
quit(1)
echo "Installed packages:"
I'm a bit careful and general in my reply because I don't know the library you
use. First, in Nim an array has a known and fixed size. If you need a dynamic
array have a lot of seq.
Basically you should differentiate between two cases:
* 1) The C func has a size parameter directly following
Or `[1,2,3].len` which is curiously not among the various listed choices for
whatever reason, and which is even more visually distinct from array indexing,
IMO.
Please create a github issue for this problem so that it is tracked.
> I will be using Kate for the videos
Here's one (ok, two) small technical advice:
* people don't watch the videos in full screen mode — make sure you use large
font size so the content is easily viewable at the usual online-video size
* please make sure that your keyboard is not louder
18 matches
Mail list logo