Re: [Nix-dev] Perl -> C++

2016-01-02 Thread Christian Theune
Hi,

smallest two cents possible: everyone has a favorite language and once done 
porting a shared project like Nix there’ll be the next language that we could 
port it to … ;)

I try to stay out of those discussions (but wanted to ad 0.0002€) as long as 
there’s no huge and clear advantage or problem fixed. For me this looks like 
bike-shedding about language choice.

Happy new year!

Theuni

> On 02 Jan 2016, at 12:12, stewart mackenzie  wrote:
> 
> hmm I suppose the real question is who'd be willing to do this?
> 
> 1) C++ only, makes nix more portable and reduces deps but adds C++ memory 
> model.
> 2) Rust adds deps, stop gapping till a long term stable port happens then 
> it'll be rust only.
> 3) Rust's windows support is still flaky (correct me pls)
> 4) Is nix that broken to call for a re-implementation?
> 5) There is enough C++ experience to maintain this project, do we have enough 
> willing Rust hands?
> 
> It really revolves around who's propared to sink time into this large amount 
> of work?
> Some feel it a waste of energy, others see it as a learning opportunity.
> 
> So let's put it out there - is there enough solidarity to get a pure Rust 
> implementation of nix out there? If not then we kill Rust in favour of C++ 
> for this thread?
> 
> P.S.  I'd love it if we could use Fractalide to implement Nix but now I'm 
> being bias!
> 
> On 2 Jan 2016 21:41, "Jakob Gillich"  > wrote:
> >
> > Nix doesn't have to be rewritten at once; you can rewrite the Perl stuff in 
> > Rust and call them from C++ code via a C interface[1].
> 
> I'm aware that Rust can replace Perl via FFI it's the added deps that concern 
> me
> 
> > This is what Mozilla does in Firefox, which is also mostly C++. So the 
> > question should be, do we want to get rid of C++ in the long term?
> 
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

--
Christian Theune · c...@flyingcircus.io · +49 345 219401 0
Flying Circus Internet Operations GmbH · http://flyingcircus.io
Forsterstraße 29 · 06112 Halle (Saale) · Deutschland
HR Stendal HRB 21169 · Geschäftsführer: Christian. Theune, Christian. Zagrodnick



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Perl -> C++

2016-01-02 Thread Jakob Gillich
Nix doesn't have to be rewritten at once; you can rewrite the Perl stuff
in Rust and call them from C++ code via a C interface[1]. This is what
Mozilla does in Firefox, which is also mostly C++. So the question
should be, do we want to get rid of C++ in the long term?

[1]: https://doc.rust-lang.org/book/ffi.html


On Thu, Dec 31, 2015, at 12:36 PM, Luca Bruno wrote:
> Nix is already C++. It's just that some tools are written in perl. Nix
> certainly isn't going to be rewritten in another language, at this
> time would be a waste of efforts in my opinion. The perl->c++ is about
> reducing the nix closure even more, but translating perl tools to c++.
>
> On Thu, Dec 31, 2015 at 12:33 PM, Tomasz Czyż
>  wrote:
>> Domen, I think this evolved from why perl -> c++ not perl -> X. Not
>> sure this went to nix -> X. But if decision was already made that c++
>> is the one, probably discussion is over :)?
>>
>
> _
> nix-dev mailing list nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Perl -> C++

2016-01-02 Thread stewart mackenzie
hmm I suppose the real question is who'd be willing to do this?

1) C++ only, makes nix more portable and reduces deps but adds C++ memory
model.
2) Rust adds deps, stop gapping till a long term stable port happens then
it'll be rust only.
3) Rust's windows support is still flaky (correct me pls)
4) Is nix that broken to call for a re-implementation?
5) There is enough C++ experience to maintain this project, do we have
enough willing Rust hands?

It really revolves around who's propared to sink time into this large
amount of work?
Some feel it a waste of energy, others see it as a learning opportunity.

So let's put it out there - is there enough solidarity to get a pure Rust
implementation of nix out there? If not then we kill Rust in favour of C++
for this thread?

P.S.  I'd love it if we could use Fractalide to implement Nix but now I'm
being bias!

On 2 Jan 2016 21:41, "Jakob Gillich"  wrote:
>
> Nix doesn't have to be rewritten at once; you can rewrite the Perl stuff
in Rust and call them from C++ code via a C interface[1].

I'm aware that Rust can replace Perl via FFI it's the added deps that
concern me

> This is what Mozilla does in Firefox, which is also mostly C++. So the
question should be, do we want to get rid of C++ in the long term?
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Perl -> C++

2016-01-02 Thread Jookia
On Sat, Jan 02, 2016 at 10:12:50PM +1100, stewart mackenzie wrote:
> I'm aware that Rust can replace Perl via FFI it's the added deps that
> concern me

Could you elaborate on this? I've seen a lot of talk about dependencies but what
exactly is the problem? Portability sounds like a genuine concern, but you can
still be portable with a lot of dependencies as long as they're portable.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Perl -> C++

2016-01-02 Thread Harald van Dijk
On 02/01/2016 18:44, Jookia wrote:
> On Sat, Jan 02, 2016 at 10:12:50PM +1100, stewart mackenzie wrote:
>> I'm aware that Rust can replace Perl via FFI it's the added deps that
>> concern me
>
> Could you elaborate on this? I've seen a lot of talk about dependencies but 
> what
> exactly is the problem? Portability sounds like a genuine concern, but you can
> still be portable with a lot of dependencies as long as they're portable.

If I want to compile and run Nix on a non-NixOS distribution, I would 
need to first install Rust, preferably from that distro's packages. 
There's a risk that the distro doesn't provide Rust at all. There's a 
risk that if the distro does provide Rust, then it isn't the right 
version for Nix. In either of those cases, I would then first need to 
install Rust without the help of *any* package manager. That's a serious 
obstacle for new users to getting started with Nix. That's a potentially 
serious obstacle for existing users to converting other systems to 
Nix/NixOS as well.

The current dependencies (bzip2, curl, sqlite, perl) could already be a 
small problem for the same reason, but at least it is a list of very 
stable software that's widely available in pretty much all package 
repositories. Rust is not yet in the same category, as far as I know.

Cheers,
Harald van Dijk
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev