Growth of popularity and Nim community

2020-09-17 Thread Sixte
It is possible to create "Nimrods daughter". And someone will do it. It is only a question of time. Nimrods daughter will be able to compile .h files including single-line macros. The language will evenly compile .c files with the tiny modification that in .c files, function declarations/definit

Growth of popularity and Nim community

2020-09-17 Thread shirleyquirk
>I would suggest to put this thread to rest. Everyone made their points already >and it is becoming repetitive. It does not serve any useful purpose any longer.

Growth of popularity and Nim community

2020-09-17 Thread fortea
I'm new to nim and I'm trying to understand if it's suitable for my work. Basically, I do research using dsp, machine learning, nlp and information retrieval. I like Nim because it's the only language that can claim to be at the same time: 1. easy for prototyping 2. no braces and unuseful s

Growth of popularity and Nim community

2020-09-17 Thread moerm
And you noted all the oh so grave "shortcomings" of Nim only now? Or did you seriously expect that you could talk us into changing to curly braces? "anyway, that was such a childish thing to say, good luck with your professional career." Thanks, I'm fine. Well noted, I'm not against you as a p

Dynamic loading of C++ library

2020-09-17 Thread fortea
Hello all, I'm completely new to Nim, but after having ridden a lot of tutorials, I completely fall in love with him. For really being able to use it, I need a couple of libraries. Hopefully, all of them are available from C++ or already partially implemented. I'm trying to use a large state-of

macro binary operator resolution

2020-09-17 Thread jyapayne
@nucleic, not sure if this is what you ultimately want (it's not that efficient), but here it is: import system, macros proc processLeftRight(l, r: NimNode): string = echo l.treeRepr echo r.treeRepr if l.kind == nnkInfix: result = processLeft

Pros vs. Cons Of Nim In The Large?

2020-09-17 Thread aviator
> Forward declaration of types in C++ is very limited. It is? I think it just does what it's supposed to do -- say that there's a named type that will be populated later. > even forward declare a function that takes a pointer to the type foo(T*) but > not much more. Forward function declaratio

Which version of OpenSSL to get QuickJWT linking?

2020-09-17 Thread treeform
Thats true, I don't support ES256. I had no need to. I don't think supporting ES256 would be that complex. Probably another 70 lines or so. I

Pros vs. Cons Of Nim In The Large?

2020-09-17 Thread doofenstein
recursive imports are supported, though it's pretty limited (see ). Also nimsuggest doesn't like it, which is why I don't use it.

Pros vs. Cons Of Nim In The Large?

2020-09-17 Thread slonik_az
Forward declaration of types in C++ is very limited. You can say `class T;` and even forward declare a function that takes a pointer to the type `foo(T*)` but not much more. You cannot forward declare class methods, etc. Regarding `*.h` and `*.c` files nothing prevent you from having header file

macro binary operator resolution

2020-09-17 Thread cumulonimbus
I'm not sure I understand your question. Which output do you want? 1\. first // second/third What you are already getting, so probably not what you want. 2\. first/second // third The second you can get by choosing a right-associative operator - one that starts with a caret , such as ^//: (see

Pros vs. Cons Of Nim In The Large?

2020-09-17 Thread aviator
> In C/C++ world there is no cyclic dependencies resolution either and forward > declarations are required like in Nim. Yet there are many successful large > and huge C/C++ code bases around. But C/C++ both DO effectively allow cyclic dependencies via forward declarations and file separation in

Growth of popularity and Nim community

2020-09-17 Thread Lecale
I think Nim is slowly growing in popularity. I suppose that popularity is going to come with exposure. You don't necessarily need a killer app, just a set of libraries that people can use to do a common set of tasks. Data Science, Progressive Web Apps, pick your trendy buzzword. I picked up Nim

Cross-compile to Rpi4 :(

2020-09-17 Thread shirleyquirk
Sweet! Now you can change the emoticon on your post title ;)

Growth of popularity and Nim community

2020-09-17 Thread allochi
> What have you invested in Nim? 1. Money, I donated (you can check the donation history) 2. I lobbied for Nim (everywhere, even to people at CERN in Geneva) 3. I spent time learning Nim 4. I actually wrote production code in Nim 5. I taught it to couple of developers 6. I made some pr

Growth of popularity and Nim community

2020-09-17 Thread moerm
With all due respect but this is **Nim** and not "allochi's dreams come true". You'll go back to C++ and go? A good decision for you probably (no cynicism intended). Humans are different and probably brains tick different too, so I certainly can understand that some people prefer other language

About arc and orc, would there be a thread-local ref object?

2020-09-17 Thread mratsim
Once we have Arc and multithreading fixed we can work on a fast threadsafe allocator. There is this for example that wraps Mimalloc . This is also something I noticed in Weave. As I do here

Growth of popularity and Nim community

2020-09-17 Thread juancarlospaco
I think this is not true, Nim used to have a Braces syntax, and was removed because nobody used it for several years, same happens with other syntax were both are allowed, CSON can use Braces, yet still everyone uses indent, CoffeeScript can use Braces, yet still everyone uses indent, YAML can u

Cross-compile to Rpi4 :(

2020-09-17 Thread kodkuce
SOLVED( thanks to shashlick ): in nim.cfg both exe and linkerexe should point to to same arm64.linux.gcc.exe = "aarch64-linux-musl-gcc" arm64.linux.gcc.linkerexe = "aarch64-linux-musl-gcc"

Cross-compile to Rpi4 :(

2020-09-17 Thread kodkuce
ye i put -ld but now i get new errors nim.cfg arm64.linux.gcc.exe = "aarch64-linux-musl-gcc" arm64.linux.gcc.linkerexe = "aarch64-linux-musl-ld" Run nim c -f --cpu:arm64 echotest.nim Hint: used config file '/home/me/.choosenim/toolchains/nim-1.2.6/c

The Greatest $$ Money Spell Caster To Make You Rich $$ +27787917167 in United Kingdom.

2020-09-17 Thread doctormorris
The Greatest $$ Money Spell Caster To Make You Rich $$ +27787917167 in United Kingdom, United States(USA),Albania,Andorra,Armenia,Austria,Belgium,Bulgaria,Croatia,Cyprus,Czechia,Denmark,Estonia,Finland,France,Georgia,Germany,Greece,Hungary,Iceland,Ireland,Italy,Latvia,Malta,Monaco,Netherlands,Nor

Compile times

2020-09-17 Thread cblake
@erikenglund \- personally, I use the TinyCC/tcc backend on x86_64 Linux and routinely get <1.0 to 1.7 second compile times for 20..40 kLoc of not too meta-programming heavy Nim (transitive closure of all stdlib deps, etc.). The [tcc mob branch](http://repo.or.cz/tinycc.git) is usually pretty fu

+27839387284 How-2-Join-Illuminati-Society-in-SWAZILAND Now +27839387284

2020-09-17 Thread doctormorris
+27839387284 How-2-Join-Illuminati-Society-in-SWAZILAND Now +27839387284 And Send on Website: / and Email: babamoris...@gmail.com, Durban FOR MONEY +27839387284 ,Fame And Power in South Africa, Join illuminati in Swaziland +27839387284, Join illuminati in Br

Welcome to The Great Temple of Illuminati +27787917167 With Priest Elvis

2020-09-17 Thread doctormorris
Welcome to The Great Temple of Illuminati +27787917167 With Priest Elvis on / and #Email: ntanzielvi...@gmail.com in South Africa,Join illuminati in Bristol,Boston,Birmingham,London and Join on this number +27787917167 /

How to Bring Back Your Lost Lover in USA +27787917167 Marriage spells

2020-09-17 Thread doctormorris
How to Bring Back Your Lost Lover in USA +27787917167 Marriage spells in California +27787917167,New York,Delaware,Upington, I want Divorce in Canada +27787917167,Norway,Germany,New York,Washington,Chicago,Seattle,Boston,San Francisco,Austin Try Spiritual Black Magic in Your Marriage +2778791716

Ensure Great Success With Magic Wallet +27787917167 To Make You Rich Forever in South Africa.

2020-09-17 Thread doctormorris
Ensure Great Success With Magic Wallet +27787917167 To Make You Rich Forever in South Africa,Swaziland,Botswana,England,Malawi,Namibia,Zimbabwe,Zambia,Kenya,Uganda,Australia,Austria,Switzerland,Sweden,German,Wales,Scotland,Netherlands,Russia,USA,Denmark,Poland,Canada,Bristol,Boston,Manchester,Bou

Cross-compile to Rpi4 :(

2020-09-17 Thread shirleyquirk
>does not work on both rpi and desktop Progress!

Growth of popularity and Nim community

2020-09-17 Thread shirleyquirk
Welp, syntax is pretty nailed down, so that's not really an avenue for Nim growth. And different languages are different. The calculus is: cost of transitioning vs benefits of adoption. Decrease the former, increase the latter. And hope that Nim didn't make a fatal mistake by not going with S-e

Growth of popularity and Nim community

2020-09-17 Thread slonik_az
I would suggest to put this thread to rest. Everyone made their points already and it is becoming repetitive. It does not serve any useful purpose any longer.\--Leo| ---|---

Cross-compile to Rpi4 :(

2020-09-17 Thread kodkuce
>From what i see default one hes no defintion for arm64 only for arm i just >added myself some new lines just am now trying to figure out what linker name >in void-linux packages

Growth of popularity and Nim community

2020-09-17 Thread allochi
@torarinvik What I'm basically saying, if you wonder why Nim is not picking up, it's because it's not easy to grab developers attention to solve common problems by introducing extra level of complexity to their workflow by learning unfamiliar syntax (but it has been reduced to spaces vs bracket

dollars for ref types

2020-09-17 Thread shirleyquirk
I think everyone is vehemently agreeing with each other. Compiler does know which types **can** be cyclic, at run time walking the graph is necessary. A subset of ref types exist that can never be cyclic, and for which my naive '$' would be safe. But you'll never have a `$` for a linked list

Growth of popularity and Nim community

2020-09-17 Thread torarinvik
> If anything this conversation convinced me to stick to C++ and Go, and invest > more time in something like Zig and Julia. they have the momentum and > libraries. Personally I program in different languages and they all have their strengths. But I do understand what you are talking about very

Cross-compile to Rpi4 :(

2020-09-17 Thread shirleyquirk
Yes, Nim can't find your cross-gcc. Have you got the right``arm.linux.gcc.path`` and the rest in your nim.cfg? After that, I had to passL the path to the libc as well

Growth of popularity and Nim community

2020-09-17 Thread RodSteward
> You don't really have to test, it is possible to make commercial or IT > applications in-house. > > I still have the impression of a discussion in a vacuum. I don't necessarily agree with the "killer app" theory. C# is immensely popular but doesn't have a particular killer app. However, in th

Cross-compile to Rpi4 :(

2020-09-17 Thread kodkuce
"if the executable runs on your local machine, if so it hasn't cross compiled properly." ye i just runed nim --cpu:arm64 --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc c echotest.nim file echotest.nim has just echo "Test1" and it runned on my x86_64amdPC like it ignored this --cpu:arm64, duno why

Growth of popularity and Nim community

2020-09-17 Thread allochi
I'm not taking any more space and time to add to my comments, I think I made my ideas clear, and they don't come from day dreaming, they are all based on actual work and research done using Nim and discussions I had with other developers as a friend or VPoT in my company. This is a repeated con

Growth of popularity and Nim community

2020-09-17 Thread torarinvik
> Nim is on its way and it's a damn good and attractive way. You want braces? > Simply use one of the many curly braces languages. Now this is something I have thought about: What about creating some kind of script for your IDE so that everytime you run your code the braces/indentation will be

Is there flame graph for Nim performance?

2020-09-17 Thread moerm
Small side note: AMD also offers a free profiler, somewhat similar to VTune (but no flames, sorry).

dollars for ref types

2020-09-17 Thread xigoi
We were talking about the `acyclic` pragma.

Growth of popularity and Nim community

2020-09-17 Thread moerm
Now we are discussing braces vs. indenting? Seriously? But what disturbs me most is the _feature picking_. C, for example, is a nightmare to properly parse. Actually it's not really feasible. Yet some here seriously suggest - on the basis of picking one (1) aspect of one (1) feature (braces) -

Growth of popularity and Nim community

2020-09-17 Thread sschwarzer
> Just to clarify my position, I'm not opposing the indentation "Only", I think > the language should have a C-style version of it, with keywords and all. What do you think should change in Nim to be more appealing to C (or C++, Go, Rust, ...) developers, apart from braces and keywords? If Nim i

Pros vs. Cons Of Nim In The Large?

2020-09-17 Thread slonik_az
> What you said about cyclic imports is so true. In many ways, Nim tries to be > a low-friction language, and it succeeds in making a lot of things easy that > are hard in other languages. This, however, is in stark contrast to how hard > it is to properly organize types and functions across fil

dollars for ref types

2020-09-17 Thread slonik_az
The Original Poster was proposing a simple implementation of a generic `$` operator for `ref` types that could lead to infinite recursion. This is the context of my comments. In the case of specific types, additional constraints could apply and my line of reasoning may or may not be valid anymor

Pros vs. Cons Of Nim In The Large?

2020-09-17 Thread shashlick
There is experimental [code reordering](http://nim-lang.github.io/Nim/manual_experimental.html#code-reordering) to avoid forward declaration headaches.

Growth of popularity and Nim community

2020-09-17 Thread sschwarzer
> Code usually is read more than it's written, it needs to be clear, a good > developers take the extra mile to communicate through their code well, I totally agree here. > is it too much to ask someone to add a }, In Nim and Python there's no need to add a `}` to begin with. That's nothing to

dollars for ref types

2020-09-17 Thread xigoi
Yeah, but let's say you make a RootedTree type and ensure (by restricting the exported API) that it can't create cycles, then marking it as acyclic makes sense.

macro binary operator resolution

2020-09-17 Thread xigoi
You can build the logic into the macro, by checking whether the RHS is itself a call of your operator.

Growth of popularity and Nim community

2020-09-17 Thread sschwarzer
> Just to clarify my position, I'm not opposing the indentation "Only", I think > the language should have a C-style version of it, with keywords and all. Thanks for clarifying!

Growth of popularity and Nim community

2020-09-17 Thread sschwarzer
> Fine, the editor identify : and give you an indentation, what about the next > line? is it indented too? what gives the right for the IDE to indent it? what > if it is only one line after : that should be indented? now you need > backspace, sure, invisible } I guess we had a misunderstanding

Growth of popularity and Nim community

2020-09-17 Thread sschwarzer
> You don't think that a human can mistakenly hit a tab or backspace? As for tabs, they're [not allowed in Nim code](https://play.nim-lang.org/#ix=2xQS), so the compiler would tell you. > or a formatter can mess up? A formatter could also mess up and delete whole lines. I mean, this is about b

About arc and orc, would there be a thread-local ref object?

2020-09-17 Thread xflywind
Thanks.

Compile times

2020-09-17 Thread geotre
One of my projects, with only stdlib imports: $ cloc src/ 14 text files. 14 unique files. 0 files ignored. github.com/AlDanial/cloc v 1.74 T=0.02 s (685.2 files/s, 68712.5 lines/s) --

Growth of popularity and Nim community

2020-09-17 Thread allochi
Just to clarify my position, I'm not opposing the indentation "Only", I think the language should have a C-style version of it, with keywords and all.

Growth of popularity and Nim community

2020-09-17 Thread allochi
> my editor gives me automatic indentation after writing a line starting ... Fine, the editor identify `:` and give you an indentation, what about the next line? is it indented too? what gives the right for the IDE to indent it? what if it is only one line after `:` that should be indented? now

Growth of popularity and Nim community

2020-09-17 Thread cumulonimbus
> 1\. indentation based syntax cannot by definition use auto indentation like > features > 2\. braces add visual clutter I would also add: 3\. Braces and indentation can imply different scoping, where the compiler only sees braces and programmers always see indentation and sometimes also braces

Growth of popularity and Nim community

2020-09-17 Thread allochi
> other reasons why someone might prefer Go over Nim The point is not the indentation only, the the whole familiarity with the code structure. Does Google use only Google created languages? Google aside you say > it already has far more devs > it's more likely I find libraries > it's more > li

Pros vs. Cons Of Nim In The Large?

2020-09-17 Thread aviator
What you said about cyclic imports is so true. In many ways, Nim tries to be a low-friction language, and it succeeds in making a lot of things easy that are hard in other languages. This, however, is in stark contrast to how hard it is to properly organize types and functions across files in Ni

Growth of popularity and Nim community

2020-09-17 Thread allochi
You don't think that a human can mistakenly hit a tab or backspace? or a formatter can mess up? you seriously don't see the danger there? or the documented intention? if you seriously can't honestly, I can't help with that.

Growth of popularity and Nim community

2020-09-17 Thread Vindaar
I meant receiving several lines of code from a colleague, which aren't indented properly and then using the editor to correctly indent all of them in one go. Have to do that all the time with C / C++ code. Because guess what. Since people don't have to take care to indent sensibly, they don't.

Growth of popularity and Nim community

2020-09-17 Thread sschwarzer
> indentation based syntax cannot by definition use auto indentation like > features I don't know if we mean the same by "auto indendation", but my editor gives me automatic indentation after writing a line starting with `if ...:` or `while ...:` and other patterns that indicate an indentation.

Growth of popularity and Nim community

2020-09-17 Thread sschwarzer
> We tend to forget that developers real job is not to learn a new language, > but find solutions for problems and challenges. My experience in learning new languages is that the use of indentation vs. braces contributes rather little to the overall effort. You also have * different paradigms

Growth of popularity and Nim community

2020-09-17 Thread sschwarzer
> our frontend developer asked several times to get involved in a Go project. There could be other/more reasons than using braces for structure. Like * it's from Google * it's backed by Google * it _already_ has far more devs * it's more likely I find libraries * it's more likely that I

Growth of popularity and Nim community

2020-09-17 Thread Vindaar
I'm sorry, but this is a bad example. The same question can be asked about the braces code. There's only 2 distinct points about braces vs. indentation: 1. indentation based syntax _cannot_ by definition use auto indentation like features 2. braces add visual clutter Whether you put more

Growth of popularity and Nim community

2020-09-17 Thread sschwarzer
> I do agree with you that indentation is not difficult to adopt, but it's > difficult to maintain, for example between 1 and 2 which one do you think the > programmer intends [...] I think the programmer intended what they wrote at the time of writing, whether version 1 or 2. Since you use onl

Can a template/macro return an imported module name?

2020-09-17 Thread vitreo12
I see, thanks!

Growth of popularity and Nim community

2020-09-17 Thread allochi
> Java(Sun) did this in order to get C++ programmers to switch. My point, Nim can be a C/C++/Rust/Go replacement on wide range of applications, why miss this opportunity, and the door is not open for long. If I list all the advantages of using Nim, I can't give it justice, but seriously, do you

Growth of popularity and Nim community

2020-09-17 Thread allochi
> What gave you the impression that it competes with Python? Not in the specs, I mean marketing and the language surrounding it, people seems to advertise it mostly as a statically typed Python, the fact it went with indentation to appeal to Python programmer, not to C-style programmers and the

About arc and orc, would there be a thread-local ref object?

2020-09-17 Thread Araq
They don't work "fine", they leak memory, I'm working on a fix. As long as they leak benchmarking them is futile.

Growth of popularity and Nim community

2020-09-17 Thread allochi
with all respect, I do agree with you that indentation is not difficult to adopt, but it's difficult to maintain, for example between 1 and 2 which one do you think the programmer intends // 1 start_process() if finished: save_results() pay(1) // 2

About arc and orc, would there be a thread-local ref object?

2020-09-17 Thread xflywind
I have done some benchmarks with some gcs. arc and orc seems to work fine with `httpbeast`. But when I benchmark prologue with many ref objects. It seems to slow down very much. With refc, 50k qps With arc, 7k qps With orc, 18k qps Any solutions?

About arc and orc, would there be a thread-local ref object?

2020-09-17 Thread Araq
> However, allocating memory in a shared heap, which means locking the heap > everytime. That's not how modern allocators work. Nim's is currently a notable exception with its single global lock, but '-d:useMalloc' fixes that. See also

Is there flame graph for Nim performance?

2020-09-17 Thread Vindaar
Regarding using `perf` I wrote some notes debugging a performance issue in `ggplotnim` last year. They are a little... informal though. But maybe they can still be of some use to someone. At least should give an idea how to use `perf` in combination with `callgrind` and `kcachegrind`:

Growth of popularity and Nim community

2020-09-17 Thread torarinvik
> I'm sure I will offend a lot of people when I say that depending on Python > programmers to make Nim popular is a mistake, and I apologize, I don't mean > to offend, Python is popular among data scientist and ML prototyping, and > those are currently in their comfort zone, why would they switc

Growth of popularity and Nim community

2020-09-17 Thread mratsim
> The funny/sad part is that Nim has a lot to provide to overcome languages > like Go, Rust, C++, C#, Java, Dart, Javascript (even Julia), yet it choose to > compete with Python. I agree with most of your post but this line. What gave you the impression that it competes with Python? Nim is not

About arc and orc, would there be a thread-local ref object?

2020-09-17 Thread wt
**\--gc:arc** and **\--gc:orc** offers a shared heap. Therefore, a ref object is allocated in a shared heap when it is `new`. However, allocating memory in a shared heap, which means locking the heap everytime. So, I wonder would there be some special ref object that is allocated from a thread l

macro binary operator resolution

2020-09-17 Thread mratsim
Use parenthesis or prefix your operator with a character with higher precedence: The only characters with higher precedence than `//` would be `$//` or `^//`.

Growth of popularity and Nim community

2020-09-17 Thread SolitudeSF
it takes two seconds to adapt to braces/whitespace difference, its never been a practical issue, just people being stuck up.

Is there flame graph for Nim performance?

2020-09-17 Thread mratsim
I use Apple Instruments, or perf annotate or Intel VTune. Anything that works with C/C++ would work with Nim you just need to compile with "\--debugger:native" so that they see the debugging symbols. Example of perf bug hunting with Apple Instruments: