> Admin note: I removed an offtopic post.
Kinda arbitrary. This topic bounced between several different languages and how
they compare to Nim. Vlang was mentioned on this thread before without getting
censored, but my mention of it just appearing on TechEmpower was censored.
Inconsistent use of
Vlang's pico framework has just burst into [the latest TechEmpower
JSON](https://www.techempower.com/benchmarks/#section=test&runid=7f65c127-fad2-4a88-a6cb-5333c68362ef&hw=ph&test=json)
and
[Plaintext](https://www.techempower.com/benchmarks/#section=test&runid=7f65c127-fad2-4a88-a6cb-5333c68362e
According to the upcoming Official 21st Century Universal Code Style Guide, the
correct way to write this is:
type
Euler* = object
💩x, 💩y, 💩z, 💩a, 💩b. 💩c: float64
method x( this: Euler): float64 =
return this.💩x
Run
Leading and trai
Very impressive matmul results in [Kostya's
benchmarks](https://github.com/kostya/benchmarks).
Would be even better if s/Apache/MIT/ license...
We cannot help without more details. What database / database library / ORM are
you using? How does it treat
[Table](https://nim-lang.org/docs/tables.html#Table) objects differently from
seq? If it's an SQL database, what SQL does it execute? Etc.
Shell scripting. (I use `mksh`, slowly thinking of transitioning to `zsh`.) I
find myself being able to do a huge fraction of my tasks with just shell,
common Unix tools, and some very useful new command line tools (ex `jq`,
`curl`, etc). I make heavy use of running `$EDITOR` (ex `vim` or `kakou
Please use more descriptive thread subjects. All of this forum is about "Nim
programm[ing] language".
It would have been great if Rosetta Code (or a blatant scrape thereof) would
let people rate the aesthetic qualities of a correct implementation. No measure
is perfect, but that would be more valuable than calculating code "terseness".
(I hate to endorse a proprietary evil powerhouse like GitHub
vscode or nvim ought to be enough for everybody.
Minimalists and license purists go
[nuklear](https://github.com/zacharycarter/nuklear-nim).
I get the same error message even from `nimble update` and `choosenim` when
trying to run over an SSH proxy with `export http_proxy=socks5://0:8123`...
I'm a big fan of programming language comparisons, and I'm happy to see one
trying to measure terseness.
I personally would measure terseness by first stripping out comments and empty
lines, normalizing all identifier names to same length, and then counting
characters weighed by typing effort (
Of course the main gateway is banned, but people [can
still](https://www.reddit.com/r/ipfs/comments/b0oe37/sending_files_to_china_via_ipfs/)
use it over VPN, I2P/Tor gateways, etc.
> Web framework [https://nimwc.org/login](https://nimwc.org/login)
[Not free software.](https://forum.nim-lang.org/t/4703)
I added Nim to the ["Use as an intermediate
language"](https://en.wikipedia.org/wiki/JavaScript#Use_as_an_intermediate_language)
listing on the "JavaScript" article. Each list item there contains a name of
the language that can compile to JavaScript with a one-sentence description of
the langua
> JUCE is not a GUI library. It is a specialized toolkit for
> audio/video/DSP/plugins/MIDI software creation which also includes some GUI
> support.
OK, I guess this means that Qt-related audio libraries (ex.
[SigDigger]([https://github.com/BatchDrake/SigDigger)](https://github.com/BatchDrake/
> the project leader has a veto right over community
I just want to emphasize this point. It's Araq's toy, he can do whatever he
wants. Choosing to use his Nim is our voluntary choice. If someone's not happy,
they can create a fork.
[Kostya's benchmarks](https://github.com/kostya/benchmarks) is finally back to
life, and they just added Vlang. I don't know the details, but the current
results are hilarious! 😁
While we're on the subject of joking about other languages, [much D lols on
Reddit](https://old.reddit.com/r/program
"SQLite for single-user apps and PostgreSQL when you need it" ought to be
enough for everybody.
> benchmarks are a game.
I agree, but in a very positive interpretation of that phrase.
Competitive games are essential, both to individual human development as well
as software projects. They are a feedback mechanism that challenges potential
complacency, and helps bring out the best that is w
1\. PHP is a horrible language by every measure.
2\. Scripting languages [scale very
poorly](https://www.techempower.com/benchmarks/#section=data-r17&hw=cl&test=json)
on the server end.
3\. The name of the programming language is "Nim", not "NIM", which implies
it's an initialism. (* Calling i
> Delphi has now the ability to run its code and GUI's on multiple platforms.
> In a study Delphi had 70% of the speed of Microsoft visual c++ compiler. But
> Delphi's compiler is lightning fast, it is almost like python in that sense.
> Delphi also has an amazing RAD development package and is
Someone is yet to write a JUCE library for Nim.
Out of curiosity, what made you choose JUCE over [the
alternatives](https://en.wikipedia.org/wiki/List_of_widget_toolkits)?
JUCE has a big down-side of being [GPLv3/commercial
licensed](https://github.com/WeAreROLI/JUCE/blob/master/LICENSE.md), an
[Kostya's benchmarks](https://github.com/kostya/benchmarks) have become updated
again [after a long absence](https://github.com/kostya/benchmarks/issues/179),
featuring Nim v1.0.0, Rust stable, the current versions of the D compiler trio,
etc.
Nim's BF2 results have improved compared to [the
p
I encourage everyone to BUY the book.
> Is there any getting started tutorials for Nim?
In addition to what was mentioned above, the great **_Nim In Action_** book is
available on BitTo^H^H^H^H^H ... err ... I mean ... It's available [on
Amazon](https://www.amazon.com/Nim-Action-Dominik-Picheta/dp/1617293431)! And
elsewhere.
> may
Really the only thing that Nim and Lisp have in common is very powerful
metaprogramming. Aside from that - it's a very strange comparison...
Lisp is a family of programming languages, almost all of which are scripting
languages without static typing. Most common Lisp implementations (ex. SBCL,
> Web framework with 2 Factor Authentication, ReCaptcha, WebP, Postgres/SQlite,
> DbC, Hardened builds, etc.
[Subject to the Pol Pot License...](https://forum.nim-lang.org/t/4703) 🥺
Having a shared system-wide config file is useful in many Grandpa Unix
scenarios, like shared [shell
account](https://en.wikipedia.org/wiki/Shell_account) boxes. This is major
retro nerd chic! 🐡 🧐
`nim` would be in `/usr/local/bin` on most BSDs, or `/usr/pkg/bin` or
`/opt/pkg` on PkgSrc system
I think the question of "Why use Nim?" is incomplete without context. There
should be several specific variants of this question, each with a somewhat
different set of arguments:
* Why use Nim to teach
[CS101](https://www.i-programmer.info/news/150-training-a-education/7511-python-becomes-mos
A few more optional field suggestions for the [dot-nimble
format](https://github.com/nim-lang/nimble#nimble-reference):
**Author Info:**
* `author_url` \- one or more URLs about the author (since not everybody uses
github).
* `author_forum` \- the author's verified handle on this forum. Thi
> what everyone else was using for writing Nim?
I think most people use [VScode](https://code.visualstudio.com), which has [a
great Nim
extension](https://marketplace.visualstudio.com/items?itemName=kosz78.nim).
The [Editor Support](https://github.com/nim-lang/Nim/wiki/Editor-Support) GH
wiki
Related to the above:
[GitHub starts blocking developers in countries facing US trade
sanctions](https://www.zdnet.com/article/github-starts-blocking-developers-in-countries-facing-us-trade-sanctions/)
Of course people with unpopular political opinions have been facing informal
sanctions (ex. s
Just curious, is IPFS taking off in Mainland China?
I was thinking of thinking of possibly contemplating an IPFS mirror of the Nim
ecosystem (git source code, Web-site snapshots, videos, binaries, etc).
> I think @Araq and the team should consider hiring a Chinese speaker for
> community management and engagement.
This shouldn't depend on the core team. People in the FLOSS communities should
be more proactive - don't wait for "The Center" to give orders.
It would be awesome of any "special int
> > Is having a "std" GUI / drawing / clipboard / etc lib really so important
> > when there are non-"std" candidates in nimble?
>
> Yes, quite a lot. Std GUI lib means that you can and will be able to make ui
> using same code for every compatible platform and 90% extensions (like custom
> con
Reverse engineering even a normal compiled binary is a lot of work, but it can
be studied in memory. It's easy to obfuscate all identifier names and add
computational noise (there are C/C++ products that do this), which will make
reverse engineering harder but still doable.
The only way to enti
I'm sure this is interesting for some people, but the choice of languages seems
peculiar. I think Nim's biggest competitors are: D, Rust, Crystal, Swift,
Kotlin Native, etc...
Is having a "std" GUI / drawing / clipboard / etc lib really so important when
there are non-"std" candidates in nimble
> [It](https://github.com/vlang/v) has 1k more Github stars than
> [Nim](https://github.com/nim-lang/Nim).
Yet another reminder that [GitHub stars are an awful harmful way to
measure](https://old.reddit.com/r/nim/comments/8q99ba/happy_5000_stars/e0i7etu/)
anything...
> BTW, Nim is approaching
There goes my "V is for [Vaporware](https://en.wikipedia.org/wiki/Vaporware)"
joke... 🙄
But on the other hand I do defend the author. Being overly ambitious and slow
to deliver can annoy people, but there's still potential for long-term success.
There is no such thing as "compilation speed". There are lots of different CPUs
in existence: some specialized for mobile, some for home desktops, and some for
multi-million-dollar super-computer compilers in the cloud.
So it's about time we start measuring compilation in terms of cost (given fr
> Arak
s/k/q
> If my understanding is correct, then why should I invest in Nim when I won't
> have the advantage of the GC and instead I could use another language with
> the same memory-management mechanism as Nim but with a huge community behind
> it, backed by Mozilla?
* Nim has a much b
You're probably looking at their last publication, [Round
17](https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=json)
from Oct 30th. See the "now" link in my previous post. Rust is way ahead in
their flagship "Fortunes" benchmark (next language is at 62%).
On [TechEmpower dailies](https://tfb-status.techempower.com) Rust is
[now](https://www.techempower.com/benchmarks/#section=test&runid=019d5c9b-823f-4890-8ed9-28c0a2718bdd)
the absolute dominant champion in every category...
> @libman please calm down and be less verbose in these quite offtopic
> discussions. Yes, you like MIT and dislike GPL, we know, you don't have to
> repeat it again and again...
I didn't repeat it, I brought up a new point about an exodus of Python
programmers not happy w
> My bad trying to be sarcastic on the internet.
As I demonstrate, it is possible to be sarcastic without being wrong.
> You may have noticed that I copied the language from your illustrative
> non-source and made some replacements:
>
> proprietary software owners -> open-source software projec
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 - no
> From your source: [...]
It's not "source" in the journalistic sense of the word - it's an illustration.
Like other links in that paragraph, there's some obvious whimsy; as there's
obviously a lot of gray area between Stallman's ideals, what Stallman is able
to get away with, and mildly restri
My predictions about [SJW derangement](http://esr.ibiblio.org/?p=6918)
spreading and alienating a growing minority of programmers continue to come
true:
* [Now political correctness infects a programming
language!](https://www.techpowerup.com/forums/threads/now-political-correctness-infects-a
He probably works for GitHub. 😵
I didn't take time to properly understand your code or to test this, but here's
my idea of what clean code looks like:
import os, streams, strutils
var appendCodeBlock = ""
var filesWeAppendTo: seq[string]
let wildcard = getCurrentDir() / "*.nim"
for file i
The idea of having a binary [AST
format](https://github.com/tc39/proposal-binary-ast) [is
finally](https://www.phoronix.com/scan.php?page=news_item&px=BinaryAST-Proposal)
[lifting off in the vast swamps of
JavaScript](https://blog.cloudflare.com/binary-ast/)...
Whether this can benefit languag
I might need to break up the "Non-English" playlist by language...
There's now [a lot of new Nim YT videos in
Thai](https://www.youtube.com/channel/UCTyvSBAvdBPDS-7isD5GDdw/videos)! 🇹🇭👍
[GNU Affero General Public License
v3.0](https://github.com/akavel/dali/blob/master/LICENSE) 😤👎👎👎
That's a typical reaction of someone coming from Python and thinking that
`proc` has the exact same usage as `def`. In Nim there's also `func`,
`iterator`, and `method`.
Maybe I'd recommend adding more proc-alternative keywords to make definitions
less verbose, like...
Now: `proc uname*(a1: va
Back on topic, [the big news in
Dland](https://www.phoronix.com/scan.php?page=news_item&px=GCC-9.1-Compiler-Released)
is:
"The D programming language front-end has finally been mainlined in GCC! There
is now D support beginning with GCC 9."
I wonder if that will affect D's popularity...
> It's may be a strange question, but what do you think about PureBasic ?
I don't think about PureBasic, because it's proprietary. I don't hate
proprietary software - I'm sure plenty of people find it useful - but I have no
use for it personally.
It seems like PureBasic had a _raison d 'être_ a
> Did you read the comments at the links you list? People are saying that
> Common LISP was doing both at the same time in the 80s.
That's why the thread title is in quotes - this is something we can discuss and
qualify.
Maybe the exact language of the claim needs to be altered, but I'd like to
There are many examples of VM and scripting languages that can do hot code
reloading, including Great-Great-Great-Grandpa Lisp. And there are Lisp /
Scheme implementations that can create native binaries. The questions is, can
they do both at the same time?
Yeah, that "Array Dimensions" table's First/Last columns are inconsistent
between different languages. Some show how to get index, some value, some both.
I just presented two things separated by ``. Also most say `0` meaning
`name[0]`, which is confusing, but I didn't want to edit the other lang
[https://youtube.com/watch?v=7WgCt0Wooeo](https://youtube.com/watch?v=7WgCt0Wooeo)
[https://slides.com/onqtam/nim_hot_code_reloading](https://slides.com/onqtam/nim_hot_code_reloading)
[https://news.ycombinator.com/item?id=19738572](https://news.ycombinator.com/item?id=19738572)
[https://lobste.r
The proposed purpose of this thread is to coordinate efforts to improve
Nim-related articles on Wikipedia, and to add appropriate mentions of Nim in
articles about general programming topics.
I just added Nim to the "[Comparison of programming languages
(array)](https://en.wikipedia.org/wiki/Co
Anyone familiar with Python (the most commonly taught introductory programming
language, and, most importantly,
[esr-approved](http://catb.org/~esr/faqs/hacker-howto.html)) should be used to
to [negative
indices](http://wordaligned.org/articles/negative-sequence-indices-in-python).
(Nim has go
> why "Projects like Nim and D can never be failures"?
I've explained that point. At very least they brought value to the thousands of
programmers that used them, but that's just one aspect of their achievement.
D (since 2001) and Nim popularized the idea that a language can come close to
the e
Projects like Nim and D can never be failures. They've introduced or spread
many new ideas. Many of those ideas have already crosspolinated to other
languages. If some ideas don't spread, they were still a worthwhile experiment.
There's a recently-concluded series of four articles collectively titled "
**The Philosophies Of Software Languages** " :
* Foundations, 1940 to 1972, [From Plankalkül to
C](https://www.welcometothejungle.co/fr/articles/philosophies-software-languages)
(includes Fortran, Cobol, Algol, Simula,
Godot is probably the best 100% free game engine overall. It has 2D support
[(now with
"pseudo-3d")](https://godotengine.org/article/godot-32-will-get-pseudo-3d-support-2d-engine).
There are [Nim bindings](https://github.com/pragmagic/godot-nim).
> Because I'm looking for a cross-platform[Windows +Linux, etc], fast,
> relatively easy language that compiles to C or C++, and which can interop or
> imbed with code +libs from C or C++.
I'm curious to see some evidence that FreeBASIC is "fast".
(Although transpiled languages do have the adva
I think encouraging the use of `nimpretty` and extending its features could
subdue a lot of criticism currently directed at Nim. It can even have options
for consistency in things like:
* Identifier casing / underscore style.
* Forcing explicit module prefixes (probably the biggest issue for
LOL, minutes ago I happened to mention Vlang [on another thread of this
forum](https://forum.nim-lang.org/t/1996) (before seeing this thread):
> [...] [Vlang.io](https://vlang.io). It's not even released yet (except online
> playground), but I do like the promised features and syntax, as a refug
Is this a thread for mentioning obscure languages we're playing around with?
If so, I'd like to mention [Vlang.io](https://vlang.io). It's not even released
yet (except online playground), but I do like the promised features and syntax,
as a refuge from the growing complexity of Nim. I'd call it
> Sure, IDEs can go a long way toward helping with this problem, but if I'm
> reading code on GitHub I often have no idea where a proc is coming from. This
> makes it extremely difficult to trace how the code functions without cloning
> it locally to open in VSCode.
Well, that's a trade-off, an
> What is it specifically about Nim that you find hard to read, compared to
> which mainstream languages?
Nim should not be compared with "mainstream languages". Looking at the [top of
the TIOBE Index](https://archive.fo/aISH1) \- the first 17 are either VM,
scripting, or unsafe systems languag
IMHO, the Nim development and code reading experience would benefit greatly
from advanced IDE features, which as of yet don't exist. (VScode is the best
supported editor at present.)
Nim doesn't force you to explicitly repeat the module prefix where something
comes from - if the compiler can fi
Flutter is just Android & iPhone, right?
I'd rather see advancement of [nimX](https://github.com/yglukhov/nimx) to make
truly portable GUIs, including OpenBSD desktop,
[Librem5](https://puri.sm/products/librem-5/) phone, etc.
> How can nim generate AngelScript code?
If someone forks the Nim compiler and adds that backend. (Or pays someone else
to do it.) Nim's core devs need to focus on much more important things.
Given that [AngelScript](https://en.wikipedia.org/wiki/AngelScript) is a very
obscure target (compared
I wanted to play around with Nim GMP for [a much simpler
experiment](https://pastebin.com/raw/yDtNktYz): seeing how long it would take
to find a `clong.rand` array that
[SO3C](https://en.wikipedia.org/wiki/Sums_of_three_cubes) to <2 billion, which
is billions of times easier than hitting a spec
To state the obvious... This isn't Nim related, but serious computation
challenges typically require:
* Looking for the most efficient search algorithm. This is for math PhDs,
which I definitely am not.
* The ideal algorithm would also be easy to
[map](https://en.wikipedia.org/wiki/MapReduc
So a revised "Things I Recommend" list:
* Checking that Nimble metadata matches the package.
* Have `nimble init` suggest "Apache || MIT" as an option above plain
"Apache". ("License nagging" in favor of this is becoming very common in the
Rust community, which would totally destroy Nim's ch
> Please. You haven't contributed a single library to Nim's ecosystem,
Yes, I'm a very easy target for ad hominem attacks. My interest in Nim hasn't
moved beyond theoretical in 7 years. Guilty as charged. But does that
invalidate all of my points?
Maybe tomorrow you'll change your license to "N
Please understand my priorities:
* Dealing with the aforementioned threat of "even more restrictive than
copyleft" licenses is the most pressing concern, and it's an issue that I hope
most people can agree on. Nim module licenses are not the place to punish
people you don't like.
* The copy
Did you know that using Nim's import keyword supposedly constitutes entering
into a contract? Are you aware of all the legalese imposed on you by the
modules you use (as well as their dependencies, and their dependencies'
dependencies, etc)? Here are a few examples:
* The [libravatar](https:/
This would be a good question category for next year's [Community
Survey](https://nim-lang.org/blog/2018/10/27/community-survey-results-2018.html):
* In which
[major](https://en.wikipedia.org/wiki/Globalization_and_World_Cities_Research_Network#2018_city_classification)
world city are you mos
* Nim is in top 50 for [GitHub
"star"](https://madnight.github.io/githut/#/stars/2018/4) and "issue" events.
* Nimble (Nim's module registry) ecosystem is [among the fastest growing
percentage-wise](https://www.reddit.com/r/nim/comments/9rf1ob/happy_800_modules_nimbles_ytd_growth_beats_d_c/).
I know it's not the main point of this article, but use of recursion kinda
dulls the excitement of " ** _Speeding Up_** Python with Nim". Why not show the
fastest fib version, with a loop?
This runs many orders of magnitude faster. It also works for n>92 (int64
overflow). Pre-filling an initial
I'd recommend a video showing off all the features of the best IDE experience
Nim has to offer (which, last time I checked, was [Visual Studio
Code]([https://github.com/pragmagic/vscode-nim))](https://github.com/pragmagic/vscode-nim\)\)).
A lot of people probably tried Nim with another editor /
I'm all for Nim support in Geany, but focusing on [the most popular
IDEs](http://pypl.github.io/IDE.html) first would be most beneficial... Support
in IntelliJ and Visual Studio (Proprietary, not Code) is lacking...
>From Araq's blog — [Nim and Perl](https://nim-lang.org/araq/perlish.html) —
> Last month I tried to reimplement Perl in Nim and to see how well Nim's macro
> system holds up for unusual domain specific language requests. **Personally I
> do not like Perl at all** , but for a language designer i
Maybe you'll convert someone from
[Ada](https://fosdem.org/2019/schedule/track/ada/) or
[Rust](https://fosdem.org/2019/schedule/track/rust/) devrooms with Nim's
superior syntax; or from the
[Python](https://fosdem.org/2019/schedule/track/python/) devroom with superior
scalability and efficienc
> Is it possible to compile the Nim compiler to Javascript?
Given enough foolishness, [all things are possible](https://www.xkcd.com/505/).
But it would probably be _unbearably slow_. And definitely very inefficient.
Heck, one can even run [Qemu in the
browser](https://github.com/atrosinenko/qe
This is awesome! Thank you very much! ☺
I hope this gets as many views as possible. To promote this, I would highly
recommend a more detailed blog post [(like this older
one)](https://yglukhov.github.io/Making-ReelValley-Overview/) or an updated
Web-site ([OnsetGame.com](http://onsetgame.com/)
Latest example legal PITA from the Big Dot Com languages:
[Apple is indeed patenting Swift
features](https://news.ycombinator.com/item?id=18997302)
> Nim is widely regarded as having too many features (which is quite unfair),
> so I don't think more syntax sugar is gonna cut it.
I thought the
Sorry, I've made a typo / mixup in my previous post.
It originally said: "Python users are used to just saying `b = 2` for _let_ ".
I obviously meant: "Python users are used to just saying `b = 2` for _var_ ".
There is no _var_ keyword that you have to use when first create a variable. My
"impl
> It might look useful for simple cases
Which is what people do the majority of the time, especially when getting
acquainted with a new language. Simple things should be simple and clean.
> but what happens when you want to import an operator? Or if you want to
> import a hash procedure that th
> But when you want to make Nim very similar to Python, as Crystal did it with
> Ruby some years ago, then traditional OOP is the largest obstacle. Some
> syntax differences really do not matter. But most Python code uses OOP style,
> which is not recommended by most Nim devs. So Python people w
Please remember the context.
This is a "Nim Advocacy & Promotion Strategies" thread that I've started 4
years ago. Other people are free to write their own strategy outline proposals,
and of course these are just friendly suggestions that anyone of consequence
can easily just ignore.
The quest
> Nim already has a very Python-like syntax. What is it that you suggest doing
> differently?
There have been lots of proposals to push Nim's syntax closer to Python, at
least for the simplest things, just [like Crystal have been very
successful](https://forum.nim-lang.org/t/1246) by targeting
We don't _need to_ , but there's plenty of material.
That's what [v/](https://voat.co/v/programmerhumor) r/ProgrammerHumor is for. 😇
> @Libman 's proposal is extravagant but appealing.
My [proposal](https://forum.nim-lang.org/t/4523#28308) consists of multiple
small points: some are easy for one person to start, while others are more of a
long-term vision.
The basic idea is to use a wiki to provide additional "
Have you ever wondered why Google (a for-profit mega-corp that makes money by
manipulating people, and was pretty much a member of the government during the
prior US administration) is giving things away for "free"?
1 - 100 of 284 matches
Mail list logo