Arbitrary Strings Not Properly Encodable.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- testing
Direzione di ricerca
Start by locating the Arbitrary instances for strings and characters in the repository, then inspect how generated UTF-16 code units are used by the existing tests. The issue proposes generating strings from code points or restricting the character range to U+0000–U+D7FF; determine which approach fits the library and verify the encoding behavior with the reported text encoding work.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi Folks, I have ongoing work to deal with string encoding for the purpose of supporting cryptography in purescript, and I am attempting to isolate the cause of the problem I encounter.
I suspect currently that the cause of the problem is actually in the way that quickcheck generates strings via Arbitrary. That is to say, that generating randomly ordered CodeUnits (purescript Char), is not truly compliant with the way UTF-16 strings should be encoded. If we wanted to join randomly generated strings, these should be the (potenitially) multi code-unit strings, aka CodePoints.
I think the best solution would be to redefine arbitrary string such that it is generated from Code Points, not Code Units. Failing this however, a "quick and dirty" solution would be to redefine the char range used to generate strings to always fall within the U+0000 to U+D7FF range. (Represented identically between their code point and code unit).
I will be happy over the weekend to write the PR should I find time and there are no objections raised here. It will also be used to verify my theory by using it with existing text encoding work I've done.
- Lingua principale
- PureScript
- Stelle
- 108
- Fork
- 42
- Merge medio
- 2g 23h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di purescript/purescript-quickcheck
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
purescript/purescript-quickcheck#136 · 1 commento ·
-
Lazy List Arbitrary InstanceForse già presa @eviefp l’ha presa 2206 giorni fa. Apertatype: enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
purescript/purescript-quickcheck#111 · 2 commenti · 2 reazioni ·
-
type: documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
-
purs-0.15 type: breaking change
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
purescript/purescript-quickcheck#104 · 12 commenti ·
-
ShrinkingApertatype: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
purescript/purescript-quickcheck#103 · 6 commenti · 4 reazioni ·
Tutte le issue di purescript/purescript-quickcheck
Issue simili
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
johanhaleby/occurrent#1505 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
future-agi/future-agi#4092 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno