profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/mreinstein/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

caolan/nodeunit 1913

Easy unit testing in node.js and the browser, based on the assert module.

mjackson/rollup-plugin-url-resolve 122

Use URLs in your Rollup imports

mreinstein/alexa-verifier 73

✓ Verify HTTP requests sent to an Alexa skill are sent from Amazon

mreinstein/collision-2d 62

2d collision routines

alexa-js/alexa-verifier-middleware 30

An express middleware that verifies HTTP requests sent to an Alexa skill are sent from Amazon.

mreinstein/ecs 29

data oriented, functional entity component system

mreinstein/constraint-solver 15

a constraint solver based on kiwi.js with better API ergonomics

mreinstein/aws-transcription-to-vtt 11

convert an AWS transcribe JSON body into a .vtt file

mreinstein/ascii-diagrams 7

no bullshit ascii diagramming

mreinstein/home-automation 5

🏠 Notes, links, and prototypes related to my home automation experiments

push eventmreinstein/boids

Mike

commit sha bd03b258450e266544badf1073e745364acc7cb9

add polyline pathway code ported from Craig Reynold's original boids implementation

view details

push time in 11 days

push eventmreinstein/boids

Mike

commit sha 44b005ee28327478fb9fad0b6fbab132908fce59

minor tweaks

view details

push time in 14 days

issue closedianmcgregor/boid

would you accept a PR that changes the API to be data oriented and functional?

Hi Ian!

I'm wondering if you'd accept a PR that makes some architectural changes to this library:

  • re-design the API to be data oriented and functional rather than object oriented
  • re-use the gl-matrix vec2 library
  • look for opportunities to reduce memory garbage creation

If these things are something that you'd be interested in for this library, I'm happy to submit a PR. That said, I don't want this to come across as pressure since it would a big breaking change. If it's not appealing no big deal. I just would rather update your library as a starting point rather than produce a new one from scratch.

Thanks again for a great module!

closed time in 15 days

mreinstein

push eventmreinstein/substrate

Mike

commit sha 8b605c1b3fe6f97ac2de952dbbea506feac69742

update deps

view details

push time in 17 days

issue commentmreinstein/ecs

visualizer: chrome devtools dark mode

a cool idea! I'm curious how you detect if the devtools are being rendered in dark mode or not? Is there a css declaration or global js variable?

pavelvasev

comment created time in 17 days

push eventmreinstein/extract

Mike

commit sha 40dc97dc79628ab5faa6acc308c28886199e6bb2

convert to esm, update all deps

view details

push time in 17 days

push eventmreinstein/extract

Mike

commit sha 158d0c84887815a04dfb9659370ea463f2180bee

update deps

view details

push time in 17 days

issue commentbjornharrtell/jsts

Is there a human friendly guide for learning how to use jts?

is jsts.geom.Coordinate(..) expecting the 2 arguments to be [ x, y] , or is it supposed to be [point0, point1] ?

In your setup code e will have 2 points (it's an array of arrays)

mreinstein

comment created time in 20 days

issue commentbjornharrtell/jsts

Is there a human friendly guide for learning how to use jts?

I get an uncaught Error with message "Points of LinearRing do not form a closed linestring".

Ahh nice, didn't realize there was a polygon factory that could take in these points and validate them

mreinstein

comment created time in 20 days

issue commentbjornharrtell/jsts

Is there a human friendly guide for learning how to use jts?

I'm guessing you are coming from a non-GIS background which is probably one reason why JSTS seem alien to you

Yes absolutely. I am ignorant of all but the most trivial of GIS concepts.

You are coming in with a list of coordinate pairs that might or might not constitute valid polygonal geometry

Also correct. This set of line segments is what gets exported from an editor that humans use to design scenes by hand.

I will try and interpret it and give a verdict if your input makes any sense.. :)

That would be absolutely amazing, thank you Björn! Understanding what criteria goes into valid polygonal geometry is probably where I'm failing, unless there is some underlying bug in JST that you mentioned before.

I'm happy to pay you for any time spent on this, or donate to some org/cause on your behalf, as I know time is not cheap, and I appreciate you taking a look at this stuff.

mreinstein

comment created time in 20 days

issue commentbjornharrtell/jsts

Is there a human friendly guide for learning how to use jts?

I'm not trying to do things in an exotic/odd way, to my original point I'm just trying to figure out how to use the library to accomplish the goal. That fiddle was the only working example I've come across. If you have any suggestions I'm eagerly listening. :-)

mreinstein

comment created time in 20 days

issue commentbjornharrtell/jsts

Is there a human friendly guide for learning how to use jts?

Here are the line segments for the scene I showed:

[[176,544],[192,560],[192,560],[192,576],[192,576],[208,592],[208,592],[208,608],[208,608],[240,640],[240,640],[256,640],[256,640],[272,656],[272,656],[288,656],[288,656],[304,672],[304,672],[352,672],[352,672],[368,688],[368,688],[560,688],[560,688],[576,672],[576,672],[624,672],[624,672],[640,656],[640,656],[656,656],[656,656],[672,640],[672,640],[688,640],[688,640],[720,608],[720,608],[720,592],[720,592],[736,576],[736,576],[736,560],[736,560],[752,544],[752,544],[752,496],[752,496],[784,464],[784,464],[832,464],[832,464],[864,496],[864,496],[864,544],[864,544],[880,560],[880,560],[880,576],[880,576],[896,592],[896,592],[896,608],[896,608],[928,640],[928,640],[944,640],[944,640],[960,656],[960,656],[976,656],[976,656],[992,672],[992,672],[1040,672],[1040,672],[1056,688],[1056,688],[1248,688],[1248,688],[1264,672],[1264,672],[1312,672],[1312,672],[1328,656],[1328,656],[1344,656],[1344,656],[1360,640],[1360,640],[1376,640],[1376,640],[1408,608],[1408,608],[1408,592],[1408,592],[1424,576],[1424,576],[1424,560],[1424,560],[1440,544],[1440,544],[1440,496],[1440,496],[1456,480],[1456,480],[1456,288],[1456,288],[1440,272],[1440,272],[1440,224],[1440,224],[1424,208],[1424,208],[1424,192],[1424,192],[1408,176],[1408,176],[1408,160],[1408,160],[1376,128],[1376,128],[1360,128],[1360,128],[1344,112],[1344,112],[1328,112],[1328,112],[1312,96],[1312,96],[1264,96],[1264,96],[1248,80],[1248,80],[1056,80],[1056,80],[1040,96],[1040,96],[992,96],[992,96],[976,112],[976,112],[960,112],[960,112],[944,128],[944,128],[928,128],[928,128],[896,160],[896,160],[896,176],[896,176],[880,192],[880,192],[880,208],[880,208],[864,224],[864,224],[864,272],[864,272],[832,304],[832,304],[784,304],[784,304],[752,272],[752,272],[752,224],[752,224],[736,208],[736,208],[736,192],[736,192],[720,176],[720,176],[720,160],[720,160],[688,128],[688,128],[672,128],[672,128],[656,112],[656,112],[640,112],[640,112],[624,96],[624,96],[576,96],[576,96],[560,80],[560,80],[368,80],[368,80],[352,96],[352,96],[304,96],[304,96],[288,112],[288,112],[272,112],[272,112],[256,128],[256,128],[240,128],[240,128],[208,160],[208,160],[208,176],[208,176],[192,192],[192,192],[192,208],[192,208],[176,224],[176,224],[176,272],[176,272],[160,288],[160,288],[160,480],[160,480],[176,496],[176,496],[176,544],[640,448],[640,496],[640,496],[608,528],[608,528],[608,544],[608,544],[560,592],[560,592],[528,592],[528,592],[512,608],[512,608],[368,608],[368,608],[352,592],[352,592],[320,592],[320,592],[304,576],[304,576],[288,576],[288,576],[240,528],[240,528],[240,496],[240,496],[224,480],[224,480],[224,416],[224,416],[352,416],[352,416],[368,432],[368,432],[576,432],[576,432],[592,448],[592,448],[640,448],[688,336],[656,368],[656,368],[640,368],[640,368],[624,384],[624,384],[576,384],[576,384],[560,368],[560,368],[544,368],[544,368],[528,352],[528,352],[528,304],[528,304],[592,240],[592,240],[608,240],[608,240],[624,256],[624,256],[656,256],[656,256],[688,288],[688,288],[688,336],[432,224],[432,288],[432,288],[416,304],[416,304],[400,304],[400,304],[384,320],[384,320],[368,320],[368,320],[352,336],[352,336],[336,336],[336,336],[288,288],[288,288],[288,240],[288,240],[304,224],[304,224],[304,208],[304,208],[320,192],[320,192],[336,192],[336,192],[352,176],[352,176],[400,176],[400,176],[416,192],[416,192],[416,208],[416,208],[432,224],[1104,256],[1088,272],[1088,272],[1072,272],[1072,272],[1056,288],[1056,288],[1024,288],[1024,288],[1008,304],[1008,304],[992,288],[992,288],[976,288],[976,288],[944,256],[944,256],[960,240],[960,240],[960,224],[960,224],[976,208],[976,208],[992,208],[992,208],[1008,192],[1008,192],[1056,192],[1056,192],[1104,240],[1104,240],[1104,256],[1296,208],[1312,224],[1312,224],[1328,224],[1328,224],[1376,272],[1376,272],[1376,288],[1376,288],[1328,336],[1328,336],[1264,336],[1264,336],[1248,320],[1248,320],[1248,304],[1248,304],[1216,272],[1216,272],[1216,240],[1216,240],[1248,208],[1248,208],[1296,208],[1152,336],[1168,352],[1168,352],[1184,352],[1184,352],[1248,416],[1248,416],[1248,432],[1248,432],[1264,448],[1264,448],[1280,464],[1280,464],[1280,480],[1280,480],[1296,496],[1296,496],[1296,512],[1296,512],[1312,528],[1312,528],[1280,560],[1280,560],[1264,560],[1264,560],[1248,576],[1248,576],[1072,576],[1072,576],[1056,560],[1056,560],[1024,560],[1024,560],[1008,544],[1008,544],[992,544],[992,544],[928,480],[928,480],[928,464],[928,464],[944,448],[944,448],[944,432],[944,432],[1040,336],[1040,336],[1152,336]]

It's a flat array of line segments, structured like this:

[
    [ x, y ],     // line 0, point 0
    [ x, y ],     // line 0, point 1

    [ x, y ],     // line 1, point 0
    [ x, y ],     // line 1, point 1

    ⋮
]

I'm thinking I'll put some interactive demo of the problem online in a little while too.

mreinstein

comment created time in 20 days

issue commentbjornharrtell/jsts

Is there a human friendly guide for learning how to use jts?

you should bring this to the upstream project which is JTS

My only problem is I'm not able to construct a Java example. Do you think providing the dataset without code or with the jsts code would be acceptable? I'm happy to do that if so.

mreinstein

comment created time in 21 days

issue commentbjornharrtell/jsts

Is there a human friendly guide for learning how to use jts?

That looks like fun geometry and a fairly exotic use of buffering

Thanks! :D I think it's pretty close to working, apart from this one problem.

I would advice you to try it in latest JTS and if that produces the same unexpected output

I updated the code from 1.2.1 (what the jsfiddle was using) to 2.7.1 (the latest.) It seems the only breaking change was the rename of some fields to underscores. e.g. _geometry._shell._points._coordinates:

const spacing = -8;
const geometryFactory = new jsts.geom.GeometryFactory();
const shell = geometryFactory.createPolygon(geoInput);
const polygon = shell.buffer(spacing, jsts.operation.buffer.BufferParameters.CAP_FLAT);

for (const geometry of polygon._geometries) {
     const oCoordinates = geometry._shell._points._coordinates;
     for (const oItem of oCoordinates.length) {
         deflatedCoordinates.push([ Math.ceil(oItem.x), Math.ceil(oItem.y) ]);
     }
}

Seems to produce the same results. geoInput in my case is just a flat array of jsts.geom.Coordinate objects.

mreinstein

comment created time in 21 days

issue commentbjornharrtell/jsts

Is there a human friendly guide for learning how to use jts?

I am only aware of this old one

I looked at that, and it definitely has fragments of useful info, thanks. I think I'm struggling because I don't see any complete examples, and then there's also the translation from jts to jsts as a result of it not being a javascript api.

I'm trying to construct a negative buffer for a given geometry, for the purposes of producing a navmesh for agent ai. I found a really old example of jsts being used at https://jsfiddle.net/Mallack/kjwf5qq4/2/ which I was able to adapt. Seems to work pretty well for simple geometries, but I'm running into problems on more complicated scenes:

Screen Shot 2021-09-04 at 2 59 28 PM

the purple lines are the negative buffered lines produced by jsts/jts. Notice how some parts of the scene don't have any lines. Do I need to declare some holes in these line segments for it to work?

mreinstein

comment created time in 21 days

issue openedbjornharrtell/jsts

Is there a human friendly guide for learning how to use jts?

I was able to find the javadocs for jts, but they are incredibly hard to read in terms of learning how to use that library.

I scoured the jts github repo but I don't see any links to places that show some examples or how to actually use this very capable but complicated API.

Do you happen to know where one might find this?

created time in 21 days

push eventmreinstein/ecs

Mike

commit sha 6c83cdd8a0a832cf51222d4bfc6c703d751aaf72

0.13.1

view details

push time in 22 days

push eventmreinstein/ecs

Mike

commit sha 225de18934077495bdbbdd39b4cffd82a42060fb

update deps

view details

push time in 22 days

push eventmreinstein/editor-curve

Mike

commit sha 30927ed772302b2777e2d0d29d435d6dfbfde51d

add link to running demo on the web

view details

push time in 23 days

push eventmreinstein/editor-curve

Mike

commit sha b5253c7516064aab12f098770c24a060f4156c9d

add screenshot

view details

push time in 23 days

push eventmreinstein/editor-curve

Mike

commit sha 9575aa78184bac8dddb9f357f1daff32682a9901

initial commit

view details

push time in 23 days

create barnchmreinstein/editor-curve

branch : main

created branch time in 25 days

created repositorymreinstein/editor-curve

a simple editor for curve creation and editing

created time in 25 days

issue commentevanw/esbuild

Support outfile as a function

It's an interesting workaround, but it doesn't help in my build pipeline because I need to modify part of the filename to strip out some characters.

onEmit or some similar handler is the last remaining thing I need before I can realistically use esbuild at work.

silvenon

comment created time in a month

issue closedmreinstein/substrate

investigate esbuild for underlying build system

currently we use rollup, but esbuild looks pretty great, and promises much faster build times.

https://esbuild.github.io/

https://github.com/mreinstein/esbuild-plugin-substrate

closed time in a month

mreinstein

issue openedmreinstein/substrate

investigate esbuild for underlying build system

currently we use rollup, but esbuild looks pretty great, and promises much faster build times.

https://esbuild.github.io/

https://github.com/mreinstein/esbuild-plugin-substrate

created time in a month

issue commentTooTallNate/plist.js

simple bug: Inconsistencies around null and undefined

@amaramth I know this is a crazy-late reply, but I'm getting ready to start tackling a v4 of plist.js. If you're still interested in having this change go into a new major version, it's upcoming.

amaramth

comment created time in a month

issue commentTooTallNate/plist.js

plist v4

since v4 would be an API breaking change, I'd be open to including any fixes related to broken parsing behavior (for example, #87 , #66, etc.)

mreinstein

comment created time in a month

PR closed TooTallNate/plist.js

Update xmldom to 0.7.x

The name of the package changed due to the owner abandoning it. More info at xmldom/xmldom#271.

This fixes #110, fixes #111.

+4 -4

12 comments

4 changed files

dylmye

pr closed time in a month

pull request commentTooTallNate/plist.js

Update xmldom to 0.7.x

resolved via https://github.com/TooTallNate/plist.js/commit/fa8e184631d3b809da1a9e3cfcf6407919871d1b (steps 1-2 in my previous comment.)

Steps 3-4 moved to #113

dylmye

comment created time in a month