Skip to content

Commit c3d3ad9

Browse files
committed
still working on propositional logic
1 parent 5d2b609 commit c3d3ad9

File tree

106 files changed

+14279
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+14279
-71
lines changed

.junk.swp

416 KB
Binary file not shown.

_extensions/r-wasm/live/_extension.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
title: Quarto Live
22
author: George Stagg
3-
version: 0.1.2-dev
3+
version: 0.1.3-dev
44
quarto-required: ">=1.4.0"
55
contributes:
66
filters:

_extensions/r-wasm/live/_knitr.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
# We'll handle `include: false` in Lua, always include cell in knitr output
66
knitr::opts_hooks$set(include = function(options) {
7-
if (options$engine == "webr" || options$engine == "pyodide" ) {
7+
if (options$engine == "webr" || options$engine == "pyodide") {
88
options$include <- TRUE
99
}
1010
options

_extensions/r-wasm/live/live.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,10 @@ function setupPyodide(doc)
528528

529529
-- Initial Pyodide startup options
530530
local pyodide_options = {
531-
indexURL = "https://cdn.jsdelivr.net/pyodide/v0.26.1/full/",
531+
indexURL = "https://cdn.jsdelivr.net/pyodide/v0.27.0/full/",
532+
env = {
533+
PLOTLY_RENDERER = 'plotly_mimetype',
534+
}
532535
}
533536
if (pyodide["engine-url"]) then
534537
pyodide_options["indexURL"] = pandoc.utils.stringify(pyodide["engine-url"])
@@ -593,7 +596,7 @@ function setupWebR(doc)
593596

594597
-- Initial webR startup options
595598
local webr_options = {
596-
baseUrl = "https://webr.r-wasm.org/v0.4.1/"
599+
baseUrl = "https://webr.r-wasm.org/v0.5.4/",
597600
}
598601
if (webr["engine-url"]) then
599602
webr_options["baseUrl"] = pandoc.utils.stringify(webr["engine-url"])

_extensions/r-wasm/live/resources/live-runtime.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_extensions/r-wasm/live/resources/live-runtime.js

Lines changed: 42 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_extensions/r-wasm/live/resources/pyodide-worker.js

Lines changed: 3 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_extensions/r-wasm/live/templates/webr-setup.ojs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
webROjs = {
2-
const { WebR } = window._exercise_ojs_runtime.WebR;
2+
const { WebR, ChannelType } = window._exercise_ojs_runtime.WebR;
33
const {
44
WebREvaluator,
55
WebREnvironmentManager,
@@ -37,6 +37,10 @@ webROjs = {
3737
const filesContent = document.querySelector(`script[type=\"vfs-file\"]`).textContent;
3838
const files = JSON.parse(b64Decode(filesContent));
3939

40+
// Use PostMessage channel for async communication
41+
// We do not expect to take nested prompt input in Quarto Live cells
42+
data.options.channelType = ChannelType.PostMessage;
43+
4044
// Initialise webR and setup for R code evaluation
4145
let webRPromise = (async (webR) => {
4246
statusText.textContent = `Downloading webR`;
@@ -79,11 +83,12 @@ webROjs = {
7983
let path = '';
8084
while (parts.length > 0) {
8185
path += parts.shift() + '/';
82-
try {
83-
await webR.FS.mkdir(path);
84-
} catch (e) {
85-
if (!e.message.includes("FS error")) {
86-
throw e;
86+
const analysis = await webR.FS.analyzePath(path);
87+
if (!analysis.exists) {
88+
try {
89+
await webR.FS.mkdir(path);
90+
} catch (e) {
91+
throw new Error(`Filesystem Error: "${e.message}".`);
8792
}
8893
}
8994
}

_freeze/activities/03_python-1/execute-results/html.json

Lines changed: 12 additions & 0 deletions
Large diffs are not rendered by default.

_freeze/activities/04_python-2/execute-results/html.json

Lines changed: 12 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)