If it's for some "jobs" can be considered in production, I guess I used Nim for web scraping and saved the info I got to postgres. There is other too, like testing web api using unittest module, since I wasn't restricted to use any specific request to test it, so I used Nim.
Been telling it to my coworkers, but I guess it would be far more easier to convince them if Nim already reaches 1.0
I'm using Nim to handle ZIP Code validation and address correction. It's a fuzzy process of checking the postal address to ensure that the given ZIP Code is correct. Nim should match the ZIP Code against the postal data file and refers to the correct location and so on.
Given I'm not using any advanced trick/technique in my code, I don't care if Nim has not yet reached v1. I realize any upcoming / stable release will not break my code, and if so, I think I'll not spend too much time fixing it.
By the way, in my opinion, version 1 should have been formally released some time ago. Okay, there are pros and cons to this, I know.
My Environment is Ubuntu (running at DigitalOcean) w/ SQLite.
And BTW, I make some money with that... :) So, you can consider I'm using Nim in Production.
Cheers
I have big plans to rewrite all my C/C++ projects in Nim, some legacy code problems still stops me, but future is near :)
At this moment several console routines work in production as a bridge between new web-based and legacy (non web) components, all work just fine.
Nim has replaced every language (except javascript maybe) that im currently writeing. I dont want to code in other languages any more ;)
What is the package you guys using for web scraping ?
Just usual stuff from the standard library...
Privately, just play stuff that might eventually form a useful library to build off, but isn't of any real use to me immediately - like https://github.com/Sud0nim/Unfathomable
Professionally I am tinkering with a wrapper for the back-end of the trading/financial software my company uses, to hopefully build a safer and more user friendly interface to make calls to/send commands to. Still at the early testing stage as it is the first time I have used c2nim, but so far it seems relatively hassle-free.
What is the package you guys using for web scraping ?
Additional to what @LeuGim said,
Use httpclient module to get the page.
Use parseHtml from htmlparser to get the XmlNode representation of page.
Use xmltree module to work on that XmlNode you got.
For practical example, here's some script I wrote to web scrap mangastream
Everything.
At home I'm replacing a lot of stuff with Nim due to performance - and fun. Server jobs, scripts, python hacks, file and log handling, all monitoring and controlling of my RPi's, etc.
At work we use a project management tool written in Nim (except JS for now) in our own environment for managing construction projects and software development. We are running a beta in a public environment at www.Hubanize.com - and maybe someday it'll reach stable 1.0 ;-)
There are some advantages of Nim I like to use, like:
Also, some of the advantages my friend mentioned when I asked him why not Rust:
Common goodies I like:
As for now, I think I'll start porting some of my Rust programs to Nim so they can be used "natively" in both.
I'm currently using Nim at work as a replacement for some old scripts, mostly for provisioning servers (as part of our Ansible deployment setup). The tools in question preform tasks such as creating MySQL databases and the required tables/relationships and importing initial data and downloading a set of applications from our SVN server, zipping them up (using the zipfiles module) and then deploying them onto the servers.
We've also written some other small utilities in Nim that would have been written in Python or other languages in the past to do tasks such as monitoring data coming in from a serial port and logging that data with timestamps per packet.
no-copy-by-default was very appealing, Rust's arr[lb..hb] provides a view while Nim's arr[lb..<hb] actually copies the slice (good luck with reimplementing everything to work on views/slices) unless immediately followed by assignment
Last time I checked Python's implementation, Python's slices also do copy, but it's not a problem because people believe they don't copy and beliefs tend to win over facts. ;-)
Rust supports submodules and has better visibility rules
If you say so. I think submodules are a strange idea and most languages (Python included) do fine without.
no easy moving in Nim while moving is default argument passing method in Rust (Nim's is by-ref for ref types and by-val for other types)
Moving is actually easy enough in Nim but zero-copy slices cannot be moved in any language since it's pretty much a logical impossibility. Probably not a real problem but it feels a bit weird that the two features of Rust you wish Nim had do not work together.
More importantly, which libraries would you need?
Last time I checked Python's implementation, Python's slices also do copy, but it's not a problem because people believe they don't copy and beliefs tend to win over facts.
They do copy, as far as I know, but I'd not be so sure about make-it-true power. ;) For some time I was sure slicing makes a view in Python that I used:
I was pretty sure it actually will sort a slice until tests failed. :D
I think submodules are a strange idea and most languages (Python included) do fine without.
Please take a look at the thread about submodules I created. I wrote it after rewritting a project of mine to use import and export rather that include (which took me some time as it has many files) and saw the docs look nowhere like what I would like them to look like.
Moving is actually easy enough in Nim but zero-copy slices cannot be moved in any language since it's pretty much a logical impossibility.
If you mean shallowCopy, it'd love it to actually behave like moving. I was sure it does but recently I got a runtime error because of this assumption. Maybe a compiler bug though.
About not being able to move zero-copy slices: logical error here, actually. Zero-copy slices are views, either mutable or immutable. The view itself can be moved, it just doesn't move the data it points at. Alternatively, there can be three kinds of slices defined: immutable view, mutable view, slice-entry. The last one can do all the mutable view can do and also extend the slice or shrink it (even to zero length). Of course these operations actually affect original container, e.x. an seq has to move the data after the slice's end in memory.
Also, Python is not a good example here, I'd say. As you know, it's not really an efficiency-focused language. ;)
More importantly, which libraries would you need?
As for now, not so many, actually.
Firstly, hdf5 (and h5part). I know it can be ported but as far as I know, Nim's VM can't handle non-pure code (or did it change?) and I tend to use metaprogramming a lot. Today I was frustrated that I couldn't find any way to access a const passed to a macro (so I could, e.x. access elements of a const array), so I guess it shows just how weird things I tend to use (maybe you know the solution?). Here, I'd like to be able to recursively build a type-safe data structure with fields named and typed after hdf5 files' groups.
Secondly, lots of array-related and optimization goodies, like advanced autovectorization (and possibly autoparallelization). I had a look at qex ("A talk on HPC" thread) and hope jxy will publish some of his stuff as it seems a good base.
I would also me nice to have some utilities which make Nim more similar to plain old Fortran as otherwise I could use Nim only for a small fraction of what I do for work (my clients know Fortran and aren't be eager to learn a totally new language).
And there is this Rust's natural functional flavour which Nim lacks... :-/