/dpt/ — Daily Programming Thread

What are you working on, Any Forums?

Previous thread:

Attached: modern-programming-object-oriented-programming-and-best-practices.jpg (1200x1480, 168.92K)

Other urls found in this thread:

github.com/friendlyanon/cmake-init
github.com/blawar/ooot/archive/refs/heads/master.zip
twitter.com/SFWRedditImages

All programming languages are shit.

Programming is an antichrist pilled field whose sole purpose is to connect humanity with demons.

Awesome, anything that pisses off Christians is based!

>Daily
there has already been a thread today... faggot op

>he sucks the cock of the antichrist
>he also can't program
pottery

Attached: god_gives.png (483x468, 559.79K)

*Don't* learn Haskell

Attached: 1635327452126.png (500x496, 57.51K)

>avoid selecting readable fonts

Reminding anons to use github.com/friendlyanon/cmake-init when creating new C++ and C projects!

the text fidelity is lazily evaluating

Cniles and functards absolutely cannot come up with a single concrete argument against OOP, only the circular "OOP is bad because it's just bad" or complete strawman arguments, or reposting 5+ year old youtube rants full of strawman arguments

Attached: 1634690495674.jpg (1024x797, 90.5K)

Finished the music breaker script. Bash is too taxing for feature creep. Lot of valuable lessons learned today though.
>When putting variables in a command, quote everything.
>A space between parenthesis is the difference between an arithmetic operation and piping in a command
>Regular expressions suck, which must be why there are so many different programs doing them in different ways
>When reading a file line by line, don't forget the last character in each line is a line break
>Totally unrelated but line breaks are valid in file names
>Counting starts at one, arrays start at zero unless specified otherwise
>Bash has half a dozen ways of presenting a variable, each more complicated than the last

#!/bin/bash
cluster_of_music="YOUR MUSIC FILE.opus"
output_folder="AUDIOOUT"
input="tracklist.txt"
readarray track_list < $input

for (( i=${#track_list[@]}; i>-1; i-- ))
do
# Since the array starts at zero
# and the track count starts at one
# the track number and FOR loop's test get shifted by 1.
track_number=$((i+1))

if (($i==${#track_list[@]}))
then
# The first entry is blank. So we catch it and do nothing meaningful.
echo "${#track_list[@]} Tracks Found!"
continue
fi

if (($track_number==${#track_list[@]}))
then
# Get the full length of the audio file
# so we can propery trim the last audio track
# which is bullshit, but feels like a proper solution
track_start[$track_number]=$( (ffprobe -sexagesimal -i "$cluster_of_music" -show_entries format=duration -v quiet -of csv="p=0") )
track_title[$i]=${track_list[$i]:9}
echo "Full duration of audio: ${track_start[$track_number]}"

else

# Not totally apparent but every line except the last one
# ends in a LINE BREAK
# This line break must be filtered out or it shows up in the file name!
track_title[$i]=${track_list[$i]:9:-1}
fi

track_start[$i]=${track_list[$i]:0:8}

# convert track times to seconds, subtract current time from previous time
# to get the length of the current track in seconds
track_length=$(( $(date -d "${track_start[$track_number]}" "+%s") - $(date -d "${track_start[$i]}" "+%s") ))

echo "Track $track_number - ${track_start[$i]}"
echo "${track_title[$i]}"
echo "Length: $track_length"
ffmpeg -loglevel error -stats -ss "${track_start[$i]}" -t "$track_length" -i "$cluster_of_music" "$output_folder"/"${track_title[$i]}".opus < /dev/null
echo "______________________________________"
sleep 1
done

Please help

LAMP is literally the only stack you could ever need

>regex sucks
Kill yourself

Programming in the best language created by man tonight.
Programming in Rust.
Making extremely performant concurrent trading systems.

Attached: inb4_transvestite.jpg (758x644, 37.75K)

*created by woman

Choose for me
>Copy(byte[] array, int offset, int count);
or
>Copy(byte[] array, int arrayIndex, int count);
or
>Copy(byte[] array, int startIndex, int count);

int start, int end
end is exclusive

Copy(byte[] theArray, int theIndex, int theCount);

Attached: mpv-shot0039.jpg (1920x1080, 205.39K)

byte Copy(byte theByte)

Copy(byte[] standardArray, int standardArrayIndexParameter, int standardArrayIntegerCount);

/*
* redacted 50 lines of documentation
*/
void cp(T[] arr, size_t off, size_t len);
//cp(a, i, size);

what is it even copying ?

I am try to fucking learn Spring, and I don't know if it is so fucking easy, or am I retarded and I am missing something.
I hate this.

Attached: PepeRope.jpg (1280x1137, 138.9K)

automation scripts; how would i detect if a online file is 404'd with curl and exit?
what i have so far:
@echo off
color 0a
tools\curl-7.81.0-win64-mingw\bin\curl -L -o ooot.zip github.com/blawar/ooot/archive/refs/heads/master.zip
cd output
del ooot.rz
cd ..
"C:\Program Files\7-Zip\7z" x ooot.zip
del ooot.zip
rz a -d 1111k "output\ooot.rz" "ooot-master"
del ooot-master
pause

Copy(byte[] a, int b, int c);

I cannot think of anything to make. I only really know PHP but I want to make something that is useful for me.