Skip to content

Commit 0da048a

Browse files
author
jammy
committed
Fix lesson progress sync and improve memory-view messaging/data consistency
1 parent 1ef8428 commit 0da048a

77 files changed

Lines changed: 2947 additions & 117 deletions

Some content is hidden

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

.envrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
nvm_root="${NVM_DIR:-/home/jammy/.nvm}"
2+
if [ ! -d "$nvm_root" ] && [ -d "$HOME/.nvm" ]; then
3+
nvm_root="$HOME/.nvm"
4+
fi
5+
6+
if [ -d "$nvm_root/versions/node/v22.22.0/bin" ]; then
7+
export PATH="$nvm_root/versions/node/v22.22.0/bin:$PATH"
8+
elif [ -d "$nvm_root/versions/node/v20.19.4/bin" ]; then
9+
export PATH="$nvm_root/versions/node/v20.19.4/bin:$PATH"
10+
fi

packages/backend/prisma/content/java/lessons/java-1-1.en.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,29 @@
7070
"comparison": "0x001 != 0x002",
7171
"output": [
7272
"false"
73+
],
74+
"stack": [
75+
{
76+
"name": "a",
77+
"value": "-> 0x001",
78+
"type": "String"
79+
},
80+
{
81+
"name": "b",
82+
"value": "-> 0x002",
83+
"type": "String"
84+
}
85+
],
86+
"heap": [
87+
{
88+
"address": "0x001",
89+
"content": "\"hello\""
90+
},
91+
{
92+
"address": "0x002",
93+
"content": "\"hello\"",
94+
"new": true
95+
}
7396
]
7497
}
7598
},
@@ -83,6 +106,29 @@
83106
"comparison": "\"hello\" == \"hello\"",
84107
"output": [
85108
"true"
109+
],
110+
"stack": [
111+
{
112+
"name": "a",
113+
"value": "-> 0x001",
114+
"type": "String"
115+
},
116+
{
117+
"name": "b",
118+
"value": "-> 0x002",
119+
"type": "String"
120+
}
121+
],
122+
"heap": [
123+
{
124+
"address": "0x001",
125+
"content": "\"hello\""
126+
},
127+
{
128+
"address": "0x002",
129+
"content": "\"hello\"",
130+
"new": true
131+
}
86132
]
87133
}
88134
},
@@ -137,6 +183,35 @@
137183
"false",
138184
"true",
139185
"true"
186+
],
187+
"stack": [
188+
{
189+
"name": "a",
190+
"value": "-> 0x001",
191+
"type": "String"
192+
},
193+
{
194+
"name": "b",
195+
"value": "-> 0x002",
196+
"type": "String"
197+
},
198+
{
199+
"name": "c",
200+
"value": "-> 0x001",
201+
"sameRef": true,
202+
"type": "String"
203+
}
204+
],
205+
"heap": [
206+
{
207+
"address": "0x001",
208+
"content": "\"hello\"",
209+
"refCount": 2
210+
},
211+
{
212+
"address": "0x002",
213+
"content": "\"hello\""
214+
}
140215
]
141216
}
142217
}

packages/backend/prisma/content/java/lessons/java-1-1.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,29 @@
7070
"comparison": "0x001 != 0x002",
7171
"output": [
7272
"false"
73+
],
74+
"stack": [
75+
{
76+
"name": "a",
77+
"value": "-> 0x001",
78+
"type": "String"
79+
},
80+
{
81+
"name": "b",
82+
"value": "-> 0x002",
83+
"type": "String"
84+
}
85+
],
86+
"heap": [
87+
{
88+
"address": "0x001",
89+
"content": "\"hello\""
90+
},
91+
{
92+
"address": "0x002",
93+
"content": "\"hello\"",
94+
"new": true
95+
}
7396
]
7497
}
7598
},
@@ -83,6 +106,29 @@
83106
"comparison": "\"hello\" == \"hello\"",
84107
"output": [
85108
"true"
109+
],
110+
"stack": [
111+
{
112+
"name": "a",
113+
"value": "-> 0x001",
114+
"type": "String"
115+
},
116+
{
117+
"name": "b",
118+
"value": "-> 0x002",
119+
"type": "String"
120+
}
121+
],
122+
"heap": [
123+
{
124+
"address": "0x001",
125+
"content": "\"hello\""
126+
},
127+
{
128+
"address": "0x002",
129+
"content": "\"hello\"",
130+
"new": true
131+
}
86132
]
87133
}
88134
},
@@ -137,6 +183,35 @@
137183
"false",
138184
"true",
139185
"true"
186+
],
187+
"stack": [
188+
{
189+
"name": "a",
190+
"value": "-> 0x001",
191+
"type": "String"
192+
},
193+
{
194+
"name": "b",
195+
"value": "-> 0x002",
196+
"type": "String"
197+
},
198+
{
199+
"name": "c",
200+
"value": "-> 0x001",
201+
"sameRef": true,
202+
"type": "String"
203+
}
204+
],
205+
"heap": [
206+
{
207+
"address": "0x001",
208+
"content": "\"hello\"",
209+
"refCount": 2
210+
},
211+
{
212+
"address": "0x002",
213+
"content": "\"hello\""
214+
}
140215
]
141216
}
142217
}

packages/backend/prisma/content/java/lessons/java-1-1.zh.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,29 @@
7070
"comparison": "0x001 != 0x002",
7171
"output": [
7272
"false"
73+
],
74+
"stack": [
75+
{
76+
"name": "a",
77+
"value": "-> 0x001",
78+
"type": "String"
79+
},
80+
{
81+
"name": "b",
82+
"value": "-> 0x002",
83+
"type": "String"
84+
}
85+
],
86+
"heap": [
87+
{
88+
"address": "0x001",
89+
"content": "\"hello\""
90+
},
91+
{
92+
"address": "0x002",
93+
"content": "\"hello\"",
94+
"new": true
95+
}
7396
]
7497
}
7598
},
@@ -83,6 +106,29 @@
83106
"comparison": "\"hello\" == \"hello\"",
84107
"output": [
85108
"true"
109+
],
110+
"stack": [
111+
{
112+
"name": "a",
113+
"value": "-> 0x001",
114+
"type": "String"
115+
},
116+
{
117+
"name": "b",
118+
"value": "-> 0x002",
119+
"type": "String"
120+
}
121+
],
122+
"heap": [
123+
{
124+
"address": "0x001",
125+
"content": "\"hello\""
126+
},
127+
{
128+
"address": "0x002",
129+
"content": "\"hello\"",
130+
"new": true
131+
}
86132
]
87133
}
88134
},
@@ -137,6 +183,35 @@
137183
"false",
138184
"true",
139185
"true"
186+
],
187+
"stack": [
188+
{
189+
"name": "a",
190+
"value": "-> 0x001",
191+
"type": "String"
192+
},
193+
{
194+
"name": "b",
195+
"value": "-> 0x002",
196+
"type": "String"
197+
},
198+
{
199+
"name": "c",
200+
"value": "-> 0x001",
201+
"sameRef": true,
202+
"type": "String"
203+
}
204+
],
205+
"heap": [
206+
{
207+
"address": "0x001",
208+
"content": "\"hello\"",
209+
"refCount": 2
210+
},
211+
{
212+
"address": "0x002",
213+
"content": "\"hello\""
214+
}
140215
]
141216
}
142217
}

packages/backend/prisma/content/java/lessons/java-1-2.en.json

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,28 @@
7070
"output": [
7171
"true"
7272
],
73-
"warning": "Literals return true with ==! But you shouldn't rely on this"
73+
"warning": "Literals return true with ==! But you shouldn't rely on this",
74+
"stack": [
75+
{
76+
"name": "a",
77+
"value": "-> Pool:0x100",
78+
"type": "String"
79+
},
80+
{
81+
"name": "b",
82+
"value": "-> Pool:0x100",
83+
"sameRef": true,
84+
"type": "String"
85+
}
86+
],
87+
"heap": [],
88+
"stringPool": [
89+
{
90+
"value": "\"hello\"",
91+
"address": "Pool:0x100",
92+
"refCount": 2
93+
}
94+
]
7495
},
7596
"code": "System.out.println(a == b);"
7697
},
@@ -117,6 +138,31 @@
117138
"comparison": "Pool:0x100 != 0x200",
118139
"output": [
119140
"false"
141+
],
142+
"stack": [
143+
{
144+
"name": "a",
145+
"value": "-> Pool:0x100",
146+
"type": "String"
147+
},
148+
{
149+
"name": "c",
150+
"value": "-> 0x200",
151+
"type": "String"
152+
}
153+
],
154+
"heap": [
155+
{
156+
"address": "0x200",
157+
"content": "\"hello\"",
158+
"new": true
159+
}
160+
],
161+
"stringPool": [
162+
{
163+
"value": "\"hello\"",
164+
"address": "Pool:0x100"
165+
}
120166
]
121167
},
122168
"code": "System.out.println(a == c);"
@@ -158,6 +204,26 @@
158204
"javaMemoryState": {
159205
"output": [
160206
"true"
207+
],
208+
"stack": [
209+
{
210+
"name": "a",
211+
"value": "-> Pool:0x100",
212+
"type": "String"
213+
},
214+
{
215+
"name": "d",
216+
"value": "-> Pool:0x100",
217+
"sameRef": true,
218+
"type": "String"
219+
}
220+
],
221+
"heap": [],
222+
"stringPool": [
223+
{
224+
"value": "\"hello\"",
225+
"address": "Pool:0x100"
226+
}
161227
]
162228
},
163229
"code": "System.out.println(a == d);"

0 commit comments

Comments
 (0)