profile
viewpoint
Oliver Lenehan sunsetkookaburra Australia sunsetkookaburra.github.io Interested in all sorts of programming and problem solving. Contact: sunsetkookaburra+contact{{at}}outlook.com.au

sunsetkookaburra/dinocord 23

A Discord API Library for Deno 🦕

sunsetkookaburra/deno 0

A secure JavaScript and TypeScript runtime

sunsetkookaburra/deno_website2 0

deno.land website

sunsetkookaburra/griddraw 0

Grid Drawing Program

sunsetkookaburra/sunsetkookaburra.github.io 0

Home page for Sunset Kookaburra

startedRockstarLang/rockstar

started time in 2 months

pull request commentdenoland/deno

CI: Separate std tests to speed up process.

@bartlomieju #5179 was about testing with the latest binary, given that std was separated. But this was seen as unnecessary, so it was closed. (I will remove the work done for this, I put them in the same PR as it was pretty similar to 5186)

This PR is about #5186, and will test std separate to the rest of the deno build (excepting those parts which are more integral and used for testing the binary). This will speed up CI for new std modules, bringing testing time down from 20min to 1-2min.

sunsetkookaburra

comment created time in 2 months

push eventsunsetkookaburra/dinocord

Oliver Lenehan

commit sha 6f75dd4062c3ac6de3b6b847ce5b15b21bbea50c

Update README.md

view details

push time in 2 months

issue commentdenoland/deno

[WIP] Arm64/Aarch64 ci builds

Have you managed to run the binary successfully? I did manage to build it, but at runtime it would fail.

sunsetkookaburra

comment created time in 2 months

pull request commentdenoland/deno

chore: added ci stages for building aarch64 linux with cross compilation

Did you try running the binary? If you did and it worked then that's fantastic! It might be an idea though to try and get cargo test working, so that changes in deno that break aarch64 during runtime are caught before release into the wild.

06kellyjac

comment created time in 2 months

delete branch sunsetkookaburra/deno

delete branch : rgb-fmt-number

delete time in 2 months

issue commentdenoland/deno

[WIP] Arm64/Aarch64 ci builds

@ktfth I did manage to. I used docker run -v /host/directory:/container/directory to map the repo inside the root of the docker container, but I don't think with rust cross. So if you can find another way to add the folder (ADD command in a custom dockerfile for rust-cross I think) that should get you further along.

sunsetkookaburra

comment created time in 3 months

issue commentsunsetkookaburra/dinocord

unexpected reconnect & socket closed event

Dinocord doesn't attempt a reconnect at this stage of the project. As for the process continuing to run, that's an issue with my async code.

jurgenzz

comment created time in 3 months

issue commentdenoland/deno

[WIP] Arm64/Aarch64 ci builds

@ktfth this was trying to build using the ci, but following the steps for aarch64 on your machine should do much the same. Rust-Cross looks promising, but I couldn't figure out how to install python in that image or rust.

Rust cross (https://github.com/rust-embedded/cross) is so close to an answer I feel, you just need to figure out installing the build tools onto that image (rust+python+...)

sunsetkookaburra

comment created time in 3 months

startedfox-cat/coward

started time in 3 months

fork sunsetkookaburra/deno_webview

Deno bindings for webview, a tiny library for creating web-based desktop GUIs

fork in 3 months

pull request commentdenoland/deno

CI: Separate std tests, and test std with latest deno release.

Any comments on whether this is needed would be appreciated.

sunsetkookaburra

comment created time in 3 months

issue closeddenoland/deno

[std/image]: discussion on an API

(I'll work on this if it is decided that it should included)

Rationale: Go's standard library includes an image package, and since deno/std takes inspiration from Go's (porting code sometimes too), I think it would be right to include deno/std/image. Deno's could not really be a direct port from Go, due to this language feature which as far as I can tell is not elegant to solve in TypeScript/JavaScript.

// the definition of RGBA
type RGBA struct {
    R, G, B, A uint8
}
// and the definition of a "method".
// confusing naming with RGBA struct...
// this is really an RGBA64, but stored in 128bits!
func (c RGBA) RGBA() (r, g, b, a uint32)
// creating an RGBA
color = RGBA{0xff,0xff,0xff,0xff} // 4 bytes "array"/"struct"
// then
color.RGBA() // 8 bytes
// and operating on an array/struct!
//looks like a class to me!

Brief: Based on some compromises between the JS language, Python's PIL/Pillow and Go's image, I think something along the lines of this would be a good API (requesting some more opinions before I go and implement this)...

export class Color implements RGB, HSVA, ... {
  // expose the raw buffer (as Uint16Array perhaps) for fast maths/manipulation
  bytes() {return this._buf}
  get r(){/*compute from buffer*/};
  set r(){/*compute to buffer*/};
  // same for g,b,a,h,s,v,etc.
  // constructor converts a color interface to a color class
  constructor(c: RGBA | HSVA | ... ) {}
}

export interface Image {
  bitsPerPixel: number;
  colorModel: ColorModel
  pitch: number;
  width: number;
  height: number;
  at: (x: number, y: number) => Color | null;
  bytes: ()=>Uint8Array;
  set: (x: number, y: number, c: RGBA | HSVA | ... | Color) => void;
}

// All `number` values are in the range 0->1.
// this removes the view of raw data types, which are loose in JS
export interface RGB {
  r: number;
  g: number;
  b: number;
}
export interface Alpha {
  a: number
}
export interface RGBA extends RGB, Alpha {}
export interface HSV {
  h: number;
  s: number;
  v: number;
}
export interface HSVA extends HSV, Alpha {}
// extended with YUV/YCbCr/etc.

// specific implementation for raw image types
class RGBAImage implements Image {}

const colorModels = {
  rgba: RGBAImage
};
export type ColorModel = keyof typeof colorModels;

export interface ImageOptions {
  model?: ColorModel; //defaults to RGBA
  width?: number;
  height?: number;
  initialColor?: RGBA | HSVA | ... | Color;
}

// something along these lines
export function createImage(o: ImageOptions = {}): Image {
  if (o.model === "rgba") return new RGBAImage(o);
}

A further draw module inside std/image could provide an interface similar to Go's, and a wrapper to support the Web's Canvas API.

Usage:

const img = createImage({
  model: "rgba",
  width: 250,
  height: 150,
  initialColor: { r:0, g:0.1, b:0 }
});
let c = img.at(2,2);
console.log(c.r, c.g, c.b); // 0 0.1 0
img.set(2,2,{r:0.5,g:0.2,b:0.6});
c = img.at(2,2);
console.log(c.r, c.g, c.b); // 0.5 0.2 0.6

const newColor = new Color({r:0,g:1,b:1});
newColor.h; //returns computed hue value (between 0->1)

closed time in 3 months

sunsetkookaburra

issue commentdenoland/deno

[std/image]: discussion on an API

Will work on this in its own repo, that's best for the time being. When it's polished, I'll contribute that to deno/std.

sunsetkookaburra

comment created time in 3 months

PR closed denoland/deno_website2

update style.css to fix images spilling over page

Closes #371. #root img { is at the top for minimum specificity, allowing it to be overridden.

+4 -0

2 comments

1 changed file

sunsetkookaburra

pr closed time in 3 months

push eventsunsetkookaburra/deno

Marcus Weiner

commit sha f6b617784f53497b0c59d6f6f1370cb2223e38f3

Allow starting isolate from snapshot bytes on the heap (#5187)

view details

Luca Casonato

commit sha 45f9b32ef0416e0477e9f5335df49ca3cccdb6eb

Docs for deno test + minor other changes (#5185) * Added fs events example. * Added docs for `deno test`. * Renamed file server example. * Unified markdown code types. * Removed plugin topics from TOC. * Fixed links.

view details

David Sherret

commit sha e9318aa2c0b64282a53d59bfe3c5b6bee224bf39

Update to dprint 0.17.2 (#5195)

view details

Ryan Dahl

commit sha 60dfd911de693263157e28e58e4307d6eb4a3476

ci: don't fail-fast on tag build (#5189)

view details

Nayeem Rahman

commit sha e74a83a7152fc5d1f6dace1fac49062d331f1cac

fix(std/encoding/yaml): Correct exports (#5191)

view details

Bartek Iwańczuk

commit sha 0d148c6e80583dfe029d5362f61b92334a22341a

fix: remove default --allow-read perm for deno test (#5208)

view details

Bartek Iwańczuk

commit sha 32aeec9630dc91162f0408b95dd86e1c26e4c1d3

refactor: check permissions in SourceFileFetcher (#5011) This PR hot-fixes permission escapes in dynamic imports, workers and runtime compiler APIs. "permissions" parameter was added to public APIs of SourceFileFetcher and appropriate permission checks are performed during loading of local and remote files.

view details

Kitson Kelly

commit sha d16c7394cb052928d1ff9ae63cbb13811f264727

fix: Expose ErrorEvent globally (#5222)

view details

Edward Elric

commit sha b2da8f3d4e8e93d2a593f93963bc8e15d95c54d2

doc: fix typo in std/node/README.md (#4819)

view details

Ryan Dahl

commit sha fb7d7f40ed805eab5a0388f04e96224163973624

Merge std_tests.rs into integration_tests.rs.rs (#5228) * Remove usage of url_to_filename from integration_tests * Make test ports not conflict with each other

view details

Bartek Iwańczuk

commit sha a3f82c3d5ec3caad1d4ec74f49ef11adc45807d6

fix: worker benchmarks (#5227)

view details

Bert Belder

commit sha 3cccadcf0fbfc7ff4e7dd37299a65bea1cf0eab0

Change plugin interface to prevent segfaults when unloading plugin (#5210) Fixes: #3473 Closes: #5193

view details

Ryan Dahl

commit sha 73d8fa74c656841703b51bf8d52d46acf3b97cc9

BREAKING: There is no public Rust API for the CLI (#5226)

view details

Bartek Iwańczuk

commit sha d062ffc1baeccca8bf168dc1ce4e94b929478142

fix: source maps in inspector (#5223) This commit fixes problems with source maps in Chrome Devtools by substituting source map URL generated by TS compiler with actual file URL pointing to DENO_DIR. Dummy value of "source_map_url" has been removed from "ScriptOrigin". Also fixes lock file which used compiled source code to generate lock hash; it now uses source code of the file that is being compiled.

view details

Haobo Zhao

commit sha c912ffde11fc6eeb5552fce660787aa80ab2a0a9

doc: fix typo (remove redundant 'from') in first_steps.md (#5199)

view details

Lucas Machado

commit sha eec085573707d1df2bb5fbec88b9a3240613ca1f

fix(std): fix broken style guide link (#5211)

view details

Oliver Lenehan

commit sha a53943898a33d88291031cd323562e0fa70264af

split up ci

view details

Oliver Lenehan

commit sha 12b548fad8c469553e763d0872d3852750dbd3f7

fix ci std

view details

Oliver Lenehan

commit sha fb48d3ec5e911d4cbc1e63cfd537ee83591aea4a

fix ci std 2

view details

Oliver Lenehan

commit sha 4de6b024afb24958bf1b4c030d565e2b24956d23

REVERT, PURELY A TEST

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha d1bf9fcce99bc8e85324d41def18db8bbc6ad59d

split-ci: fix typo

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha e35c320e625dde51d601008f0c75fffc30ac0d91

split-ci: trigger on workflows, typo in bash

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 8dfbc3cdc189ee37458d7e29ee1bf15c89f538d9

split-ci: link version.ts and ci_std

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 50baeaf4006856b35498d792d8c93cea4ad27f28

split ci: move deno install to log version

view details

push time in 3 months

pull request commentdenoland/deno

CI: Separate std tests, and test std with latest deno release.

the change to the blob test file allows other modules and patches to be added to std/encoding without needing to wait for full ci to lint and test.

sunsetkookaburra

comment created time in 3 months

issue commentsunsetkookaburra/dinocord

Throw error when the token is invalid

thank you, my patch is to throw a string for the moment. 1.0 will specify a proper error type to be dealt with correctly. aadb640

supertiger1234

comment created time in 3 months

push eventsunsetkookaburra/dinocord

Oliver Lenehan

commit sha ef7f6c3031d436e8616fd10bd7fb9084c51e7e47

throw on invalid token

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha d1b3af2e992415ef33f1128bc634bcc1644fd973

split-ci: tidy up

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 19511e8652009c1aa8ff473aa6bff65b5ed57937

std ci fix lint issue

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha cdbc4b8a1835715a9d7490f3e4087bb8558a3630

std ci install latest deno

view details

push time in 3 months

PR opened denoland/deno

feat(std/fmt): rgb24 and bgRgb24 can use numbers for color

closes #5196

+40 -4

0 comment

2 changed files

pr created time in 3 months

create barnchsunsetkookaburra/deno

branch : rgb-fmt-number

created branch time in 3 months

issue openeddenoland/deno

std/fmt/colors.ts should allow number overload

Mentioned in the discord#dev channel. This would enable the use of numbers as rgb colors to be specified using a number literal, e.g. 0xff00ff would display as magenta. image

created time in 3 months

push eventsunsetkookaburra/deno

Marcus Weiner

commit sha f6b617784f53497b0c59d6f6f1370cb2223e38f3

Allow starting isolate from snapshot bytes on the heap (#5187)

view details

Luca Casonato

commit sha 45f9b32ef0416e0477e9f5335df49ca3cccdb6eb

Docs for deno test + minor other changes (#5185) * Added fs events example. * Added docs for `deno test`. * Renamed file server example. * Unified markdown code types. * Removed plugin topics from TOC. * Fixed links.

view details

push time in 3 months

delete branch sunsetkookaburra/deno

delete branch : rgb-fmt

delete time in 3 months

push eventsunsetkookaburra/deno

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 231b361b2ccb83741a9f2ad3dd5b939cbcdb5666

bump for ci

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha f4896bccaab59a182b827e87c6f5db29ec036d1b

split ci force std change, add path exceptions

view details

push time in 3 months

issue commentdenoland/deno

Test std with the latest released deno binary

deno during cargo build/test is testing std

nayeemrmn

comment created time in 3 months

issue commentdenoland/deno

ci should discriminate between std and core

adding an exception to the ci, so that if any dependencies of cli/js/tests are modified in std, it'll do the full ci.

sunsetkookaburra

comment created time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha b29dc44f5b2dc1f8d8fba372cebc89c2abca3a1b

add to both ci 2

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha e505d2d5ebf4edc1f16054a9308f746ecdb6e875

add to both ci

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 603178b2dce65222e4f0755cdb7a216917b3f9f2

try grep

view details

push time in 3 months

issue commentdenoland/deno

[WIP] Arm64/Aarch64 ci builds

I did try (at one point) forcing it to build v8 (on arm), and that didnt work.

sunsetkookaburra

comment created time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 4bb9a4cc0abb0e2f2af84a07a0a76bb1c448168e

fix PATH case in std/node and update ci

view details

push time in 3 months

issue commentdenoland/deno

Test std with the latest released deno binary

will work on this in #5188

nayeemrmn

comment created time in 3 months

PR opened denoland/deno

Split Continous Integration: Isolate deno/std testing

Closes #5186 this should speed up testing for deno/std, and does not affect testing of the other components of deno.

+71 -1

0 comment

2 changed files

pr created time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha b0a1a0d8150512d292d59cd82e9b91624571bed1

split ci to speed up std testing

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha f24db4d32be8eb80d0eb6ef855ec4ae159a4f950

REVERT, PURELY A TEST 2

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha ac66812e0c44c67ff2557648ad5f952aba24ccaa

REVERT, PURELY A TEST

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha f4d5e7274cba8260fa970120ed525b37cf8b93b1

fix ci std 2

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 3aca32503079b2ee2e23746c13b5d6d15a004e2e

fix ci std

view details

push time in 3 months

push eventsunsetkookaburra/deno

Michał Zdunek

commit sha 9790399bcea36091da85799c4ed86ead6c9af92a

add option to lint and format only staged files (#5172)

view details

Oliver Lenehan

commit sha 7d3728e3f4b8c9764518bcbe7e4a49cd18fb1f90

feat(std/fmt): 8bit and 24bit ANSI colors (#5168)

view details

crowlKats

commit sha abbf0339cd0013ba7d691adf76460631c6a03e9f

feat(upgrade): allow specifying a version (#5156)

view details

Seanmclem

commit sha 2b02535028f868ea8dfc471c4921a237747ccd4a

updated manual to indicate needed --unstable for --importmap (#5117)

view details

Nayeem Rahman

commit sha f184332c09c851faac50f598d29ebe4426e05464

BREAKING(std): reorganization (#5087) * Prepend underscores to private modules * Remove collectUint8Arrays() It would be a misuse of Deno.iter()'s result. * Move std/_util/async.ts to std/async * Move std/util/sha*.ts to std/hash

view details

Ryan Dahl

commit sha 5de077ab6558129d57e1212e0896caa5d5318eb1

Move style guide to docs dir (#5174)

view details

Ryan Dahl

commit sha d5dd5ae87d7598643a46f27fa4a11b2a85d42be8

std/0.50.0 Add std/version.ts and document unstableness of std.

view details

Ryan Dahl

commit sha eb505f8afcd56f4d4a372cdfbb66906d8a5107c7

Add support for X-Deno-Warning header (#5161)

view details

Ryan Dahl

commit sha b8364a263694e9845a4ad03fac53fb913667f63a

BREAKING: make Deno.hostname unstable (#5108)

view details

Nayeem Rahman

commit sha 7a635eda5e9132558ad23ea6147ab2fb3764dbdd

fix(cli/installer): Fix concurrent env handling in tests (#5182)

view details

Kitson Kelly

commit sha 670d01d0126d80c0acfd22a76148dcbd831763cb

fix: Allow multiple Set-Cookie headers (#5100)

view details

Bartek Iwańczuk

commit sha 1fddcc372196466799789350e7950cef1a38d35e

refactor(cli): unify display of errors from Rust and JS (#5183)

view details

Bartek Iwańczuk

commit sha d8f5b37218715bbc624eb53dd4b7409867b2c803

1.0.0-rc2

view details

push time in 3 months

create barnchsunsetkookaburra/deno

branch : split-ci

created branch time in 3 months

issue openeddenoland/deno

ci should descriminate between std and core

for discussion and tracking, i'll put together a PR.

created time in 3 months

push eventsunsetkookaburra/deno

Michał Zdunek

commit sha 9790399bcea36091da85799c4ed86ead6c9af92a

add option to lint and format only staged files (#5172)

view details

Oliver Lenehan

commit sha 7d3728e3f4b8c9764518bcbe7e4a49cd18fb1f90

feat(std/fmt): 8bit and 24bit ANSI colors (#5168)

view details

crowlKats

commit sha abbf0339cd0013ba7d691adf76460631c6a03e9f

feat(upgrade): allow specifying a version (#5156)

view details

Seanmclem

commit sha 2b02535028f868ea8dfc471c4921a237747ccd4a

updated manual to indicate needed --unstable for --importmap (#5117)

view details

Nayeem Rahman

commit sha f184332c09c851faac50f598d29ebe4426e05464

BREAKING(std): reorganization (#5087) * Prepend underscores to private modules * Remove collectUint8Arrays() It would be a misuse of Deno.iter()'s result. * Move std/_util/async.ts to std/async * Move std/util/sha*.ts to std/hash

view details

Ryan Dahl

commit sha 5de077ab6558129d57e1212e0896caa5d5318eb1

Move style guide to docs dir (#5174)

view details

Ryan Dahl

commit sha d5dd5ae87d7598643a46f27fa4a11b2a85d42be8

std/0.50.0 Add std/version.ts and document unstableness of std.

view details

Ryan Dahl

commit sha eb505f8afcd56f4d4a372cdfbb66906d8a5107c7

Add support for X-Deno-Warning header (#5161)

view details

Ryan Dahl

commit sha b8364a263694e9845a4ad03fac53fb913667f63a

BREAKING: make Deno.hostname unstable (#5108)

view details

Nayeem Rahman

commit sha 7a635eda5e9132558ad23ea6147ab2fb3764dbdd

fix(cli/installer): Fix concurrent env handling in tests (#5182)

view details

Kitson Kelly

commit sha 670d01d0126d80c0acfd22a76148dcbd831763cb

fix: Allow multiple Set-Cookie headers (#5100)

view details

Bartek Iwańczuk

commit sha 1fddcc372196466799789350e7950cef1a38d35e

refactor(cli): unify display of errors from Rust and JS (#5183)

view details

Bartek Iwańczuk

commit sha d8f5b37218715bbc624eb53dd4b7409867b2c803

1.0.0-rc2

view details

Oliver Lenehan

commit sha 9ef7aff160b9964404bd9b4bfe722c77518f85a4

fix(std/encoding): rework params, improve comments, expose DataType, add varnumBytes and varbigBytes

view details

Oliver Lenehan

commit sha cd4d8f3604d88080d37316943aa1ca1a507b2682

fix lint

view details

Oliver Lenehan

commit sha 5e61123c2c9b6f896840aaa3737f4124099b6a07

revert

view details

Oliver Lenehan

commit sha 937f41e47efa6b1eb6e1807304632b0fa1b3d8c8

typo

view details

Oliver Lenehan

commit sha 593b9c2194a758f91473e958ec97459f6e9587f7

unncessary variable created

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 0b53df705119cc921611c7d8ae2d26a764518f15

bump to try and resolve deno tag format ci error

view details

push time in 3 months

pull request commentdenoland/deno

feat(std/encoding/binary): add varnumBytes(), varbigBytes()

thanks as always for keep this an awesome project 😃

sunsetkookaburra

comment created time in 3 months

pull request commentdenoland/deno

feat(std/encoding/binary): add varnumBytes(), varbigBytes()

@ry just waiting on ci, reverted those param/signature changes. (Updated PR description). This is now just adding those two functions, and improving the comments.

sunsetkookaburra

comment created time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 509abcc2a07b8c9a70fb33fbf6bc519aa229f370

unncessary variable created

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 1728f76c4a90c521e5ea7f07ae34143b5eddd221

typo

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 6f4b2828692361154ecaae419cd114cea14fd48f

revert

view details

push time in 3 months

push eventsunsetkookaburra/dinocord

Oliver Lenehan

commit sha aadb640cce4e5ee113ce0270c77b85360fc9bb77

fix for breaking std version

view details

push time in 3 months

Pull request review commentdenoland/deno

fix(std/encoding/binary): refactor params. add varnumBytes, varbigBytes

 const rawTypeSizes = {   uint64: 8,   float32: 4,   float64: 8,-};+} as const; -/** Returns the number of bytes required to store the given data-type. */-export function sizeof(dataType: RawTypes): number {+/** Number of bytes required to store `dataType`. */+export function sizeof(dataType: DataType): number {   return rawTypeSizes[dataType]; }  /** Reads `n` bytes from `r`.  *- * Returns it in a `Uint8Array`, or throws `Deno.errors.UnexpectedEof` if `n` bytes cannot be read. */+ * Returns it in a `Uint8Array`, or null if `n` bytes cannot be read. */ export async function getNBytes(   r: Deno.Reader,   n: number-): Promise<Uint8Array> {+): Promise<Uint8Array | null> {   const scratch = new Uint8Array(n);   const nRead = await r.read(scratch);-  if (nRead === null || nRead < n) throw new Deno.errors.UnexpectedEof();+  if (nRead === null || nRead < n) return null;   return scratch; } -/** Decode a number from `b`, and return it as a `number`. Data-type defaults to `int32`.- * Returns `null` if `b` is too short for the data-type given in `o`. */-export function varnum(b: Uint8Array, o: VarnumOptions = {}): number | null {-  o.dataType = o.dataType ?? "int32";+/** Decode a `number` from `o.bytes`.+ *+ * If `o.bytes` is shorter than `sizeof(o.type)`, returns `null`. */+export function varnum(+  o: VarnumOptions & { bytes: Uint8Array }+): number | null {

I thought changing getNBytes to null better follows Deno.read(), but really it should error because the user is specifying they know how many bytes there are to be read. I also thought that the data-type should be compulsory, but it would make sense that that is created using the Options type first and used throughout the code. I'll revert the changes to the signature, keep the new varnumBytes() methods (less messy sometimes than putVarnum), and update the comments to reflect a default. (Thanks for reviewing and keeping me in check :) )

sunsetkookaburra

comment created time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 5a1134ed1a5810d8cc70883d4412c632eda41b7a

fix lint

view details

push time in 3 months

PR opened denoland/deno

fix(std/encoding/binary): refactor params. add varnumBytes, varbigBytes

Refactor binary module.

  • Refactor parameters, use an object.
  • Improve comments.
  • Expose DataType.
  • Add varnumBytes, varbigBytes (easier to use than putVarnum/putVarbig)
+206 -127

0 comment

2 changed files

pr created time in 3 months

create barnchsunsetkookaburra/deno

branch : binary-tweaks

created branch time in 3 months

issue commentdenoland/deno

for await of not support await when Concurrency request

@outshineamaze If you want your expected results , the listenAndServe function in std/http will suit your needs.

outshineamaze

comment created time in 3 months

issue commentdenoland/deno

for await of not support await when Concurrency request

I think what your finding is that for await will await the code block it contains, meaning that it will block any other requests because the first one is awaiting the sleep(). I think this can be closed.

outshineamaze

comment created time in 3 months

push eventsunsetkookaburra/deno

zjopy

commit sha 761b7efb3b8a140caad12803619a2e8a535cc178

fix(docs): add missing "deno run" (#5126)

view details

Yoshiya Hinosawa

commit sha dabe88f854b7cc04518c5ff75c55fa437360a91f

fix(deno_dir): better error message (#5120) Add better error messages when a cache subdirectory in `DENO_DIR` cannot be created.

view details

Bartek Iwańczuk

commit sha 0ba90c8c11089500b23761f126a8d08afd38a73e

fix(imports): fix panic on unsupported scheme (#5131)

view details

Bartek Iwańczuk

commit sha 53265fb6dbe1d1676d68b7060ba33e4ba79b9144

feat(bundle): add --config flag (#5130)

view details

Ryan Dahl

commit sha 9a8d94842044c5d91ce8ac09ed96c0e184d842b2

Remove REPL/Windows hack (#5136)

view details

Yoshiya Hinosawa

commit sha 93cf3bd5341d5985201ea0905280082d5a3310f9

feat: format deno bundle output (#5139)

view details

Bartek Iwańczuk

commit sha 2b66b8a03e4f81cc158be40d07534f26fa762c2b

BREAKING: Remove support for .wasm imports (#5135) Importing .wasm files is non-standardized therefore deciding to support current functionality past 1.0 release is risky. Besides that .wasm import posed many challenges in our codebase due to complex interactions with TS compiler which spawned thread for each encountered .wasm import. This commit removes: - cli/compilers/wasm.rs - cli/compilers/wasm_wrap.js - two integration tests related to .wasm imports

view details

Bartek Iwańczuk

commit sha aca21dad1ba576e2e8b81cfa5ac87d58c69f1de6

BREAKING: make Worker.deno unstable (#5128) This commit makes "Worker.deno" option unstable. Added new manual entry "docs/runtime/workers.md". Removed stale workers tests.

view details

Chris Knight

commit sha 5fea4e826cc106e2c42fb279a7115a52572aa907

fix: correct type error text (#5150)

view details

Ganesh R

commit sha c0e8bae498b1892b994757b5f4972913c076a65e

doc: fix typo on first_steps.md (#5149)

view details

Oliver Lenehan

commit sha a08a4abac116eda498f8ad2df13b3816ec36c9ad

feat(workers): "crypto" global accessible in Worker scope (#5121)

view details

Chris Knight

commit sha 6b73e0caff9673965df7a096c360ac336eb1cba0

add tools/README.md (#4453)

view details

Bartek Iwańczuk

commit sha f9f10229a41d000ae9e96f0907ca321f9ffdeea7

refactor: Remove cli::compilers module (#5138) This PR removes "cli/compilers/" directory. "cli/compilers/ts.rs" has been renamed to "cli/tsc.rs"

view details

Andrey Trebler

commit sha c42ad381ad64f42e54ea0c1186d81af5abfdbb66

revert PR #5002 (#5141)

view details

Bert Belder

commit sha f479b1964973264920dabca4cef963d056bf4598

Don't publish cli when tag name starts with 'std/' (#5159)

view details

luk

commit sha febb6aa68f1f1f3c5cf7640658de0807d472bea9

Fix broken links (#5164)

view details

Hossam Magdy

commit sha fca204d8335b407236e16e639099a7696f9563ee

fix typos (#5163)

view details

Ryan Dahl

commit sha 9a0bf201c2d76364038f431dccfbf67922796382

Link to code of conduct (#5165)

view details

Ryan Dahl

commit sha 4e5e6da348fb6c6d289426f313e564d6fd6fe242

Add hint on how to exit REPL (#5143) Removes exit and help commands

view details

push time in 3 months

delete branch sunsetkookaburra/deno

delete branch : image-module

delete time in 3 months

delete branch sunsetkookaburra/deno

delete branch : fix-worker-window

delete time in 3 months

push eventsunsetkookaburra/deno

Luca Casonato

commit sha 34ec3b225425cecdccf754fbc87f4a8f3728890d

Multi page manual (#5110)

view details

zjopy

commit sha 761b7efb3b8a140caad12803619a2e8a535cc178

fix(docs): add missing "deno run" (#5126)

view details

Yoshiya Hinosawa

commit sha dabe88f854b7cc04518c5ff75c55fa437360a91f

fix(deno_dir): better error message (#5120) Add better error messages when a cache subdirectory in `DENO_DIR` cannot be created.

view details

Bartek Iwańczuk

commit sha 0ba90c8c11089500b23761f126a8d08afd38a73e

fix(imports): fix panic on unsupported scheme (#5131)

view details

Bartek Iwańczuk

commit sha 53265fb6dbe1d1676d68b7060ba33e4ba79b9144

feat(bundle): add --config flag (#5130)

view details

Ryan Dahl

commit sha 9a8d94842044c5d91ce8ac09ed96c0e184d842b2

Remove REPL/Windows hack (#5136)

view details

Yoshiya Hinosawa

commit sha 93cf3bd5341d5985201ea0905280082d5a3310f9

feat: format deno bundle output (#5139)

view details

Bartek Iwańczuk

commit sha 2b66b8a03e4f81cc158be40d07534f26fa762c2b

BREAKING: Remove support for .wasm imports (#5135) Importing .wasm files is non-standardized therefore deciding to support current functionality past 1.0 release is risky. Besides that .wasm import posed many challenges in our codebase due to complex interactions with TS compiler which spawned thread for each encountered .wasm import. This commit removes: - cli/compilers/wasm.rs - cli/compilers/wasm_wrap.js - two integration tests related to .wasm imports

view details

Bartek Iwańczuk

commit sha aca21dad1ba576e2e8b81cfa5ac87d58c69f1de6

BREAKING: make Worker.deno unstable (#5128) This commit makes "Worker.deno" option unstable. Added new manual entry "docs/runtime/workers.md". Removed stale workers tests.

view details

Chris Knight

commit sha 5fea4e826cc106e2c42fb279a7115a52572aa907

fix: correct type error text (#5150)

view details

Ganesh R

commit sha c0e8bae498b1892b994757b5f4972913c076a65e

doc: fix typo on first_steps.md (#5149)

view details

Oliver Lenehan

commit sha a08a4abac116eda498f8ad2df13b3816ec36c9ad

feat(workers): "crypto" global accessible in Worker scope (#5121)

view details

Chris Knight

commit sha 6b73e0caff9673965df7a096c360ac336eb1cba0

add tools/README.md (#4453)

view details

Bartek Iwańczuk

commit sha f9f10229a41d000ae9e96f0907ca321f9ffdeea7

refactor: Remove cli::compilers module (#5138) This PR removes "cli/compilers/" directory. "cli/compilers/ts.rs" has been renamed to "cli/tsc.rs"

view details

Andrey Trebler

commit sha c42ad381ad64f42e54ea0c1186d81af5abfdbb66

revert PR #5002 (#5141)

view details

Bert Belder

commit sha f479b1964973264920dabca4cef963d056bf4598

Don't publish cli when tag name starts with 'std/' (#5159)

view details

luk

commit sha febb6aa68f1f1f3c5cf7640658de0807d472bea9

Fix broken links (#5164)

view details

Hossam Magdy

commit sha fca204d8335b407236e16e639099a7696f9563ee

fix typos (#5163)

view details

Ryan Dahl

commit sha 9a0bf201c2d76364038f431dccfbf67922796382

Link to code of conduct (#5165)

view details

Ryan Dahl

commit sha 4e5e6da348fb6c6d289426f313e564d6fd6fe242

Add hint on how to exit REPL (#5143) Removes exit and help commands

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 32878b08050ada5a91f271db4940341971f0b219

fix

view details

push time in 3 months

PR opened denoland/deno

feat(std/fmt): 8bit and 24bit ANSI colors

enable support for 8bit and 24bit ansi escape sequences in std/fmt adds

/* public */
export function rgb8(str: string, color: number): string;
export function bgRgb8(str: string, color: number): string;
export function rgb24(str: string, color: Rgb): string;
export function bgRgb24(str: string, color: Rgb): string;

/* internal only */
interface Rgb {
  r: number;
  g: number;
  b: number;
}
function clampAndTruncate(n: number, max = 255, min = 0): number;
+125 -27

0 comment

3 changed files

pr created time in 3 months

create barnchsunsetkookaburra/deno

branch : rgb-fmt

created branch time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 5826af4c07bbe73d5ca7626a254e2115ede6a800

work

view details

push time in 3 months

push eventsunsetkookaburra/dinocord

Oliver Lenehan

commit sha e9f8ae870d8bb5d5dcb9e2bd40e6871eee1e90ed

editor config again

view details

push time in 3 months

push eventsunsetkookaburra/dinocord

Oliver Lenehan

commit sha cf83c8c94e6e229552ce5bd1e7f1d827d1e92f80

fix editorconfig

view details

push time in 3 months

push eventsunsetkookaburra/dinocord

Oliver Lenehan

commit sha 7b91d375a8e0ee8750467f730e3ed6014c6f329f

editorconfig and tabs

view details

push time in 3 months

push eventsunsetkookaburra/dinocord

Oliver Lenehan

commit sha 2cae4054554b7792109c3eeda0075fa154255a02

bump to deno v1.0.0-rc1

view details

push time in 3 months

PR opened denoland/deno_website2

update style.css to fix images spilling over page

Closes #371. #root img { is at the top for minimum specificity, allowing it to be overridden.

+4 -0

0 comment

1 changed file

pr created time in 3 months

push eventsunsetkookaburra/deno_website2

Oliver Lenehan

commit sha dd300d627916dd548d385e36d4a76dcfeea5f789

update style css to fix issue with image sizes Closes #371. `#root img {` is at the top for minimum specificity, allowing it to be overridden.

view details

push time in 3 months

issue openeddenoland/deno_website2

Repository README previews not displaying images correctly.

image image

(opened to track, i'll provide a patch to public/style.css)

created time in 3 months

pull request commentdenoland/deno

fix: crypto is not accessible in a Worker scope

this should be ready now

sunsetkookaburra

comment created time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 9e22d642ec3c22e554da85bc1c52021757ff06bd

colors and web

view details

push time in 3 months

issue commentdenoland/deno

[std/image]: discussion on an API

Yep, Colors should not have any associatioln with binary data. Colors are Models and the binary bit comes when writing the image: e.g. RGBA and ARGB and ABGR are the same model, but different binary representations.

sunsetkookaburra

comment created time in 3 months

issue commentdenoland/deno

[std/image]: discussion on an API

Or perhaps I'm overthinking colors? Should a color be an interface of RGBA and then its up to the user to convert them? e.g. rgbToHsv({r:1:g0.5:b:0.2});

sunsetkookaburra

comment created time in 3 months

issue commentdenoland/deno

[std/image]: discussion on an API

commonColor does not expose the real buffer, and so I felt it would be best as a symbol for more "internal" use when converting between colors. It might be best to make it public however... just not sure of a name. .color() doesn't seem right. If it were public I would need to name a new method, (.from maybe?) to convert instead of operator overloads (which seem kinda messy here).

sunsetkookaburra

comment created time in 3 months

issue commentdenoland/deno

[std/image]: discussion on an API

Okay, so at the moment Colors look like this...

export interface AlphaModel {
  a: number;
}
export interface RGBModel {
  r: number;
  g: number;
  b: number;
}
export interface RGBAModel extends RGBModel, AlphaModel {}

export type ColorModel = AlphaModel | RGBModel | RGBAModel;

export const commonColor = Symbol();
interface Color<M=ColorModel> {
  /** A RGBA64 buffer, with the RED, GREEN, BLUE, ALPHA each taking a Uint16 */
  [commonColor](): Uint16Array;
  bytes: () => Uint8Array;
  set(c: Partial<M> | Color): void;
}

export class RGBA64 implements Color, RGBAModel {
  #buf = new Uint16Array(4);
  constructor(c: Partial<RGBAModel>) {
    this.set(c);
  }
  [commonColor](): Uint16Array { return new Uint16Array(this.#buf); }
  bytes(): Uint8Array { return new Uint8Array(this.#buf.buffer, 0, this.#buf.byteLength); }
  set(c: Partial<RGBAModel>): void;
  set(c: Color): void;
  set(c: Partial<RGBAModel> | Color): void {
    if ("bytes" in c) this.#buf.set(c[commonColor]());
    else {
      if (c.r !== undefined) this.r = c.r;
      if (c.g !== undefined) this.g = c.g;
      if (c.b !== undefined) this.b = c.b;
      if (c.a !== undefined) this.a = c.a;
    }
  }
  get r(){ return (this.#buf[0] / 0xffff); }
  get g(){ return (this.#buf[1] / 0xffff); }
  get b(){ return (this.#buf[2] / 0xffff); }
  get a(){ return (this.#buf[3] / 0xffff); }
  set r(v: number){ this.#buf[0] = (v * 0xffff); }
  set g(v: number){ this.#buf[1] = (v * 0xffff); }
  set b(v: number){ this.#buf[2] = (v * 0xffff); }
  set a(v: number){ this.#buf[3] = (v * 0xffff); }
}

Usage:

const red = new RGBA64({r:1});
console.log(red.bytes()[0]); // output: 65535
console.log(red.r); // output: 1
sunsetkookaburra

comment created time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 6075854b0ed9cfe23dbd2c090a9c50e4fa8c9400

terminate worker oops

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 1281a2b654174e7474eabc2e11241d6ac5114161

fix unresolved promise

view details

push time in 3 months

pull request commentdenoland/deno

fix: crypto is not accessible in a Worker scope + re-enable Worker Deno test

@bartlomieju Do I need to squash the commits into one, or will the PR put them into a single commit?

sunsetkookaburra

comment created time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha aaca90bb82b13a95ef135b05225120aef7b72d87

once again i've made a typo

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha b1d370d9253b50fc7bac6012c325d43482e82ed5

revert old files, tweaks

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha d392431e0b5009bfc58df292c440ff2a08c63ef5

revert and move test

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 9f6b38c97db1c03f836e2efec67fb239f65d73d9

stuffs

view details

push time in 3 months

issue commentdenoland/deno

[std/image]: discussion on an API

new ColorModel<RGB>({
  "r": 8,
  "g": 8,
  "b": 8
});
sunsetkookaburra

comment created time in 3 months

issue commentdenoland/deno

[std/image]: discussion on an API

new ColorModel<RGB>([
  { name: "r", bits: 8 },
  { name: "g", bits: 8 },
  { name: "b", bits: 8 }
]);
sunsetkookaburra

comment created time in 3 months

issue commentdenoland/deno

[std/image]: discussion on an API

Thoughts on the best API for a ColorModel...

sunsetkookaburra

comment created time in 3 months

push eventsunsetkookaburra/deno

Luca Casonato

commit sha 34ec3b225425cecdccf754fbc87f4a8f3728890d

Multi page manual (#5110)

view details

push time in 3 months

push eventsunsetkookaburra/deno

Oliver Lenehan

commit sha 1b02f48c3b240732b004248738427e74582a45b3

remove local files

view details

push time in 3 months

more