It's a large step up from "it's used for job postings in (or closely working with) mainland China", to "it's featured in Apple product announcements targeting a global audience of millions".
Has it been used in an Apple product announcement before? My search is imperfect, but I actually can't find an example (on their /newsroom subdomain).
As recently as two months ago, with the Airphone announcement, they weren't doing this:
2020 - "First, I want to recognize Apple’s family in Greater China. Though the rate of infections has dramatically declined, we know COVID-19’s effects are still being strongly felt. I want to express my deep gratitude to our team in China for their determination and spirit. As of today, all of our stores in Greater China have reopened."
2024 - "Today, Apple has 57 stores in Greater China, with thousands of team members delivering exceptional service and creating magical experiences for customers."
It's not a "loose geographical region". It's usually denotes precisely the PRC (People's Republic of China, including mainland China and the special administrative regions of Hong Kong and Macao) together with the ROC (Republic of China, usually known as Taiwan).
> especially when you are on Linux AND on macOS. I can’t run FreeBSD jails or ZFS on macOS, can I? Definitely not with one file and one command.
On macOS, docker actually launches a Linux VM to run containers. If this counts, then yes, you can run FreeBSD jails or zfs on macOS, by running a FreeBSD VM.
But it works with one command and one (Docker)file. That’s what I mean by Docker being a kludgy solution: this is way less than ideal. But for developer experience this is very nice. And that same Dockerfile runs on everything from AWS, to GCP, to k8s, to Dokku, etc.
I dislike the implementation but I cannot deny that the UX is good enough to be very popular.
This. Is Zig an interesting language? Yes sure. But “a totally new way to write programs”? No, I don’t see a single feature that is not found in any other programming languages.
There are actually two part of mechanisms in China to wall its garden.
The first part is GFW, with which people outside of China is more familiar. It operates at every international internet cable, analyzing and dynamically blocks traffic in realtime. China only have few sites that connects to international internet, with very limited bandwidth (few Tbps in total), so it's more feasible. But overall speaking, this is the easy part.
The second part of walling a garden is about controlling what's inside the garden. Every website running in China mainland needs an ICP license from the government, which can take weeks. ISPs must be state-owned (there are 4 of them in total, no local small ISPs whatsoever). Residential IPs cannot be used for serving websites because the inbound traffic of well-known ports are blocked, which is required by the law. VPN apps are illegal. etc. These are things that are much harder to do in other countries.
Speaking from a developing country with a large population of less educated people, I think you would be surprised to find out that a majority of the people in the world simply don't do "research work". Successfully booking a flight ticket from a straightforward app on their phone is already at their limit (BTW, ~80% of people in the world have never taken a plane). For most other "research" requirement like planning a trip, they would just search on tiktok to see what those influencers have to say (or nowadays, ask the AI)
To be fair, Vim and Curl are almost certainly dynamically linked, so they get to "cheat" a little. 10 megs is entirely reasonable for a statically linked utility intended to "just work" when you dump it somewhere in your $PATH.
Take the Micro editor. It's written in Go, and packs a fair bit of functionality into a single 12 meg static binary (of which a few megs is probably the runtime.)
I believe the Ken Olson quote was that nobody needed a computer in their house, but that was a time where businesses were using terminal servers... it would have been interesting to see where that would have went, but we might be heading that way again since we own nothing and everything is a only a temporary license.
The second quote was "I think there is a world market for maybe five computers", and it's attributed to Thomas Watson of IBM saying it in 1943. The real quote is indeed from Watson, but in 1953, summarizing the sales projections of a specific model of machine, and noting that they actually sold 18 of them.
Gates denies ever saying anything like the 640K quote, but it was possibly someone at Microsoft being salty about the 640K limit that IBM had imposed on the PC through its design.
IMO the take away from command-line interfaces is compact, precise and minimal design. In a transitional shell prompt like #~$, each character has its meaning. Merely copying these symbols to a watch face is the exact opposite spirit of command like interfaces.
Cool project, but I also noticed the weird choice of #:~$ as a prompt, it uses almost half the width of the clock screen. And isn't # normally used to denote root shells? I don't think I ever saw it together with $.
My favorite prompt is >: as a callback to the Swan computer in the TV show Lost (not sure if it's also used in early Apple computers).
A prompt including > can be dangerous since that character also does shell output redirection. A sloppy copy/paste could, in theory, overwrite an important file.
The usually trick here is to use a unicode character like ⟫ (U+27EB) instead, which looks basically the same, but isn't interpreted as a redirection by the shell
Using computers since 1986, not sure where I can find such precise and minimal design, when it is impossible to use them without a manual, there is no discovery, and most commands have an endless list of options.
The manual is there usually: type `man`, or `help`, or run the command with `--help`.
Most GUIs also have "endless" pages of options. Grouping them helps quite a bit.
Having many options is usually considered the trait of the rich and powerful. Studying them for the tools you use often may actually save time, compared to googling around the bush every time.
BTW: In Lisps, if is still a special form / macro, because in Lisp lists are evaluated by default, in Rebols if can be a function because blocks (lists) aren't evaluated by default.
Now about the point about Lisps and if: the regular if operator with value and expression arguments has a companion if function:
4> (special-operator-p 'if)
t
5> (fboundp 'if)
t
Unlike in some other dialects like Common Lisp, a symbol can have a binding in the macro or operator space, and in the function space at the same time.
But this if is not useful control. It's useful for things like being able to map over a function-like facsimile of the if operator. E.g. take an element of the (a b c d) or (x y z w) list depending on whether the leftmost list has a nil or t:
6> [mapcar if '(nil t nil t) '(a b c d) '(x y z w)]
(x b z d)
In the reverse direction, being able to write a macro for a function function exists, allows for ordinary macros to be "compiler macros" in the Common Lisp sense: provide optimizations for certain invocations of a function.
This dialect is not even "weird"; overall it is Common-Lisp-like. Right down to the multiple namespaces, which is why the [...] syntax exists for referring to functions and variables in a combined virtual namespace.
while there are certain simplicities and economies in a Lisp-1, it's a bad idea on the whole, and has irksome disadvantages.
Lisp-2 also has irksome disadvantages, like the verbosity in code working with functional arguments.
I want to give myself and my users the advantages of Lisp-1 and Lisp-2, as well as ways to avoid their respective disadvantages, so there is no way to get around having some kind of combination that lets us work in different styles.
I checked the Rye homepage, and it has "dialects" which allow more familiar math infix notation. In that sense it is very tcl-y, tcl technically being a lisp.
Looking at their rather confusing looping mechanisms, they probably could benefit from being a little more tcl-y, since tcl has some of the best looping semantics I've worked with.
I can tell the rye devs like the idea of everything being a function. But in their very first "language basics" section, they introduce assignment not as a function call, but as some kind of magic that happens when you have colons in a name.
So when we get to the "looping" section, it is the first time we have seen a colon-having-name outside the context of assignment:
> loop 3 { ::i , prns i }
And it is explained that the above line of code is "injecting" values for the code block to "pick up".
But right away this begs a number of questions:
* Why the double-colon? I would assume each loop-body-evaluation happens in its own scope, and that we're not creating global variables, so a single colon (:i) should be sufficient, right?
* What are we doing, conceptually? Is the ::i meant to be "a function which when given a value modifies its enclosing scope to include the symbol i" or "an unassigned symbol which the loop function will use to do something akin to term-rewriting with?"
* Do we really need a symbol at all, or could we just have a the point-free loop "loop 3 {prns}"?
* If we can't have the point free thing, is it because somehow the injected value would end up "to the left" of prns, if so, why would we want that?
* If we're doing something more like term rewriting, why isn't the symbol given as a separate argument from the body?
Rye is foremost a REBOL and REBOL has this notion of many types of words at it's core:
`word` - regular word, can evaluate to value it's bound to or call a funtion if bound to a function
`word: "value"` - set-word, assignment that you noticed
`probe :word` - get-word, always returns bound value, doesn't call a function if it's bound to a function, in Rye this is `?word`, because `:word` is left-set-word.
`'word` - literal word, evaluates to a word itself
etc ...
Rye adds even more word types. Rye also has left to right flow so it adds left-set-word. In Rye all assigned words with set-words are constants and they are used by default. So we also need a "mod-word", that is the double colon that you noticed, and left-mod-word. Because of left-to-right flow Rye also has .op-words and |pipe-words.
The logic around words, op-words and pipe-words ... I tried to explain here:
Another pattern you noticed (good observation btw:) is the idea of injected blocks that isn't used just for loops, but also for conditionals, function bodies, HOF-like functions etc ...
> Rye also has left to right flow so it adds left-set-word. In Rye all assigned words with set-words are constants and they are used by default. So we also need a "mod-word", that is the double colon that you noticed, and left-mod-word
So I would assume that the :i is actually constant within the loop body scope. That is, the loop function is doing something like this:
; i is not assigned in this scope
evaluate {1 :i, prns i}
evaluate {2 :i, prns i}
evaluate {3 :i, prns i}
; i is still not assigned in this scope
But it sounds like you're telling me that :i would actually escape the scope of the loop body and so it needs to be modifiable or else the loop will break.
Yes, Rye follows REBOL in this case. Plain block invocation doesn't create it's own scope / context. That holds for do, if, either, loop, for, map, etc.
It would be costly to have this on by default. If you want separation there are many ways to achieve it. Rye has many functions related to contexts / scopes. For creating contexts in multiple ways and evaluating code inside contexts or with context as parent or isolated context, etc.
And a lot of builtins directly accept anonymous functions in place of blocks of code.
For example for loop also accepts function if you want separation and don't mind the cost.
for { 1 2 3 } fn { x } { print x }
; which can also be written with fn1
for { 1 2 3 } fn1 { .print }
; or latest experiment where we have syntax for 3 injected blocks
; .() - same as "with"
; .[] - same as "reduce/with"
; .{} - same as "fn1"
; where it's already decided department from REBOL:
; () is "do"
; [] is "vals"
; {} is literal block
for { 1 2 3 } .{ .print }
If you treat assignment as a function, then you have to reify environments as run-time objects, whereby you basically lose lexical scope.
Lisp originally, as in LISP, had assignment as a function: it was called SET.
To use it, you usually had to quote: (SET 'VAR 42).
It worked without an environment parameter because variables were in a pervasive environment, but the quote was needed to get the variable symbol as a run-time value. (SET VAR 42)
would mean evaluate VAR to a symbol, and then pass that symbol to the SET function along with 42, so whatever variable was in VAR would be assigned.
Assignment is inherently non-functional, since it is a side-effect, so it is mostly counterproductive to model it as a function.
A pattern matching or logical language can have implicit bindings as the results of an operation, and so produce variables that way. Then instead of assignment you have shadowing, in that some construct binds a variable again that was already used, so that the most recent value then emerges, shadowing the previous one.
So tcl handles it somewhat more elegantly, I think. It also has a set function, but does not require any special quoting because it uses the $ prefix to denote "get the value of this symbol":
set a 5
puts $a #prints 5
and of course because it is modeled as a function (albeit an impure one) you can pass arguments to it as normal:
set a b
set $a 5 #equivalent to set b 5
puts $b #prints 5
of course, everything in tcl is a string, so this works too lol
I’ve personally always thought that REBOL’s use of set-words and similar constructs was a strength. It makes sense conceptually, is visually distinguishable, and maintains a strong sense of internal consistency.
REBOL (and by extension, Rye) was never designed around the idea that everything must be a function. It just turns out that this approach fits naturally within the core principles and rules of the language.
All “active” words happen to be functions, because nothing else is needed. The behavior of different word types (and, more broadly, value types) is determined by the evaluator. In that sense, you could say that Rye does have syntax, expressed through its distinct word types.
This page works beautifully in my iPhone. As I scroll down, the content slides and animates. I actually came here to say that I’m stunned that this effect can be good in mobile, only to find out your comment :D
I'm on iPhone too; I'm referring to the way scrolling down with your finger animates the content sideways, which I really don't think works well — it would have been better to just be able to scroll sideways.
[1] https://careers.microsoft.com/v2/global/en/locations/gcr.htm...
[2] https://www.thinkwithgoogle.com/intl/en-apac/collections/gre...
reply