The ones I showed presently work on Firefox and Chromium browsers. They are somewhat fragile as the security rules about clipboard access keep changing, and the page format could change. But they work today.
@Nasser "bookmarklet" is just a fancy name for a hyperlink that uses the javascript: protocol. When a browser dereferences the link, it executes the code. To use it, create a new bookmark and set the URL to the content of the bookmarklet. When viewing an MSE page (or any page with PRE tags), and open the bookmark. The bookmarklet will execute without leaving the page.
As someone who writes a lot of higher-order functions, the new syntax appears very sweet. But, for me at least, the scoping problem makes it too bitter :)
g[fn_] := {1} /. {b_} :> fn[b]
f[x_] := a |-> a + x
g[f[10]]
(* 11 *)
f[x_] := b |-> b + x (* uh-oh, "b" is used in "g" *)
g[f[10]]
(* error: Parameter specification 1 in Function[1,10+1] should be a symbol or a list of symbols. *)
@EmilioPisanty It is indeed a terrific syntax improvement... but named Function arguments still have scope problems. I've stuck to slot notation ever since a particularly unpleasant debugging session found this:
@Mr.Wizard The precedence table in the code parser that WRI has released on GitHub contains comments which detail discrepancies between the kernel parser and Precedence.
@b3m2a1 I'll have to defer to you judgment on that one... I am frequently criticized on this site for not paying enough attention to performance :) The Condition approach removes some redundant pattern-matching in exchange for other overheads. But unless the expression structure and patterns are particularly simple (and even then), it would be hard for me to predict whether that trade-off is worth it. I would have to benchmark in the context of the real problem.
Complex patterns must go in the inner $rules. I don't think that restricts the generality of the allowable patterns beyond the restrictions that Cases already places upon its patterns, but maybe you have found an example.
@CATrevillian Cases does really work with sequences even where there is only a single rule. It always inspects individual elements even when given sequence patterns and level specs. In the form I gave, it is crucial that the outer pattern i_ match everything so that Condition can do its work.
@CATrevillian The Import will only return the selected elements. However, I cannot speak to whether the internal implementation will do this by streaming the notebook or by reading the entire thing into memory. Some experimentation and/or spelunking would be required.
The old documentation center used to have index pages for things like tech notes, but that seems to be absent in version 12.1. But until they reappear...
"Tech note" in 12.1 is not so much a first-class concept as it is a qualifier applied to tutorials. Tutorial types are identified by a certa...
I have created a new chat group. Is it possible to invite related developers to my chat group? Is there any option to invite developers into a chat group?
I have recently created the chat group.
@Silvia A very formal name for the bottom part is frustrum. In this case it would be an oblique frustrum whereas it would have been a right frustrum if the cut were parallel to the base. The other part would be the apical part, that is, "the part next to the apex". I have not heard of a simple name for this part.
The mapping back then was essentially what you suggest. But I suppose at some point ater the ctrl key was introduced they decided to use it for cross-platform consistency (as opposed to Mac-only consistency).
Such redirection is a bit hacky since stderr and stdout messages might be interleaved somewhat randomly. But it works reasonably well in interactive contexts where we are just interested in whether and how things might have failed.
As for the syntax "2>&1", this is not a Mathematica feature but rather a command shell feature supported by many shells (both on Unix and Windows). It indicates that the stderr stream (channel 2) is to be redirected to the stdout stream (channel 1). This way, any error messages get captured by the Import as well.
@PlatoManiac As described in Streams and Low-Level Input and Output, if we prefix an input stream name with an exclamation mark then the stream data will be the output that results from executing the command that follows the exclamation mark. We can use any input operation: Read, ReadList, Get, Import, etc.
@LeonidShifrin Thanks for all the comments on the EntityFramework question. When I logged in and saw seven comments my first thought was, "Boy, I must have really fouled up that response" :) I have made some minor revisions to avoid implying that compilable query operators can only be used for filtering. But I hope you will forgive me for not trying to incorporate more of your observations into an already TL;DR answer :)
@anhnha If you are keen to learn all the gnarly details about the evaluation process, then I suggest reading Chapter 7 of Wagner's Power Programming with Mathematica, especially section 7.1.3. You can find a link to a free download in the answer (22724).
@Szabolcs The datasets have different types -- try evaluating Dataset`GetType /@ {ds1, ds2}. Dataset type is sensitive to the history of evaluations that created the dataset. See for example (146177).
You might take into consideration things like which answer has the best explanation (for posterity), or which has the clearest or most concise code, or is the fastest, or uses the least memory. If everything else is equal, you can always choose the one posted first. In any event, it is common practice to upvote every useful answer, whether accepted or not.
@MarkRoss You can only accept a single answer. Choose the one you like best. I know that can sometimes be difficult when there are multiple answers, but that is the way it is.
@CarlLange +1. I had the same thought when I was watching the various SPARQL/Entity LiveCEOs. A couple of times of I was ready to start shouting it at the screen ;D
@Kuba I would probably use Return if the exit point was "nearby". For long non-local exits, I would Catch/Throw -- with a localized tag to make sure I don't catch anything by accident. The boundary between the two cases is admittedly vague.
Those heuristics have sometimes changed. I know of a specific example where Return was broken for a time in v7 and v8 but fixed in v8.0.4. I've never had a problem with the two-argument form (fingers crossed).
@C.E. On the subject of "what is wrong with Return"... the scant documentation documentation says that if the second argument is omitted then the return point will be determined using heuristics.