what are you talking about ?
HN user
rogue7
Kind of agree, but in my view preventing the programmer to make mistakes is futile. I have seen awful stuff in languages made to prevent errors.
It's much better to give all the power to the programmer, to allow him to fix his mistakes rather than fantasising about preventing them.
IMHO surveillance is a problem when it is asymmetric ; which is obviously the case here. Governments for example are watching everyone inside and outside, but the people that are being monitored simply cannot really watch the people watching them. Don't you agree ?
In this view, maybe an ultra radical solution to privacy issues is : no privacy at all, for no-one. Complete and total transparency of everyone to everyone. Now the question is how to implement that ? That's obviously impossible, because someone in power will always have something to hide. So maybe if true democracy where everyone holds exactly the same amount of power that could work ? Same issue, because it is impossible to implement too. Oh well.
Agreed for cheaper prices and more flexibility. At least this is what we think we want. But do we actually want it ? A computer 40 years ago was way more expensive than now. How did people do it ? They managed. How do we do it now ? We manage, similarly.
Was there an improvement in things ? Obviously, computers are more powerful for example. But with less powerful computers, people could also be happy I believe.
I remember 15 years ago, tech has obviously evolved a lot since then, and I have learned to use more and more tech tools. But am I more efficient than then ? Happier than back then ? More skilled than back then ?
- More efficient for some things, less efficient for others. - Happier ? no. Not sadder either, similar. If anything, it's not related. - More Skilled ? No. Skilled at other things. For example my handwriting is still ok but I believe I won't be able to write so much or so quickly or so well as I used to (I should try though).
Am I saying that progress is not real ? No, of course not. Progress happens. But is it what "people" want or need ? Taking my own perspective : if it happens (and it does), I adapt - no problem. If it does not happen somehow - then I would adapt too. That's what we do.
Personally, it depends. If I could automate taking the trash out, I would do probably want to do it (not sure though). But what remains when everything is automated ?
Well, so far we have been automating many things, and we are still busy working and living as always. It's of course impossible to automate everything - we always have things to do, by necessity by also by choice ; do we really want to be idle and contribute nothing to society ? I don't, and I am sure nobody does. Being useful is an essential need.
Is it pointless then, to automate more and more ? No. It's a way to move forward, and not necessarily a "bad" way. Just not the only way.
Never heard of this joke, very funny !
For this I use gron [0]. It's very convenient.
This looks neat. However since I read about Koka's dot selection [0], I keep thinking that this is an even neater syntax:
fun showit( s : string )
s.encode(3).count.println
However, this is of course impossible to implement in most languages as the dot is already meaningful for something else.I built a small static web app [0] (with svelte and tensorflow js) that shows gradient descent. It has two kind of problems: wave (the default) and linear. In the first case, the algorithm learns y = ax + b ; in the second, y = cos(ax + b). The training data is generated from these functions with some noise.
I spent some time making it work with interpolation so that the transitions are smooth.
Then I expanded to another version, including a small neural network (nn) [1].
And finally, for the two functions that have a 2d parameter space, I included a viz of the loss [2]. You can click on the 2d space and get a new initial point for the descent, and see the trajectory.
Never really finished it, though I wrote a blog post about it [3]
[0] https://gradfront.pages.dev/
[1] https://f36dfeb7.gradfront.pages.dev/
Vaping is way less harmful than smoking.
See e.g. the study [0] conducted by Public Health England that concludes vaping is at least 95% (!) less harmful than smoking.
See also this video [1] that shows graphically the different impact it has on the lungs.
[0] https://www.gov.uk/government/news/e-cigarettes-around-95-le...
5. Many of my current projects take the form of "big data pipeline, followed by intermittent job to rebuild a static site and push it live"; astro fits very nicely in this role
You may be interested in Observable Framework [0]
In this case `d` is the entire dataframe. It's just a way of "piping" the object without having to rename it.
You are probably thinking about `df.apply(lambda row: ..., axis=1)` which operates on each row at a time and is indeed very slow since it's not vectorized. Here this is different and vectorized.
Agreed 100%. I am using this method-chaining style all the time and it works like a charm.
This is possible to do with ipywidgets [0] and all the ipy[stuff] packages.
bqplot [1] for example is great for 2D dataviz, very responsive and updates real-time. Based on D3 I believe. Usually I can do what I want with base widgets and bqplot and the result is pretty.
ipyleaflet is another popular library for maps.
I especially enjoy using them with voila [2] to create an app, or voici [3] for a pure-frontend (wasm) version.
If you want to develop a widget, the new-ish anywidget library can reveal handy [4].
For an example, see this demo [5] I made with bqplot and voici, that visualizes a log-normal distribution.
[0] https://ipywidgets.readthedocs.io/en/stable/
[1] https://github.com/bqplot/bqplot
[2] https://voila.readthedocs.io/en/stable/
[3] https://voici.readthedocs.io/en/latest/
[5] https://horaceg.github.io/long-tail/voici/render/long_tail.h...
I built a gradient descent visualizer in js with Svelte and TensorflowJS [0].
Also wrote about it in my blog [1].
Same here. _I already am eating from the trash can all the time_
So I'm a ping-pong ball, good to know
I love Vega(-lite) / Altair, the grammar of graphics plotting system is really great to build any kind of chart even when it wasn't thought through by the authors of the library. There are other wrappers for languages that lack viz libraries, such as Elixir / Livebook [0]
However, when I used it a couples years back it struggled with large vizs, I think due to Vega(-lite)'s way of embedding the data in the viz artifact.
Also, interactive is nice but often I just need a quick static plot, and matplotlib is more convenient for this, you can easily see the png in any environment etc.
These days I'm eager to see an Observable Plot [1] wrapper for Python ! See [2] for a comparison to vega-lite
[0] https://github.com/livebook-dev/vega_lite
For conda there is mamba [0], a drop-in replacement that's really fast.
By the way, the creator of mamba started his own company at https://prefix.dev/
They want to essentially leverage the conda(-forge) infrastructure to build a new cross-platform, cross-language, cargo-like package manager: pixi
Interesting pivot from the Observable team.
I loved observable and wrote a couple of notebooks, it worked great ! I'm gonna try Framework asap !
Looks cool !
Makes me think of Voila [0], in my opinion one of the most powerful solutions to build interactive app with python. It requires Jupyter notebook, IPywidgets and e.g. BQPlot.
I used the same [0], however wkhtmltopdf stopped working correctly at some point, so I am stuck printing the pdf manually with chrome at the moment. Probably an update that broke some stuff.
You need to wait a bit because there is a fair bit of precomputing in the browser when you open the page.
I will reduce the number of coin tosses to improve the UX
A small interactive introduction to bayesian inference on Observable.
Finally ! Keyword-only arguments are the best to build reliable software.
It's a bit like the redundancy of classes that led to attrs and dataclasses. It's the obvious next step.
I managed to install it with devbox (nix under the hood), works very well !
In my line of work I've been using numpyro to model physical phenomena.
There are multiple unbalanced categorical variables, so partial pooling helps a lot to infer the target in regions where the data is sparse.
I've been using nix through devbox [0] & direnv recently for an elixir project.
The experience has been good so far:
- Fully reproducible.
- Does not install things globally, rather on a per-project (directory) basis.
- Reasonably fast
One of the downsides is that cutting-edge releases of packages are not available as quickly as with other means.
Facebook has done it with their iOS Messenger app
https://engineering.fb.com/2020/03/02/data-infrastructure/me...