ngrok -> gui proxy -> your dev server
341 karma · joined November 27, 2019
ngrok -> gui proxy -> your dev server
But it is not always true that one promise instance can be awaited in multiple places.
In Swift you cannot get the ref to the Promise instance, so you cannot store it or await it at multiple places.
Once you start an async fn the compiler forces you to await it where it was started (you can use `await task.value`, but that is a getter fn that creates a new hidden promise ref on every call).
To be honest this is an edge case. But I often start a read transaction on a SQLite connection just so I know multiple queries are reading from the same state (and to ensure state has not been changed between queries).
SQLite can have many readers and a single writer with WAL, so a many read transactions can exist whilst the writers move the db state forward.
- The write api is sync, but it has a hidden async await: when you do your next output with a response, if the write fails the runtime will replace the response with a http failure. This allows the runtime to auto-batch writes and optimistically assume they will succeed, without the user explicitly handling the errors or awaits.
- There are no read transactions, which would be useful to get a pointer to a snapshot at a point in time.
- Each runtime instance is limited to 128mb RAM.
- Websockets can hibernate and you do not have to pay for the time they are sleeping. This allows your clients to remain connected even when the DO is sleeping.
- They have a kind of auto RPC ability where you can talk to other DOs or workers as if they are normal JS calls, but they can actually be calling another data center. The runtime handles the serialisation and parsing.
A cloud load balancer is $20/month before you even handle traffic.
I think they are introducing a $1.50 charge for every uptime check, when they were initially free.
Auto layout does sound neat.
But this does not keep the center col exactly centered, but it does allow the content to take the free white space and then wrap when needed.
In your original post with Swift, what happens?
I am not familiar with auto layout so I do not know the exact behaviour vs CSS. Do you have a few screen shots of how it would handle different sized content?
https://jsfiddle.net/Lah5g3vb/
Changes:
- each col is now 1fr (3 cols, 33% each)
- the child elements align inside the col using `justify-self: start | center | end`
Tracks is a grid term for rows or columns, as it works in both dimensions.
There is also fit-content:
E.g: grid-template-columns: fit-content(150px) …
An interesting thing you can do with grid is align the tracks.
I wrote about this here:
- JS object appears to be at least 2x faster than document.createElement() (Chrome)
- Note: JS object only loosely represents JSX element so it is a bit unfair. But with actual JSX objects I would assume it is still somewhat faster than the DOM API.
https://youtu.be/DgVS-zXgMTk&t=1532
- Pete Hunt, one of the React devs, says "JSX is faster than the DOM because it is JS memory."
I would guess there is more overhead in creating a dom element than a JS object (which JSX elements compile to).
This becomes more complicated when the number of divs is dynamic as flex determines position based on siblings. With grid you already have defined the “layout”, and you are just placing the div into the correct position.
Grid does that in both axis too. So although you may be able to kind of replicate the 1d version with flex, it becomes much harder to align in 2D.
I wrote an article about this: https://cssprinciples.com/3/grid/
Caffeine is not the only stimulant in coffee. It’s just the most well known.
Some decaf coffee is more like “reduced caffeine”, not “no caffeine”.
1) You can add more timestamps by adding paragraphs with enter.
2) You can playback at any word by highlighting it and pressing space. You can also cut with right click on the wav ui.
What do you typically do with the text on export? E.g. Do you parse the times?
I built something similar here: https://bigwav.app
I think in general interaction between generator tools and hand written code is very difficult.
Once you start with one you cannot then use the other on the same code.
The chrome dev tools are also useful as it allows you to modify a grid in place to instantly see your changes.
I wrote a post on grid here:
With async/await, everything is still a function. Your IDE and debugger help you understand when and where a function is called. When debug-breaking on a function you have the stack trace.
Async/await gets you fast context switching for IO ops as it is a single OS process (no threads for the OS to constantly switch).
But once you go beyond a single OS process, then you need something like messaging or shared memory on top of async/await to communicate between OS processes/threads.
I think Golang jumps straight to messaging which is better for multiple cores, but misses the first step of async/await which is easier to reason about when you have a single process on a single core.
So every edit you need to take a minute to see how it renders?