> The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.
169 karma · joined October 11, 2017
> The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.
Written in a certain way, it's that different from writing Python 3 with PEP-484 type annotations. You can easily write Python-like code and just get things done. :)
Concurrency-wise, you can implement any concurrency model you want on top of it, and, personally, I find immutability + Task-like implementations (Monix, ZIO, IO, etc.) easier to understand than CSP, but that's just me. There's also actors & channels & threads & anything else you could want.
What's cool, though, IMO, is that once you need more power than just Pythonic Scala gives you, it has one of the most powerful type systems in the world; you can verify as much as you need to, and refine things over time. It's not a language that hamstrings you once you do need more power.
Scala gets its bad reputation from that huge surface area and flexibility, though. There was a period (2009ish, maybe) where the Scala community was having a field day with its flexibility via custom operators like '<<++>>' and implicit conversions and untyped actors that made it impossible to figure out what was going on. It was like using the worst of Erlang with the worst of Haskell with the worst of Java. I'd say they've matured past that entirely, though; in 2020, it's one of the nicer and more practical languages, ecosystem, & communities IMO. Scala is made for getting things done.
I don't think the issue here is due to static typing, but due to the age and complexity of the language implementation. It's not trivial to figure out how all of those extensions interact with each other and your changes.
brew install vim -- --with-override-system-vi --with-python3
To get a vim with python 3 on mac os. You are correct that it defaults to python 2, though.I mean, maybe my experience would've been different with a different laptop, or maybe I could've put more effort in, but this is what stops Linux from being a daily driver for me. I don't want to spend all of that time just trying to find a distribution that works, followed by even more time trying to keep it working.
I disagree with Windows' direction more and more. I very much want to like Linux and use it as a daily driver -- I tried 6 popular distributions trying to get just one to work! -- but the reality of it stops me. If this is what someone who wants to use Linux experiences, how will it ever be able to catch on for regular desktop use?
(The best experience was with MX Linux. The hardware compatibility wasn't ideal; installing proprietary nvidia drivers broke the boot; power usage was kinda poor relative to Windows; but overall, I was able to at least use it.)
FreeBSD itself was a pleasure and I wish I could use it more. I've not found a linux distribution I've found quite as nice.
He did reply and let me know ways I could help.
>Unison is a language in which programs are not text. That is, the source of truth for a program is not its textual representation as source code, but its structured representation as an abstract syntax tree.
It has some further goals for doing this which are really exciting to me, such as content-addressable code, but the starting point is similar to the one you stated. :)
https://futuretimeline.net/21stcentury/2020-2029.htm
Most of the 'predictions' have links explaining why they think this may occur in that timeframe, e.g., this one about exascale computers: https://www.futuretimeline.net/21stcentury/2021.htm#exascale
I like Philip Wadler's Programming Language Foundations in Agda: https://plfa.github.io/
>The original goal was to simply adapt Software Foundations, maintaining the same text but transposing the code from Coq to Agda. But it quickly became clear to me that after five years in the classroom I had my own ideas about how to present the material. They say you should never write a book unless you cannot not write the book, and I soon found that this was a book I could not not write.
I found Agda + PLFA was more approachable for me than Coq + Software Foundations.
(Edit: clarifying that I'm responding to the tangent.)
I've since learnt real Samsung water filters come with an authentication tag, and none of the ones I ordered on Amazon came with one. I think we've been drinking water from counterfeit filters for a year now.
https://www.samsung.com/us/home-appliances/home-appliances-a...
https://static.googleusercontent.com/media/guidelines.raterh...
If you're doing something that would skew the results to favour a certain brand, you'd be going against Google's guidelines and your contract would be terminated quickly. I found the review process of my results to be fairly stringent; they were reviewed frequently to ensure I was staying within the guidelines, and I was told even about slight deviatiations.
data EndsWith : Type where
EndsWithPeriod : (s: String) -> { auto prf : ("." `Strings.isSuffixOf` s = True) } -> EndsWith
s : EndsWith
s = EndsWithPeriod "."
-- Value of type False = True cannot be found
-- s2 : EndsWith
-- s2 = EndsWithPeriod ""
The noun one might be possible -- I'm honestly less familiar with what a proper noun is offhand. (E: prefix=>suffix)Insertion and selection sort are also O(N^2), but sorts like merge and quick will use them to sort small sublists in their recursive cases because they are fast when input is small enough.
Some languages get a lot closer than others, though -- I think Elm, Rust, Haskell, and so on are still a big improvement over the status quo of languages. I'd rather get 90% of the way there than 10%.
If I'm resorting to extensions or CSS to modify DOM elements, it's likely the web experience is already broken from my point of view. It's not something I do just for the fun of it.
> [define [plus i j] [+ i j]]
> [plus 1 2]
3http://docs.idris-lang.org/en/latest/effects/depeff.html
readInt : Eff Bool [STATE (Vect n Int), STDIO]
[STATE (Vect (S n) Int), STDIO]
http://docs.idris-lang.org/en/latest/st/machines.html logout : (store : Var) -> ST m () [store ::: Store LoggedIn :-> Store LoggedOut]
They're both implemented within Idris, as libraries/modules, rather than being compiler magic:- https://github.com/idris-lang/Idris-dev/blob/master/libs/con...
- https://github.com/idris-lang/Idris-dev/blob/master/libs/eff...
I think it'd be possible to write similar effect systems in other dependently typed languages like ATS, which is a relatively imperative language (C+ML-like).
> E.g. x ∈ ℕ ∧ x > 2 ∧ x < 5 ∧ x % 2 = 0 implies x = 4.
in Agda would be this, I think:
_ : ∀ { x : ℕ } → x > 2 → x < 5 → (x % 2) ≡ 0 → x ≡ 4 class A {
def foo(): String = ...
def bar(): String = ...
def baz(): String = ...
}
class B {
private val a: A = new A()
def foo(): String = ...
// Export a's methods as b's, except for foo, and rename baz as qux
export a.{foo => _, baz => qux, _}
}
val b = new B()
b.foo() // b's implementation
b.bar() // a's
b.qux() // a's baz