This is the second post I’ve seen praising Datastar in the last 24 hours, and once again no mention of the requirement to punch a gaping hole in one’s Content-Security-Policy.
If this is the framework of the future, cyber criminals are going to have a bright future!
That's the nature of anything that does this kind of work. React, Svelte, Solid. Alpine has a CSP version but it does so little that I recommend you just accept being a Web1 MPA basic site.
I have ideas around ways around this but it's a per language template middleware.
Svelte only requires a CSP hole in its default config as a standalone library; SvelteKit does proper CSP by default, and if you're not using SvelteKit you can build CSP handling into whatever you are using instead. I assume the others are the same way.
Could you avoid eval by having a CSP mode that forces reactive expressions to only allow functions users have registered with datastar in a lookup table?
Please don't cargo cult CSP without understanding it.
unsafe-eval constrained to function constructors without inline scripts is only a concern if you are rendering user submitted HTML (most common case I see is markdown). Regardless of your CSP configuration you should be sanitizing that user submitted HTML anyway.
The linked post relies on the Datastar project, which requires use of `unsafe-eval` in one’s Content-Security-Policy [1]:
> When using a Content Security Policy (CSP), unsafe-eval must be allowed for scripts, since Datastar evaluates expressions using an IIFE (Immediately Invoked Function Expression).
The project itself links to Mozilla’s docs on CSP, which state:
> The unsafe-eval keyword can be used to override this behavior, and as with unsafe-inline, and for the same reasons: developers should avoid unsafe-eval.
Out of the box, htmx uses a similar approach, but one can disable this use of eval [2]:
htmx.config.allowEval - can be set to false to disable all features of htmx that rely on eval:
- event filters
- hx-on: attributes
- hx-vals with the js: prefix
- hx-headers with the js: prefix
I love innovation in this space, and remember when Parinfer came out having some enlightening discussions with colleagues about how they efficiently edited code.
I've since settled on Lispy and Lispyville in Emacs, and have run into very few issues over the past few years.
There's something about Lispy’s style of editing that appeals to me — the use of hugging parentheses to enable its bindings, combined with Lispyville making all of my Vim bindings safe, makes me very happy.
A scalar field is a field with one value at any point.
Temperature can be represented using a scalar field. There is only one temperature at any point in our universe.
Theories like Quantum Field Theory describe our universe as a series of interacting fields that are everywhere. The Higgs field gives us mass, a single number at any point in space.
In this sense, the space around us is permeated by many fields.
Space itself is not a single scalar field because space contains many properties at every point that cannot be represented using a single number — for that one might use a matrix of values.
Temperature seems like a bad example because its an average of energy in particles in a volume of space. The temperature at any finite point will always be zero. Like what's the temperature on the inside a neutron? Is that even mean anything?
Wait, why would the temperature at any finite point will always be zero? Because I’m quite confident it would be non zero as emptying space is stupid expensive.
And there is temperature inside a neutron, since it’s not a fundamental particle but composed of quarks: The neutron temperature T, on the Kelvin scale, is given by T = 2E/3k, where E is average neutron energy and k the Boltzmann constant.
> why would the temperature at any finite point will always be zero
Based on your answer of the temperature inside a neutron then maybe it won't be zero everywhere. Any finite point is going to either be inside a particle or outside of a particle. And since most of space is empty, and atoms are also mostly empty, the vast majority of finite points will be where there is nothing, and hence have no temperature.
> emptying space is stupid expensive
I don't what this means. Most of space is already empty.
If space is “empty”, then how come we can measure the temperature of the microwave background radiation?
Think about it…any direction we point an apparatus, we will get a reading — the static of a radio IS the CMB, and if you could take that radio into space, and have the ability to travel anywhere, that radio would still have static. As such, space cannot be “empty”, it’s filled with photons, electrons, and quarks, amongst other things.
To reach 0 Kelvin would take an infinite amount of energy (infinite is not exactly accurate but might as well be), hence “stupid expensive”. It would also create holes in the CMB. CMB has no holes, as such, there is stuff everywhere.
> how come we can measure the temperature of the microwave background radiation
Because that's the average temperature over an region not the temperature of a finite point. It's kind of like pressure; it really only makes sense at a macro level where you are averaging over a volume or region. The pressure at a singular finite point will also be zero because that singular infinitely small point will likely be in the empty space that makes up an atom.
The original comment was about scalar fields in which there is a value at every finite point. Temperature and pressure are not good examples of these. A better example would be like a magnetic or gravitational field which would have a specific value at every point in space.
This is a strange comment that probably reflects the sliver of academics you're familiar with. Who do you think wrote and continues to develop R and all those packages? There are actually many types of software in use by academics.
Academics (the mass noun, meaning something similar to "academia") does indeed learn and progress. Academics (the worker bees in the academic hive) can be super intransigent and in my experience learn a couple of tools in their younger days and never again. As they say, science advances one funeral at a time. I've found that new ideas and technologies are almost always brought in by new students, and not old academic dogs learning new technological tricks.
And I agree, but the end might be a bit optimistic at how often or efficiently that happens. In my experience, most are all too willing to accept the institutionalized choices.
There are actually a surprising number of academics in the Clojure for data science study groups. A lot of them ran into performance or portability issues with Python or R and found Clojure tools as a good solution.
Please don't make false accusations about a third part without a minimum understanding of the matter first.
Nueva Pescanova has nothing to do with this case, and I doubt that they would be interested at all in breeding a deep sea (and, most probably, non edible) species.
Deep sea cephalopods accumulate ammonia in their body as a buoyant device. This way, they don't need to spend so much energy swimming. Ammonia is fairly toxic, so they would taste either like pee, or like poison. I had touched some of this animals and the smell of rancid fat and urine last for days in your hands
Also if you put this animals at the surface they will literally burst from inside and turn into a mushy mess. I had explained this yet a few times before, but for some reason this particular Muusoctopus nursery is a recurrent history on HN.
Octopuses are benthic, so they could store a different amount of ammonia, but my bet would be that such partially disintegrated octopus product would look and taste awful. None of the other species of deep sea octopuses are fished commercially.
Hongeo-hoe is a type of fermented fish dish from Korea's Jeolla province. Hongeo-hoe is made from skate and emits a very strong, characteristic ammonia-like odor
Skates (hongeo) are cartilaginous fish that excrete uric acid through the skin, rather than by urinating as other animals do. As they ferment, ammonia is produced, which helps preserve the flesh and gives the fish its distinctive, powerful odor.
I know that some sharks and rays had a more or less strong pee taste. I personally dislike it. Skate is the only dish that I would classify as dog food grade. The line between tasty and nasty is very thin in those fishes and requires a skilled chef.
But I'm perfectly fine with the idea of some people loving the pee taste, or eating rotten shark meat, or urinating in other people's mouths while eating carp croquettes. As long as those people is not me, good for them. I'll pass. Thank you.
Feel free to eat this new discovered octopus before any other human and tell us about your experience. My bet is that will be memorable for all the wrong reasons
In any case, skate meat should be forbidden by conservation issues. Their populations are very fragile and on a sharp decline, and to eat this animals is very irresponsible.
The ammonia content of Greenland Shark doesn't prevent them from being a treat:
The traditional method begins with gutting and beheading a shark and placing it in a shallow hole dug in gravelly sand, with the cleaned cavity resting on a small mound of sand. The shark is then covered with sand and gravel, and stones are placed on top of the sand in order to press the fluids out of the body. The shark ferments in this fashion for six to twelve weeks, depending on the season. Following this curing period, the shark is cut into strips and hung to dry for several months. During this drying period, a brown crust will develop, which is removed prior to cutting the shark into small pieces and serving.
TYFYS, doing your part to Stop The Spread of dis-and-or-misinformation!
I usually accept any given internet comment as unimpeachable truth, and was just about to fire off a bunch of angry hate mail to Nueva Pescanova because of this specific thing!
Gosh, would I have felt silly to find out that they're not literally building cages for this particular species!
Do you have a source for your claim that nobody in this company is currently planning to build cages 10,000' underwater for a species that was just discovered?
"I reckon if you want to eat meat still you should mostly be eating chicken. "
But favorably chicken that has seen the sun and real soil to pick in, not only on the way to the slaughterhouse.
And there is nothing inheritently wrong with fishing, it is just that the way it is usually done, is quite horrific. But there is somewhat certified ethical fishing. Or local fishermen.
The massive problem with fishing is that the fish are wild. They need to get replaced by nature. You can’t scale up the operation. Add to that pollution, warming seas, and you’re disturbing a system way too much.
What’s the plan once the oceans are messed up permanently?
At this moment, I think factory farmed chicken would have less impact on the environment.
At this point wouldn’t it be easier to artificially select for traits that make the chicken mind more tolerant of poor conditions? Like if we can have consciousless chicken then it wouldn’t matter the condition they grow under?
It sounds way easier, to continue to pretend, that animals don't have feelings. And in general not know too much of the meat factories. Which is why many people choose this approach.
Also like the sibling comment said, not really possible with our tech and knowledge. Lab grown meat would be the way to go to achieve it.
That is one heck of a story. Salient to discussion about consciousness: to what extent does the ability to act like awareness, count as awareness for the purposes of outside observers?
You would need a clearer working model of consciousnes to be able to know whether your efforts were succeeding. But this is the idea behind lab-grown meat, just don't grow the brain at all and you don't have to worry as much.
There are other reasons than environmental for eating fish but not meat.
I used to be pescatarian and my main reason for that was factory farming. Once reason I now eat meat is that it has become a lot easier to buy meat that has been well treated.
Before I was a programmer, I was a marine biologist and also worked as a fish farmer.
By virtually all metrics, intensive land-based animal farming is much harder on the environment. Also, in terms of animal welfare, its super sketchy even with animals labeled organic.
The misinformation around fish farming is absurd. I think people want to believe in the myth that commercial fishing is a couple guys in a wooden boat; when its actually a floating factory discarding up to half or more of what it kills.
There are many aquatic things I won't eat but mostly it is of the "wild fish" variety (overfishing, pollution, mercury, bycatch). I worked a single season as a fisheries observer in Alaska. The destruction was maddening.
I put wild fish in quotes because many times they are raised in a hatcheries then released into the wild. Which has ruined the gene pool of salmon in places that do this.
After a few years raising chickens at my home farm, I became pescatarian. I drew an arbitrary line at intelligence where I wouldn't eat anything as smart or smarter than a chicken.
Anyhow, avoiding farmed fish while eating land meat is really misinformed. I think the meat industry and commercial fishing industries have managed to completely misinform the American public (and a few well-meaning but misleading documentaries on the subject).
America doesn't not farm very many aquatic things besides oysters, trout and catfish. Which are all very very green industries. I like to bring these ones up in conversations about this topic.
I think it's more to do with us being able to empathize more easily with other land animals because we're biologically similar. Fish can't scream in pain or show basically any emotion we'd recognize at all. They're so different it's like looking at a wiggling steak, so it's trivial to dismiss them as simple automatons.
Hunting/fishing for food was really more ethical many millennia ago, when humans were fewer than wild terrestrial vertebrates.
Nowadays, there are many more humans and domestic animals than wild terrestrial vertebrates, so hunting could not sustain any non-negligible fraction of the humans.
The modern methods of fishing are much too wasteful, so neither fishing has any future.
Nah fishing wild is better assuming your catch rate is sustainable for the population. Farming means taking acres of natural area with a careful web of ecological interactions that took millions of years to develop as such, and replacing all of that with a temperamental monocrop sometimes as far as the eye can see. It would be like if we fished by first sterilizing the ocean and then growing up some goldfish.
I've had a to-do item to build a collaborative AR experience for people to graffiti the world and find the creations of others.
I picked up the domain OutHere and spent some time drafting the initial experience because I think it's a compelling idea, but life has gotten in the way of late.
The current trend of projecting information onto our eyes through devices is a primitive form of sensory enhancement.
It is time to make a leap towards a more transformative innovation, which could be achieved by transmitting knowledge directly into our brains. This way, we could simply know the name of a plant by looking at it.
Reading is primarily about acquiring knowledge. I am personally excited about the idea of augmented intelligence, which would not require strapping a couple of TVs to our faces.
If this is the framework of the future, cyber criminals are going to have a bright future!