Python has had considerable growth over the past few years, and it was just
named the **TIOBE Programming Language Of The Year** again for 2018. I wonder
if that makes my above point of "Appeal to Python Fans" worthy of a second look.
My points about appealing to freedom zealots ("license
I recommend the following:
* Creating a simple wiki server in Nim (possibly backed by
[Fossil](https://en.wikipedia.org/wiki/Fossil_%28software%29)), in similar
style and UX as this forum (but Markdown support would be great).
* Moving all content from [the GitHub
Nim + Intel's proprietary C/C++ compiler == easy benchmark wins over languages
married to LLVM.
Nim is a wholly-owned subsidiary of Microsoft, a corporation very much in bed
with the US government. To contribute to Nim, one must create a GitHub account,
thereby automagically agreeing to
[15](https://help.github.com/articles/github-terms-of-service/) \+
> I'm afraid that "being the most libertarian programming language: no
> restrictive licenses / patents" also has quite little influence; for most
> "it's free" (beer & freedom) is good enough.
We are talking about small niches. Using
[TIOBE](https://www.tiobe.com/tiobe-index/) as a rough
Everyone's been whining for markdown support from day one (especially me). But
that's no excuse to not click that "[Styling with RST is
supported](https://forum.nim-lang.org/about/rst)" link and RTFM. And use
"Preview".
You can edit your comments. Place ```nim on the line before your code
Can you link to specific ones that aren't duplicates of the ones on YouTube?
I'm glad that a solution was found for this specific `macros` case, but it's
indeed disappointing that all Nim JSON libraries fail if used in static /
compile time context...
The `jsmn` module was somewhat promising, but failed for another reason - your
mileage may vary.
In case anyone finds
> Hello **the Nims** ^^
BTW, did the Nim community ever decide on whether we are Nimers, Nimrods,
Nimists, Nimsters, Nimblers, Nimians, Nimberts, or even Nimbertarians? Should
we have a vote? ☺
(I used to be one of the original "Pythoneers" \- long before it was cool, and
long before the
> Do you think that Nim will have a future ?
Definitely. It is open source and liked by thousands of programmers (most of
whom are waiting for it to stabilize and mature). No matter what happens, there
will be some people interested in developing Nim.
As I recently posted, [Nim's package
I have two Nim video playlists on YouTube:
* * *
# * [English-language
playlist](https://www.youtube.com/playlist?list=PLXIivpcMlfwAevvA4IvLIiYOujqSuyyKY)
(40 videos)
It grew slowly over the past [3
years](https://www.youtube.com/watch?v=OgutkaymJ-E=PLXIivpcMlfwAevvA4IvLIiYOujqSuyyKY=40)
I was hoping for a more adult analysis of [Alexandrescu's introspection
talks](https://www.youtube.com/results?search_query=Alexandrescu+Introspection)
and Nim vs D...
> FWIW I had a look at D multiple times and learned to fervently dislike it. My
> personal summary is that D is but yet
I can't find anything like this in stdlib.
Maybe you're remembering something like `ospaths.DirSep` or Python's
[os.linesep](https://docs.python.org/3/library/os.html#os.linesep)?
System
[readline](https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L3135)
works with either line
There's a [progress](https://github.com/euantorano/progress.nim) module in
nimble:
`nimble install progress`
Here's a (very crude) example of using it with spawn:
# https://github.com/euantorano/progress.nim
import os, strutils, progress, threadpool
const
" **I believe we are the language with the best static introspection in the
world** " — [AA](https://en.wikipedia.org/wiki/Andrei_Alexandrescu) @ [Dconf
2018 in Munich](http://dconf.org/2018/index.html), three minutes into "[Ask Us
I am confused by lots of things, including that the same constants like
AF_INET6 are present with different values in `lib/nativesockets.nim` vs
`lib/posix/posix_linux_amd64_consts.nim`.
The edited above code now uses posix's AF_INET6 value (10.cint) cast to
nativesockets Domain enum for
I'm a n00b, and I've spent some time trying to research this without finding a
good answer. I'm posting my notes in case they are helpful for someone...
In C one would use
[getaddrinfo](https://archive.fo/eFztO#selection-589.810-589.883). This is much
easier in Python, which has a high-level
> The Nim Forum software is a solid example of a fully functional app in Karax.
I wouldn't call it "a solid example of a fully functional app" until threads
can be archived (ex.
[archive.org](https://web.archive.org/web/20181201000107/https://forum.nim-lang.org/t/4407),
It's probably specific to your code, so a code paste would be helpful.
This thread could use some pointless grumpy whining. (Or at least that's all I
can contribute right now.)
I'm wondering about the future of `nim js`.
Nim has invested considerable effort into the JS backend - time that could have
been invested into delivering a more competitive "product" with
Having a conversation in two places at once is annoying, and I think this forum
is much more valuable than Reddit, so I'll reply here:
> Oh. Awesome! Thank you. I have been traveling with the family for the
> holidays so haven’t been checking. I’ll test it as soon as I can. Knew I
> should
**(1)** I think both nimedit and aporia were small experimental projects that
didn't get very far and that no one really uses. [More than
half](https://nim-lang.org/blog/2018/10/27/community-survey-results-2018.html)
of Nim devs use [vscode](https://code.visualstudio.com), which has by far the
I couldn't reproduce the problem, neither on nim v0.19.0 release nor today's
#devel, running under Ubuntu 18-10.
For my test I created two basic download loop daemons:
**dlHttpClient.nim** using Nim stdlib as above -
import os, times, httpClient
var client =
Seems like there was a misunderstanding here.
Note that there are different iterations of the tests, and we are talking about
the ones published as " **round 17** ".
Also note that there are 12 result tab combinations: 6 tests times 2 test
environments. **Nim participated in four of the twelve
> [...] with v1.0 closer than ever before [...]
That's a very complex theological claim. I for one will only believe in v1.0 if
I see it, before I die.
> it may be time to have an official vote
That's a very complex political claim. Is Nim a democracy now? Are votes to be
somehow weighed by
A quick `jq '.[][]["memory usage"]["used"]'` through all stats.txt.json files
in
[latest](https://tfb-status.techempower.com/results/14a815b6-93c1-4207-96bb-3960c29719e2)
[results](https://tfb-status.techempower.com/results/bd2d23c9-3d8c-4b6c-b7a2-cb900ed27e95)
dumped to [a
I'd just like to second this endeavor.
I've always wanted to tinker with getting
[djgpp](http://www.delorie.com/djgpp/zip-picker.html) (or one of the
abandonware compilers) in dosbox to work with Nim-generated C89 code, but never
found the time / energy.
DOS support is the ultimate
Maybe you want something like:
import os, osproc, posix, strutils
proc userEditString(content = "", editor = "vim"): string =
let tmpPath = getTempDir() / "userEditString"
let tmpFile = tmpPath / $getpid()
createDir tmpPath
writeFile tmpFile, content
Some people claim that TechEmpower is a Java shop and so their benchmarks are
biased. I think those benchmarks are still very useful, but there's one very
important factor that gives JVM languages an edge: the great abundance of RAM.
The "Cloud" benchmarks are run on an [Azure
Round 17...
* [JSON serialization,
cloud](https://www.techempower.com/benchmarks/#section=data-r17=cl=json)
(Azure D3v2): Nim's [httpbeast](https://github.com/dom96/httpbeast) is **THE
WINNER, #1 among the 328 web frameworks tested!** Also present is
[mofuw](https://github.com/2vg/mofuw) at
Markdown and
[HastyScribe]([https://h3rald.com/articles/hastyscribe/](https://h3rald.com/articles/hastyscribe/))
FTW!
Nim isn't something you just quit.
A part of Nim stays in you, always.
Every missing semicolon that D smacks you for, every undefined WTFism in C++,
every second you wait for your 40mb Golang binary to upload, every time you
realize that half of your screen is taken up by repetitive
Reverse proxies like Varnish or Nginx can be used to bundle different Web
services (multiple HTTP APIs, static files, etc) together under one domain, and
offer additional benefits like caching, load balancing, and DoS protection.
But it is entirely possible to run a server like Jester by itself
I still like [my old proposal](https://forum.nim-lang.org/t/3061) for the use
keyword (instead of from ... import nil). Then import means "import into
namespace"; use means "use with a prefix".
Both can be used with the from, except, and as keywords:
from mymodule import myproc #
Here's a very **very** stupid nimdir.sh script that I find useful:
#!/bin/sh
libPath=~/.choosenim/toolchains/nim-0.18.0/lib
# libPath=$(choosenim --noColor show | grep ' Path: ' | awk '{print
$2}')/lib
nimFile=$(find $libPath -iname $1.nim | sed 1q)
[ -f
I once played around with the idea of setting up qemu instances of many
platforms * many OSes for building binaries, automating as much as possible
with qemu's telnet monitor console / ssh in the OS install. Full system
virtualization is not as good as doing it on bare metal, but better than
Some public libraries take recommendations for what books to purchase, and do
free inter-library book shipping on request. Doesn't hurt to ask them.
I really like dom96 and I would encourage everyone to financially support his
book.
That said:
[https://thePirateBay.org/torrent/22104456/Nim_in_Action](https://thePirateBay.org/torrent/22104456/Nim_in_Action)
Sorry. I didn't leak it. I just happen to notice its there.
**Excellent news!**
(Does everyone still think I'm crazy for [pushing Nim on the license freedom
front](https://archive.fo/E77TN#selection-989.0-1009.452)?)
[httpBEAST](https://github.com/dom96/httpbeast), _yaay!_
Think of this forum as a minimalist server API (with a little bit of HTML
parsing).
Write your own client libraries, tools, JSON / FUSE / SQL interfaces, vim /
emacs / WordPerfect integrations, and bots.
The biggest thing that would reduce compile time is putting the compiler on a
(quantum?) supercomputer in the cloud...
Random thought: IPFS
A [new Web Frameworks
benchmark](https://github.com/tbrand/which_is_the_fastest) includes Jester...
Nim is ranked 12th out of 12.
Now Python and even Ruby have frameworks that score better...
> To really appeal to Python programmers, Nim would have to support dynamic
> compilation and a REPL.
Not necessarily. Being a Python programmer doesn't mean you can't do anything
other than Python. It means that you're used to _The Python Way_ of doing
things, and don 't want to deviate from
[https://insights.stackoverflow.com/survey/2018](https://insights.stackoverflow.com/survey/2018)
^ I'd like to propose this as a discussion topic.
Some brief thoughts:
* **Python 's popularity is growing** (and all other measures seem to
confirm).
* I still think it would benefit Nim to
[Related thread.](https://forum.nim-lang.org/t/3534)
I hope the Nim ecosystem comes up with it's own alternatives - eventually even
to GitHub, Linux, and the browser stack.
A long long time ago we had this crazy thing called shell scripts. We used them
to set environmental variables, build complicated command lines, etc...
> I was able to read on the web efficient garbage collector offers you, it's
> fine but is it possible to use it without... in the manner of Rust for
> example ?
Nim is GC by default - which is the way to go for the vast majority of cases,
and most people who think they need manual memory
I wouldn't say that "corporations suck" \- they are a means to an end. They
need to make things work in a cost-effective and dependable way, without making
themselves dependent on genius. Average-IQ programmers are the base, the bread
and butter of the industry, and so they are the standard.
Thanks for pointing that out. So we don't know what the extent of the 's' bug
was, but the Playground is now at 0.18.0 and it's gone.
This forum is Araq's property, so this conversation here is over. Please don't
reply, as this thread getting bumped would increase its annoyance.
I apologise that I've gotten drawn into a debate where it isn't appropriate.
I'm confident that I've made a correct, complete, and thorough argument
Dear StasB,
First and foremost, please note that **I am criticizing your argument** against
my position on NAP and "copyfree"dom advocacy, **not you personally**.
Also please keep in mind that this isn't a fully off-topic discussion for this
forum, because Nim's ecosystem ranks #1 in
BTW, did this thread get started by someone who got censored or self-deleted?
Much confusion (even before I made it worse). There are much less bad ways for
the forum software to handle that...
Either way, snapshotting is always a good idea -
First of all, even in a hypothetical discussion, there's not one "AnCap-istan"
but a free market of a zillion jurisdictions competing for subscribers, trade,
patronage, etc. Some would have different explicit contractual agreements than
others, including on the construct of copyrights, software
I am not on a crusade to take away anyone's left-wing utopia, only to preserve
my right to not be a part of it.
Some individuals and organizations (ex. Richard Stallman, FSF, and most
recently GitHub) have crossed a line in polluting the free software ecosystem
with calls for government force.
I'm still screaming bloody murder about GitHub (to which most people here are
addicted worse than heroin) injecting communist blind-faith-in-government
anti-Internet-freedom propaganda in everyone's code.
To retaliate, I'll have my libraries randomly inject chapters from Ayn Rand /
Milton
Leading version zeros smell of weakness. And real code warriors do regular
release engineering, like OpenBSD.
I'd move the damn decimal point and call it version 18.xx. Release 19.xx next
year.
> Does standard library is stable for usage in the enterprise?
No.
The "enterprise" had reluctantly transitioned from their legacy systems only
because COBOL programmers were dying of old age. IBM / SAP / Oracle / etc were
pushing Java, and Microsoft was pushing BASIC and C# (especially in
That unexplained trailing 's' character doesn't appear for me locally
(v0.17.2), but only on [Nim Playground](https://play.nim-lang.org/) (which is
also used by this forum's "Run" button).
System [add](https://nim-lang.org/docs/system.html#add,string,string)...
proc add*(x: var
I would like to start a discussion about the virtues of
[dogfooding](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) within the
Nim community.
This comes in response to [a comment on
reddit](https://www.reddit.com/r/nim/comments/7smw81/nim_future/dt7xmab/):
> "For god's sake use
> This thread scares me as a new Nim user
This brainstorming session is long expired.
* * *
Summarizing Araq's verdict with quotes from above:
{
* "Skins were part of my original Nim 'vision'."
* "I now think syntax skins should be an editor feature, not a compiler
feature, so relax."
@Ar:
> I think a significant portion of nim users found Nim through Rust. Not sure
> why, but there used to be some sort of competition between the two (or at
> least Nim was more known in the Rust community).
That, if true, is very interesting. I would've thought that Nim's closest
Our caveman ancestors had this silly belief that a tool should "do one thing
and do it well"...
But then came Nim!
_Nim does everything!_
It slices, it dices, it generates code that generates code that generates
code...
Write a kernel in Nim. Write your Web client-side in Nim. Earlier today
Yeah, I can't seem to resist responding to a mention of Rust's "SJW cancer"
with a pent-up rant about politics in free software ecosystems... (The GitHub
situation has been particularly traumatic...)
I agree about Nim's technical merits. There's something about the "just works"
qualification
That is entirely up to Araq.
Everyone (including myself) has been hyping up the idea of [The Great Epic
Version One Point Oh
Release](https://en.wikipedia.org/wiki/Software_versioning#Version_1.0_as_a_milestone),
as if that really requires some rigid standard of achievement. I am starting
to
The original post contains two interesting points that may or may not be
connected. The first point, emphasized by the title, is that it (Nim) "all
'just works'". The second point, mentioned in passing, talks about
dissatisfaction with the political culture in competing projects encouraging
I'd just like to say that **this project is very good news**, for both Nim and
Ethereum.
* * *
I've been critical of [cpp-ethereum](https://github.com/ethereum/cpp-ethereum)
being GPLv3, which means not everybody can use it (for either practical or
philosophical reasons). As always, I
(I'm that annoying voice that pops up here every once in a while for a quick
anarcho-individualist tinfoil rant against governments, corporations,
copyright, [clouds](http://knowyourmeme.com/memes/old-man-yells-at-cloud), etc.)
I think that GitHub is getting way too powerful, and there's no
I think the most valuable effort is that which is effective at attracting more
people to Nim, which is a force multiplier for less inspirational tasks.
Everyone knows that things like IRC and other library improvements can be done
given someone's time and effort. But many people are judging
> Is it possible to get an compile-time error in the last line?
If that line is executed at compile-time, like in a static block:
import tables
const myTable = {
1: 14.cint,
2: 23.cint,
3: 4.cint
}.toTable()
static:
echo myTable[33]
I never had this problem, but I've heard of NASA software projects that were
commanded to use an [arbitrary precision
library](https://en.wikipedia.org/wiki/List_of_arbitrary-precision_arithmetic_software)
for absolutely positively everything numeric. I think they had an auditing
tool that
Probably not the prettiest way to do this, but here's a thought:
import times, strutils
let
startEpochTime = epochTime()
startEpochSec = ($startEpochTime).split(".")[^1]
startTimeInfo = getLocalTime(fromSeconds(startEpochTime))
startTimeStr =
apers, or is it a means to an end?
In [a Quora
answer](https://www.quora.com/What-do-you-say-about-Nim-programmning-language/answer/Alex-Libman-2)
I summed up what I see as Nim's top strengths: performance to productivity
ratio, safety to syntax cleanliness ratio, license simplicity (very
Pardon my satiric pessimism. Nim is my #1 favorite programming language, and I
very much hope that it succeeds. But, in answer to this thread's question about
the past 9 months, I think there's very little to celebrate. Growth exists, but
it's far slower than it should be. People are
> I've been away from Nim for about 9 months. Can anyone give me a quick update
> ...
We keep [accelerating toward
C](https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why),
but v1.0 [remains
As far as I know, the most advanced Nim development environment so far is
[VSCode](https://en.wikipedia.org/wiki/Visual_Studio_Code) \+
[this](https://github.com/pragmagic/vscode-nim)
[extension](https://marketplace.visualstudio.com/items?itemName=kosz78.nim).
Someone please correct me if I'm
With a sufficiently ugly hack, all things are possible...
import strutils
static:
proc getNimCompilerCmdLine(): string =
return staticRead("/proc/self/cmdline").replace('\0', ' ')
const nimCompilerCmdLine = getNimCompilerCmdLine()
I agree with @Jehan on most points, which really complement rather than
contradict what I've said.
Yes, there's no such thing as a perfect benchmark, a perfect survey / opinion
poll, etc. But that doesn't take away from the fact that these things are still
useful, and that the TIOBE index is a
[Crystal](https://en.wikipedia.org/wiki/Crystal_%28programming_language%29) has
gotten a highly distinguished mention in [this month's update
summary](https://archive.is/ZkkgZ#selection-691.431-691.520) of the prestigious
[TIOBE prog lang popularity index](https://www.tiobe.com/tiobe-index/):
I just came across ** [Min](https://min-lang.org) **
[[GH]](https://github.com/h3rald/min), a
[concatenative](https://en.wikipedia.org/wiki/Concatenative_programming_language#Implementations)
scripting language written in Nim by [Fabio](https://github.com/h3rald).
* * *
EMPHASIS ON MAIN LINK:
That would be consistent and logical. But (IMHO) pragmas are ugly...
(My previous post was posted before mapi's post became visible due to new
account moderation.)
> Only I used `require` for its name.
The three related keywords (`import`, `include`, and this proposed new one)
should be easy to remember which is which.
* `include` reminds people of C
Looks like my `load` macro example has become `require` [on
Reddit](https://www.reddit.com/r/nim/comments/6p0q72/help_with_a_macro/) (which
I am now boycotting, along with the rest of social media, due to the
_still_-unexplained [shadow censorship
> if the condition is never met importing xyz is wasteful
Yeah, unused imports still increase binary size despite deadCodeElim
(`--d:release` `--opt:size`). In a perfect world that would not be the case...
* * *
> you can use `from math import nil`
Yup. But I
Semi-related to this discussion:
I just added Nim to the "Languages" section of Wikipedia's [[[Comparison of
regular expression
engines]]](https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines).
Someone more knowledgeable may wish to review and complete the "Language
The top-rated answer to [this SO
question](https://stackoverflow.com/questions/442026/function-overloading-by-return-type)
is a very interesting read. Some teaser quotes:
> Overloading by return type is possible and is done by some modern languages.
>
> Two of the languages I regularly (ab)use
[C++, Java](http://www.geeksforgeeks.org/g-fact-75/), Dlang,
[C#](https://stackoverflow.com/questions/20705643/method-overloading-with-different-return-type)
etc don't allow this either... But IMSHO (in my humble stupid option) it would
still be a good idea.
I thought Nim's philosophy was to
I never understood why Nim doesn't allow this.
If you want to keep the same name and use overloading, one option is to use a
_var_ argument instead of return. This works:
proc myBirthday(n: var int) =
n = 372297600
proc myBirthday(s: var string) =
s = "October
I'm sorry that I cannot contribute to this effort directly.
I'm glad that some efforts are being made...
(BTW, there's now a [TechEmpower round 15
preview](https://www.techempower.com/benchmarks/previews/round15/).)
[Some people
say](https://en.wikipedia.org/wiki/Source_\(journalism\)#Anonymous_sources) it
stands for:
New [Indented](https://en.wikipedia.org/wiki/Off-side_rule)
[Modula-3](https://en.wikipedia.org/wiki/Modula-3).
> Libman, I hope you will come back to the thread and correct false critics?
> Dom already does it very well, but I guess he has to do more important stuff.
Yeah, I didn't return there fast enough, and dom96 has already made all the
important points. But I did add my own rant or two
Bump for [Round 14](https://www.techempower.com/benchmarks/#section=data-r14),
just in case it gives anyone some ideas...
Nim web frameworks are still MIA...
Random thought: [h2o](https://h2o.examp1e.net/)
[[src]](https://github.com/h2o/h2o) seems to be an emerging C web server /
framework
I like having a little compiler wrapper to execute nim just the way I like it.
I wrote one for my needs called
[nimr](https://github.com/lbmn/nim/blob/master/old/cmd/nimr.nim)
[[pb]](https://pastebin.com/isfr0xRX), but I think most programmers will want
to write their own rather than deal with
> When was Nimrod renamed to Nim?
Officially as of [version
0.10.2](https://nim-lang.org/blog/2014/12/29/version-0102-released.html):
**2014-12-29**.
// Or [a day later in
Russia](https://en.wikipedia.org/wiki/Victory_in_Europe_Day#Soviet_Victory_Day).
>
If you read [the actual
article](https://compileandrun.com/stuggles-with-rust.html), look at its
horrifying Rust code trying for a ConfigParser substitute, and see the author's
[conclusion](https://archive.is/ElUzm#selection-2299.0-2299.75) to stick with
Python - **"Use Nim" is EXACTLY the
HackerNews (and Slashdot) are dominated by intolerant trigger-happy nazi scum.
That doesn't mean one should stop trying to inject an unorthodox opinion there
once in a while, but don't get your hopes up...
Nim has an added trick up its sleeve when going toe to toe with the Rustkies:
benchmark Nim using all available backend compilers (ex. Intel's icc) and go
with the fastest.
Araq is always right... **_Except_** when he tells you to throw away
[TAoUP](https://en.wikipedia.org/wiki/The_Art_of_Unix_Programming). (Or makes
me use RST, which doesn't let me italicize a link.)
There's the [minimalist
school](https://en.wikipedia.org/wiki/Minimalism_\(computing\)) of
You are of course free to release your software under any license you want, and
I really don't want to hijack this thread, but your summation of the Apache
License is not accurate.
Your summation ("it is as free as you can get, with the only requirement that
if you actually do modifications to
101 - 200 of 269 matches
Mail list logo