Hacker Newsnew | past | comments | ask | show | jobs | submit | go_prodev's commentslogin

Hold my CPAP

Here's a fun fact, the CPAP machine lowers my Heart Rate Variability. HRV spikes when I sleep part of the night without it.


Not a mystery. This is directly correlated to the CPAP's primary goal which is to ensure a steady flow of air in and out of your lungs. Without the CPAP, your heart is reacting to variations in O2 (inflow) and CO2 (outflow), speeding up and slowing down accordingly, including experiencing stress during periods where the airway is completely obstructed.


I think that's backwards, higher HRV is better?


Yes, higher is better. The CPAP lowers HRV during use.


It's much heavier but a lot more powerful and flexible.


Thanks! And is it more or less performant on large datasets (100k+ data points).


maintainer of chartjs here.

It’s probably more performant. Chart.js isn’t designed for a ton of data and we recommend sampling before visualization . We have a builtin plugin that does a form of min/max sampling to retain peaks but cut down on the amount of data points drawn


Hey! Thanks for maintaining chartjs :)


maintainer of uPlot here :)

they're about same for line chart rendering when using decimation in both.


Wow, that's cool, thanks for working on it, I've been using Chart.js for many years :)

Performance seemed quite good with Chart.js in my case, for small to medium datasets.


With great power comes great responsibility.


GELU really is like magic:

UNARY(GELU, b / 2 * (1 + tanh(.7978845 * (b + .044715 * b * b * b))))


This is just a practical approximation to the actual mathematical definition of GELU, which is `GELU(x) := x * Φ(x)` where Φ(x) is the CDF of the Gaussian distribution.


Isn't that just erf()?


They are related but the error function approaches -1 for large negative numbers. Φ(x) approaches 0 and so does x * Φ(x).


Fast inverse square root lookalike.


You can hand that GELU definition to a mathematician and they can interpret it as a function of a real number b. The definition does not depend upon b being a floating-point number with a particular bit representation.

In contrast, the fast inverse square root really exploits the bit representation of a floating point input to cheaply compute an initial guess.


He addressed the "dad paid for everything" rumors in a recent video.

From memory he just worked for it, bought secondhand and then made a lot of money through YouTube.


Maybe they've updated it, but I found a Windows MSI link about halfway down the front page.


Streatham High Road still seems like a grey area that should be considered a high street.

It probably was a road (connecting 2 towns with no houses) when it was first named, but is more of a street (with housing either side) now, and is definitely the primary commercial street in Streatham.


It is also widely referred to as 'Streatham High Street'.


dg explains in the article


I'm always exploring new graphing libraries. Are you happy to share a link to yours?


If you click on their username, it takes you to their profile.

https://news.ycombinator.com/user?id=simonsarris

which says:

I make GoJS, a powerful canvas-based diagramming library:

http://gojs.net/

Which is not what I think of a graphing (time series, x-y points joined by lines), but otherwise seems relevant to their comment.


Thank you. I guess I should update that, since GoJS renders to SVG also if that's what you prefer (at a cost to performance of course)

Most of us who make such libraries tend to distinguish charting (time series, lines, bars) from graphing (nodes and links). Charting is, in many aspects, a much smaller problem space. Graphing requires a lot more in terms of layouts and interaction tools, grid snapping, guides, undo/redo, copy/paste, grouping, subgraphs, managing user permissions for interactivity, expand/collapse (both subgraphs and tree sections), updating the backing data when the graph is edited, etc.


It's very surprising to me that there is a market for this. But then again I have spent almost my entire professional programming career writing matlab. How does one even identify such a market? I am so curious, please share your story.


The extremely condensed story of my company (started ~1995 when I was a tiny child, I joined 2010, though now I am part owner) was a bunch of guys in an advanced research division of Digital, trying to make a visual programming language. After Digital went under they kept trying to do this, but no one wanted the language. People however were interested in the graphic tech used to make the language, so they turned that into a library, in the 1990s, called Go++ (Graph Objects for C++).

Then JGo (Java), GoDiagram (C#, WinForms and now Avalonia), GoXam (XAML/WPF C#), and GoJS.

I began GoJS as a greenfield project starting in 2010-2011 as a new grad by working with these guys who had been thinking about diagrams for years. So it had the advantage of being built from scratch (and using the brand new HTML Canvas surface) but with all the accumulated experience of their wisdom at hand any time there were design questions. In some sense I got really lucky to work on such a "brand new, but charted path" project. Not many new grads get that kind of experience...

When we released GoJS I was unsure if anyone would actually pay for JavaScript library. There weren't too many I could find in the space that weren't free (Sencha was one I found while doing research, and funny enough they tried to recruit me, flew me out to CA after I wrote a book about canvas circa 2013). But the problem space really truly is large, and you can save a year or more of development time by buying such a library, so the calculus is very worth it for many companies. Like so many people, what we sell is time, and having thought hard about these problems for so long, from layouts to really mundane undo/redo transactional stuff.


This is very true in my experience as well.

This is a key component for any good low/no code platform, process builders, workflow builders , process documentation and so on. And that is just one area.

It makes tons of sense to buy/use a library like this rather than build your own (unless that is your business). We use one from antd. Antiquated and hard to automate testing. We are looking for a more modern solution.

How compatible is GoJS with web testing tools? Most seem to have trouble with canvas.


I would say "fairly annoying", alas! I never bothered to make Selenium etc examples, though I know some customers use it. You can switch to the SVG renderer for testing if you really want to inspect the DOM after doing actions, and some customers do this too. And you can mock events if you want to, we give some basic examples: https://gojs.net/latest/samples/Robot.html

But you have to inspect programmatically one way or another. What is easiest really depends on what, exactly, you want to test. Eg testing your permissions (can a user copy a node with these checkboxes in my app selected) can be done by trying to copy and seeing how many Parts exist before and after, etc.


Thank you!


Can I ask how large your library can scale to? We have digraphs in the range of tens to hundreds of thousands of nodes, and every tool I've tried falls over. The layered digraph example from your site seems to hang forever at 10k, but that could just be how the example widget is set up.


I would be interested in the use case. It depends on how/what you want to display. Consider: https://gojs.net/latest/samples/virtualizedTree.html

Layered Digraph is by far the slowest layout. In general as you get past ~5k nodes you should consider all of https://gojs.net/latest/intro/performance.html

we have some niche performance examples like this (WARNING slightly epileptic) https://gojs.net/extras/10000parts.html, but most of those are for internal testing and not too useful for customers.


They're data-dependence graphs for a neural-network scheduling problem. Like this but way bigger to start with and then lowered to more detailed representations several times: https://netron.app/?url=https://github.com/onnx/models/raw/m... My home-grown layout engine can handle the 12k nodes for llama2 in its highest-level form in 20s or so, but its not the most featureful, and they only get bigger from there. So I always have an eye out for potential tools.


You can make it a business to build and license a JavaScript calendar widget. Many companies would rather buy such a library than have their developers pick something FOSS or develop on their own.


I was fitted for one, and was told that the lower jaw is held forward by using the upper teeth as an anchor. Over time they can cause upper and lower teeth to move.


For those who want to simulate the feeling, touch your tongue to the front of your top teeth and jut your jaw forward so you can close your jaw with your tongue staying in place, sandwiched between the front of your top teeth and back of your bottom teeth.

It was wildly uncomfortable and I gave up after three nights. Also didn't notice better sleep.


Wow, I can (just barely) slide my bottom teeth in front of my top teeth, but not with the tongue in between, and it still feels extremely weird and uncomfortable...


Does anyone have a photo of these? I can only find the boxing ones, and don't understand how they might help with snoring.


To see a photo, image search "apnea sleep guard." By jutting your lower jaw forward, it is supposed to move your whole lower jaw assembly including tongue forward. It is the tongue drooping back towards your throat that causes the snoring for most. This, in turn, should reduce episodes of reduced oxygen then leading to less wakeful events since your body is not having to jerk itself awake to keep air flowing.


Ahh, I see, thank you, so this is by design. Yeah, this much tension on your front teeth really can't be good :(


I have one, and it works well. It's the default treatment here, where CPAP is reserved for the morbidly obese.

But the effect of jaw displacement is real. Every morning it takes a few hours to move the lower jaw slowly back. And I've visited a dentist in another country, who advised against it (and had apparently rarely seen it).

It's all local.


As someone who always prefers native SQL over ORM queries, I'll add a couple of counterpoints.

Most IDEs provide intellisense/validation of ORM entities, vs treating SQL like a raw string.

ORM entities also make refactoring and impact analysis slightly easier.

Despite those benefits, I generally find ORMs a pain for anything besides the most basic queries.


For typescript I've found pgtyped to be my perfect middle ground. I write SQL queries, it auto generate typing for the query and the response.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: