Pandas Equivalent for Nim?

2021-11-12 Thread oyster
> > First of all, there is no xlrd/openpyxl/etc equivalent which can enable > > reading data into a DataFrame. > > That dosen't make any sense , any programming langauge can be used to write > excel reader. Your mentioned lib only read XLS files. what I mentioned is exactly libraries which can

byaddr tuple unpacking?

2021-11-12 Thread ggibson
Is there any way to get the tuple unpacking version of the following? let a {.byaddr.} = b Run Note: requires `import std/decls`

Treat memory allocation as effect?

2021-11-12 Thread elcritch
> Also, if you cannot allocate on the heap, the solution is not to instead use > large arrays on the stack, that's usually even worse... So you would need a > "no big stack allocations either" effect too. Yah, that becomes an issue. Usually what I'd want is to avoid allocations in a tight loop,

Readability problems

2021-11-12 Thread xigoi
Templates are literally C `#define`, but without all the pitfalls and consistent with the rest of the language.

Readability problems

2021-11-12 Thread bpr
> But it is VERY useful to have JSON in stdlib, Yeah, the **std** namespace is precious, and no one wants to see `json2`, `json3`, etc. You can't make an omelette without breaking a few eggs.

Readability problems

2021-11-12 Thread juancarlospaco
But it is VERY useful to have JSON in stdlib, I would rater deprecate less used stuff like `std/logic` or `std/inotify`...

Readability problems

2021-11-12 Thread Araq
> Then its time to Fix it, even if it means breaking changes... No need to break anything, deprecate the module and link to an alternative, recommended package.

Pandas Equivalent for Nim?

2021-11-12 Thread pietroppeter
I agree that it would be nice if more people would join Nim. As far as I can see those libraries do have proper maintainers (people who answer issues and can direct contributors), they likely could benefit more contributors (and users).

Readability problems

2021-11-12 Thread juancarlospaco
> Almost nothing in json.nim aged too well. :-) Then its time to Fix it, even if it means breaking changes...

Pandas Equivalent for Nim?

2021-11-12 Thread pietroppeter
> Then, can the data type of a column value be infered by > nim-pandas-like-thing? I suspected that we have to pre-define the dtype of > every column before we can read the data. Data type can be inferred and Datamancer does that, for another example, see:

Pandas Equivalent for Nim?

2021-11-12 Thread pietroppeter
A couple additional resources for the excellent Datamancer (on top of [official docs](https://scinim.github.io/Datamancer/datamancer.html)): * [datawrangling in scinim/getting-started](https://scinim.github.io/getting-started/basics/data_wrangling.html) * a gist with a [comparison of datafra

Pandas Equivalent for Nim?

2021-11-12 Thread hugogranstrom
We also have which is built on top of Arraymancer

Readability problems

2021-11-12 Thread Niminem
Templates are IMO the simplest form of metaprogramming in Nim as it's just code substitution. If you're concerned with debugging you can add an extra piece of complile-time logic into the templates that only executes / gets put into the resulting binary when you define something like `debugging

Readability problems

2021-11-12 Thread PMunch
> Which is obviously unreadable and very easy to forget what it means. Not really, once you know what it means it's quite readable, but it requires that you familiarize yourself with the tools you're using. Besides, when you see something that looks suspiciously much like json with some appended

Readability problems

2021-11-12 Thread SolitudeSF
yes. `template json*(t): JsonNode = %* t` badabing, crisis averted.

Pandas Equivalent for Nim?

2021-11-12 Thread oyster
I don't think such a pandas-thing existing in any static language First of all, there is no xlrd/openpyxl/etc equivalent which can enable reading data into a DataFrame. Then, can the data type of a column value be infered by nim-pandas-like-thing? I suspected that we have to pre-define the dtyp

Readability problems

2021-11-12 Thread Araq
Almost nothing in `json.nim` aged too well. :-) The idea back then was "toJson is more common than modulo, so I'd rather use % for that operation". But `%` only worked on simple values (integers, values), so in order to turn "anything" you would use `%*` which read like "%/toJson but repeated".

How do I inject a NimNode directly instead of going through a macro or template?

2021-11-12 Thread deech
That worked great, thanks!

How to hide FFI details from implementations of a (C FFI) interface?

2021-11-12 Thread lpirl
Dear community, first, thanks for the great docs, issue discussions and forum replies – those express a friendly atmosphere and are great resources to learn. I am new to Nim and try to achieve something that is apparently above my level of experience – please excuse any fuzziness in my question

Treat memory allocation as effect?

2021-11-12 Thread Araq
Also, if you cannot allocate on the heap, the solution is not to instead use large arrays on the stack, that's usually even worse... So you would need a "no big stack allocations either" effect too.

Treat memory allocation as effect?

2021-11-12 Thread elcritch
> It would be possible and quite easy ... Override malloc so that it counts > allocations and use -d:useMalloc is one option, for example. Interesting, I could see how maintaining some effects could become tedious. For this case wouldn't implementing a test on every bit of no-alloca code be more

Treat memory allocation as effect?

2021-11-12 Thread Araq
It would be possible and quite easy to do but I wouldn't do it, the effect system in my experience has been nothing but a productivity killer. I would see how to write a test case to ensure a critical piece of code doesn't "allocate".