Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

Why not migrate Portage to C language?

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
162 posts
  • Page 4 of 7
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • Next

Would you like to see Portage rewritten in C?

Yes
78
45%
No
40
23%
Don't care
56
32%
 
Total votes: 174
Your vote has been cast.

Author
Message
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

  • Quote

Post by Naib » Sun Feb 09, 2020 9:47 am

crocket wrote:I'd rather use clojure than python for a dynamic language with optinoal typing.
But you haven't done anything so this reply is moot. You would do it in Haskel BUT you haven't. What we have is functional and unless someone attempts to replace it, it won't.
Look at how long NDF take to come along and even then it hasn't replaced yum.

Even of you implemented the PMS in whitespace there is zero guarantee that it will provide a solution that kicked off these multiple critism (ie perl) because part of the problem is perl itself and having a dedicated cleaning script, which you need to run what? Every couple of years AT THAT is not the end of the world.
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
C5ace
Guru
Guru
Posts: 517
Joined: Mon Dec 23, 2013 12:44 am
Location: Brisbane, Australia

  • Quote

Post by C5ace » Sun Feb 09, 2020 12:00 pm

Tony0945 wrote:
crocket wrote:With C, you have to worry about violating memory boundaries constantly even if a C program compiles.
A C program crashes if you are not careful about memory boundaries. Just writing a simple for loop in C can lead to buffer overflow.
People who work on computer security know how hard it is to write correct C programs that don't crash or lead to buffer overflow.
C requires a lot of discipline which is expensive. With haskell, you don't have to worry about it.
If you don't have the budget of NASA, maintaining a haskell program in a multi-person project is substantially cheaper and faster than maintaining a C program.
I've been writing C for about forty years, professionally for 25. I NEVER had those problems. Maybe code cowboys did, professionals didn't. You are spreading FUD.
I concur with Tony0945. Been writing C private and professionally since 1988. Would not touch any other language, including C++ and Python with a barge pole.
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as perl, python, C++, C#, Rust and the likes.
Top
CasperVector
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Tue Apr 03, 2012 1:22 pm

  • Quote

Post by CasperVector » Sun Feb 09, 2020 3:18 pm

Tony0945 wrote:I've been writing C for about forty years, professionally for 25.
[OT]So you began doing it professionally when I was around 4 y/o :D[/OT]
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Sun Feb 09, 2020 8:32 pm

Probably before you were born. Professional use was first. early '80s My boss sent me to an AT&T seminar to see what this C language was all about. we mostly used Z80 assembly language at that time. We then started using it on new 8088 projects. I did port it to Z80, no floating point, no bit-fields. I was kind of proud of the block swapping code I wrote to get around the memory limitations.
Top
alexander-n8hgeg5e
n00b
n00b
Posts: 58
Joined: Sat Nov 02, 2019 2:47 pm

  • Quote

Post by alexander-n8hgeg5e » Sat Mar 21, 2020 7:19 pm

If something really needs speedup, python can be extended with c-modules.
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4692
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Sat Mar 21, 2020 11:52 pm

Not knowing much about the internals of different programming languages...
Rust and Go sound good.
I still voted "I don't care". Although removing python depency from Gentoo base install would be a plus in my eyes.
..: Zucca :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
asturm
Developer
Developer
Posts: 9496
Joined: Thu Apr 05, 2007 4:07 pm

  • Quote

Post by asturm » Sat Mar 21, 2020 11:54 pm

Zucca wrote:Rust and Go sound good.
Those two are representative of all that is wrong in today's programming world :lol:
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4692
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Sun Mar 22, 2020 12:12 am

asturm wrote:
Zucca wrote:Rust and Go sound good.
Those two are representative of all that is wrong in today's programming world :lol:
I have "faith" those could be better choices than python. :D
..: Zucca :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
Hu
Administrator
Administrator
Posts: 24389
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Mar 22, 2020 12:51 am

If their core developers were not dead set on following packaging worst practices, maybe. I suggest you try to install Rust straight from source, without using a prebuilt Rust as a shortcut. ;) Before you start, uninstall any rust or rust-bin packages currently installed, then mask rust-bin.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Sun Mar 22, 2020 2:28 am

Zucca wrote:
asturm wrote:
Zucca wrote:Rust and Go sound good.
Those two are representative of all that is wrong in today's programming world :lol:
I have "faith" those could be better choices than python. :D
eshowkw rust go python tells a different story.
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sun Mar 22, 2020 8:58 am

Hu wrote:If their core developers were not dead set on following packaging worst practices
It is best practice to write a general-purpose language compiler/interpreter in its own code. AFAIK, both languages have public (open source) boot-strap procedures available, but it lies in the nature of things that they are cumbersome and something most people do not want to have on their usual machines: For go, AFAIK this is the GNU compiler collection go which bootstraps itself via the gcc compiler and has probably no much other purpose than being a bootsrap-compiler, and for rust this is rust-build. That gentoo does not optionally offer building by rust-build is a gentoo decision, I suppose.
Top
Muso
Veteran
Veteran
User avatar
Posts: 1052
Joined: Tue Oct 22, 2002 7:45 am
Location: The Holy city of Honolulu
Contact:
Contact Muso
Website

  • Quote

Post by Muso » Sun Mar 22, 2020 9:33 am

asturm wrote:
Zucca wrote:Rust and Go sound good.
Those two are representative of all that is wrong in today's programming world :lol:
What's wrong with Go?

I'm perfectly happy with Portage as is, but I'm just curious as to why you seem to dislike Go.
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop!
Top
Ionen
Developer
Developer
User avatar
Posts: 3013
Joined: Thu Dec 06, 2018 2:23 pm

  • Quote

Post by Ionen » Sun Mar 22, 2020 10:36 am

Clearly portage should be rewritten in JavaScript+php with a required modern browser frontend, the web server would install packages with a CGI+rust backend. The build system should use dev-ruby/rake and also use perl and python for generate a few files. A Go module could be used for dependency calculations integrated after someone else made it. I recommend a dependency on haskell to build the man page.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Sun Mar 22, 2020 10:40 am

Ionen wrote:Clearly portage should be rewritten in JavaScript+php with a required modern browser frontend, the web server would install packages with a CGI+rust backend. The build system should use dev-ruby/rake and also use perl and python for generate a few files. A Go module could be used for dependency calculations integrated after someone else made it. I recommend a dependency on haskell to build the man page.
No java :( :P
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4692
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Sun Mar 22, 2020 12:44 pm

I'll propose Portage to be rewritten in Whitespace.
..: Zucca :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sun Mar 22, 2020 2:34 pm

Zucca wrote:I'll propose Portage to be rewritten in Whitespace.
That's an old suggestion. IIRC immediately after the suggestion to use Brainfuck.
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sun Mar 22, 2020 2:42 pm

But to write something serious: Most part of portage is actually bash, except for the dependency resolver. And this is the slow part. There once was a suggestion to use a SAT solver library for dependency resolving. Unsurprisingly (to me) this project was never finished, but if somebody really wants to make portage faster, this is the way to go IMHO.
Top
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

  • Quote

Post by Naib » Sun Mar 22, 2020 2:43 pm

plenty of suggestions, plenty of criticism but not alot of doing :) This is why it will stay as python and fundamentally there is nothing wrong with that.
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
Ionen
Developer
Developer
User avatar
Posts: 3013
Joined: Thu Dec 06, 2018 2:23 pm

  • Quote

Post by Ionen » Sun Mar 22, 2020 2:57 pm

Naib wrote:plenty of suggestions, plenty of criticism but not alot of doing :) This is why it will stay as python and fundamentally there is nothing wrong with that.
Yeah, if someone/people actually rewrote portage in another language that is compatible with current implementation it could eventually be offered as an alternative, and if deemed better could replace it after sufficient testing.

But asking current devs to drop everything they've done and rewrite it, I don't think so :)

List of features to re-implement has also gotten long, so the idea of extending the current implementation (like a faster dependency calculation algorithm that "could" be written in C) is also more reasonable, but again, someone has to do it. Not that this helps if want a python-less system (or worse, bash-less), but that's how things are.
Top
Hu
Administrator
Administrator
Posts: 24389
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Mar 22, 2020 4:38 pm

mv wrote:
Hu wrote:If their core developers were not dead set on following packaging worst practices
It is best practice to write a general-purpose language compiler/interpreter in its own code.
The inability to build these packages without having already built them is only the beginning of what's wrong with them, although it is a major first step. Rust's "recommended" install instructions pushing people to curlpipesh is a good second step in case anyone was thinking about trusting them to treat packaging seriously.
mv wrote:AFAIK, both languages have public (open source) boot-strap procedures available, but it lies in the nature of things that they are cumbersome and something most people do not want to have on their usual machines: For go, AFAIK this is the GNU compiler collection go which bootstraps itself via the gcc compiler and has probably no much other purpose than being a bootsrap-compiler, and for rust this is rust-build. That gentoo does not optionally offer building by rust-build is a gentoo decision, I suppose.
I have never seen anyone mention rust-build, and the Rust recommended install instructions make no mention of it either. A search for "rust-build" doesn't turn up anything with that name, but does lead to the Rust github page, which recommends a Python script that, by their own documentation, doesn't even have dependency tracking set up correctly:
https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html wrote:If you have already built rustc, then you may have to execute rm -rf build for subsequent configuration changes to take effect. Note that ./x.py clean will not cause a rebuild of LLVM, so if your configuration change affects LLVM, you will need to manually rm -rf build/ before rebuilding.
Later:
https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html wrote:Stage 0: the stage0 compiler is usually (you can configure x.py to use something else) the current beta rustc compiler and its associated dynamic libraries (which x.py will download for you).
I will grant that the parenthetical note might, or might not, apply only to the dynamic libraries. If it does, then it's not clear where the current beta rustc compiler would come from.

From the readme, as rendered by the Github repository:
Since the Rust compiler is written in Rust, it must be built by a precompiled "snapshot" version of itself (made in an earlier stage of development). As such, source builds require a connection to the Internet, to fetch snapshots, and an OS that can execute the available snapshot binaries.
From that, I don't know what Gentoo could do that is meaningfully different from the current approach of depending on a rust-bin that is downloaded and used to compile the rust sources.
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sun Mar 22, 2020 5:06 pm

Hu wrote:Rust's "recommended" install instructions pushing people to curlpipesh is a good second step in case anyone was thinking about trusting them to treat packaging seriously.
Oh yeah, it is so much more clever to follow instead the python recommendation and use pip. :roll:
I don't know what Gentoo could do that is meaningfully different from the current approach of depending on a rust-bin that is downloaded and used to compile the rust sources.
One could write a full bootstrap (I thought rust-build were such, but I might be wrong). Yes, bootstrapping to a different architecture (which would mean a full bootstrap) is not simple, and not even gcc can do that easily. go only has it simpler because they have become part of an "established" compiler chain.
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Sun Mar 22, 2020 6:46 pm

Naib wrote:plenty of suggestions, plenty of criticism but not alot of doing :) This is why it will stay as python and fundamentally there is nothing wrong with that.
Yep. Not everyone has the skillset. That doesn't mean an implementation or other choices are beyond constructive criticism. The main reason I'd prefer to not rely on python can be exhibited in the python 2.7 retirement as well as the frequent updates of newer versions.
Quis separabit? Quo animo?
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4692
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Sun Mar 22, 2020 7:25 pm

mv wrote:Oh yeah, it is so much more clever to follow instead the python recommendation and use pip. :roll:
I can sense many installations get broken because people run such programming language specific package managers as root.
..: Zucca :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
Hu
Administrator
Administrator
Posts: 24389
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Mar 22, 2020 7:37 pm

mv wrote:
Hu wrote:Rust's "recommended" install instructions pushing people to curlpipesh is a good second step in case anyone was thinking about trusting them to treat packaging seriously.
Oh yeah, it is so much more clever to follow instead the python recommendation and use pip. :roll:
Pip, for all its faults, natively supports installing packages to a user private area or a virtual environment. A curlpipesh, almost by definition, could be anything, and could be something else tomorrow, so even if the currently served script is good (which I very much doubt), it could be something better or worse by the time someone else looks at it. For that reason, it is my opinion that a curlpipesh is always a bad solution, no matter what problem is under discussion. That does not necessarily preclude offering curlpipesh as a fallback, but when curlpipesh is the recommended solution, that reduces my trust in all the other packaging related advice from that speaker.

Citing pip is not relevant here, because the download page for the Python interpreter makes no mention of it and because it is not the preferred way to install Python (indeed, as far as I know, pip cannot be used to install Python, only to install selected Python packages that are hosted on PyPI or a compatible index). Even if both of those were false and Python were very difficult to package, the existence of bad practice in the Python community does not excuse the Rust community choosing actions that are so directly contrary to good packaging.
Top
Dr.Willy
Guru
Guru
Posts: 547
Joined: Sun Jul 15, 2007 5:13 pm
Location: NRW, Germany

  • Quote

Post by Dr.Willy » Sun Mar 22, 2020 8:35 pm

@mv if you wish to short-circuit that discussion with Hu: viewtopic-p-8334612.html#8334612
gentoo repos: kakoune | oil | hyper-v
Top
Post Reply
  • Print view

162 posts
  • Page 4 of 7
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • Next

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic