profile
viewpoint
Job van der Zwan JobLeonard IxD/supporting programmer at Linnarsson Lab Malmö

startedLLNL/zfp

started time in 5 days

startedjhallen/joes-sandbox

started time in 6 days

startedd3/d3

started time in 8 days

startedd3/d3-contour

started time in 8 days

pull request commentpieroxy/lz-string

A cornucopia of optimisations

That's not really asm.js, but integer optimization (or SMI optimization if you're on 32 bit V8). Sadly, "proper" asm.js is a bit more involved to write. It's really hard to do right, and not really practical for our case: we need to initiate our own heap, do memory management, and wait for the asm.js compiler to do its thing (which is pretty slow). The start-up time might be worse than the actually performance boost, and it is very likely that we end up making a mistake and the whole thing turns back into regular JS.

I actually was trying to clean up the PR (locally, on my machine) a month ago, and finally got around to implementing an unsafe variant that made use of typed arrays to see if that was even faster. It was:

image

However, in the process I discovered another bug in the new version, and I haven't managed to fix it in the meantime.

JobLeonard

comment created time in 9 days

startednitrousjit/nitrous

started time in 11 days

startedjunegunn/fzf

started time in 11 days

startedkristopolous/BOOTSTRA.386

started time in a month

pull request commentd3/d3-delaunay

Delaunay.update

testing here observablehq.com/d/b301cc346b009686

This is fun, looks almost alive: https://observablehq.com/d/ad7f414084bc3680

Really looking forward to this! :D

Fil

comment created time in a month

issue openedmozilla/serviceworker-cookbook

The low-contrast, no-border tabs hampers discoverability

I clicked a link to a recipe and was searching for a about five minutes for where the actual examples were before I noticed the faint text in the top-right of the page:

image

The natural way of reading that page is from the title, then down at the description.

So the meat of these examples is found through links:

  • far away from the rest of the content
  • without borders
  • with low-contrast text
  • with merely filenames as descriptions and no hint that they're the actual content you're looking for
  • and no hint in the actual attention-drawing content on the left that you should go to the top-right for those links

Look, speaking as an interaction designer: this is the kind of UI that is perfectly usable but only if you already know how to use it, which is not a good UI. In fact I would say this is bordering on actively user-hostile UI design.

I would suggest:

  • putting the file tabs next to the Readme and Demo tab on the left, perhaps with a little | between to separate them. This would make it more clear that they're tabs and clickable
  • perhaps add a border and/or underline that again tells you that the text over there is clickable
  • increase the contrast, because currently the low-contrast text fades into the background
  • use plain links to the files in the descriptions as well, with the blue + underline link mark-up that people know and expect, and prefaced with a little description telling you to click on them for more details on this recipe

created time in a month

startedjibsen/brieflz

started time in a month

pull request commentmapbox/delaunator

Add an update method for iterative algorithms

You know what, just reading from the page it's obvious that this works. And manually modifying the original coordinates array that was passed (or this.coords I guess) seems most sensible to me too: iterative changes means interacting with the raw array anyway.

So I'll just wait until this and d3-delaunay merges and update my Voronoi stippling notebook then :)

mourner

comment created time in a month

pull request commentmapbox/delaunator

Add an update method for iterative algorithms

how does this look?

It looks great! BRB, going to try it out :p

mourner

comment created time in a month

pull request commentballercat/walt

Add corollary

Did you notice the use of "I" in the preceeding paragraphs? What I'm getting at is that this commit is adding a paragraph to the motivation of ballercat to create this language. It's quite literally putting words into his mouth.

CrazyPython

comment created time in a month

startedmetafizzy/zdog

started time in 2 months

startedpenrose/penrose

started time in 2 months

startednschloe/colorio

started time in 2 months

issue commentmapbox/delaunator

Request: a mutable variant with an update method, for Voronoi relaxation purposes

The last approach could be done like this:

  • modify update to work just like the constructor does now, except that arrays are cached
  • at the start of the update method, if the cached arrays are null or too small for the number of points, (re)allocate them. Otherwise reuse previous arrays
  • modify constructor to just call this.update(coords), then set all caches to null to release memory

Does that sound like an elegant solution?

JobLeonard

comment created time in 2 months

issue commentmapbox/delaunator

Request: a mutable variant with an update method, for Voronoi relaxation purposes

I suppose one question is that we don't want to cache the arrays by default. How about not doing so until update is called at least once?

JobLeonard

comment created time in 2 months

issue commentmapbox/delaunator

Request: a mutable variant with an update method, for Voronoi relaxation purposes

Can we just split out the main code into another method that is called from both the constructor and the update function?

JobLeonard

comment created time in 2 months

pull request commentd3/d3-delaunay

upgrade to delaunator@3

Makes sense - plus the proposed mutable variant is not officially part of delaunator yet. I might fork your notebook later to see if it is even worth it (I hope so, the various stippling notebooks could use a performance boost!)

Fil

comment created time in 2 months

pull request commentd3/d3-delaunay

upgrade to delaunator@3

https://observablehq.com/d/0f4a4cc6afcc02c3

Have you considered making a variant of delaunator that uses a mutable api, like I suggested in this delaunator issue? TypedArray allocation tends to be a major bottleneck in these kinds of algorithms, so this is likely to significantly improve performance in Lloyd's Algorithm. Especially if we want to use more points!

Fil

comment created time in 2 months

startedPeltoche/lsd

started time in 2 months

started1j01/simple-console

started time in 2 months

PR opened dsalaj/awesome-quirks

Added animated emoji URL article
+1 -0

0 comment

1 changed file

pr created time in 3 months

push eventJobLeonard/awesome-quirks

Job van der Zwan

commit sha f965fef023a6fae5234a438ee0b3d0b032e0b837

Added animated emoji URL article

view details

push time in 3 months

more