Hello, I would like to bring attention to the fact that the Nim godbolt online
compiler does not seem to work with command line arguments. Before opening an
issue, I would like to ask the community if I am doing it the wrong way so here
is the link:
[https://godbolt.org/z/u_z_GM](https://godbol
Hello, I would like to bring attention to the fact that the Nim godbolt online
compiler does not seem to work with compiler arguments. Before opening an
issue, I would like to ask the community if I am doing it the wrong way so here
is the link:
[https://godbolt.org/z/u_z_GM](https://godbolt.or
> For a time library, the lowest building block should be the timestamp of a
> single float64, not a complex calendar object. You should store timestamps
> and transfer timestamps.
Yup. In units of seconds since 1/1/1970, right? Although I've sometimes worried
how soon the precision will degrad
> Bummer, I still like them better than json. :-)
> I wrote one, called Fleece
> <[https://github.com/couchbaselabs/fleece>](https://github.com/couchbaselabs/fleece>).
> It's used in the Couchbase Lite database, because it's faster than JSON.
> There's now [a Nim binding of
> it](https://githu
> I did not want to use json. I wanted to use binary formats .. compressed
> binary formats.
Bummer, I still like them better than json. :-)
My first serious project was Chrono a Timestamps, Calendars, and Timezones
library for Nim.
[https://github.com/treeform/chrono](https://github.com/treeform/chrono)
I have become much better at Nim than when I first wrote it. I recently went
over the project and wanted to share things that I ha
glob anyways imports the regex module (
[https://github.com/nitely/nim-regex](https://github.com/nitely/nim-regex) ).
So you might as well just use that instead of importing nre.
nre will introduce a dependency on PCRE on your app, while the nim-regex module
won't.
one option is to write nre.Regex or nfatype.Regex
Let's imagine a code starting like this.
import os, times, glob, strutils
from nre import replace, Regex
proc decipher(file: string): string =
let pathsplit = splitPath(file)
let tail = pathsplit.tail.replace(Regex("^[\!\+\-]+\s"), "")
let head = p
Hi
I like that description of Nim too as a snappy description / bullet.
While I have no problem what the word _idiomatic_ myself, perhaps plainer
language would be better too, for younger people, and perhaps non native
English speakers to understand more easily?
At the end of the day it is abo
Having written a fair amount of Assembly, it's kind of hard to optimize. Most
optimizations are done with taking a different approach to solve your problem
and not some cleaver SIMD instruction, in fact a random single SIMD can really
slow down your code...
I think this is what Nim does really
Nice! Good job. We need Nim in more places.
CodeRunner <[https://coderunnerapp.com](https://coderunnerapp.com)> is a really
useful utility app for Mac, a GUI scratchpad editor for writing and running
code in dozens of languages, from Python and Bash to C/C++. It's not free or
open-source, but IMHO it's well worth the $15. I use it a lot.
@mratsim Thank you for your detailed and informative response, also I didn't
know about the do statement in Nim that's something else new for me. My main
takeaway is that I don't always have to use runtime resolution, especially
because the kind of code I write is mostly statistics/machine learn
Once Nim can intelligently add `restrict` to its generated C when it knows
pointers are not aliased, it should be able to beat C ... because no C/C++
programmer I know of ever uses `restrict`, it's too confusing 🤣
(I say "once" because I saw an issue in the Nim bug tracker calling this out as
w
You can use my quote, but I don't think "optimization walls" will be understood
by most people.
> write Nim code with performance close to other high performance languages as
> C or C++.
write Nim code with performance close to **Assembly**
Idiomatic Nim code is generally very fast, and with some knowledge you can
ALWAYS write Nim code with performance close to other high performance
languages as C or C++.
What about: Nim is fast by default?
After thinking more about it, I suppose the problem with understanding isn't
about hitting a wall, but the nature of the wall. ;-)
In this forum, there are frequently questions along the lines, "How can I make
this Nim code faster?", so you could say the post authors _did_ hit an
optimization w
I think "optimization wall" is not always understood without a bit of context.
More importantly, languages can have a very steep climb, instead of a wall,
that makes optimization possible but not worth the effort.
IMO Nim allows for progressive, smoother optimization.
[Ahem, if we exclude the p
As long as the audience is just watching a stream, I agree. Participants also
talking to each other, possibly in groups or with video, would be more
complicated.
Maybe we can target this for a future conference. :-)
The time is important I agree, but the platform shouldn't matter. It's unlikely
to be anything other than Twitch/YouTube, streaming to those services is always
just a case of using OBS and watching just needs a browser.
I know the expression, but even then I might not have been sure about the
meaning in this context.
What about putting the time and the "location"/technology for the conference in
the blog post? Or would you rather add these details in an upcoming post? The
end time might depend on how many talks we have.
The conference time (or at least timezone to get an idea) is rather important
because de
> Do you think that "optimization wall" is understood by most people?
"I tried to do X but I hit a wall" (meaning, an obstacle I couldn't get around
and wasn't sure it was even possible to get around) is an often used expression
in American English; I think it's understandable. see e.g.
[https:
> "Idiomatic Nim code is fast and Nim does not have "optimization walls." "
To me, the "... Nim ... and Nim ..." doesn't flow so well. What about
"Idiomatic Nim code is fast and there are no "optimization walls" if you want
to make it even faster."
(even if it's a bit longer)? But I guess this
Sure, how about:
"Idiomatic Nim code is fast and Nim does not have "optimization walls." "
Nim used files
Nyc article
Sorry for nitpicking ... ;-)
> > It's not that Nim is fast, it's that Nim does not have "optimization walls."
>
> Great quote! Can we put it on the website? It says in one sentence what I've
> always tried to express.
If I was completely new to Nim, this sounded to me like "Idiomatic Nim isn't
> the sentence may give a wrong impression.
Indeed. And again I have the perfect wording in my book :-)
"Nim is fast. Generally performance is very close to other high performance
languages as C or C++. There are some exceptions still — other languages may
have libraries or applications that ar
> It's not that Nim is fast, it's that Nim does not have "optimization walls."
Great quote! Can we put it on the website? It says in one sentence what I've
always tried to express.
I would like to hear something about game programming. (esp mobile, but game
programming in general is fine)
I've changed that sentence to reflect that C-like performance is always
attainable.
35 matches
Mail list logo