Re: I think we can really do better...
I think both are true, but is good opportunity for ``.
Re: I think we can really do better...
> Topmost page should not contain too much text and too much details. And no > unknown terms. Agree with you here. In fact, I made a similar remark in the PR: [https://github.com/nim-lang/website/pull/150#issuecomment-496166378](https://github.com/nim-lang/website/pull/150#issuecomment-496166378) But I would say that your suggested text is also too long.
Re: I think we can really do better...
Saying you "can swim fast" doesn't impress people. Saying you swim X meters in Y seconds doesn't impress people much because most don't have an immediate frame of reference. Saying that you've won [23](https://en.wikipedia.org/wiki/List_of_multiple_Olympic_medalists) Olympic gold medalists - now that's a knockout blow! What Nim needs most is to win benchmarks and other systematized programming language comparisons. I think [Web Framework benchmarks](https://forum.nim-lang.org/t/1152) are the most important point Nim can make about its performance. It's already doing great, but needs more implementations and optimization.
Re: Is there a 'protected' or module-local scope modifier?
Friends: somepkg / [types, core, other_stuff] Run Strangers: somepkg Run Since low-level code is available in Nim, privacy can always be broken by someone defining their own copy of your types with their own fields, and then casting your type to theirs. You're only making that a little bit harder by trying to hide data in a closure environment.
Re: I think we can really do better...
Nim is a state of the art programming language well suited for systems and application programming Its clean Python like syntax makes programming easy and fun for beginners, without applying any restrictions to experienced systems programmers. Nim combines successful concepts from mature language like Python, Ada and Modula with a few sounding features of latest research. It offers high performance with type- and memory safety while keeping the source code short and readable. The Compiler itself and the generated executables support all mayor platforms including Windows, Linux, BSD and Mac OS X. The custom package manager makes use and redistribution of programs and libraries easy and secure. Nim supports various backends -- the C and LLVM based backends allow easy OS library calls without additional glue code, while the Javascript backends generates high quality code for web applications. The integrated "Read–eval–print loop" (REPL), "Hot code reloading", and support of various development environments including debugging and language server protocol makes working with Nim productive and enjoyable. Nim is Efficient: * The statically typed language compiles to highly optimized dependency free executables. * Modern concepts like zero-overhead iterators, compile time evaluation of user-defined functions and cross-module inlining in combination with the preference of value-based, stack located datatypes leads to extremely efficient code. * Multithreading, async IO, parallel processing including GPU execution are supported. * Various memory management strategies exists: Selectable and tunable high performance Garbage Collectors are supported by manually and semi manually memory management. This makes Nim a good choice for Application development and close to the hardware system programming at the same time. The unrestricted hardware access, small executables and optional GC will make Nim a perfect solution for embedded systems, hardware driver and Operating Systems development Nim is Expressive and Elegant * Nim offers a modern type system with templates, generics and type inference. * Built in advanced data types like dynamic containers, sets and strings with full UTF support are completed by a large collection of library types like hash tables and regular expressions. * The Powerful AST-based hygienic macro system offers nearly unlimited possibilities for the advanced programmer. * While the traditional Object-Oriented Programming style with inheritance is supported, Nim does not enforce this programming paradigm and offers modern concepts like procedural and functional programming. Nim is Open and Free * The Nim compiler and all of the standard library are implemented in Nim. All source codes are available under less restricted MIT license. Nim has a friendly and helpful growing community * Forum (coded in Nim), Gitter, IRC Nim has a encouraging future * Started 10 years ago as a small community project of some bright CS students leaded by Mr A. Rumpf, it is now considered as one of the most promising programming languages supported by uncounted individuals and companies of leading computer industry, ie. from the area of game-, web- and cryptocurrency development. \-- More details: [https://nim-lang.org/features.html](https://nim-lang.org/features.html) Try it: [https://play.nim-lang.org/index.html](https://play.nim-lang.org/index.html)
Re: Disadvantages of static proc parameters?
compilers nowadays often do call specialization for constants arguments - basically create alternate functions for specific constant values based on metrics collected during the compile, instead of doing it blindly, meaning that static ends up being a noisy premature optimization if used for this reason. the story is similar to inline in c \- obsoleted by better compilers, effectively. this will work better if you also enable LTO - which incidentally removes the need for the nim {.inline.} noise in your code too.
Re: Rosencrantz is Routing DELETE Method not working?
Try putting explicitly rosencrantz.delete, I think there may be an issue because the function delete is overloaded
Re: I think we can really do better...
Note, we have already a second page which I really like: [https://nim-lang.org/features.html](https://nim-lang.org/features.html) There we can explain all that in more details with examples. Topmost page should not contain too much text and too much details. And no unknown terms. And we have to be careful with too unstable/experimental stuff. Hot Code Reload and REPL is great, but is it working stable already, and do we have docs? People we asks for docs. Compile-Time FFI, yes we should mention that. Also that different, optional and tunable GCs exists. No idea what MultiSync is... Maybe we should directly link to the Playground -- I am not sure if it currently exists. And mention packedmanager.
Re: about Nim compiler parameters
IIRC you can always use two dashes, even for single letter options.
Re: I think we can really do better...
I would mention Compile-Time FFI, Hot Code Reload, the GC options, REPL and MultiSync, you can not do that on other languages...
Re: Nim enum inner-aliasing and order
So for an enum like this: [https://doc.qt.io/qt-5/qfont.html#StyleHint-enum](https://doc.qt.io/qt-5/qfont.html#StyleHint-enum) would you use a distinct cint or a just leave the aliases alone and use a Nim enum? Which one is the "nim way"?
Re: Nim enum inner-aliasing and order
Well a Nim enum is not a C enum. To introcude an alias (which is a bad idea btw), use this: type XX* {.size: sizeof(cint), pure.} = enum ab = 0, ed = 1 const be = XX.ab Run But using distinct integer types for C interop works much better IMO.
Shared library for Android
Hello, Is there an ability for Nim to create a shared library for Android? Best regards, Sergey
Re: about Nim compiler parameters
> -d:ssl This is same with `--define:ssl` , two hyphens is long option while single hyphen is short option. This `--define` option is to define a compile-time variable ala `#DEFINE` in C for example you define 'goThisWay' when compiling then you can use it in code when defined(goThisWay): # all codes that will be compiled else: # alternative when you want other codes Run Another use is explained in this [part of manual](https://nim-lang.github.io/Nim/manual.html#implementation-specific-pragmas-compile-time-define-pragmas)
Nim enum inner-aliasing and order
type XX* {.size: sizeof(cint), pure.} = enum ab = 0, be = XX.ab, ed = 1 Run main.nim(3, 8) Error: invalid order in enum 'be' What's the point of enum order anyway?
Re: Where to show applications/examples to promote Nim?
This looks wonderful. Actually you can [submit a blog post](https://github.com/nim-lang/website/tree/master/jekyll/_posts) on your experience directly on nim-lang.org and we can share that on the usual channels (Hacker News, Reddit, Lobste.rs) and the localized channels with a strong Nim following (qiita.co.jp and habrhabr.ru)
Re: Disadvantages of static proc parameters?
The main disadvantage is that you have one proc per static instantiation value which usually increase the code size (and is less efficient on the instruction cache). It doesn't really matter in this case as the proc is inline and a single machine instruction proc.
Re: about Nim compiler parameters
Command line parameters follow Unix conventions, one hyphen (minus) for one letter options like -d:release, two hyphens for multiletter options like --threads:on. See "nim --fullhelp" for a list of all (documented) command line parameters. \--experimental is a valid command line parameter, but I am not sure if it is identical to pragma use. nim.cfg can contain parameters, for example| ---|--- path:"$projectdir" nimcache:"/tmp/$projectdir" gcc.options.speed = "-march=native -O3 -flto -fstrict-aliasing" #gcc.options.speed = "-save-temps -march=native -O3 -fstrict-aliasing" #gcc.options.speed = "-march=native -O3 -g -fno-strict-aliasing" Run
about Nim compiler parameters
Hi there! Currently I compile my program with nim c -d:ssl --threads:on app.nim I also have an {.experimental.} pragma inside app.nim which I assume could be replaced with another flag to the compiler. Right now I'm a bit confused about these flags and parameters`. <[https://bibliocrunch.com/profile/techcaredn/>`](https://bibliocrunch.com/profile/techcaredn/>`)_ Is there a pattern for when the parameter to the compiler should have no dash (c/compile) one dash (-d:ssl) or two dashes (--threads:on)? Can all these parameters be replaced with pragmas in the code? Is it possible to keep the compiler options in a nim.cfg file? I still haven't found a help section about configuration files that explains what they can do. Thanks
I think we can really do better...
I may feel a bit guilty as I critisized the former Nim Homepage content... But sorry, the new draft is really not nice. Page look is unfriendly, content is not great also. So here is my first content suggestion -- I just hacked it together in a few minutes. It would be easy to improve the text further, I guess I forgot some points, and we can steal some wording from pages of other languages. Of course I am not a native English speaker, and do not know well all Nim details. But it is so easy to make a better text, so I could not resists, of course knowing that my draft will newer make it to the Nim homepage. So I have not fixed spelling errors and I have not tuned the wording in any way. But you may get the feeling. I would maybe group the statements in boxes as it is done for Julia -- Julia in a nutshell. * * * Nim is a modern universal programming language suited for systems and application programming Nim combines successful concepts from mature language like Python, Ada and Modula with a few sounding concepts of latest research. It offers high performance while keeping the source code short and readable. Its clean Python like syntax makes programming easy and fun for beginners, without applying any restrictions to experienced systems programmers. Nim is efficient: * The generated native, dependency free executables are small and allow easy redistribution. * Nim supports various backends -- the C and LLVM based backends allow easy OS library calls without additional glue code, while the Javascript backends generates high quality code for web applications. More backends already exists or can be easily added. * The Compiler itself and the generated executables support all mayor plattforms like Windows, Linux, BSD and Mac OS X. Porting to other platforms is easy. * Modern concepts like Zero-overhead iterators, compile time evaluation of user-defined functions and Cross-module inlining in combination with the preference of value-based, stack located datatypes leads to extremly performant code. * Various memory management strategies exists: Selectable and tunable high performance Garbage Collectors are supported by manually and semi manually memory managent. This makes Nim a good choice for Application development and close to the hardware system programming at the same time. * The unrestricted hardware access, small executables and optional GC will make Nim a perfect solution for embedded systems, hardware driver and Operating Systems development Nim is Expressive * Nim supports the well know concepts like operator and function overloading and ... * While the traditional Object-Oriented Programming styles is supported, Nim does not enforce this programming paradigma and offers modern concepts like ... * The Powerful AST-based hygienic macro system offers nearly unlimited ... for the advanced programmer. Nim is Elegant * Modern type system with local type inference, tuples, variants, generics, etc. Nim is Open and Free. * The Nim compiler and all of the standard library are implemented in Nim. All source codes are available under the unrestricted MIT license. Nim has a friendly growing community * IRC * Forum (coded in Nim) * ... Nim has a bright future * Started 10 years ago as a small project of some bright CS students leaded by Mr A. Rumpf, it is now considered as one of the most promising programming languages supported by uncounted individuals and companies of leading computer industry, ie. from the area of game development, cryptology and bitcoin stuff.