The Wolfram Front Ends

John Fultz, Wolfram Research Inc.

Join the Conversation #WolframTechConf

Why “front ends”, plural?

Cause we’ve got three of them now (and boy, is that a lot of work!)

The notebook paradigm is a huge success, and continues to be copied

So, let’s talk a little bit about what we’re doing to push it forward

New messages interface

Messages are cleaned up and provide a stack trace

hashDirectory[dir_String]:=Fold[BitXor[FileHash[#2],#1]&,0,FileNames["*",dir]]

(* might fail due to incorrect implementation of hashing which doesn't account for directories *)
hashDirectory["."]

Real-time spell-checking

Seems straightforward, but it’s interesting what this feature has pushed us to do.

High quality dictionaries

A more discriminatory notion of language settings (soon...)

Embedded locale information in every notebook (soon...)

Writing packages in the front end

A lot of this worked quite well before, but isn’t very well known.

File ⊳ New ⊳ Package...

Writing packages in the front end

A lot of this worked quite well before, but isn’t very well known.

File ⊳ New ⊳ Package...

When the code is the thing

We have two kinds of code cells...one for package code, and one for inline evaluations only

Default is Code style (Alt/Cmd+8)
Use inilne evaluations use Input style (Alt/Cmd+9)
You can toggle package/inline evaluation cells, too (Ctrl+8)

Works well with external editors, source control, etc.

Plays very nicely, e.g., with Github

So, Github and notebooks...

Do notebooks work in git/Github?

Diffs can be a little crazy (but we’re working on that)

No previews...but maybe we can fix that

Let’s go try!

How the document viewer works

Hits the Github REST API to get the state of the repo

Checks the local cache to see if anything needs populated

If so, pulls it down from Github, and builds a table of contents if necessary

Redirects to the appropriate cloud notebook

Which is to say, this is notebook programming in the Cloud

I did web development without any web development skills

And so can you!

But seriously, when can we have that Github viewer?

What you see represents just a bit over a day’s worth of development

So we ought to be able to roll something out pretty quickly.

Watch the WolframResearch Github organization account for more info.

So, iOS and notebooks...

Yes, we finally have a solution for this!

Beta is opening up today.

See Rob Raguet-Schofield’s talk, 3:30 today, Fighting Illini

A little peek into the future

Attached cells

Attach to a box

Button["click me", AttachCell[EvaluationBox[],Graphics[{Green, Arrowheads[.3],Thickness[0.05],Arrow[{{1,0},{0,1}}]},ImageSize->Small],{0,{Right,Bottom}},{Left,Top}]]

Attach to a cell

SetAttributes[AttachMonitor,HoldAll]
AttachMonitor[expr_,mon_]:=Module[{obj,result},
obj=AttachCell[EvaluationCell[],Panel[Dynamic[mon]], {0, {"CellBracket", Bottom}}];
result=expr;
NotebookDelete[obj];
result]

AttachMonitor[Do[PrimeQ[i],{i,10^7}],i]

AttachMonitor[Table[Length[FactorInteger[2^n-1]],{n,50,450,50}],ProgressIndicator[n,{50,450},ImageSize->Tiny]]

Attach to a notebook

AttachCell[EvaluationNotebook[], Button[Style["Press me",Red], NotebookDelete[EvaluationCell[]]],{-30, #}]&/@{{Left,Center},{Right,Center},{Center,Top},{Center,Bottom}};

A little peek into the future

Input fields with customizable auto-completions

InputField["",String,FieldCompletionFunction->(If[StringLength[#]>1 &&StringLength[#]<5,DictionaryLookup[Prepend[StringExpression@@Table[_,5-StringLength[#]],#],5],{}]&)]

A little peek into the future

StyleHints

Hint-hint-hint...this actually works now.

CurrentValue[EvaluationNotebook[],{StyleHints,"CodeFont"}]

CurrentValue[EvaluationNotebook[],{StyleHints,"CodeFont"}]="Courier"

CurrentValue[EvaluationNotebook[],StyleHints]=Inherited

Some other FE talks

Today

3:30–4	Wolfram Player for iOS, Rob Raguet-Schofield

5:30–6	Building Maintainable Dynamic Interfaces, Lou D’Andria

Tomorrow

1–1:30	New in 3D graphics, Yuzhu Lu

Friday

9–9:30	CDF: An Update, Andre Kuzniarek

2:30–3	Cloud Notebooks, Jan Poeschko, John Pacey
3:30–4	Typesetting, Jason Harris
4–4:30	3D Graphics, Yuzhu Lu

(and, 1-1:30 Friday, I’ll give another talk on GitLink)