1,166 karma · joined November 28, 2016
Here's an example: https://ronanarraes.com/tutorials/julia/my-julia-workflow-re...
The naive Julia version has unnecessary allocations and therefore is 23% slower than the optimized version:
@inbounds for k = 2:60000
Pp .= Fk_1 * Pu * Fk_1' .+ Q
K .= Pp * Hk' * pinv(R .+ Hk * Pp * Hk')
aux1 .= I18 .- K * Hk
Pu .= aux1 * Pp * aux1' .+ K * R * K'
result[k] = tr(Pu)
end
In order for this loop to match the C++ version you need to use C-style functions: for k = 2:60000
# Pp = Fk_1 * Pu * Fk_1' + Q
mul!(aux2, mul!(aux1, Fk_1, Pu), Fk_1')
@. Pp = aux2 + Q
# K = Pp * Hk' * pinv(R + Hk * Pp * Hk')
mul!(aux4, Hk, mul!(aux3, Pp, Hk'))
mul!(K, aux3, pinv(R + aux4))
# Pu = (I - K * Hk) * Pp * (I - K * Hk)' + K * R * K'
mul!(aux1, K, Hk)
@. aux2 = I18 - aux1
mul!(aux6, mul!(aux5, aux2, Pp), aux2')
mul!(aux5, mul!(aux3, K, R), K')
@. Pu = aux6 + aux5
result[k] = tr(Pu)
end
... which is quite dirty. But you can write the same thing in C++ like this (and even be a bit faster than Julia!): for(int k = 2; k <= 60000; k++) {
Pp = Fk_1*Pu*Fk_1.transpose() + Q;
aux1 = R + Hk*Pp*Hk.transpose();
pinv = aux1.completeOrthogonalDecomposition().pseudoInverse();
K = Pp*Hk.transpose()*pinv;
aux2 = I18 - K*Hk;
Pu = aux2*Pp*aux2.transpose() + K*R*K.transpose();
result[k-1] = Pu.trace();
}
which is much more readable than Julia's optimized version.If Julia had a linear-algebra-aware optimizing compiler (without the sheer madness of C++ template meta-programming that Eigen uses), then Julia's standing in HPC would be much, much better. I admit that it's a hard goal to achieve, since I haven't seen any language trying this (the closest I've seen is LLVM's matrix intrinsics (https://clang.llvm.org/docs/MatrixTypes.html), but it's only a proposal)
But what many older generations in tech who constantly lament about the “new generation of tech-illiterates” ignore is that there are actually quite some people (both old and young) who understand this and are actually dedicating towards learning, teaching, and creating low-level mechanisms and systems (such as the people in the Handmade Hero Network, the young new Linux hackers contributing to the kernel, and hobbyists creating their own game engines). And it’s a grave disrespect against them to say that nobody actually cares about anything. If you really are worried about this, don’t just complain and cry about it, be the change you want to see in the world.
And please note that Mac OS is NOTORIOUS for having bad/buggy/outdated support for OpenGL (which alacritty extensively uses), and this is a legitimate frustration that many developers in the low-level graphics domain have. It’s already really maddening for the devs, the contributors shouldn’t nag too much about it (I understand people outside the domain might genuinely not know this - but it’s always good to read some of the previous Github issues before filing your own, to learn the general “vive” among the core contributors)
You still have to understand the workers are also the one who's getting fucked here. The owner of the grill in the article is deliberately worsening working conditions because of his beliefs on Covid, and it's perfectly reasonable that the workers will leave you to get a new job where your boss doesn't spread Covid on you by not wearing masks. I understand businesses are hard right now, but business owners should care a bit about hygiene, it's not something that would cost you a lot.
> This city is amid a dire housing shortage, expedited by lack of new construction and a migration of buyers from more lucrative economies. The median home price increased by 57% in the last 10 years, 8.6% in the last year alone to $315k. In the meantime the median family income remains only $46k.
But I think you've correctly diagnosed the real issue here - skyrocketing housing costs. Everyone suffers from this, both the workers and the small businesses. And it's a shame that the Dems and Reps are making this an "us vs. them" issue. (There's a similar dynamic in my country too, where liberals try to raise the minimum wage a bit, and then the conservatives fiercely oppose it and latch onto small business owners for support. Of course both the establishment liberals and conservatives are totally incompetent at solving skyrocketing housing costs and general economic inequality, yada yada.)
I think the real issue here is not about workers or small businesses, but just plain-old economic inequality - in the sense that the minority rich at the top can invest on housing at their heart's content (numbers seem to always go UP!) but the majority can't afford those prices. So even though the majority at the bottom knows that the price is bullshit, the bubble will not burst unless the rich realizes that those prices are bullshit (And do they really have to realize? They can still afford those investments though! They can stay being delusional and still enjoy all the luxuries they have!) Market price is now not an objective measure of value, but instead becomes a power that real estate investors can collectively impose onto the poor. Ah, communism for the rich, capitalism for the poor...
There’s a lot of bullshit papers in every field (including computer science) now, due to the corporatization of universities and its chase for numerical metrics. It’s our job as independent thinkers to wade through the bullshit, find the hidden gems, and arrive at our own conclusions. My current take is that if you’re actually trying to find some serious philosophy, don’t look at journal papers but actual full books by philosophers (which is becoming rarer and rarer due to the incentives to pump out high-metric papers).
julia> @time (using Plots; display(plot(1:0.1:10, sin.(1:0.1:10))))
9.694037 seconds (18.29 M allocations: 1.164 GiB, 4.17% gc time, 0.40% compilation time)
To be honest, this isn't really something the devs should be proud about. 10 seconds, 18.29 M allocations and 1.164 GiB of memory just to render a simple static image is just unacceptable. In order for Julia to be a good-enough language for general scientific usage the current slow LLVM-based JIT compiler sadly isn't enough. I really want Julia to succeed, but this one problem is triumphing over every good language feature.In an ideal world Julia would have two backends:
- A fast, hand-made JIT backend (something like LuaJIT) which is mostly interpreted and only JIT-compiled in frequently run code paths.
- The current slow, almost-AOT-like LLVM backend which is only used for precompilation of packages
It's just like Debug/Release bulids in C++, except that the Debug builds are lightning fast to compile (but slower at runtime) and Release builds are slower to compile (but hyper-optimized for runtime speed). I guess there's going to be an immense engineering effort if something like this happens, given that Julia today is immensely coupled with the LLVM compiler/runtime. But that's just my pipe dream.
Agree that the artificial womb is an undererstimated milestone technology that will radically change the world. But such a technological solution isn't a perfect solution for low birth rates if you take care of the fact that you still need to take care of the kids born out of these artificial wombs (even though it could radically improve women's lives).
Land's history is... very interesting. His earlier works (such as "Kant, Capital, and the Prohibition of Incest") shows his materialist roots, but over time he began to be influenced heavily by the CCRU (which cyberfeminist Sadie Plant created) and Deleuze and Guatarri's works on schizoanalysis, along with a heavy doze of amphetamines(!). In his most productive, drug-fueled form he wrote what he called "theory-fiction", Deleuzian theory combined with fiction (cyberpunk, horror), leading to writings such as "Circitries" and "Meltdown". Land might have been overappreciated in the creation of accelerationist philosophy, but I still think he was an incredible poet. Sadly, his overreliance on drugs literally "broke" him, and after some physical/mental health issues he moved to Shanghai and after that became the neo-reactionary we know today. I think it's a quite lame ending to his philosophy career, many of his collegues tried to persuade him to budge towards the left and failed, and Land himself says that he wants to leave behind his amphetamine-fueled past self.
it's more along these three camps:
- Progressives / Left Populists (such as Bernie, AOC, etc...) - they aren't really "extreme left"; they are more moderate lib-left if you ask any Europeans. They don't really want to demolish capitalism as some actual Marxists suggest, they just want to fix/modulate capitalism to be reasonable to the ordinary people, at the expense of large corporations and free market policies. Although some of them are in the Democratic Party, they are still failing to exert any power in there, which is mostly comprised of neoliberals. However, they are gaining an noticeable amount of partisan support these days, up to the point that the neoliberals had to actually strategize a bit to make sure Bernie doesn't win in the DNC primaries.
- Neoliberals / Globalists (Obama, Biden, etc...) - this is where the majority of politicians are at, comprising the majority of the Democratic Party, as well as about half of the Republican Party (or even more). Although it seems on the surface that the Dems and Reps are fighting the shit out of each other, many of them are still bind by the common interest of supporting various austerity policies, free reign of large corporations and making sure the global free market economy continue without any problems. Note that the left tends to use the term "neoliberal" more, while the right tends to use the term "globalists" more. From the left and right populist's view they are the source of all evil, and from a neoliberal's view the populist left/right are respectively "communists" and "fascists".
- Right Populists / Nationalists (Trump, etc...) - Just like the progressives hate that the neoliberals are looting people with austerity measures and skyrocketing housing/healthcare/education costs, the right populists hate that the globalists are looting people by shutting down former industrial businesses, and imposing some weird liberal cultural hegemony upon them. Though I do not completely know the dynamics inside that camp, there seems to be a common agenda of being oppositional to immigration and being pro local business, as well as a deep hatred of liberal media. They have started to take over the GOP party, which is why there are no-Trump Republicans fighting against it.
Trump is kind of an outlier - he was a real-estate neoliberal but was kind of an outcast among them, and he forced his way into politics with many years of reality TV image-shaping. Many on the far-left criticize him being a neoliberal in right populist coating, and some on the far-right are disappointed by Trump about him having achieved nothing (which is a different phenomenon than no-Trump Republicans - I'm talking about actual fascists here!)
There are also some on the left (state communists, anarchists) as well as the far-right (fascists, neoreactionaries) which I've excluded, as they are still a bit fringe.
It also seems that the right often oversimplifies the left as well as the left oversimplifies the right, and that's partially because there are power struggles inside both of the respective camps that makes the whole situation a bit complicated. For example, if you picked a random BLM protester, chances are you'll get a neoliberal (if their protest was co-opted by the establishment Democrats), a progressive (if their protest wasn't co-opted but are still mainly peaceful and still believe in electorialism), or an anarchist (if they do not believe in electorialism and are more interested in looting and smashing the police). A naive right-populist will see protesters destroying police stations and say that the Democrats are letting this happen and the left are all "cultural Marxists", but in reality it's a situation where anarchists are on the rise and the neoliberals are failing to take control over the "peaceful/orderly protest" narrative. Actually, I don't really know if the protestors participating in the violence are simply "anarchists", maybe they are just uninterested in these labels and just want to wreck shit up as they are fed up by many decades of police suppression.
And this phenomenon is perhaps most exacerbated today, as we are experiencing a gradual but terminal decline of former capitalist empires, but nobody can imagine a new revolutionary path out (as Mark Fisher would say, "the slow cancellation of the future") Ghostly ideologies from the past (communism, fascism) are quickly recycled on the Internet for their nostalgic sign value, but as it is quickly consumed and commoditized it fails to offer a solution for the problems of our current world. And more people are listening to music [3] that admittedly makes them feel "nostalgic for a past that does not exist".
[1] https://en.wikipedia.org/wiki/Hauntology [2] https://en.wikipedia.org/wiki/Hauntology_(music) [3] https://en.wikipedia.org/wiki/Vaporwave
https://github.com/nothings/stb/blob/master/stretchy_buffer....
This basically allows you to use std::vector<T> like vectors in C, but with an added benefit that you can subscript the vector like arr[3] rather than using unwieldly functions like vector_get(arr, 3) or vector_put(arr, 3, value).
Anyways, it's frustrating that the author is kinda acting a bit scummy for something that might not have been even a problem. If he was a bit patient and had just got permission from those people beforehand... (I don't really think any of those 10 people would object to it since the commits aren't that big, unless one of them is a free software movement purist perhaps) And people generally agree on Mozilla's "95% author coverage" line so I think this controversy might have been a bit overblown.
Also there are also a shit-ton of minor logic-changing modifications when you're writing prototype gamedev code, (for example, moving an if statement here or there to tweak the physics of your platforming). These cannot be easily represented in config files, and this is why people attach lightweight scripting languages like Lua to their game engines (so that you don't have to wait for those atrocious C++ compile times when tweaking your gameplay code).
(Ironically, serde is known for its atrocious compile times, which really makes the situation even worse. Because of this some frustrated Rust gamedevs wrote their own serialization libraries such as nanoserde (https://github.com/not-fl3/nanoserde)... but you get the point.)
Before, I would try to learn how to make games by dabbling with SDL/DirectX/Cocos2D/etc, but figured out that you can't really do much with these frameworks as a beginner than just copy-pasting code in the books and tutorials. I was really able to make "complete" apps once I've grabbed a no-nonsense batteries-included framework like Corona, and I would have wasted far more time on useless low-level stuff if I haven't stumbled upon it.
Oh, and about the unfortunate name they've decided with: who really knew that this coincidence would happen haha...
$ circle taco4.cxx -I /home/sean/projects/opensource/taco/include -M /home/sean/projects/opensource/taco/Debug/lib/libtaco.so -filetype=ll
Creating compute_1 function
macro expansion: taco4.cxx:428:3
error in expansion of macro auto call_taco(const char*, const options_t&)
code injection: taco4.cxx:420:6
error thrown in @expression("c")
error: @expression:1:1
undeclared identifier 'c'
A well-defined meta language would probably have way better error messages than an accidentally-discovered language based on insane template hacks.What we should talk about instead: hygienic macros in Scheme/Rust, AST-level modification in Nim, dependent types, etc. I think metaprogramming is an aspect of programming that should be explored more, and is definitely useful for reducing boilerplate.
Although postmodernism isn’t as strictly defined as other philosophical movements, one can still clearly say what it doesn’t represent. Postmodern philosophy is typically associated on the internet as feminism/multiculturalism/Cultural Marxism, although it is none of that at all. It may have some loose ties by influencing some feminists and critical theorists through some scholars such as Foucault and Deleuze, but you can’t really mash all of them into a same philosophical movement.
By the way, it doesn’t support discrete GPU, but Nvidia GPU performace in the XPS 15 is horrible due to heavy throttling anyway.