1,057 karma · joined Feb 21, 2012 (14y ago) · 172 submissions
comment 2y ago · link · parent
comment 2y ago · link · parent
Pure functions are easier to reason about (there may be exceptions of course), that's why they're interesting.
This paper is not related to side-effects - it's related to "totality", meaning all programs terminate. This could also be interesting for side-effecting programs, but it's of course much harder to verify in this case.
Due to the halting problem's existance a total language can not be Turing complete, but many useful programs can be verified.
I didn't see anything in the paper that claims that pure functions should be "all the way down", and the paper is not about side effects anyway.
comment 2y ago · link · parent
I'm sure they've spent money on promoting this, but there's many reasons you'd come to this conclusion other than having it "manufactured" for you by billionaire conspiracies.
You have to start by considering that your political opponents are capable of thinking for themselves if you want to ever do more than just preach to the choir. Declaring them idiots in the guise of "providing historical context" isn't helpful.
comment 2y ago · link · parent
In general every Monad can be expressed "interpreting" the free monad. This relaxes the "one-shot" restriction, and can be implemented using delimited control. One-shot means faster performance though and is still useful for many things - and that can be implemented using coroutines.
If you acquire some understanding of what this means then you'll have a very good idea about the expressive power of what you can use coroutines (with nothing more) for, so it's very interesting.
comment 4y ago · link · parent
For instance when scaling by "a" in the x direction
M = (a 0; 0 1)
It's pretty easy to see by graphing an example that in order for the normal to work out correctly you must scale it by the inverse scale factor (1 / a), so the correct choice of M is the inverse, M⁻¹, i.e. M = ((1 /a) 0; 0 1).
This of course generalises to scaling in multiple directions (just multiply the matrices) - i.e. to diagonal matrices. For
M = (a 0; 0 b)
the correct choice for transforming the normals is
M = ((1/a) 0; 0 (1/b));
By applying singular value decomposition you get
M = UDV
So choosing M' = M⁻¹ᵀ you'll get M' = (UDV)⁻¹ᵀ = UD⁻¹V
Since orthogonal matrices U, V will actually correctly transform the normals (they're rotations or reflections) you can intuitively understand that M' will work for transforming the normals.
Question is - where does the transpose part actually come from? It's a of a bit "magic" choice. This article makes it very clear that this "arises from" the transpose in the dot product, (t⋅n = tᵀn), as the dot product defines orthogonality!
comment 4y ago · link · parent
I do this a lot is vscode to auto-fix issues and automatically add imports for the identifier under the caret. It's however frustrating in that it sometimes uses the underlying platform's dropdown widget, which doesn't respect my key bindings (Emacs-like, using C-p, C-n for up, down etc).
comment 5y ago · link · parent
This is then somehow shoehorned into "Parse / Don't typecheck" but it doesn't make much sense honestly.
comment 6y ago · link · parent
This all comes down to whether critical race theory is truly an unacceptable set of ideas, like e.g frenology, or not, that should be legitimately banned.
Should be easy to make an honest defense of that point if this is indeed the case?
comment 6y ago · link · parent
I think the idea behind the ban is that critical race theory delivers a certain leftist ideology veiled in an intent to address race or gender issues.
Agree with this or not, but this seems where to discussion should take place.
comment 6y ago · link · parent
The fact that so many devs are scared of monads and believe outrageously silly things like you need a math phd to understand them seems to be similar to being afraid of drinking dihydrogen monoxide. Even though it's only water, it has a complicated sounding scary name, so it must be bad.
17.
Bulgaria to Declare State of Emergency over Coronavirus(nytimes.com ↗)
2 points · by alipang · 6y ago · discuss
comment 6y ago · link · parent
Arguably we might one day find out that the universe is discrete at which point we could begin to try to define the naturals as something that "exists", at least up to some maximum large number. But even then the numbers are probably still best thought of as just a helpful abstraction.
comment 6y ago · link · parent
SWC has a Webpack plugin, whereas ESBuild seems to aim to replace both Webpack and Babel. Correct me if I'm wrong.
This is a big reason why I think SWC is more likely to succeed, and why I say they're in "competition" since they overlap partially, even if it's not 1-1.
comment 6y ago · link · parent
SWC is already more mature, at least more so than this project. Using rust does also seem to have some advantages compared to Go.
Still, nothing wrong with some competition, just think it'll be pretty hard to replace the entire ecosystem around Typescript/Babel/Webpack in one go. Not going to work for existing project - probably way too high of a risk for new ones, sadly.
comment 6y ago · link · parent
https://www.microsoft.com/en-us/research/wp-content/uploads/...
comment 6y ago · link · parent
The result of this is that people can't afford to just replace things as soon as they break. For instance I had a pair of nice, but not crazy expensive headphones that broke while living there.
It was very easy to find a shop that helped me repair them, but this involved a decent amount of manual work. It very unlikely this would have been more cost effective than just picking up a new pair on most other countries I've lived.
If we put higher taxes on plastics and other materials so that the cost of labour vs. the cost of physical goods were similarly changed I bet we'd see a lot of improved behaviours like this also in the more affluent parts of the world.
comment 6y ago · link · parent
The more likely outcome is that prices on a whole lot of things are about to drop drastically. Of course this does nothing to help the people who are left out of a job and can no longer contribute as they are no longer cost-effective. UBI is one option to address this, at least partially. Do you have a better one? Ban AI? Do you happen to be an anti-capitalist, and your convenient solution is (big surprise) to remove capitalism as an economic system?
I'm not saying the effect of more people being outcompeted from the job market will never be a problem. Perhaps parts of it will be solved with income redistribution being increased. Perhaps part of the effort will be in creating new jobs where humans can not be replaced. Some cookie cutter "anti megacorp" rhetoric ain't likely to help much.
comment 6y ago · link · parent
My (admittedly little) experience with Unison though is that it's far from ready for the spotlight however. Much of the docs 404, and joining their discord mostly resulted in the advice to wait for future releases.
I wish Microsoft would invest in something like the koka language https://github.com/koka-lang/koka. Perhaps the idea of content-addressable / immutable code could find a place too, but I think it's less critical.
comment 7y ago · link · parent
When I say "actual CS concepts" I mean things that have been broken down into it's core using a suitable mathematical model. This is ultimately a much more suitable way bo build tools used by engineers.
My personal concerns is that Vue to me is mostly just a reskin with new syntax on things that are already in React. Hooks become the "composition api". Redux becomes VueX. Is this necessary?
Could VueX just have been an alternative to Redux, like MobX is?
Could we just have implemented a Webpack-loader to put styles and react components together?
Some people don't like that React uses `className` instead of class. Is `v-bind:class` and various `@` notations really so much better we can justify a whole new ecosystem?
So roughly - Vue provides fragmentation in the frontend ecosystem. I like competition - but what does it really offer that justifies it? I don't get it, and now what they have been working on is just catching up to React.
comment 7y ago · link · parent
The Vue implementation seems to ultimately lack this core understanding, and comes off almost a bit cargo-cultish in comparison. React has hooks, so we must have something similar.
I don't mean this as singularly bad, I'm certain Vue can be productive and that this can be a productive feature for Vue devs - but when will we as an industry manage to evaluate software by semantics rather than the syntax we prefer? Does Vue truly offer anything over React that's not in the realm of preferred syntax?
comment 7y ago · link · parent
Type classes could certainly be argued to be one of those things, but also just existential types makes "reducers" a lot more pleasant to work with.
Check out e.g. Edward Kmett's library or read e.g. Gabriel Gonzales' post on folds if you want to know more.
[1] http://hackage.haskell.org/package/folds-0.7.5/docs/Data-Fol...
[2] http://www.haskellforall.com/2013/08/composable-streaming-fo...