Re: [Proposal] Import a with 'b' (<- refers to importing a.xyz as bxyz)

2018-09-02 Thread Libman
I still like [my old proposal](https://forum.nim-lang.org/t/3061) for the use keyword (instead of from ... import nil). Then import means "import into namespace"; use means "use with a prefix". Both can be used with the from, except, and as keywords: from mymodule import myproc #

Re: Equivalent of dir() in python

2018-09-02 Thread Libman
Here's a very **very** stupid nimdir.sh script that I find useful: #!/bin/sh libPath=~/.choosenim/toolchains/nim-0.18.0/lib # libPath=$(choosenim --noColor show | grep ' Path: ' | awk '{print $2}')/lib nimFile=$(find $libPath -iname $1.nim | sed 1q) [ -f

Re: What is needed for choosenim installation to support linux_arm (raspbian)

2018-09-02 Thread Libman
I once played around with the idea of setting up qemu instances of many platforms * many OSes for building binaries, automating as much as possible with qemu's telnet monitor console / ssh in the OS install. Full system virtualization is not as good as doing it on bare metal, but better than

Re: Embedding ssl libraries ?

2018-09-02 Thread enthus1ast
`git clone https://github.com/openssl/openssl.git cd openssl #Openssl does not build for me with gcc -..-ls export cc=/usr/bin/clang ./config make mkdir /home/david/nimPlayground/sslfun cp *.a /home/david/nimPlayground/sslfun/ cd /home/david/nimPlayground/sslfun/ staticssl.nim import

Re: [Proposal] Import a with 'b' (<- refers to importing a.xyz as bxyz)

2018-09-02 Thread Allosteric
Thanks for the reply. I have nothing special to say about the case problem. > Just to import them as is? I can't agree on this since whoever tried to use > the import with expression is interested in dividing namespaces. > > optional second (non-alphanumeric) prefix for operators? This seems to

Re: [Proposal] Import a with 'b' (<- refers to importing a.xyz as bxyz)

2018-09-02 Thread LeuGim
> or maybe the with can be cleaver enough to follow the original form Yes, it is the easiest part - just to change case of the first letter of the prefix according to identifier, and maybe uppercase identifier's first letter. > How to handle operators. Just to import them as is? Or an optional

Re: [Proposal] Import a with 'b' (<- refers to importing a.xyz as bxyz)

2018-09-02 Thread Allosteric
Never knew it. Thanks for pointing out. I edited and it's fixed

Re: [Proposal] Import a with 'b' (<- refers to importing a.xyz as bxyz)

2018-09-02 Thread Araq
Slightly offtopic: I cringe every time I have to read "UFCS". It's called the "method call syntax" or similar. There is nothing _universal_ in `a.f(b, c)`, it puts the first argument in a special position. The universal call syntax is `f(a, b, c)` or maybe `(f a b c)` if you like Lisp.