Nim godbolt does not work with command line arguments

2020-05-15 Thread adnan
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

Nim godbolt does not work with compiler arguments

2020-05-15 Thread adnan
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

Re: Revisiting my oldest Nim project.

2020-05-15 Thread snej
> 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

Re: Revisiting my oldest Nim project.

2020-05-15 Thread snej
> 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

Re: Revisiting my oldest Nim project.

2020-05-15 Thread Araq
> I did not want to use json. I wanted to use binary formats .. compressed > binary formats. Bummer, I still like them better than json. :-)

Revisiting my oldest Nim project.

2020-05-15 Thread treeform
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

Re: Conflict of nfatype.Regex and nre.Regex

2020-05-15 Thread kaushalmodi
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.

Re: Conflict of nfatype.Regex and nre.Regex

2020-05-15 Thread enthus1ast
one option is to write nre.Regex or nfatype.Regex

Conflict of nfatype.Regex and nre.Regex

2020-05-15 Thread svtz
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

Re: New blog, with some Nim articles

2020-05-15 Thread wiremoons
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

Re: New blog, with some Nim articles

2020-05-15 Thread treeform
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

Re: Nim support for CodeRunner app

2020-05-15 Thread treeform
Nice! Good job. We need Nim in more places.

Nim support for CodeRunner app

2020-05-15 Thread snej
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.

Re: How to instantiate `ptr object`

2020-05-15 Thread dataPulverizer
@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

Re: New blog, with some Nim articles

2020-05-15 Thread snej
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

Re: New blog, with some Nim articles

2020-05-15 Thread treeform
You can use my quote, but I don't think "optimization walls" will be understood by most people.

Re: New blog, with some Nim articles

2020-05-15 Thread mratsim
> write Nim code with performance close to other high performance languages as > C or C++. write Nim code with performance close to **Assembly**

Re: New blog, with some Nim articles

2020-05-15 Thread Stefan_Salewski
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++.

Re: New blog, with some Nim articles

2020-05-15 Thread jasonfi
What about: Nim is fast by default?

Re: New blog, with some Nim articles

2020-05-15 Thread sschwarzer
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

Re: New blog, with some Nim articles

2020-05-15 Thread federico3
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

Re: Idea: Nim Online Conference

2020-05-15 Thread sschwarzer
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. :-)

Re: Idea: Nim Online Conference

2020-05-15 Thread dom96
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.

Re: New blog, with some Nim articles

2020-05-15 Thread sschwarzer
I know the expression, but even then I might not have been sure about the meaning in this context.

Re: Idea: Nim Online Conference

2020-05-15 Thread sschwarzer
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

Re: New blog, with some Nim articles

2020-05-15 Thread cumulonimbus
> 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:

Re: New blog, with some Nim articles

2020-05-15 Thread sschwarzer
> "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

Re: New blog, with some Nim articles

2020-05-15 Thread Araq
Sure, how about: "Idiomatic Nim code is fast and Nim does not have "optimization walls." "

Re: How to parse html wild?

2020-05-15 Thread JohnCarter
Nim used files

Re: New blog, with some Nim articles

2020-05-15 Thread JohnCarter
Nyc article

Re: New blog, with some Nim articles

2020-05-15 Thread sschwarzer
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

Re: New blog, with some Nim articles

2020-05-15 Thread Stefan_Salewski
> 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

Re: New blog, with some Nim articles

2020-05-15 Thread Araq
> 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.

Re: Idea: Nim Online Conference

2020-05-15 Thread kragil
I would like to hear something about game programming. (esp mobile, but game programming in general is fine)

Re: New blog, with some Nim articles

2020-05-15 Thread jasonfi
I've changed that sentence to reflect that C-like performance is always attainable.