Wow! Thanks for the detailed response! I'll definitely look into it! I thought
Digital Ocean wouldn't have been an option with Nim, but Docker seems to make
it possible... That seems to be a pattern I've been noticing when trying to
research this topic in particular...
As a Canadian too, I didn't push for the 'or' change... and I'm pleased with
the English 'our' wording.
Well that was embarrassing. I've fixed the 'I' 'e' spelling throughout and
committed the changes. Thank you for noticing that. As a Canadian, I can't
approve the 'or' over 'our' spelling however! All the English speakers in the
UK, Canada, Australia, New Zealand, South Africa, etc. wouldn't be
Myself, I use Digital Ocean for hosting, using docker-compose. I keep the
source code (w/o credentials) for each site on separate private repos and put
the results on a separate repo for the docker instance.
Essentially, each website is compiled with C. I write a move.sh bash script to
move
There are small typos in proc names (revert **i** and **e** ): nearestNieghbour
should be written nearestNeighbour, and similar for nearestNieghbours. Or if
you prefer the American wording, nearestNeighbor... Better to correct that now
than when it is broadly used.
Have been referenced in [Nim
I recognize this code. :) If you would like the original, I've been placing the
website code after each section of the YouTube series at:
[https://github.com/JohnAD/bookclub](https://github.com/JohnAD/bookclub)
If you look at the releases, each release points to the commit for that part of
the
> We have discussed that term really long enough. Is your beginner someone with
> absolutely no CS skills or someone having programmed in C++ and Haskell for
> 15 years and is now comming to Nim?
I'm talking about reading level. At home I have a 12 year old and a 13 year
old. The book would
openarray is not a concrete type, you can use it only in procedure
declarations. you need to use array or a sequence.
Yeah `\p` is the platform specific newline but in most cases `\n` works better
since indeed Windows accepts LF everywhere with the exception of some 3rd party
applications.
@b3liever Thanks for the catches. I've just pushed the changes now.
Great library Thanks!
`HyperRectangle` doesn't have to be a `ref object` since it only contains two
`KdPoint` s and doesn't get copied.
When its works in editors like VScode or neovim fine then all is ok, and I
think it will as it is not that much generic.
My RTree is very generic, and nimsuggest has big problems with it. I was told
that neovim is not really blocked, as it uses async LSP, but of course all is
delayed much.
It seems to work within VS Code for me, with autocomplete working as expected.
That said, I'm not sure if it would work with others. The only generic
parameter in it is with the data associated with points.
I'm not sure if it works with nimsuggest. I'm still just experimenting with Nim
and am not all that knowledgable of it's larger ecosystem. Is there a way that
I can check if it works with nimsuggest?
I've seen your RTree implementation and it's quite impressive!
Nice, does it work with nimsuggest and Nim editors?
My RTree unfortunately blocks nimsuggest for 30 seconds permanently, which
makes using it a bit hard. Maybe next winter I will compare your tree against
my one.
I think 4 or five years ago there was "n" as general newline char that could be
two chars for windows and mac?
Now there seems to be "p" for that purpose? I missed the detailed discussion.
So would we now use "p" generally for terminal output. And "n" only when we
want to guaranty that our
I have created a pure Nim k-d tree implementation
([https://github.com/jblindsay/kdtree)](https://github.com/jblindsay/kdtree\)).
It's rather flexible compared with many existing k-d tree libraries, allowing
for single and multiple nearest neighbour searches, within-radius (circular
search
But type i serialized wasn't reference type... I did serialization via marshal
module, so program struggles to find int in the beginning of the json (i guess
this is memory address)
Thanks a Araq for trying.
I manage to find and solve the problem.
Regarding the cast, are you referring to
[these](https://github.com/mantielero/ipopt.nim/blob/master/src/ex01.nim#L238-L244).
I need to think about how to make it easier using the library.
You didn't change .to[:T] to .tp[:ref T]
When creating a table where values are arrays:
import tables
var env = newTable[string, openarray[int]]()
Run
I get the following error:
main.nim(2, 19) template/generic instantiation of `newTable` from here
I guess i doing something wrong, because i tried it like this:
proc deserialize[T](filename: string): ref T =
read_file(filename).to[:T]
let obj = spawn deserialize[A]("my_file.json")
Run
And it says:
Error: type mismatch: got but
I skimmed your wrapper code and your example code and unfortunately couldn't
find a bug. However your `cast`'s can be avoided if you start out with the `ptr
UncheckedArray` types.
Fwiw this "quirk" was well known when we designed the syntax. For me it's a
feature, either write `x + y` or `x+y`; `x +y` is ugly and inconsistent.
Found this in the "Curated Packages" list for Nim:
[https://github.com/planety/prologue](https://github.com/planety/prologue)
Has anybody here used Prologue? How does it compare to Jester?
Use more `import` instead of `include`.
Make your complex object a `ref object`.
Hi all!
I have function, that does deserialization in a way, that it takes filename and
type and returns complete object.
It takes too long to process sequentially couple of files, so i wanted to
parallel calls, because they are not data-tied.
However, I cannot simply spawn ` thread from
We're not going to catch what you're missing if you don't post more code.
Don't ya just hate it!? when you bang your head on a problem only to find the
answer in a post to YOUR OWN FOUR YEAR OLD [solved] QUESTION !!!
Thanks again, forum, for being here.
Write good comments-- the coder you help may be yourself!
I am getting the following error:
/home/jose/src/VapourSynth.nim/test/ex12.nim(24, 6) Error: type mismatch:
got
but expected one of:
proc append(vsmap: ptr VSMap; key: string; data: float)
first type mismatch at position: 3
required type for data: float
but
This is so you can do things like
echo -3
Run
which parses as `echo(-3)` instead of `echo - 3`. Same goes for
echo [1, 2, 3]
echo @[1, 2, 3]
# parsed as
echo([1, 2, 3])
echo(@[1, 2, 3])
# iinstead of
echo[1, 2, 3]
echo @ [1,
Just for the record, it was much more informative (at least for me) compiling
with:
$ nim c --profiler:on --stacktrace:on ex01
and then checking the error messages provided by valgrind:
$ valgrind ./ex01
I have started wrapping [Ipopt](https://github.com/coin-or/Ipopt), a numerical
optimizer. As always, the beginnings are hard. I wrapped it with c2nim. Now I
am getting a memory error that I have reported
[here](https://github.com/coin-or/Ipopt/issues/371).
I have put my code
Thank you very much!
Also note that traditional OOP languages do not have multiple dispatch so what
you are trying would not be possible in C++ or Java.
That makes sense. Thanks.
37 matches
Mail list logo