bytevector=?(3scm)
π bytevector=?(3scm) β the bytevector equality vibe check π
okay so this is from the Scheme Programmer's Manual, and we are about to compare two bytevectors like it's our job. no cap. π
π NAME π
bytevector=? β compare two bytevectors. that's the whole assignment, bestie. π«Ά
π LIBRARY π
you pull it in from either of these, depending on your R6RS situation:
(import (rnrs)) ;R6RS
(import (rnrs bytevectors)) ;R6RS
β¨ SYNOPSIS β¨
(bytevector=? bytevector1 bytevector2)
πΈ DESCRIPTION πΈ
so bytevector=? hands back #t when bytevector1 and bytevector2 are equal. and equal means they have the same length and equal bytes at all valid indices. if that's not the case, you get #f. periodt. π
π RETURN VALUES π
returns a single boolean object. that's it. one boolean object, living its truth. β¨
π¦ EXAMPLES π¦
look at these little icons slaying:
(bytevector=? #vu8(1 2 3) #vu8(1 2 3)) => #t
(bytevector=? #vu8(1 2 3) #vu8(0 1 2)) => #f
π¨ APPLICATION USAGE π¨
bestie, this is serious: programs that work with sensitive data such as passwords and message digests must never use this procedure with attacker-controlled data.
why? it may leak information through the time it takes to execute, leading to the movie trope where a password is cracked one letter at a time. π no cap, do not do it.
π COMPATIBILITY π
this procedure is absent from R7RS. use equal?(3scm) instead. lowkey important. π«Ά
π ERRORS π
this procedure can raise exceptions with the following condition types:
&assertion(R6RS) β The wrong number of arguments was passed or an argument was outside its domain.
π₯ SEE ALSO π₯
equal?(3scm)
π STANDARDS π
R6RS. periodt. π
π AUTHORS π
this page is part of the scheme-manpages project. it includes materials from the RnRS documents. more information can be found at https://github.com/schemedoc/manpages/. π§
sign-off πΈ: this page is from the Scheme Programmer's Manual, dated 2021-02-28, and it's the bytevector=?(3scm) page. mwah. π
π¦ where this page comes from
- nixpkgs unstable: scheme-manpages 0-unstable-2024-02-11
- π the page's license: MIT
- Copyright (c) 2021 Gwen Weinholt
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms