One of my favourite quotes on the topic of abstraction comes from Dijkstra, too.
The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.
HN user
One of my favourite quotes on the topic of abstraction comes from Dijkstra, too.
The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.
Scala has a very wide surface area, and it can be as simple or complex as you want it to be.
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.
This is really neat! Have you considered an ML-like module system, with functors and such? I'd be curious if they could be connected with Erlang's processes somehow :)
Cannabis, although I find it's easy to accidentally dive deep on something I didn't mean to on it -- I find combining it with coffee prevents me from getting too focused on one thing. YMMV.
GHC was released in 1992 and has a large amount of language options it supports (over 100 now, I think) https://downloads.haskell.org/~ghc/latest/docs/html/users_gu...
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.
Basic HTML Gmail hasn't changed in years and works perfectly fine for all of my needs for gmail: reading and sending emails. I find the current UI to be quite unusable, but at least there's still the basic html option.
I think you can just do
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.Anecdote: I recently purchased a laptop which came preinstalled with Windows 10. After trying 6 different Linux distributions -- Ubuntu, Fedora, Mint, Manjaro, Suse, MX Linux -- and none of them working (issues ranging from the installer not working to being totally unable to boot after the install to frequent freezing), I gave up and have gone back to Windows. I think I could've made Gentoo work with enough effort, but I don't have the patience for Gentoo that I used to.
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.)
It's nice to see the work from Type Systems as Macros (also Stephen Chang of NU) continued! Thanks for sharing.
As a long time fan of Gentoo, I felt very at home on FreeBSD, and quite liked how everything in it worked. I remember my frustration was more around software and hardware issues. In the end, it wasn't Linux; I felt left in the cold if I ever wanted to use something that wasn't made for FreeBSD.
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.
I emailed RMS during the fiasco a couple months back, in support of him. RMS has always been an inspiration to me, and I've always had a lot of respect for him -- a hero to me, if you will -- so I felt I had to let him know the world wasn't against him, even if he couldn't reply.
He did reply and let me know ways I could help.
Have you heard of Unison? If not, it may interest you -- it stores code in a syntax tree rather than as text directly.
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. :)
I'm seeing a database error, but there's a similar site with 2020 predictions (and onwards):
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
It depends on the audience and goals for your language. If your language is intended to be a playground for new ideas, like a new type system or semantic model, you may only be concerned about getting that working and into other peoples' hands for experimentation, rather than usability.
Also, more tangential, but this comment section might attract people who know the answer: any good resources for getting started on type systems more generally?
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.)
We had constant issues with our fridge water dispenser using 'Samsung' water filters bought on Amazon. Out of desperation, I just bought a cheap off-brand one, hoping if it was at least being honest about not being an official product, it'd at least be functional as a replacement. All of the issues with our fridge have since vanished.
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...
I worked for Leapforce for a while doing this sort of rating work using Google's guidelines. The guidelines were linked elsewhere in this thread and, at a glance, they are the same ones I used:
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.
I do this sometimes, and it still ignores the quoted words in favour of giving me whatever results they want. I'm not sure when it was changed to no longer require quoted words in the results, but I usually just give up on the search at that point.
Idris:
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)The logic of bubble sort is so simple that just the description is enough for an implementation. It's a common interview question for the same reason Fizzbuzz is used -- any programmer worth their salt should be able to just write it down.
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.
Among others, Haskell has bottom, unsafeCoerce, unsafePerformIO, and Data.Dynamic. Even in the dependently typed Agda, you have postulates and pragmas like NON_TERMINATING and NO_POSITIVITY_CHECK. Is there any language out there with no unsafe hatches? Even in the most rigorous languages I'm aware of, I don't think 100% guarantees exist.
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%.
I wouldn't recommend trying to modify DOM elements via CSS or extensions if you can avoid it. You're going to run into some broken web experiences.
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.
RMS made his office his residence for many years, and slept in it. The mattress made sense as it was his home. It was not there for untoward reasons as people seem to be implying.
This attack on Richard Stallman feels much like a witch hunt to me; he's being vilified, and what he's actually said and done is being buried under a bunch of mass hysteria. It's sad to see; I have a lot of respect for him and it pains me to see people calling for his head doing what he's always done in questioning the status quo. He just made the mistake of questioning the wrong thing, not of any grand crime, as he seems to be accused of; it seems like he'll be misquoted and raged at until he disappears, and I think in doing so, the world is being done a disservice.
Racket does allow usage of brackets and parentheses interchangeably, as far as I know:
> [define [plus i j] [+ i j]]
> [plus 1 2]
3I don't think generics necessarily need to have a complex specification. Standard ML's specification, despite parametric polymorphism and parameterised modules, is incredibly small and easy to understand.
This has been frustrating to watch unfold. Of five major brands not implicated -- Purina, Royal Canin, Hill’s Science Diet, Eukanuba, and Iam’s -- we've tried four and they do not agree with my dog. The brands I have found that he thrives on, Fromm and Taste of the Wild, are listed here as possibly being linked to DCM (although he does well on non-grain-free Fromm). It has been a struggle finding an ideal food not linked to DCM but also agreeable to my dog.
Idris isn't imperative (Haskell-like with dependent types), but offers features like those:
http://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).
An example of
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 ≡ 4Dotty (Scala 3) recently added support for forwarding to a contained object via an 'export' keyword.
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