xtodo WolframLang

wstp wolfram symbolic transfer protocol

notes, work in progress

xtodo

try

WolframLang fuzzy completion 2024-02-14 084213
WolframLang fuzzy completion 2024-02-14 084213

function repo

programatically turn a expression into a function

th[ft_Function , xrest___] :=
tt[ With[{expr179= ft@argHq2Ky},
With[{x881= First@ expr179, y804= Last@ expr179},
{x881, y804} /. argHq2Ky -> #1 ] ] ,
 xrest] /;
SameQ[Length@ ft, 2];

paclet package repo

how to print in binary, hex.

(* \|01f469 *)

StringLength[ FromCharacterCode[{128105, 8205, 128300}]] === 3
(* StringLength["\|01f469"] *)

pattern matching issues

assume just 1 rule:

Replace[ f[x,x] , {x -> 3, y -> 4}, {1, Infinity  } ]

(* f[3, 3] *)
(*
WolframScript does not behave the same as notebook.
In notebook, these eval correctly.
in WolframScript, they do not.
*)

StringCases[ "αβ🌞ab", StringExpression[ LetterCharacter.. ] ]
(* {Î, Î, ð, ab} *)

StringCases[ "πσ", StringExpression[ "ΠΣ" ], IgnoreCase -> True ]
(* {} *)
Attributes[ CompoundExpression ]
(* {HoldAll, Protected, ReadProtected} *)

(* CompoundExpression *)

FullForm[  a;b;c ]
(* FullForm[c] *)

FullForm[ Hold[ a;b;c ] ]
(* FullForm[Hold[a; b; c]] *)

FullForm[ HoldForm[ a;b;c ] ]
(* FullForm[HoldForm[a; b; c]] *)

What's the difference between Hold, HoldForm, Unevaluate

Mathematica save to html 2022-05-14
Mathematica save to html 2022-05-14
Wolfram exe 2022-05-14
Wolfram exe 2022-05-14
# list file path of WolframLang
Get-Command wolframscript.exe | Format-List Source

# on windows, it's usually at
# C:\Program Files\Wolfram Research\WolframScript\wolframscript.exe

on linux or MacOS, type which wolframscript

2022-05-13, commented on
https://reference.wolfram.com/language/ref/ParametricPlot.html

the two examples with Exclusions, has no effect.

ParametricPlot[{Tan[u], u}, {u, 0, 2 Pi},
 Exclusions -> Range[Pi/2, 2 Pi, Pi]]

ParametricPlot[{Tan[u], u + v}, {u, 0, 2 Pi}, {v, 0, 1},
 Exclusions -> {u == Pi/2, u == 3 Pi/2}, Axes -> None]

sequence specification:

All
all elements
None
no elements
n
elements 1 through n
UpTo[n]
elements 1 up to at most n, as available
-n
last n elements
{n}
element n only
{m,n}
elements m through n inclusive
{m,n,s}
elements m through n in steps of s

Drop

Replace