Giter Site home page Giter Site logo

john AI integration about john-packages HOT 4 CLOSED

openwall avatar openwall commented on July 4, 2024
john AI integration

from john-packages.

Comments (4)

claudioandre-br avatar claudioandre-br commented on July 4, 2024

"Senior Dev AI Bot" (https://app.seniordev.ai) requires authorization (as seen at #61 (comment)). I will try it in using a fork.

It seems interesting, at least.

from john-packages.

claudioandre-br avatar claudioandre-br commented on July 4, 2024

An example of an AI review.

  • IMO it made an interesting note for #92. Maybe more than 1.
  • There is also some odd stuff.

File: deploy/docker/build.sh:

  • Use double equals signs (==) instead of single equals sign (=) for comparisons in the if statement.
  • Use consistent indentation and spacing for better readability.
  • Move the code to install nvidia-opencl-dev into a separate function to improve modularity and make it more readable.
  • Consolidate code duplication by building for CPU only image only if the type is not GPU.
  • Move the code to save information about how the binaries were built into a separate function to improve modularity and make it more readable.
  • Remove unnecessary comments and spacing.
  • Remove the temporary package_version.sh file after it has been used.
  • Remove the temporary clean_package.sh file after it has been used.
@@ -37,6 +39,8 @@
     build-essential=* libssl-dev=* zlib1g-dev=* yasm=* libgmp-dev=* libpcap-dev=* pkg-config=* \
     libbz2-dev=* wget=* git=* libusb-1.0-0-dev=* ca-certificates=*
 
+install_nvidia_opencl_dev() {
+  apt-get install -y --no-install-recommends nvidia-opencl-dev
+}
 
 if [ "$type" == "ALL" ] || [ "$type" == "GPU" ] ; then
-    apt-get install -y --no-install-recommends \
-        nvidia-opencl-dev
+    install_nvidia_opencl_dev
 fi
 
@@ -55,6 +59,18 @@
 if [ "$type" != "GPU" ] ; then
     do_configure "$X86_NO_OPENMP" --enable-simd=sse2   && do_build ../run/john-sse2
     do_configure "$X86_REGULAR"   --enable-simd=sse2   && do_build ../run/john-sse2-omp
     do_configure "$X86_NO_OPENMP" --enable-simd=avx    && do_build ../run/john-avx
     do_configure "$X86_REGULAR"   --enable-simd=avx    && do_build ../run/john-avx-omp
 fi
 
 build_for_all_images() {
     do_configure "$X86_NO_OPENMP" --enable-simd=avx2   && do_build ../run/john-avx2
     do_configure "$X86_REGULAR"   --enable-simd=avx2   && do_build ../run/john-avx2-omp
-    do_configure "$X86_NO_OPENMP" --enable-simd=avx512f  && do_build ../run/john-avx512f
-    do_configure "$X86_REGULAR"   --enable-simd=avx512f  && do_build ../run/john-avx512f-omp
+}
+
+if [ "$type" != "GPU" ] ; then
+    do_configure "$X86_NO_OPENMP" --enable-simd=avx512f  && do_build ../run/john-avx512f
+    do_configure "$X86_REGULAR"   --enable-simd=avx512f  && do_build ../run/john-avx512f-omp
+fi
+
+build_for_all_images
+
+save_build_info() {
     cd john || true
-    wget https://raw.githubusercontent.com/openwall/john-packages/main/tests/clean_package.sh
-    # shellcheck source=/dev/null
-    source clean_package.sh
-)
 
-# Save information about how the binaries were built
-cat <<-EOF > john/run/Defaults
+    wget https://raw.githubusercontent.com/openwall/john-packages/main/tests/package_version.sh
+    chmod +x package_version.sh
+ 
+    cat <<-EOF > run/Defaults
 #   File that lists how the build (binaries) were made
 [Build Configuration]
 System Wide Build=Yes
 Architecture="$arch"
-OpenMP, OpenCL=No
+OpenMP=No
+OpenCL=Yes
 Optional Libraries=Yes
 Regex, OpenMPI, Experimental Code, ZTEX=No
 Version="$(./package_version.sh)"
 EOF
+
+    rm -f package_version.sh
+}
+
+save_build_info
+
+(
+    cd john || true
+    wget https://raw.githubusercontent.com/openwall/john-packages/main/tests/clean_package.sh
+    # shellcheck source=/dev/null
+    source clean_package.sh
+
+    rm -f clean_package.sh
+)

from john-packages.

github-actions avatar github-actions commented on July 4, 2024

This issue is stale because it has been open for 30 days with no activity.

from john-packages.

github-actions avatar github-actions commented on July 4, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

from john-packages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.