Skip to content

Commit d381b07

Browse files
authored
update lua/xeus-lua snippets (#85)
* lua code updates * lua code updates * update * trigger ci * trigger ci * trigger ci * trigger ci * trigger ci
1 parent eef158e commit d381b07

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/conformance.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
install: micromamba install -y xeus-r -c conda-forge
9494
kernel-name: xr
9595
- name: xeus-lua
96-
install: micromamba install -y xeus-lua -c conda-forge
96+
install: micromamba install -y "xeus-lua>=0.10.1" -c conda-forge
9797
kernel-name: xlua
9898
- name: xeus-haskell
9999
install: |
@@ -166,6 +166,8 @@ jobs:
166166
micromamba-version: 'latest'
167167
environment-name: kernel
168168
init-shell: bash
169+
cache-environment: false
170+
cache-downloads: false
169171
create-args: >-
170172
python=3.12
171173
jupyter_client

snippets/snippets.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@
163163
"complete_code": "x = 1",
164164
"syntax_error": "function function",
165165
"input_prompt": "io.read()",
166-
"sleep_code": "-- Lua sleep requires os.execute or socket",
166+
"sleep_code": "function sleep(t)local start = os.time();repeat until os.time() > start + t end;sleep(1)",
167167
"completion_var": "test_variable_for_completion",
168168
"completion_setup": "test_variable_for_completion = 42",
169169
"completion_prefix": "test_variable_for_",
170-
"display_data_code": "ilua.display.html('<b>bold</b>')",
171-
"update_display_data_code": "-- Lua doesn't support update_display_data",
172-
"rich_execute_result_code": "// Lua uses display_data for rich output"
170+
"display_data_code": "ilua.display.display_data(ilua.display.html('<b>bold</b>'))",
171+
"update_display_data_code": "ilua.display.display_data(ilua.display.html('<b>hello</b>'), {}, {display_id = 'id1'} )\nilua.display.update_display_data(ilua.display.html('<b>world</b>'), {}, {display_id = 'id1'} )",
172+
"rich_execute_result_code": "ilua.display.html('<b>world</b>')"
173173
},
174174
"haskell": {
175175
"print_hello": "putStrLn \"hello\"",

0 commit comments

Comments
 (0)