Current section
26 Versions
Jump to
Current section
26 Versions
Compare versions
49
files changed
+10595
additions
-222
deletions
| @@ -23,7 +23,7 @@ test_locals_without_parens = [ | |
| 23 23 | Enum.flat_map( |
| 24 24 | [ |
| 25 25 | "*.{ex,exs}", |
| 26 | - "{benchmarks,config,lib}/**/*.{ex,exs}", |
| 26 | + "{benchmarks,config,lib,scripts}/**/*.{ex,exs}", |
| 27 27 | "test/elixir/**/*.{ex,exs}" |
| 28 28 | ], |
| 29 29 | &Path.wildcard(&1, match_dot: true) |
| @@ -6,17 +6,59 @@ Website: https://hologram.page | |
| 6 6 | |
| 7 7 | ## Sponsors |
| 8 8 | |
| 9 | + ### Main Sponsor |
| 10 | + |
| 11 | + <a href="https://www.curiosum.com/?utm_source=github.com&utm_medium=sponsor-logo&utm_campaign=sponsoring_hologram" target="_blank"> |
| 12 | + <picture> |
| 13 | + <source media="(prefers-color-scheme: dark)" srcset=".sponsors/curiosum_logo_horizontal_mono_white.png"> |
| 14 | + <source media="(prefers-color-scheme: light)" srcset=".sponsors/curiosum_logo_horizontal_mono_black.png"> |
| 15 | + <img src=".sponsors/curiosum_logo_horizontal_mono_black.png" alt="Curiosum" height="80"> |
| 16 | + </picture> |
| 17 | + </a> |
| 18 | + |
| 19 | + [Curiosum](https://www.curiosum.com/?utm_source=github.com&utm_medium=sponsor-logo&utm_campaign=sponsoring_hologram) |
| 20 | + |
| 21 | + ### Milestones Sponsor |
| 22 | + |
| 23 | + <a href="https://erlef.org" target="_blank"> |
| 24 | + <picture> |
| 25 | + <source media="(prefers-color-scheme: dark)" srcset=".sponsors/eef_logo_vertical_white.png"> |
| 26 | + <source media="(prefers-color-scheme: light)" srcset=".sponsors/eef_logo_vertical_black.png"> |
| 27 | + <img src=".sponsors/eef_logo_vertical_black.png" alt="Erlang Ecosystem Foundation" height="80"> |
| 28 | + </picture> |
| 29 | + </a> |
| 30 | + |
| 31 | + [Erlang Ecosystem Foundation](https://erlef.org) |
| 32 | + |
| 33 | + ### Innovation Partner Tier |
| 34 | + |
| 35 | + * Sheharyar Naseer, [@sheharyarn](https://github.com/sheharyarn) |
| 36 | + |
| 9 37 | ### Framework Visionary Tier |
| 10 38 | |
| 11 39 | * [@absowoot](https://github.com/absowoot) |
| 40 | + * Uzair Aslam, [@uzairaslam196](https://github.com/uzairaslam196) |
| 41 | + * Oban, [@oban-bg](https://github.com/oban-bg) |
| 42 | + * Lucas Sifoni, [@Lucassifoni](https://github.com/Lucassifoni) |
| 43 | + * Robert Urbańczyk, [@robertu](https://github.com/robertu) |
| 12 44 | |
| 13 45 | ### Early Adopter Tier |
| 14 46 | |
| 15 | - * Calancea Daniel, [@D4no0](https://github.com/D4no0) |
| 47 | + * Daniel Calancea, [@D4no0](https://github.com/D4no0) |
| 16 48 | * Darren Black, [@totaltrash](https://github.com/totaltrash) |
| 17 | - * Lucas Sifoni, [@Lucassifoni](https://github.com/Lucassifoni) |
| 49 | + * [@jzimmek](https://github.com/jzimmek) |
| 50 | + * Nicholas Moen, [@arcanemachine](https://github.com/arcanemachine) |
| 51 | + * [@pasila](https://github.com/pasila) |
| 52 | + * Jonatan Männchen, [@maennchen](https://github.com/maennchen) |
| 53 | + * Douglas Manzelmann, [@douglasmanzelmann](https://github.com/douglasmanzelmann) |
| 54 | + * James Harton, [@jimsynz](https://github.com/jimsynz) |
| 55 | + * Ian Asaff, [@montague](https://github.com/montague) |
| 56 | + * Juozas Norkus, [@jozuas](https://github.com/jozuas) |
| 57 | + * Thomas, [@thomaswhyyou](https://github.com/thomaswhyyou) |
| 58 | + * Max, [@Makesesama](https://github.com/Makesesama) |
| 59 | + * Dawid Danieluk, [@nxy7](https://github.com/nxy7) |
| 18 60 | |
| 19 | - Thank you to all other sponsors for supporting the project! |
| 61 | + Thank you to **all other** sponsors for supporting the project! |
| 20 62 | |
| 21 63 | If you find Hologram useful and would like to support its development, consider becoming a sponsor! Your contributions help improve the project and keep it alive. |
| @@ -1,11 +1,12 @@ | |
| 1 1 | "use strict"; |
| 2 2 | |
| 3 | + import ERTS from "./erts.mjs"; |
| 3 4 | import HologramInterpreterError from "./errors/interpreter_error.mjs"; |
| 4 5 | import Interpreter from "./interpreter.mjs"; |
| 5 6 | import Type from "./type.mjs"; |
| 6 7 | |
| 7 8 | export default class Bitstring { |
| 8 | - static #decoder = new TextDecoder("utf-8", {fatal: true}); |
| 9 | + static #decoder = ERTS.utf8Decoder; |
| 9 10 | static #encoder = new TextEncoder("utf-8"); |
| 10 11 | |
| 11 12 | static calculateBitCount(bitstring) { |
| @@ -713,10 +714,7 @@ export default class Bitstring { | |
| 713 714 | |
| 714 715 | static toCodepoints(bitstring) { |
| 715 716 | $.maybeSetTextFromBytes(bitstring); |
| 716 | - |
| 717 | - return Type.list( |
| 718 | - Array.from(bitstring.text, (char) => Type.integer(char.codePointAt(0))), |
| 719 | - ); |
| 717 | + return Type.charlist(bitstring.text); |
| 720 718 | } |
| 721 719 | |
| 722 720 | static toFloat(bitstring, endianness) { |
| @@ -62,9 +62,15 @@ export default class Client { | |
| 62 62 | ); |
| 63 63 | } |
| 64 64 | |
| 65 | - queryParts.push( |
| 66 | - `${key.value}=${Type.isBitstring(value) ? Bitstring.toText(value) : value.value.toString()}`, |
| 67 | - ); |
| 65 | + const encodedKey = encodeURIComponent(key.value); |
| 66 | + |
| 67 | + const rawValue = Type.isBitstring(value) |
| 68 | + ? Bitstring.toText(value) |
| 69 | + : value.value.toString(); |
| 70 | + |
| 71 | + const encodedValue = encodeURIComponent(rawValue); |
| 72 | + |
| 73 | + queryParts.push(`${encodedKey}=${encodedValue}`); |
| 68 74 | }); |
| 69 75 | |
| 70 76 | return queryParts.length > 0 ? `?${queryParts.join("&")}` : ""; |
| @@ -0,0 +1,14 @@ | |
| 1 | + "use strict"; |
| 2 | + |
| 3 | + export default class Sequence { |
| 4 | + // Made public to make tests easier |
| 5 | + value = 0; |
| 6 | + |
| 7 | + next() { |
| 8 | + return ++this.value; |
| 9 | + } |
| 10 | + |
| 11 | + reset() { |
| 12 | + this.value = 0; |
| 13 | + } |
| 14 | + } |
Loading more files…