metamath GUI/Game in Smalltalk

67 views
Skip to first unread message

Peter Meadows

unread,
Jun 25, 2022, 11:35:42 AMJun 25
to Metamath

Jim Kingdon

unread,
Jun 25, 2022, 7:06:03 PMJun 25
to 'Peter Meadows' via Metamath
Looks cool based on the screenshot and video.

Given how popular colorful syntax highlighting has been for code, seems like there could well be an appeal to do something sort of similar in terms of the display here.

On June 25, 2022 1:58:32 AM PDT, 'Peter Meadows' via Metamath <meta...@googlegroups.com> wrote:
https://github.com/Peter-H-Meadows/GtMetamath

Thoughts?

Peter H. Meadows

unread,
Jul 27, 2022, 10:15:38 AM (12 days ago) Jul 27
to meta...@googlegroups.com
On Sun, 26 Jun 2022 at 00:06, Jim Kingdon <kin...@panix.com> wrote:
>
> Looks cool based on the screenshot and video.
>
> Given how popular colorful syntax highlighting has been for code, seems like there could well be an appeal to do something sort of similar in terms of the display here.
>

Thanks for the feedback.

My goal is to make the game as simple, and fun as possible.

Any ideas about how to make it fun for kids?

How best to explain/introduce the rules?
( Maybe say it's a factory that uses machines to make/convert raw
input into the result? modus ponens = detacher machine. etc.?
I'm thinking how 'manufactoria' games do it.
http://pleasingfungus.com/Manufactoria2022/ )

Jon P

unread,
Jul 27, 2022, 3:15:59 PM (12 days ago) Jul 27
to Metamath
Looks like a fun thing you're making. 

I've done a little game design and here's a couple of thoughts. I made this game about the four colour theorem on steam (if anyone would like to play feel free to email for a steam key). 

One of the things I thought went best is that it doesn't have a tutorial, it's just a super slow ramp of complexity, each new idea is introduced with a couple of chances to play around with it before the next one. I'd really recommend an approach like that, especially if it's for kids, the hardest thing is walls of text, generally people learn easier by playing than reading. 


And then yeah another suggestion might be some sort of power connectors game? Like when you're doing a proof in MMJ2 you're trying to make sure every statement is connected to the rest. So you're hypotheses are sort of like your power sources and the theorem is like the lightbulb or something and what you're trying to do is make a complete chain in-between with no loose ends.

I really like the sound of what you're saying with factories etc, maybe little roads / power cables / conveyor belts / water pipes might communicate that idea of connections pretty well.

Cris Perdue

unread,
Jul 27, 2022, 8:47:48 PM (12 days ago) Jul 27
to meta...@googlegroups.com
Not working so well for me.

I downloaded the M1 Mac version of Glamorous Toolkit, opened the Zip file, ran the app,
opened a playground, pasted in the code in the README, and pressed the "eval" button.

The result was an error, "Instance of GtPharoSourceCoderEvaluationContext did not understand #isForScripting".

Is there perhaps a problem with the M1 Mac version of GT, or perhaps something else?

Thanks,
Cris

On Sat, Jun 25, 2022 at 8:35 AM 'Peter Meadows' via Metamath <meta...@googlegroups.com> wrote:
https://github.com/Peter-H-Meadows/GtMetamath

Thoughts?

--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/0249cd93-d4ec-486f-afa3-686f2380d34cn%40googlegroups.com.

Peter H. Meadows

unread,
Jul 28, 2022, 3:29:33 PM (11 days ago) Jul 28
to meta...@googlegroups.com
On Thu, 28 Jul 2022 at 01:47, Cris Perdue <cr...@perdues.com> wrote:
>
> Not working so well for me.
>
> I downloaded the M1 Mac version of Glamorous Toolkit, opened the Zip file, ran the app,
> opened a playground, pasted in the code in the README, and pressed the "eval" button.
>
> The result was an error, "Instance of GtPharoSourceCoderEvaluationContext did not understand #isForScripting".
>
> Is there perhaps a problem with the M1 Mac version of GT, or perhaps something else?
>

Thanks for testing!

I haven't tried it on a Mac before, but it should work.

Does GT work fine before you tried to load the GtMetamath code?

Can you send me the full error? (you can just press the copy button in
the debugger and paste it here).

Thanks

Mo Ti

unread,
Jul 28, 2022, 3:29:47 PM (11 days ago) Jul 28
to meta...@googlegroups.com
Its not working for me either. Windows 10. Did the same as Cris Perdue

Cris Perdue

unread,
Jul 28, 2022, 5:35:17 PM (11 days ago) Jul 28
to meta...@googlegroups.com
The full error from Glamorous Toolkit. TL;DR:

GtPharoSourceCoderEvaluationContext(Object)>>doesNotUnderstand: #isForScripting
OCUndeclaredVariableWarning>>openMenuIn:
OCUndeclaredVariableWarning(OCSemanticWarning)>>defaultAction
OCUndeclaredVariableWarning>>defaultAction
UndefinedObject>>handleSignal:
Context>>handleSignal:
OCUndeclaredVariableWarning(Exception)>>pass
[ :anException |
"it is very important that the monitor is not locked when an exception happens"
monitor exit.
"after an #exit call the monitor is open for another process, so if users start to compile code
from within the debugger. If debugger code compilation is not wrapped in this critical block,
there might be a problem of code modification from multiple processes. The chance of this, however, is very slim."
anException pass ] in [
aBlock
on: Exception
do: [ :anException |
"it is very important that the monitor is not locked when an exception happens"
monitor exit.
"after an #exit call the monitor is open for another process, so if users start to compile code
from within the debugger. If debugger code compilation is not wrapped in this critical block,
there might be a problem of code modification from multiple processes. The chance of this, however, is very slim."
anException pass ] ] in GtPharoCodeModifier>>critical: in Block: [ :anException |...
FullBlockClosure(BlockClosure)>>cull:
Context>>evaluateSignal:
Context>>handleSignal:
Context>>handleSignal:
Context>>handleSignal:
OCUndeclaredVariableWarning(Exception)>>signal
OCASTSemanticAnalyzer>>undeclaredVariable:
OCASTSemanticAnalyzer>>resolveVariableNode:
OCASTSemanticAnalyzer>>visitVariableNode:
UnresolvedVariable(Variable)>>acceptVisitor:node:
RBVariableNode>>acceptVisitor:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitNode:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitMessageNode:
RBMessageNode>>acceptVisitor:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitNode:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitReturnNode:
RBReturnNode>>acceptVisitor:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitNode:
[ :each | self visitNode: each ] in OCASTSemanticAnalyzer>>visitSequenceNode: in Block: [ :each | self visitNode: each ]
OrderedCollection>>do:
OCASTSemanticAnalyzer>>visitSequenceNode:
RBSequenceNode>>acceptVisitor:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitNode:
OCASTSemanticAnalyzer>>visitMethodNode:
RBMethodNode>>acceptVisitor:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitNode:
OCASTSemanticAnalyzer>>analyze:
RBMethodNode>>doSemanticAnalysis
[ast doSemanticAnalysis] in OpalCompiler>>doSemanticAnalysis in Block: [ast doSemanticAnalysis]
FullBlockClosure(BlockClosure)>>on:do:
OpalCompiler>>doSemanticAnalysis
OpalCompiler>>transformDoit
OpalCompiler>>parseDoIt
OpalCompiler>>compileDoit
[compilationContext noPattern
ifTrue: [ self compileDoit ]
ifFalse: [ self compileMethod ]] in OpalCompiler>>compile in Block: [compilationContext noPattern ...
FullBlockClosure(BlockClosure)>>on:do:
OpalCompiler>>compile
[
self class compiler
source: aSourceString;
class: methodClass newAnonymousSubclass;
context: aGtPharoSourceCoderEvaluationContext runtimeContext;
requestor: aGtPharoSourceCoderEvaluationContext;
noPattern: isForMethod not;
failBlock: anEvaluationFailBlock;
compile ] in GtPharoSnippetCoder(GtPharoSourceCoder)>>primitiveAnonymousCompile:inContext:onFailDo: in Block: [...
FullBlockClosure(BlockClosure)>>on:do:
[
aBlock
on: Exception
do: [ :anException |
"it is very important that the monitor is not locked when an exception happens"
monitor exit.
"after an #exit call the monitor is open for another process, so if users start to compile code
from within the debugger. If debugger code compilation is not wrapped in this critical block,
there might be a problem of code modification from multiple processes. The chance of this, however, is very slim."
anException pass ] ] in GtPharoCodeModifier>>critical: in Block: [...
[
self enter.
aBlock value] in Monitor>>critical: in Block: [...
FullBlockClosure(BlockClosure)>>ensure:
Monitor>>critical:
GtPharoCodeModifier>>critical:
GtPharoSnippetCoder(GtPharoSourceCoder)>>primitiveAnonymousCompile:inContext:onFailDo:
GtPharoSnippetCoder(GtPharoSourceCoder)>>primitiveEvaluate:inContext:onFailDo:
[
self
primitiveEvaluate: aDecoratedSourceString
inContext: aSourceCoderEvaluationContext
onFailDo: [
| aResultWithSyntaxError |

aResultWithSyntaxError := GtSourceCoderEvaluationResultWithSyntaxError new
evaluationContext: aSourceCoderEvaluationContext.
aThenBlock cull: aResultWithSyntaxError.
^ aResultWithSyntaxError ] ] in GtPharoSnippetCoder(GtSourceCoder)>>evaluate:decorated:inContext:thenDo: in Block: [ ...
FullBlockClosure(BlockClosure)>>on:do:
GtPharoSnippetCoder(GtSourceCoder)>>evaluateBlock:onErrorDo:
GtPharoSnippetCoder(GtSourceCoder)>>evaluate:decorated:inContext:thenDo:
GtPharoSnippetCoder(GtSourceCoder)>>evaluate:inContext:thenDo:
GtPharoSnippetCoder(GtSourceCoder)>>doItInContext:thenDo:
GtPharoSnippetCoder(GtSourceCoder)>>doItInContext:
GtPharoSnippetCoderViewModel(GtSourceCoderViewModel)>>doItAllRequestedBy:
GtPharoSnippetCoderViewModel(GtSourceCoderViewModel)>>doItRequestedBy:
GtPharoSnippetCoderViewModel(GtSourceCoderViewModel)>>doIt
[ self coderViewModel perform: action ] in GtCoderCodeExecutor>>execute in Block: [ self coderViewModel perform: action ]
[ activeProcess
psValueAt: index
put: anObject.
aBlock value ] in GtCoderExecutionContextVariable(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
GtCoderExecutionContextVariable(DynamicVariable)>>value:during:
GtCoderExecutionContextVariable class(DynamicVariable class)>>value:during:
GtCoderExecutionContextVariable class>>element:do:
GtCoderCodeExecutor>>execute
[ :aCoderUIModel :anElement |
GtCoderCodeExecutor doIt
coderViewModel: aCoderUIModel;
element: anElement;
execute ] in GtPharoSnippetCoder>>initializeAddOns: in Block: [ :aCoderUIModel :anElement | ...
FullBlockClosure(BlockClosure)>>gtValueWithArgs:
[ aGtCoderAction action
gtValueWithArgs:
{self textualCoderViewModel.
aButtonElement} ] in [ [ aGtCoderAction action
gtValueWithArgs:
{self textualCoderViewModel.
aButtonElement} ]
ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ] in [ aButtonElement
enqueueTask:
(BlTaskAction new
action: [ [ aGtCoderAction action
gtValueWithArgs:
{self textualCoderViewModel.
aButtonElement} ]
ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ]) ] in GtCoderActionsElement>>handleButton:action:onEvent: in Block: [ aGtCoderAction action...
FullBlockClosure(BlockClosure)>>ensure:
[ [ aGtCoderAction action
gtValueWithArgs:
{self textualCoderViewModel.
aButtonElement} ]
ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ] in [ aButtonElement
enqueueTask:
(BlTaskAction new
action: [ [ aGtCoderAction action
gtValueWithArgs:
{self textualCoderViewModel.
aButtonElement} ]
ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ]) ] in GtCoderActionsElement>>handleButton:action:onEvent: in Block: [ [ aGtCoderAction action...
FullBlockClosure(BlockClosure)>>cull:
BlTaskAction>>run:
[ aTask run: aWaker ] in [ BlTaskExecutionSignal for: aTask block: [ aTask run: aWaker ] ] in [ :aTask |
aTask setExecuting.

BlFrameTelemetry
timeSync: [ 'Run task {1} ({2})' format: { aTask class name . aTask } ]
during: [ BlTaskExecutionSignal for: aTask block: [ aTask run: aWaker ] ].
self onTaskExecuted: aTask.

aTask requeueTaskAfterExecution
ifTrue: [ self privateRequeueRepeating: aTask ]
ifFalse: [
tasks
lock: [ :theSpaceTasks |
(theSpaceTasks hasPendingTask: aTask)
ifFalse: [ aTask setComplete ] ]
ifNilPut: [ self newTasks ] ] ] in BlSpaceTaskQueue>>runOn: in Block: [ aTask run: aWaker ]
BlTaskExecutionSignal class>>for:block:
[ BlTaskExecutionSignal for: aTask block: [ aTask run: aWaker ] ] in [ :aTask |
aTask setExecuting.

BlFrameTelemetry
timeSync: [ 'Run task {1} ({2})' format: { aTask class name . aTask } ]
during: [ BlTaskExecutionSignal for: aTask block: [ aTask run: aWaker ] ].
self onTaskExecuted: aTask.

aTask requeueTaskAfterExecution
ifTrue: [ self privateRequeueRepeating: aTask ]
ifFalse: [
tasks
lock: [ :theSpaceTasks |
(theSpaceTasks hasPendingTask: aTask)
ifFalse: [ aTask setComplete ] ]
ifNilPut: [ self newTasks ] ] ] in BlSpaceTaskQueue>>runOn: in Block: [ BlTaskExecutionSignal for: aTask block: [ aTask ...etc...
NullTelemetry>>time:during:
BlSpaceTelemetry>>time:during:
BlFrameTelemetry(BaseProcessTelemetry)>>time:during:
BlFrameTelemetry(BaseProcessTelemetry)>>timeSync:during:
BlFrameTelemetry class(BaseProcessTelemetry class)>>timeSync:during:
[ :aTask |
aTask setExecuting.

BlFrameTelemetry
timeSync: [ 'Run task {1} ({2})' format: { aTask class name . aTask } ]
during: [ BlTaskExecutionSignal for: aTask block: [ aTask run: aWaker ] ].
self onTaskExecuted: aTask.

aTask requeueTaskAfterExecution
ifTrue: [ self privateRequeueRepeating: aTask ]
ifFalse: [
tasks
lock: [ :theSpaceTasks |
(theSpaceTasks hasPendingTask: aTask)
ifFalse: [ aTask setComplete ] ]
ifNilPut: [ self newTasks ] ] ] in BlSpaceTaskQueue>>runOn: in Block: [ :aTask |...
Array(SequenceableCollection)>>do:
BlSpaceTaskQueue>>runOn:
GtWorld(BlSpace)>>runTasks
[ :theSpace | theSpace runTasks ] in BlSpaceFrameTaskPhase>>runOn: in Block: [ :theSpace | theSpace runTasks ]
FullBlockClosure(BlockClosure)>>cull:
GtWorld(BlSpace)>>dispatchTimeEvent:during:
BlSpaceFrameTaskPhase>>runOn:
[ self currentPhase runOn: aSpace ] in BlSpaceFrame>>runCurrentPhaseOn: in Block: [ self currentPhase runOn: aSpace ]
NullTelemetry>>time:during:
BlSpaceTelemetry>>time:during:
BlFrameTelemetry(BaseProcessTelemetry)>>time:during:
BlFrameTelemetry class(BaseProcessTelemetry class)>>time:during:
BlSpaceFrame>>runCurrentPhaseOn:



--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages