Difficulty getting started with aporia.

2016-08-09 Thread jyelon
I recently installed Nim using the windows 64-bit installer. I wrote a hello-world program (just an echo statement). The program compiles and runs when I compile it from the NIM command prompt. Now I'm trying to run it from inside aporia, to see if I can get aporia to work. Issue #1: When I

Re: Where do I learn how to program Nim without a GC?

2016-08-25 Thread jyelon
Yeah, but he needs information on how to cause an normally garbage-collected library (for example, the JSON library) to allocate out of a memory region, without changing the code for the library. I think the real answer is: I don't think memory regions are implemented yet, I don't think

Re: Send data structures between threads?

2016-08-11 Thread jyelon
Thanks for the casting idea. I really don't think you should think of boehm as "dirty." I mean, compared to what? Real multi-threaded programs need to store structured data in shared memory. Just to give an example, let's say that this structured data is json. With boehm, I can load the

Re: Send data structures between threads?

2016-08-25 Thread jyelon
Say, I never did get an answer to either of the questions above. I'm still curious: 1\. If the json is stored in a thread-local heap, then I let other threads reference the json, those other threads are going to tend to touch the refcounts. But the refcounts, presumably, aren't atomic ints.

Re: Difficulty getting started with aporia.

2016-08-09 Thread jyelon
If aporia isn't fully functional, it probably shouldn't be the promoted item in the start menu.

Re: Send data structures between threads?

2016-08-26 Thread jyelon
So, this only sounds half-usable: yes, I can pass the json to some other thread, but then when it arrives at the other thread, I can't call library functions like "getFields" or even 'x == y' to examine the json (these functions take refs). So now I have a ptr to a json object that I can't pass

Re: Difficulty getting started with aporia.

2016-08-10 Thread jyelon
I used the 64-bit nim installer for windows. I didn't install anything else, or build anything myself. After installation, if you look at the start menu, the highlighted menu item is Aporia.

Send data structures between threads?

2016-08-11 Thread jyelon
I've compiled with --gc:boehm because I want to be able to share data structures between threads. Despite this, I'm still getting this error from my .thread. proc: procedure is not GC-safe. As I understand it, this is the compiler trying to enforce separate heaps. This surprises me: I assumed

Re: Send data structures between threads?

2016-08-12 Thread jyelon
I don't know what "protect" the json means. I looked in the manual, it doesn't mention a protect statement. I'm also not entirely sure about "dispose", the word "dispose" doesn't appear in the manual, but I know there's a dispose statement that ignores a return value. But I don't see where that

Re: Send data structures between threads?

2016-08-27 Thread jyelon
When I think about how this plays out in a large multithreaded program, it worries me. For example, I used to work on a program that served queries pertaining to products for a shopping website. This program used to load tons of data at program initialization time: it would load up the

Re: Send data structures between threads?

2016-08-28 Thread jyelon
I used the word "database" in the generic sense. Basically, go to any good shopping website (eg, wayfair, or amazon, or google shopping, for example), and see what that website "knows" about coffee tables. If you take a little time and study the website, I think you'll realize that it's a

Re: What do you think about the programming language NIM?

2019-08-13 Thread jyelon
I think sharing data structures between threads in garbage collected languages is more common than you think. Java, definitely. C#, golang. Anything that runs on the JVM, like scala or kotlin. All pure functional languages, like haskell. Just a few examples.

Re: What do you think about the programming language NIM?

2019-08-15 Thread jyelon
I'm surprised everyone is treating owned and unowned refs as if they were something new. C++ has owned and unowned refs. In C++, they're called "std::unique_ptr" and "dumb pointers." The semantics of the C++ version are almost exactly the same as the semantics of the nim version - the one

Re: What do you think about the programming language NIM?

2019-08-13 Thread jyelon
Back in 2016, I evaluated nim. I thought it was wonderful, and I was particularly impressed with the metaprogramming features. I used to use Common Lisp, and macros were amazing, and I've been waiting for a modern fast language to include them. Kudos. I was about to start using nim, when I