View previous topic :: View next topic |
Author |
Message |
nikolis Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 21 Aug 2003 Posts: 200 Location: Athens
|
Posted: Tue Mar 21, 2023 9:11 pm Post subject: Chatgpt can write ebuilds ? |
|
|
Hi!
Have you asked the chatgpt to write you ebuilds? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Dark _Templar n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/2085608533639637f720b68.png)
Joined: 02 Dec 2022 Posts: 29 Location: Prague
|
Posted: Tue Mar 21, 2023 10:14 pm Post subject: |
|
|
It is able to generate simple ebuilds for installing building simple projects or installing scripts, whitch need some minor adjustments. As for more complex ones, it still cant produce even remotly working script. Also urls are compleetly wrong, but in my opinion, it has potential. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
szatox Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 27 Aug 2013 Posts: 3494
|
Posted: Tue Mar 21, 2023 11:30 pm Post subject: |
|
|
I think we had like 2 topics about chatgpt already.
It's a LANGUAGE model, not a general AI. It puts together words that often go together. It has no concept of meaning behind those words. There is no depth to whatever output it generates.
Which is what made it super funny when colleges started complaining about automatically generated thesis being indistinguishable from actual studies. I really shows what humanities are worth
No worries, if ya any good at all, it ain't taking yer work |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fedeliallalinea Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/161653968057192eb39329f.jpg)
Joined: 08 Mar 2003 Posts: 31467 Location: here
|
Posted: Wed Mar 22, 2023 6:27 am Post subject: |
|
|
I tried now.
Q: "write an ebuild for gentoo of sphinx-intl"
R:
Code: | # Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_6 )
inherit distutils-r1
DESCRIPTION="Internationalization extension for Sphinx documentation generator"
HOMEPAGE="https://pypi.org/project/sphinx-intl/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RDEPEND="dev-python/babel[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
test? ( >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}] )"
# Test suite requires internet connection.
RESTRICT=test
python_prepare_all() {
sed -i 's:^_\([^_]\+_\)$:..\1:' sphinx_intl/__init__.py || die
sed -i "/locale.compile/d" sphinx_intl/__init__.py || die
}
python_test() {
esetup.py test
}
python_compile() {
# Build egg first to create documentation.
python_export setuptools
python_export sphinx
esetup.py build_sphinx
esetup.py egg_info --egg-base "${ESRC}"/build
esetup.py build ${BUILD_ARGS} --executable="${EPYTHON}"
}
python_install_all() {
local LANGUAGES="ca de es fr hu it ja ko nl pl pt_BR ru sv tr uk zh_CN zh_TW"
local languages=""
for l in ${LANGUAGES}; do
use linguas_${l} && languages+=" ${l}"
done
# Build documentation first.
esetup.py build_sphinx
# Copy conf.py to build dir for localized builds.
cp sphinx_intl/conf.py build/sphinx || die
# Install egg-info first.
distutils-r1_python_install_all
# Install Sphinx components.
local components="sphinx-build sphinx-intl"
for c in ${components}; do
newbin "build/scripts-${PYVER}/${c}" "${PN}-${c}"
done
# Install translations.
local lang
for lang in ${languages}; do
insinto "/usr/share/${PN}/locale/${lang}/LC_MESSAGES"
doins "build/locale/${lang}/LC_MESSAGES/${PN}.mo"
done
# Install localization scripts.
insinto "/usr/share/${PN}"
doins sphinx_intl/*.{po,sh}
# Install examples.
insinto "/usr/share/doc/${PF}"
doins -r examples
# Install manpages.
newman "build/sphinx/man/sphinx-intl.1" "${PN}-sphinx-intl.1"
} |
My working ebuild
Code: | # Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1
DESCRIPTION="Utility tool to translate Sphinx generated document."
HOMEPAGE="https://github.com/sphinx-doc/sphinx-intl https://pypi.org/project/sphinx-intl/"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
# use tox that seems not supported in distutils-r1 eclass
RESTRICT="test"
RDEPEND="dev-python/Babel[${PYTHON_USEDEP}]
dev-python/click[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
"
BDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]" |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mrbassie l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/2027197225fd39331ea1f1.jpg)
Joined: 31 May 2013 Posts: 834 Location: Go past the sign for cope, right at the sign for seethe. If you see the target you've missed it.
|
Posted: Wed Apr 26, 2023 9:21 pm Post subject: |
|
|
szatox wrote: | I think we had like 2 topics about chatgpt already.
It's a LANGUAGE model, not a general AI. It puts together words that often go together. It has no concept of meaning behind those words. There is no depth to whatever output it generates.
Which is what made it super funny when colleges started complaining about automatically generated thesis being indistinguishable from actual studies. I really shows what humanities are worth
No worries, if ya any good at all, it ain't taking yer work |
Learn to mine? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|