Re: Python transpiler

2020-07-13 Thread sschwarzer
Do you mean from Nim to Python or from Python to Nim? Which use cases do you have in mind?

Re: tests in the same files as the code

2020-07-13 Thread sschwarzer
Good point. This comes up from time to time in the forum. It would be really nice if there was some documentation on `testament` (or if there's some, a link to it). Also, I vaguely remember that `testament` also has disadvantages over `unittest`, so the tradeoff when to use one or the other shou

Re: tests in the same files as the code

2020-07-13 Thread sschwarzer
I think for small simple modules it's ok to have the tests (with doAssert, not assert) in the same file. Apart from that, I prefer a test module using the [unittest](https://nim-lang.org/docs/unittest.html) module for each module to test. In my experience, putting the tests in the same file as

Re: "Nim for Python Programmers" wiki page

2020-07-11 Thread sschwarzer
What I meant here is that in some cases you can use object variants where you would otherwise use inheritance in a more "traditional" design. That doesn't mean that object variants can do everything that inheritance can do. Both object variants and inheritance are different design tools and thei

Re: "Nim for Python Programmers" wiki page

2020-07-11 Thread sschwarzer
I don't expect that you can replace _all_ uses of inheritance with object variants. But some. :-)

"Nim for Python Programmers" wiki page

2020-07-11 Thread sschwarzer
gested I should write down the changes first to discuss them on the Nim forum. So here are the potential changes: [https://gist.github.com/sschwarzer/ff9f3f7092f132b17e2b33e7a5a2fe81](https://gist.github.com/sschwarzer/ff9f3f7092f132b17e2b33e7a5a2fe81) . What do you think?

Re: How to set up/start a Project?

2020-07-07 Thread sschwarzer
Just to be sure, are you using the command `Nim` (uppercase N) or `nim` (lowercase n)? The command is `nim` (lowercase n).

Re: How to set up/start a Project?

2020-07-07 Thread sschwarzer
There's the Nim package manager [Nimble](https://github.com/nim-lang/nimble) and its README has a section on [project structure](https://github.com/nim-lang/nimble#project-structure). Also, if you use `nimble init` on the command line, it will create the structure for you to have an easy start.

Re: Connection-Pooling Compile-Time ORM

2020-07-02 Thread sschwarzer
Python code usually uses a _leading_ underscore to mark an identifier "private" and _trailing_ underscores to distinguish identifiers from keywords. [https://www.python.org/dev/peps/pep-0008/#descriptive-naming-styles](https://www.python.org/dev/peps/pep-0008/#descriptive-naming-styles)

Re: Procedure overloading with explicit parameters

2020-06-26 Thread sschwarzer
> I'm surprised noone answered OP's question so far. The question was why the code shown by the OP wasn't possible in Nim. :-) > Since Nim is not a functional, but imperative language, I think we shouldn't think too much in language categories. If a language is mostly imperative, this doesn't m

Re: Procedure overloading with explicit parameters

2020-06-25 Thread sschwarzer
Here's a Nim library for pattern matching on values: [https://github.com/alehander92/gara](https://github.com/alehander92/gara)

Re: NvP: s.add('x') 100M times

2020-06-24 Thread sschwarzer
The reason I suggest comparing against Python 3 is that Python 2 is no longer supported by the CPython project. Also, by far most of the people who start with Python will use Python 3. If Python 2 is faster in many string benchmarks that's most likely because the default string type in Python 2

Re: NvP: s.add('x') 100M times

2020-06-24 Thread sschwarzer
For the record: In Python 3, "some string" is a unicode string where the items are code points. The model more similar in semantics to the Nim version is the `bytes` type. That said, I get the same time for multiplying `b"x"` (`bytes`) as for `"x"` (`str`).

Re: Norm 2.0.0

2020-06-24 Thread sschwarzer
I can imagine migrations that don't change the schema. For example, you have a `varchar` field and change the format from `part1 - part2` to `part2 - part1`, i. e. swap two strings in the same string attribute.

Re: NvP: s.add('x') 100M times

2020-06-24 Thread sschwarzer
Two things about the Python version: * Using `xrange` tells me you're on Python 2. I suggest you use a current/recent Python 3 version for your benchmarks. * The recommended way to concatenate a big number of strings is with `separator.join(iterable)`. So you could use: `s = "".join(("x"

Re: Naming conventions - need leading underscore

2020-06-24 Thread sschwarzer
I'm interested in the following use case: type MyType* = object x: int ... proc x*(mt: MyType): int = # This is also the user API for the type. # Have some side effect, for example update a cache. ... mt.x var mt = MyTy

Re: When will the NimConf timeline get posted?

2020-06-18 Thread sschwarzer
Hm, it's clearly after Tuesday now and the conference is only two days away. It would be really nice to get a timetable of the talks. :-)

Re: Nim's popularity

2020-06-17 Thread sschwarzer
> I don't like popularity, I like what it comes with popularity: more brains, > more libraries, better maintained packages, ... This thread could be titled: > "Nim's ecosystem" or even better "How could Nim's ecosystem be improved". Agreed, I wouldn't go for popularity in itself, but for the imp

Further development of a tree iterator that allows mutations

2020-05-31 Thread sschwarzer
ly do other things with the node. ... Run If you delete a node, the iterator doesn't descend into the children of the deleted node. Recursive iteration continues with the node after the deleted node. I have an [implementation](https://hg.sr.ht/~sschwarzer/lazytree/browse) th

Re: Walking trees without recursive iterators

2020-05-31 Thread sschwarzer
> Now that I think more about it, with the current implementation, I'd expect > this behavior: > > * If you delete a node and insert another node instead, the iterator should > go over the child nodes of the new node. I think that's actually reasonable. > * If you insert a node after the one

Re: Walking trees without recursive iterators

2020-05-30 Thread sschwarzer
Many thanks for your feedback! > Your test suite looks like it could maybe use a mixture of inserts & deletes > in either order while iterating The inserts are "missing" because they were not relevant for my use case and I hadn't thought a lot about them. As far as I did think about insertions,

Re: How do I revert a my fork back to nim devel?

2020-05-30 Thread sschwarzer
I also recommend including the branch name in your shell prompt. For bash, I have in my `.bashrc`: PS1='\u@\h:\w$(__git_ps1 " [%s]")\$ ' Run Depending on your distribution, you may need to install a package or source some shell script to the `__git_ps1` command. For

Re: How do I revert a my fork back to nim devel?

2020-05-30 Thread sschwarzer
I assume the pull got you stuck in a merge because of a merge conflict. The output of `git status` should say something about this. If it's confirmed by `git status`, you can either try to resolve the merge conflict by editing the file, `git add` it and use `git merge --continue`, or you can sto

Re: Output test statistics from `nimble test` (succeeded, failed, skipped, possibly runtime)

2020-05-29 Thread sschwarzer
I just saw this is mentioned as a possible enhancement in [https://github.com/nim-lang/Nim/issues/5114](https://github.com/nim-lang/Nim/issues/5114) .

Re: Change Nim colour on GitHub

2020-05-29 Thread sschwarzer
Um, _what_ was the initial goal then? :-) Maybe we could add the question "Where do Nim's name and logo come from?" or something similar together with the answer to the FAQ (even if it's not strictly a _frequently_ asked question ;-) ).

Re: Walking trees without recursive iterators

2020-05-29 Thread sschwarzer
@cblake Thanks for your encouragement, it _did_ motivate me. :-) Unfortunately, I only found the time this week. So finally, here's a new take on the recursive tree iterator: [https://hg.sr.ht/~sschwarzer/lazytree](https://hg.sr.ht/~sschwarzer/lazytree) (clone with hg

Re: Idea: Nim Online Conference

2020-05-17 Thread sschwarzer
For me, from this thread and the blog post it always looked like the registration was only for the case that you want to give a talk. So "regular" participants maybe wouldn't look at the form to begin with. That said, I had looked at the form when the conference was announced for June 1st, but

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: 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: 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 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 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: Some rant about nim

2020-03-03 Thread sschwarzer
Regarding `with` and `else` in Python: $ cat with_else.py with open("/etc/passwd") as fobj: pass else: pass $ python3.8 with_else.py File "with_else.py", line 3 else: ^ SyntaxError: invalid syntax Run At least

Re: How to package a nim program in an APK file

2020-02-20 Thread sschwarzer
The output is hard to read. You can use literal (code) formatting by putting triple backticks on a line before and after your code, [as in Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting). Syntax highlighting also works.

Re: Why whitespace?

2020-02-19 Thread sschwarzer
I'm really tired of these tabs vs. spaces discussions. There are good reasons for either approach, and I don't see why one approach would be _objectively_ better than the other. People who prefer the pro/con combination of tabs over the pro/con combination of spaces, prefer tabs. People who pr

Re: Nim 1.0.6 is out!

2020-01-28 Thread sschwarzer
Here's a thread on the version numbering: [https://forum.nim-lang.org/t/5606](https://forum.nim-lang.org/t/5606)

Re: Naming conventions - need leading underscore

2020-01-17 Thread sschwarzer
I'm not really after the possibility of leading underscores in Nim. That said, I'd be interested in what conventions you use to distinguish a private name and the name of a corresponding accessor proc. So, which conventions do you use or have seen?

Re: Naming conventions - need leading underscore

2020-01-16 Thread sschwarzer
> People don't complain about Python not allowing unicode characters as > identifiers (something possible in Julia for example). For the record, Python 3 _does_ allow unicode characters in identifiers. :-) $ python3 Python 3.7.5 (default, Oct 17 2019, 12:09:47) [GCC 9.2.1 2

Re: Naming conventions - need leading underscore

2020-01-16 Thread sschwarzer
> How underscores improve readability? The idea is that you could use `_name` for a private field and `name` for an accessor proc. It's a nice convention. So I agree, it doesn't improve readability directly, or maybe just in the sense that you avoid less readable names like my `privateX` above.

Re: Naming conventions - need leading underscore

2020-01-16 Thread sschwarzer
> Yet I am new to Nim (coming from C, C++, Python) and wonder, what this.x then > will mean in my Euler class. Is it the pointer to the method x or is it the > attribute x? I tried Skaruts's code in the [Nim playground](https://play.nim-lang.org/#ix=27xV) and it seems accessing `Euler(x: 3.0).

Re: Naming conventions - need leading underscore

2020-01-16 Thread sschwarzer
_At least_ in Python, an underscore at the beginning of a variable means it's private and shouldn't be accessed by client code. At some point I was wondering the same as the OP, but I think in Nim you just use the `*` suffix to distinguish "public" and "private" fields: type

Re: stdlib pegs: Accessing optional subexpressions

2020-01-13 Thread sschwarzer
Thanks! I had heard of `npegs`, but so far chose `pegs` because it's in the standard library and understands standard PEG syntax. That said, `npeg`'s features are very impressive. :-) > Afaik, stdlib peg is designed for nim compiler itself and somewhat limited. So I guess there's not much moti

stdlib pegs: Accessing optional subexpressions

2020-01-12 Thread sschwarzer
Assume I have the following PEG definition: import pegs let examplePeg = peg""" A <- {L}? {D}? L <- \a+ D <- \d+ """ Run If I test strings against this PEG, I get: if "abc" =~ examplePeg: # `["abc", "", "", "", "", "",

Reusing generic type in `proc` argument

2020-01-10 Thread sschwarzer
I'm experimenting with a `sorted` proc that takes a `key` argument instead of a `cmp` argument (see also [https://docs.python.org/3/library/functions.html#sorted](https://docs.python.org/3/library/functions.html#sorted) ). This is my attempt (also [on Nim playground](https://play.nim-lang.org/

Re: failing to read xml

2020-01-08 Thread sschwarzer
Every `XMLNode` [has a kind](https://nim-lang.org/docs/xmltree.html#7) and I guess the reason you get this error is that you use the `text` field although the node isn't a text node. In that case you must check the node kind first: if node.kind == xnText and node.text != "":

Re: "Returning" a proc from a template

2020-01-07 Thread sschwarzer
It's the other way around; I want to turn a string literal into an identifier. The [program](https://hg.sr.ht/~sschwarzer/todoreport/browse/default/src/todoreport.nim) parses a [todo.txt](https://github.com/todotxt/todo.txt#todotxt-format-rules) file and displays the information groupe

Re: "Returning" a proc from a template

2020-01-07 Thread sschwarzer
Thanks a lot everyone. I'm glad it's so simple. :-) I thought I had tried this, but it seems I didn't. (On the other hand, defining the proc as an anonymous one actually was something I tried.) Now I have a follow-up question. To replace my lengthy proc with the template, I have to create a cmp

"Returning" a proc from a template

2020-01-06 Thread sschwarzer
In [my code](https://hg.sr.ht/~sschwarzer/todoreport/browse/default/src/todoreport/task.nim) I have a proc that returns a `cmp` proc for sorting with `algorithm.sorted`: type Task* = object isComplete*: string priority*: string # We could model the

Re: Object Variants and redefinition of labels or reusbility of field names

2019-12-24 Thread sschwarzer
@FernandoTorres Maybe this is the posting you had in mind: [https://forum.nim-lang.org/t/5036](https://forum.nim-lang.org/t/5036) The related RFC is [https://github.com/nim-lang/RFCs/issues/19](https://github.com/nim-lang/RFCs/issues/19) I'd like to see one of these approaches implemented. :-)

Re: Walking trees without recursive iterators

2019-12-22 Thread sschwarzer
Ok, I understand what's the problem with the condition and can reproduce the bug in a unit test. These are my thoughts about possible fixes: * As far as I can tell, the only way to recognize that the client of the iterator has deleted a child, is checking the number of children in the parent

Re: What’s your favorite programming language and why?

2019-12-20 Thread sschwarzer
My top wishes for the Nim _language_ : * Recursive iterators. Their lack is such a pain for algorithms that are "naturally" recursive. * Recursive imports (or another solution?). So far I've only done small projects, but I can imagine that the recursive module issue can be a huge pain and I

Re: What’s your favorite programming language and why?

2019-12-19 Thread sschwarzer
I'd say my favorite programming language since about 20 years is Python and it's also the language I use most professionally. I like that it's quite expressive and has lots of libraries (not only external libraries, but I also like the standard library a lot). _Especially_ for small tools the la

Re: Walking trees without recursive iterators

2019-12-19 Thread sschwarzer
@e Yes, it seems that's a bug that wasn't revealed by my existing unit tests. Thank you! I'll look what I can do. :-)

Re: Walking trees without recursive iterators

2019-12-18 Thread sschwarzer
I've written an iterator over an `XMLNode`: [https://hg.sr.ht/~sschwarzer/vppdiff/browse/default/src/vppdiff/cleanxmi.nim#L46](https://hg.sr.ht/~sschwarzer/vppdiff/browse/default/src/vppdiff/cleanxmi.nim#L46) Internally the iterator uses a stack. Iterator features: * You can modify the

Re: Most efficient way to implement a stack using Nim?

2019-12-05 Thread sschwarzer
If you know roughly how large the stack seq can get, you may want to try [https://nim-lang.org/docs/system.html#newSeqOfCap%2CNatural](https://nim-lang.org/docs/system.html#newSeqOfCap%2CNatural) to avoid or reduce reallocations. In a small benchmark I wrote some time ago, using `newSeqOfCap` to

Re: Nim 1.0.4 is out!

2019-11-28 Thread sschwarzer
> That is common practice, see > [https://en.wikipedia.org/wiki/Software_versioning#Odd-numbered_versions_for_development_releases](https://en.wikipedia.org/wiki/Software_versioning#Odd-numbered_versions_for_development_releases) I wouldn't conclude from the Wikipedia section that it _is_ common

Re: Can I "prune" directories with walkDirRect?

2019-11-17 Thread sschwarzer
I guess the link to the Python 2 version of the library was only by accident. If some new functionality in Nim should be modeled after Python, refer to the documentation for Python 3. For most older libraries, there shouldn't be a big difference, but for newer libraries there may be, and even o

Re: Marshal and friends

2019-11-13 Thread sschwarzer
I think, as far as usage is concerned, Nim's `marshal` module corresponds more to Python's `pickle` module. Compared to the `pickle` module, the `marshal` module has quite a few caveats: [https://docs.python.org/3/library/pickle.html#comparison-with-marshal](https://docs.python.org/3/library/pic

Output test statistics from `nimble test` (succeeded, failed, skipped, possibly runtime)

2019-11-04 Thread sschwarzer
Currently I use the [unittest module](https://nim-lang.org/docs/unittest.html) from the standard library and `nimble test` to test [my code](https://hg.sr.ht/~sschwarzer/vppdiff/browse/default/tests/test_cleanxmi.nim). I like unittest's DSL. The tests look very clean. What I miss is

Re: A critique of Nim

2019-11-03 Thread sschwarzer
Here are some ideas/tips I use to navigate unknown code. * As others have said, if possible use an IDE/editor that can go to definitions. Regardless of having an IDE or editor: * Even if you know the module from using `from module import nil`, you don't necessarily know _which_ proc is t

Re: A critique of Nim

2019-11-01 Thread sschwarzer
I wouldn't be so harsh. Sometimes things seem so "obvious" that it doesn't occur to you that you may be wrong. I think this can happen to everyone. As the article I linked points out, the imports in Nim are often misunderstood. When I learned about Nim, I was also at least a bit suspicious.

Re: A critique of Nim

2019-11-01 Thread sschwarzer
There's a pretty good article on this subject at [https://narimiran.github.io/2019/07/01/nim-import.html](https://narimiran.github.io/2019/07/01/nim-import.html) :-)

Re: Error: expression has no type (or is ambiguous)

2019-10-18 Thread sschwarzer
Ouch, of course. I didn't see the forest for the trees. Thank you.

Error: expression has no type (or is ambiguous)

2019-10-18 Thread sschwarzer
I'm writing a small tool in Nim and ran into the compiler error "expression ... has no type (or is ambiguous)". Here's a simplified example that still gives the error message: [https://play.nim-lang.org/#ix=1Z5M](https://play.nim-lang.org/#ix=1Z5M) Granted, the cleanedXmi proc has no return typ

Re: Using `{.gcsafe.}` on a global string

2019-10-08 Thread sschwarzer
I suppose the reason why I might want to override the compiler's analysis would probably _not_ be that I want to "risk it" despite GC-unsafe code. I'd use the pragma because there are - hopefully - clear rules what is GC-safe and what isn't and I'd want to override the compiler in case the code

Re: Using `{.gcsafe.}` on a global string

2019-10-08 Thread sschwarzer
Re 1.: How would I be able to tell whether the code is safe in the future? Will there be a new definition of "GC-safe" at some point or was my understanding of GC safety wrong to begin with?

Re: Using `{.gcsafe.}` on a global string

2019-10-08 Thread sschwarzer
Thanks for your answers and the code suggestion. I see what you're doing here, but I need the same temporary directory for all threads. :-) Would the approach with `deepcopy` [as in the manual](https://nim-lang.org/docs/manual.html#threads-gc-safety) be safe? import os import p

Using `{.gcsafe.}` on a global string

2019-10-07 Thread sschwarzer
I have the following program: import os import posix_utils import strformat import threadpool let tempRootPath = mkdtemp("vppdiff") proc xmiFilePath(fileNumber: int, cleaned: bool): string = let cleanedSuffix = "_cleaned" return tempRootP

Re: Nim for my future project ?

2019-10-03 Thread sschwarzer
Thanks for your extensive reply! I think I see where our misunderstanding comes from. As I understand, you're seeing the term "open source" literally from the perspective of an individual user. In contrast, my perspective is that of a software maintainer picking a license for their publicly vis

Re: Nim for my future project ?

2019-10-03 Thread sschwarzer
The reason why I think the Peer Production License doesn't comply with the open source definition (point 5) is that, even though the license doesn't restrict _all_ commercial use, it restricts _some_ commercial use (point 4 c and d). This isn't visible in the boxes at the top of the respective p

Re: Nim for my future project ?

2019-10-02 Thread sschwarzer
I find the license more restrictive than the open source definition. ;-)

Re: Nim for my future project ?

2019-10-02 Thread sschwarzer
As nice as the [project website](https://nimwc.org/) looks, I'm honestly a bit confused about the [license](https://github.com/ThomasTJdev/nim_websitecreator/blob/master/LICENSE), which is linked from the website. If I understand correctly, according to the [open source definition](https://ope

Re: Front page example

2019-10-01 Thread sschwarzer
I agree with Nimster and Stefan_Salewski. The proc does something quite different from what its name (to me and probably most people) suggests. Admittedly, the _use_ of the proc makes you look a second time at it and see what the proc does, but still I wouldn't count this example as a good one.

Re: Proposal to start a Nim-Scientific Community

2019-09-30 Thread sschwarzer
I'm currently not using Nim for scientific computing, but I'm quite interested in what's going on in this area and follow related discussions in the forum.

Re: Cross compilation linux -> win + wine issue with file reading

2019-09-30 Thread sschwarzer
Have you tried reading the file and printing the start of its contents - at least up to and a bit beyond the first null byte as known from the hex editor - as hex strings to stdout? That way you could at least check if the problem already occurs when reading.

Re: What text editor are you using for Nim?

2019-08-02 Thread sschwarzer
What does the Nim support in Geany cover? Originally, I used a Nim plugin for Vim which gave me "only" syntax highlighting, but now I don't want to miss completions and "go to definition". I find this very helpful, especially since I'm rather new to Nim.

Re: What text editor are you using for Nim?

2019-08-02 Thread sschwarzer
I use the same combination. :-)

Re: What do you think about the programming language NIM?

2019-07-31 Thread sschwarzer
> Python, I started to learn Python and found it quite easy to pick up, however > I decided that its growing way to big as a language, too many people are > changing it too much, and for me on Windows it just became another scripting > language, no better than say Perl... and yes Python may be v

Re: Alias for proc names -- any progress?

2019-07-25 Thread sschwarzer
As I understand it, this is still a pull request that hasn't been merged. I think having aliases would be great, but I also see the potential conflict with already defined operators that is mentioned in the comments of the PR.

Re: Nim VS The World (CoffeeScript/Boo/PureBasic/C#/ES2018/Python)

2019-07-24 Thread sschwarzer
> Typing nimble install blah is not hard. Those libraries can be as > multiplatform as the stdlib. In my opinion the main advantage of having a GUI toolkit in the standard library isn't that it's easy to install (although that's a big plus), but that there is a _default_. > Python's "standard

Re: Field order for object variants

2019-07-22 Thread sschwarzer
I just found [https://github.com/nim-lang/RFCs/issues/19](https://github.com/nim-lang/RFCs/issues/19) which discussed the issue and has two suggestions for a possible syntax. (I had already used a generic web search, but now searched in the Nim tickets.) One of the syntax suggestions would look

Re: Field order for object variants

2019-07-22 Thread sschwarzer
It's worse if you have something like this: type MyKind = enum kind1, kind2, kind3 MyObject = object case kind: MyKind of kind1: field2: string, field3: string of kind2: field1: string field3: s

Field order for object variants

2019-07-21 Thread sschwarzer
I'd like an object variant where both variants have the `kind` and `field1` fields, but only in case of `kind == kind2`, I want an additional field `field2`. I can model this with type MyKind = enum kind1, kind2 MyObject = object case kind: MyKind

Object variants and field order

2019-07-21 Thread sschwarzer
I'd like to define clean-up actions on an XML tree. I have two clean-up kinds, one for removing whole nodes (specified by name), another one for removing attributes on nodes with a given name (specified by node name and attribute name). At the moment, I'm modeling this with object variants:

Re: Choosing the right `osproc` function

2019-07-09 Thread sschwarzer
@juancarlospaco Thanks! firejail seems to do _much_ more than I want, and from reading a bit about the Nim package and the underlying library, I must admit that I don't even understand how I would apply it to my usecase. I only want to call the external process from a small command line program

Re: Choosing the right `osproc` function

2019-07-09 Thread sschwarzer
@Araq Thanks, I'll try it. :-)

Choosing the right `osproc` function

2019-07-08 Thread sschwarzer
First some background about me: I started to use Nim only recently. It looks very interesting. :-) My programming experience of the last 20 years is mostly Python (wrote a book and several articles, and gave about 15 talks), but I also programmed in compiled languages, e. g. Pascal, C++ and Fort