From: Jacob Lifshay <programmerjake@gmail.com>
To: Libre-RISCV General Development <libre-riscv-dev@lists.libre-riscv.org>
Subject: Re: [libre-riscv-dev] next tasks
Date: Fri, 13 Mar 2020 00:38:31 -0700
Message-ID: <CAC2bXD62BPZdM8+Y7HRtUwsMy8feD0eZXGNQazpyomgw0fewdQ@mail.gmail.com> (raw)
In-Reply-To: <20200313084417.fd17b9032b84d390e182aac5@gmx.com>
On Thu, Mar 12, 2020, 23:43 Lauri Kasanen <cand@gmx.com> wrote:
> On Thu, 12 Mar 2020 10:40:16 -0700
> Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> > If we decide to create our own simulator, it might be a good idea to
> write
> > it in rpython or similar since that has an optimizing JIT trace compiler
> > that can effectively speed up any interpreter/simulator. That's what's
> used
> > to implement PyPy -- it's basically just a python interpreter written in
> > rpython.
> >
> > If we decide we don't want rpython, then I would suggest Rust -- I've
> > already started writing a cycle-accurate CPU simulator to test out my
> idea
> > for making a spectre-proof cpu (I stopped since it was taking longer
> than a
> > few days):
> >
> https://salsa.debian.org/Kazan-team/spectre-resistant-speculative-processor
>
> Using a standard language would beat slightly improved speed, for the
> usual reasons. The hipster languages have trouble running in many
> settings,
I can agree that rpython sounds like it is probably a pain to set up,
however I've found Rust to be utterly trivial to set up on all Linux
systems I've tried (other than termux -- the distro designed to run on top
of Android -- and even there it was relatively easy):
assuming you've already installed build-essential (needed for the linker),
just install using the one-line command on https://rustup.rs/ then build &
run the project by running:
cargo run -- <args to my program>
or to build and run the program independently from cargo:
cargo build
target/debug/<program-name> <args to my program>
and we need people to be able to modify the simulator (e.g.
> me).
>
Ok. fair point.
I'd recommend learning Rust anyway since Kazan (the graphics driver) is
written in Rust, as well as some of the other code.
Additionally, I find Rust to be just as (or more) expressive as modern C++
and it has additional benefits such as the compiler proving that your code
doesn't have undefined behavior (very handy for when you would have 100kloc
of C++ code that occasionally inexplicably segfaults -- been there), a very
powerful traits system (think C++ template metaprogramming but more
extensible and harder to misuse), and a waay better macro system than C
including stuff like procedural macros (running custom code at compile time
to generate source code).
Also, Rust has a very nice standard build system/package manager (cargo),
it's much better than C and C++'s build system mess.
I found Rust to be relatively easy to understand coming from my background
of >7 years of C++ and C.
If the simulator was written in hipster language of the week, I may
> not even be able to get it running, and it would place a significant
> obstacle on my modifying it. More than a decade in C/C++ vs learning an
> entirely new language with all its quirks.
>
> It would likely present similar barriers to others who need to modify
> it.
>
I had picked rpython and Rust as possible languages since python and rust
are already extensively used in the Libre-SOC codebase.
> (why yes, I have bad experiences with python, ruby, rust, go...)
hope they weren't like my experience with Scala -- never got anything to
build after several hours of trying and the JVM is huge.
Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
next prev parent reply index
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAPweEDyGztErPRa=9KLM9J02R1fLQ9Y23VY7UNAkfJ5yt-03PQ@mail.gmail.com>
[not found] ` <20200220093921.635c47f72ea2faf85dd352b7@gmx.com>
2020-03-12 14:32 ` Hendrik Boom
2020-03-12 14:43 ` Luke Kenneth Casson Leighton
2020-03-12 17:40 ` Jacob Lifshay
2020-03-13 6:44 ` Lauri Kasanen
2020-03-13 7:38 ` Jacob Lifshay [this message]
2020-03-13 8:04 ` Lauri Kasanen
2020-03-13 8:25 ` Jacob Lifshay
2020-03-13 10:13 ` Luke Kenneth Casson Leighton
2020-03-13 18:10 ` [libre-riscv-dev] Rustup security Jacob Lifshay
2020-03-14 18:13 ` [libre-riscv-dev] next tasks Hendrik Boom
2020-03-14 18:23 ` whygee
2020-03-14 18:28 ` Luke Kenneth Casson Leighton
2020-03-14 18:49 ` whygee
2020-03-15 2:47 ` [libre-riscv-dev] benefits of rust Jacob Lifshay
2020-03-15 5:18 ` Hendrik Boom
2020-03-15 5:42 ` Jacob Lifshay
2020-03-15 5:47 ` [libre-riscv-dev] [OT] Minecraft garbage collection Hendrik Boom
2020-03-15 6:41 ` Jacob Lifshay
2020-03-15 12:11 ` Luke Kenneth Casson Leighton
2020-03-16 13:22 ` Luke Kenneth Casson Leighton
2020-03-16 16:22 ` Jacob Lifshay
2020-03-16 16:24 ` Luke Kenneth Casson Leighton
2020-03-17 18:23 ` [libre-riscv-dev] next tasks Jacob Lifshay
2020-03-17 18:56 ` Luke Kenneth Casson Leighton
2020-03-16 18:30 ` Immanuel, Yehowshua U
2020-03-16 18:51 ` Jacob Lifshay
2020-03-16 22:53 ` Luke Kenneth Casson Leighton
2020-03-16 22:53 ` Luke Kenneth Casson Leighton
2020-03-16 23:12 ` Immanuel, Yehowshua U
2020-03-16 23:16 ` Immanuel, Yehowshua U
2020-03-16 23:42 ` Luke Kenneth Casson Leighton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAC2bXD62BPZdM8+Y7HRtUwsMy8feD0eZXGNQazpyomgw0fewdQ@mail.gmail.com \
--to=programmerjake@gmail.com \
--cc=libre-riscv-dev@lists.libre-riscv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Libre RISC-V Mailing list Archives (accessible via public-inbox)
Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev
Example config snippet for mirrors
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git