Arthur Besse
cultural reviewer and dabbler in stylistic premonitions
- 4 posts
- 50 comments
Arthur Besse@lemmy.mlto
Programmer Humor@programming.dev•This Phishing email... What is the IP?English
3 monthsIt’s good to see someone in this thread who knows what an IPv5 address looks like:
IPv5 addresses consist of four hextets a 16bit each. For the visual representation, those grouping are used. The hextets might be written in decimal, separated by dot '.' characters, or as hexadecimal numbers, separated by colon ':'.It’s long past time to start replacing our IPv4.1 deployments!
Idk it works for me.
I don’t think there is any possible value for the
signvariable which would make that if statement do anything other than raise aTypeError.Also
"8:00:00" > "10:00:00"but
"08:00:00" < "10:00:00". comparing timestamps as strings is weird but actually works, as long as the hour is zero-padded :)the problem with this code is that
&(bitwise AND) has higher operator precedence thanand==do, so it is first trying to bitwise AND"10:00:00"withsign(which i’m assuming would also be a string) and that will always raise aTypeError.to do what the author appears to have intended to do, they would either need use parenthesis around both comparisons to actually bitwise AND their results, or (better) to use the boolean AND operator (
and) instead of&.The boolean
andoperator is the right tool for the job, and since it is lower precedence it also wouldn’t require that any parenthesis be added here.
TypeError: unsupported operand type(s) for &: 'str' and 'str'
that little triangle means you need to click on the the text in the comment to read the rest of it, because it’s wrapped in a spoiler tag. also fyi you can search twitter without a login using xcancel.com; it takes much less than 5 minutes to do so.
I’m going to need you to drop a source that will take me less than five minutes to understand
that sounds like sealioning 🤡 but i'll bite, once:
are you asking for evidence that lunduke is queerphobic, or that the rust community has a disproportionate number of queer people in it?
or, do you acknowledge both of those things, and are actually suggesting that lunduke’s vehement opposition to rust could maybe conceivably be entirely coincidental and perhaps he dislikes it for purely technical reasons? 😂
in any case, i’m not going to link to lunduke but i just checked and confirmed that (as i assumed) if you simply search his twitter for the word rust you can find many tweets (and i only went back a month) where he is in fact complaining about people being queer.
Arthur Besse@lemmy.mlto
Programmer Humor@programming.dev•y'all are gonna hate me for this, but it's the truthEnglish
6 monthsjust post it on lemmy world as a meme, copypaste a comment that makes the code better along with the original code into the AI agent
I’m curious if you succeeded with this approach here - have you gotten your LLM to produce a bash function which you can use without needing to understand how to specify an ffmpeg filename pattern yet?
btw, if want to try learning the old-fashioned way, have a look at
man ffmpeg-formatswhere you can find perhaps-useful information like this:segment, stream_segment, ssegment Basic stream segmenter. This muxer outputs streams to a number of separate files of nearly fixed duration. Output filename pattern can be set in a fashion similar to image2, or by using a "strftime" template if the strftime option is enabled. "stream_segment" is a variant of the muxer used to write to streaming output formats, i.e. which do not require global headers, and is recommended for outputting e.g. to MPEG transport stream segments. "ssegment" is a shorter alias for "stream_segment". Every segment starts with a keyframe of the selected reference stream, which is set through the reference_stream option. Note that if you want accurate splitting for a video file, you need to make the input key frames correspond to the exact splitting times expected by the segmenter, or the segment muxer will start the new segment with the key frame found next after the specified start time. The segment muxer works best with a single constant frame rate video. Optionally it can generate a list of the created segments, by setting the option segment_list. The list type is specified by the segment_list_type option. The entry filenames in the segment list are set by default to the basename of the corresponding segment files. See also the hls muxer, which provides a more specific implementation for HLS segmentation. Options The segment muxer supports the following options: [...]From the
image2section, here is how the filename pattern works:sequence Select a sequence pattern type, used to specify a sequence of files indexed by sequential numbers. A sequence pattern may contain the string "%d" or "%0Nd", which specifies the position of the characters representing a sequential number in each filename matched by the pattern. If the form "%d0Nd" is used, the string representing the number in each filename is 0-padded and N is the total number of 0-padded digits representing the number. The literal character '%' can be specified in the pattern with the string "%%". If the sequence pattern contains "%d" or "%0Nd", the first filename of the file list specified by the pattern must contain a number inclusively contained between start_number and start_number+start_number_range-1, and all the following numbers must be sequential. For example the pattern "img-%03d.bmp" will match a sequence of filenames of the form img-001.bmp, img-002.bmp, ..., img-010.bmp, etc.; the pattern "i%%m%%g-%d.jpg" will match a sequence of filenames of the form i%m%g-1.jpg, i%m%g-2.jpg, ..., i%m%g-10.jpg, etc.And btw, the
ffmpeg-formatsmanual does also include examples:Examples • Remux the content of file in.mkv to a list of segments out-000.nut, out-001.nut, etc., and write the list of generated segments to out.list: ffmpeg -i in.mkv -codec hevc -flags +cgop -g 60 -map 0 -f segment -segment_list out.list out%03d.nut • Segment input and set output format options for the output segments: ffmpeg -i in.mkv -f segment -segment_time 10 -segment_format_options movflags=+faststart out%03d.mp4 • Segment the input file according to the split points specified by the segment_times option: ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 out%03d.nut • Use the ffmpeg force_key_frames option to force key frames in the input at the specified location, together with the segment option segment_time_delta to account for possible roundings operated when setting key frame times. ffmpeg -i in.mkv -force_key_frames 1,2,3,5,8,13,21 -codec:v mpeg4 -codec:a pcm_s16le -map 0 \ -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 -segment_time_delta 0.05 out%03d.nut In order to force key frames on the input file, transcoding is required. • Segment the input file by splitting the input file according to the frame numbers sequence specified with the segment_frames option: ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_frames 100,200,300,500,800 out%03d.nut • Convert the in.mkv to TS segments using the "libx264" and "aac" encoders: ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a aac -f ssegment -segment_list out.list out%03d.ts • Segment the input file, and create an M3U8 live playlist (can be used as live HLS source): ffmpeg -re -i in.mkv -codec copy -map 0 -f segment -segment_list playlist.m3u8 \ -segment_list_flags +live -segment_time 10 out%03d.mkvIt is actually possible to figure out how to do this and many other ffmpeg tasks even without internet access :)
it’s not obvious but, i’m pretty sure this meme (and its creator’s vehement opposition to rust) is in fact substantially motivated by queerphobia.
Arthur Besse@lemmy.mlto
Selfhosted@lemmy.world•Here is a more polished release of nanogram. Fully compatible on raspberry pi now.English
6 monthslook at their responses in the .ml cross-post,
that post is now deleted, but you can see their modlog here
Arthur Besse@lemmy.mlto
Programmer Humor@programming.dev•Strengthen your arguments with compelling programming book coversEnglish
6 monthsi guess “bring your watch” implies a lack of good tools for profiling C++ on Linux?
Arthur Besse@lemmy.mlto
Programmer Humor@programming.dev•It was best as a silly toy language in the 1990's...English
7 monthsA few lists of javascript WTFs:
- https://javascriptwtf.com/
- https://github.com/denysdovhan/wtfjs
- https://wtfjs.com/ (last updated 2016 but most of these things can/will never be fixed)
To anyone who thinks they know JS well and that its quirkiness is not a problem, let me know how you do on these quizzes:
- 7 months
the C and fiber layers should be swapped, fragility-wise
- 7 months
Important context!
They had to change this because newer laws like the CCPA classify some ways of transferring/processing data as a “sale”, even if no money is exchanged.
What? No. Do you really think their “sharing” with “partners” who are “providing sponsored suggestions” doesn’t involve money being exchanged? 🤔
Here is an abridged version of that FAQ entry consisting only of substrings of it:
The reason we’ve stepped away from making blanket claims that “We never sell your data” is because […] to make Firefox commercially viable […] we collect and share some data with our partners, including our optional ads on New Tab and providing sponsored suggestions in the search bar
All of the other words in there implying that they had to stop promising not to sell user data because of some (implied to be unreasonable) “LEGAL definition” of “sale” is imo insulting to the reader.
it works for me. did you forget to pay your git bill?










(well actually) you forgot Poland