From owner-freebsd-hackers@freebsd.org Tue Jan 1 23:55:31 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C83AE142E20B for ; Tue, 1 Jan 2019 23:55:31 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8740169D83 for ; Tue, 1 Jan 2019 23:55:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f67.google.com with SMTP id l10so19997037lfh.9 for ; Tue, 01 Jan 2019 15:55:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dgkyHIHDoJIKxFxEfsFnBH7APke492GiVCmcVugfr9M=; b=eOBDPAiD4ECxLm0rGSD43LxjHPDnYTRWBTBsaSDGvsL4EDuJtdy5mOQ9kWdngu9wcP VLQ0uS5iAwZoulLs0CbUR/l/BUlnpq6w5nNBue2qdwsJqbY5m8whjv0wOks96HRrjEZ0 ICA0E5xsA2rajW28xhN1G0RzFdeA2qsHji0HorohFuTP5rlFztg1qP5ZhO7A6DKAUed5 rgtgxypfFsxWdlHAaZbEkVhlwsNGQp/6WbN4B87yFI6tA0a94ta37Nvalptgkw3ozZf+ bA3psZG7zAPPH1vwg5dzo5ewI2aK8jqYH6Ih2LOgocI5Nmt7wT3zCrl+3ELnUfaKjfIy l4Kg== X-Gm-Message-State: AA+aEWaZ9n7mSGzDzKQjivY3giZJTx0H5aoWwSj7J2zym8COxR5dMeFK RdiCJaJS6B0FhFvOeETbK2iUM8hBRmM7GvDFSNs= X-Google-Smtp-Source: AFSGD/XnBScpl9P/Fx5ijzq+D89KkqAT+dPQPUwBU4Ohn6S5RJjgmpw2tFHaB8wzDHjbm1cb+JAX+g9CsaHpLjG9Zr0= X-Received: by 2002:a19:df41:: with SMTP id q1mr21680414lfj.25.1546386922936; Tue, 01 Jan 2019 15:55:22 -0800 (PST) MIME-Version: 1.0 References: <20190101045638.D280E1F56@spqr.komquats.com> <4ea0612bbad08e61a15d495459b2bede@rpi.edu> In-Reply-To: <4ea0612bbad08e61a15d495459b2bede@rpi.edu> From: Alan Somers Date: Tue, 1 Jan 2019 16:55:10 -0700 Message-ID: Subject: Re: Speculative: Rust for base system components To: drosih Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8740169D83 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.67 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-4.04 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[67.167.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; IP_SCORE(-1.09)[ipnet: 209.85.128.0/17(-3.77), asn: 15169(-1.60), country: US(-0.08)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2019 23:55:32 -0000 On Tue, Jan 1, 2019 at 4:17 PM drosih wrote: > > On 2019-01-01 11:00, Igor Mozolevsky wrote: > > On Tue, 1 Jan 2019 at 15:54, Eric McCorkle wrote: > > > > > > > > > I don't think that's a fair comparison at all. Rust is a systems > > > language built around zero-cost abstractions that is usable for > > > developing real embedded code > > > > > > > > Brian's simple experiment [1] demonstrates that "zero-cost" is > > more of an aspiration (and a very long term one, perhaps) than > > a hard fact ;-) > > Brian's simple experiment is a simple experiment. It's interesting, > but hardly the definitive word in evaluating a language. We need > more real-world experience with serious programs before dismissing > rust. But at the same time, we need much more real-world experience > with writing rust before we can consider bringing it into the base > system. We can't bring it into the base system and then hope that > "magic happens" because it's sitting there. > > I thought the 'ripgrep' program seemed like an interesting one > to look at. Compare how fast it works to how fast our grep works. > (I have not done that comparison! I just take advantage of the > extra features that 'ripgrep' has.) And 'ripgrep' works fine as > a port. It does not need to be in the base system. It's just an > example to look at, for those who might be interested in rust. > > Maybe other people know of other real-world useful programs which > are written in rust, and which might be interesting to look at. Freshmeat knows of 38. Just look at the reverse dependencies for rust: https://www.freshports.org/lang/rust/ . Some interesting ones are alacritty (a fast terminal emulator), exa (ls replacement), fd (find replacement), suricata (IDS), xi (text editor), tokei (cloc replacement), sccache (like ccache but networked), and of course our favorite web browser. Also notable is libjail-rs, a jail(3) replacement written in Rust. https://github.com/fubarnetes/libjail-rs . -Alan > > So consider me a cheerleader for "Let's get some more experience!". > (not that all of us can do that, but at least *some* of us!) > > -- garance alistair drosehn aka gad@FreeBSD.org > -- senior systems programmer @rpi > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"