├── .gitignore ├── Classes ├── MPWAbstractInterpretedMethod.h ├── MPWAbstractInterpretedMethod.m ├── MPWAssignmentExpression.h ├── MPWAssignmentExpression.m ├── MPWBidirectionalDataflowConstraintExpression.h ├── MPWBidirectionalDataflowConstraintExpression.m ├── MPWBindingLegacy.h ├── MPWBindingLegacy.m ├── MPWBlockContext.h ├── MPWBlockContext.m ├── MPWBlockExpression.h ├── MPWBlockExpression.m ├── MPWBoxerUnboxer+MPWBoxingAdditions.h ├── MPWBoxerUnboxer+MPWBoxingAdditions.m ├── MPWBridgeReader.h ├── MPWBridgeReader.m ├── MPWCLibrary.h ├── MPWCLibrary.m ├── MPWClassMethodStore.h ├── MPWClassMethodStore.m ├── MPWClassMirror.h ├── MPWClassMirror.m ├── MPWComplexLiteralExpression.h ├── MPWComplexLiteralExpression.m ├── MPWDataflowConstraintExpression.h ├── MPWDataflowConstraintExpression.m ├── MPWDefaultsBinding.h ├── MPWDefaultsBinding.m ├── MPWEvaluable.h ├── MPWExpression+autocomplete.h ├── MPWFastMessage.h ├── MPWFastMessage.m ├── MPWFastSuperMessage.h ├── MPWFastSuperMessage.m ├── MPWGetAccessor.h ├── MPWGetAccessor.m ├── MPWInstanceVariable.h ├── MPWInstanceVariable.m ├── MPWLLVMCompiler.h ├── MPWLLVMCompiler.m ├── MPWLiteralArrayExpression.h ├── MPWLiteralArrayExpression.m ├── MPWLiteralDictionaryExpression.h ├── MPWLiteralDictionaryExpression.m ├── MPWLiteralExpression.h ├── MPWLiteralExpression.m ├── MPWMessage.h ├── MPWMessage.m ├── MPWMessageExpression.h ├── MPWMessageExpression.m ├── MPWMethod.h ├── MPWMethod.m ├── MPWMethodCallBack.h ├── MPWMethodCallBack.m ├── MPWMethodHeader.h ├── MPWMethodHeader.m ├── MPWMethodMirror.h ├── MPWMethodMirror.m ├── MPWMethodStore.h ├── MPWMethodStore.m ├── MPWMethodType.h ├── MPWMethodType.m ├── MPWObjCGenerator.h ├── MPWObjCGenerator.m ├── MPWObjectMirror.h ├── MPWObjectMirror.m ├── MPWPropertyPathMethod.h ├── MPWPropertyPathMethod.m ├── MPWRecursiveIdentifier.h ├── MPWRecursiveIdentifier.m ├── MPWScheme.h ├── MPWScheme.m ├── MPWSelfContainedBinding.h ├── MPWSelfContainedBinding.m ├── MPWSetAccessor.h ├── MPWSetAccessor.m ├── MPWStatementList.h ├── MPWStatementList.m ├── MPWTaggedFloat.h ├── MPWTaggedFloat.m ├── MPWVariableExpression.h ├── MPWVariableExpression.m ├── NSObjectScripting.h ├── NSObjectScripting.m ├── ObjectiveSmalltalk.h ├── STAWK.h ├── STAWK.m ├── STBundle.h ├── STBundle.m ├── STClassDefinition.h ├── STClassDefinition.m ├── STCompiler.h ├── STCompiler.m ├── STConnectionDefiner.h ├── STConnectionDefiner.m ├── STConnectionDefinition.h ├── STConnectionDefinition.m ├── STConnector.h ├── STConnector.m ├── STEvaluator.h ├── STEvaluator.m ├── STExpression.h ├── STExpression.m ├── STFilterDefinition.h ├── STFilterDefinition.m ├── STIdentifier.h ├── STIdentifier.m ├── STIdentifierExpression.h ├── STIdentifierExpression.m ├── STJittableData.h ├── STJittableData.m ├── STMessageConnector.h ├── STMessageConnector.m ├── STMessagePortDescriptor.h ├── STMessagePortDescriptor.m ├── STNotificationDefinition.h ├── STNotificationDefinition.m ├── STObjectTemplate.h ├── STObjectTemplate.m ├── STPort.h ├── STPort.m ├── STPostExpression.h ├── STPostExpression.m ├── STProgram.h ├── STProgram.m ├── STPropertyMethodHeader.h ├── STPropertyMethodHeader.m ├── STPropertyPathDefinition.h ├── STPropertyPathDefinition.m ├── STProtocolDefinition.h ├── STProtocolDefinition.m ├── STQueryExpression.h ├── STQueryExpression.m ├── STScanner.h ├── STScanner.m ├── STScriptedMethod.h ├── STScriptedMethod.m ├── STSimpleDataflowConstraint.h ├── STSimpleDataflowConstraint.m ├── STSubscriptExpression.h ├── STSubscriptExpression.m ├── STSystem.h ├── STSystem.m ├── STTargetActionConnector.h ├── STTargetActionConnector.m ├── STTargetActionSenderPort.h ├── STTargetActionSenderPort.m ├── STTypeDescriptor.h ├── STTypeDescriptor.m ├── STVariableDefinition.h ├── STVariableDefinition.m └── ViewBuilderPreviewNotification.h ├── ExamplePrograms ├── 7GUIs │ ├── 1-Counter-OO-Version.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 1-Counter-constraint.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 1-Counter-model.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 1-Counter.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 2-Temperature Converter.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 3-FlightBooker.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 4-Timer-objecstore.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 4-Timer.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 5-CRUD.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 6-Circles.viewd │ │ └── Sources │ │ │ └── viewdef.st │ ├── 6-circles-model.st │ └── 7-spreadsheet.viewd │ │ └── Sources │ │ └── viewdef.st ├── NativeCompiler │ ├── .gitignore │ ├── CollectFor.st │ ├── FibServer.st │ ├── HelloHTTP.st │ ├── HelloSchemes.st │ ├── HelloScript.st │ ├── HelloWorld.bak │ ├── HelloWorld.o-bak │ ├── HelloWorld.st │ ├── HelloWorldAndClass │ ├── HelloWorldAndClass.st │ ├── Initialise.st │ ├── Loop.st │ ├── NativeInt.st │ ├── NativeIntCheating.st │ ├── PrintArgs-old │ ├── PrintArgs.st │ ├── PrintFile.st │ ├── PutFile.st │ ├── SchemeDefHTTP-script-jit.st │ ├── SchemeDefHTTP-script.st │ ├── SchemeDefHTTP.o-with-ppath-struct-broken │ ├── SchemeDefHTTP.st │ ├── TestClassMethodsWork.st │ ├── TwoClasses.o-bak │ ├── TwoClasses.st │ ├── all_month.csv │ └── sawk-filter.st └── Sails │ ├── dynamic-blog.sited │ ├── Info.json │ ├── Resources │ │ ├── PostDisplay.html │ │ ├── PostEdit.html │ │ ├── PostList.html │ │ ├── PostNew.html │ │ └── Site.html │ └── Sources │ │ ├── BlogSite.st │ │ ├── Post.st │ │ └── TemplateNames.st │ ├── dynamic-htmx-blog.sited │ ├── Info.json │ ├── Resources │ │ ├── PostDisplay.html │ │ ├── PostEdit.html │ │ ├── PostList.html │ │ ├── PostNew.html │ │ ├── Site.html │ │ └── htmx.js │ └── Sources │ │ ├── BlogSite.st │ │ ├── Post.st │ │ └── TemplateNames.st │ └── todomvc-htmx.sited │ ├── Info.json │ ├── Resources │ ├── clickme.htmx │ └── htmx.js │ └── Sources │ ├── ToDoMVC.st │ └── tasks-json-api.st ├── GNUmakefile ├── GNUstep ├── build-gnuste-stsh-deploy ├── objst-docker-ARM │ ├── GNUstep-buildon-ubuntu1604_arm.sh │ ├── README.md │ ├── test.sh │ └── testing │ │ └── Dockerfile └── stsh-deploy │ ├── Dockerfile │ ├── bashrc │ └── profile ├── Info-ObjectiveSmalltalk__Framework___Upgraded_.plist ├── MPWCSourceKit ├── Info.plist ├── MPWCSourceKit.h ├── MPWClangImporter.h ├── MPWClangImporter.m └── clang-c │ ├── CXCompilationDatabase.h │ ├── CXString.h │ ├── Index.h │ ├── LICENSE.TXT │ ├── Platform.h │ └── README ├── MPWCascadeExpression.h ├── MPWCascadeExpression.m ├── MethodServer ├── GNUmakefile ├── MethodServer-Info.plist ├── MethodServer-Prefix.pch ├── MethodServer.h ├── MethodServer.m └── en.lproj │ └── InfoPlist.strings ├── MethodServerTouch ├── Info.plist └── MethodServerTouch.h ├── ObjSTNative ├── .gitignore ├── GNUmakefile ├── MPWARMObjectCodeGeneratorExternalTestsMachO.h ├── MPWARMObjectCodeGeneratorExternalTestsMachO.m ├── MPWByteStreamWithSymbols.h ├── MPWByteStreamWithSymbols.m ├── MPWCPUSimulator.h ├── MPWCPUSimulator.m ├── MPWELFReader.h ├── MPWELFReader.m ├── MPWELFRelocationTable.h ├── MPWELFRelocationTable.m ├── MPWELFSection.h ├── MPWELFSection.m ├── MPWELFSectionWriter.h ├── MPWELFSectionWriter.m ├── MPWELFSymbolTable.h ├── MPWELFSymbolTable.m ├── MPWELFTextSection.h ├── MPWELFTextSection.m ├── MPWELFWriter.h ├── MPWELFWriter.m ├── MPWMachOClassReader.h ├── MPWMachOClassReader.m ├── MPWMachOClassWriter.h ├── MPWMachOClassWriter.m ├── MPWMachOInSectionPointer.h ├── MPWMachOInSectionPointer.m ├── MPWMachOReader.h ├── MPWMachOReader.m ├── MPWMachORelocationPointer.h ├── MPWMachORelocationPointer.m ├── MPWMachOSection.h ├── MPWMachOSection.m ├── MPWMachOSectionWriter.h ├── MPWMachOSectionWriter.m ├── MPWMachOWriter.h ├── MPWMachOWriter.m ├── MPWMethodDescriptor.h ├── MPWMethodDescriptor.m ├── MPWObjectFileWriter.h ├── MPWObjectFileWriter.m ├── MPWStringTableWriter.h ├── MPWStringTableWriter.m ├── Mach_O_Structs.h ├── ObjSTNative-Info.plist ├── ObjSTNative-Prefix.pch ├── ObjSTNative.h ├── Resources │ └── testelfnative │ │ └── Resources │ │ ├── add.elf-o │ │ └── empty-function-clang.elf-o ├── STJittedMethod.h ├── STJittedMethod.m ├── STMethodSymbols.h ├── STMethodSymbols.m ├── STNativeCompiler.h ├── STNativeCompiler.m ├── STNativeCompilerTestsMachO.h ├── STNativeCompilerTestsMachO.m ├── STNativeJitCompiler.h ├── STNativeJitCompiler.m ├── STNativeMachOCompiler.h ├── STNativeMachOCompiler.m ├── STObjectCodeGeneratorARM.h ├── STObjectCodeGeneratorARM.m ├── TestResources │ ├── ConstArray.framework │ │ └── ConstArray │ ├── add.aarch64 │ ├── add.c │ ├── add.elf-o │ ├── add.macho │ ├── addelf.aarch64 │ ├── call-external-fn.c │ ├── call-external-fn.elf-o │ ├── call-external-fn.macho │ ├── class-with-method.macho │ ├── define-pp-structs.macho │ ├── empty-function-clang.elf-o │ ├── function-calling-block.macho │ ├── function-passing-block.macho │ ├── function-passing-nsstring.macho │ ├── hashPlus200.aarch64 │ ├── main_for_add.c │ ├── testclass_objc.m │ ├── two-classes.macho │ ├── use_arithmetic.m │ ├── use_block.m │ ├── use_class.macho │ ├── use_class_that_creates_nsobject.mfile │ ├── use_class_with_if.mfile │ ├── use_class_with_two_strings.mfile │ ├── use_concatter.m │ ├── use_filter.m │ ├── use_st_block.mfile │ ├── use_string_const_class.m │ └── use_testclass.m ├── base.make ├── elf.h ├── en.lproj │ └── InfoPlist.strings ├── features.h ├── llvmincludes.h ├── macho-headers │ ├── mach-o │ │ ├── arch.h │ │ ├── arm │ │ │ └── reloc.h │ │ ├── arm64 │ │ │ └── reloc.h │ │ ├── compact_unwind_encoding.h │ │ ├── compact_unwind_encoding.modulemap │ │ ├── dyld.h │ │ ├── dyld.modulemap │ │ ├── dyld_images.h │ │ ├── fat.h │ │ ├── fixup-chains.h │ │ ├── getsect.h │ │ ├── i386 │ │ │ └── swap.h │ │ ├── ldsyms.h │ │ ├── loader.h │ │ ├── module.modulemap │ │ ├── nlist.h │ │ ├── ranlib.h │ │ ├── reloc.h │ │ ├── stab.h │ │ ├── swap.h │ │ ├── utils.h │ │ └── x86_64 │ │ │ └── reloc.h │ ├── machine.h │ └── nlist.h ├── makeheaderdir ├── stc ├── test-compiles │ ├── .gitignore │ ├── another-empty-class.m │ ├── another-empty-class.s │ ├── call-external-fn.c │ ├── class-with-method-arm64.s │ ├── class-with-method-block.m │ ├── class-with-method-block.s │ ├── class-with-method.arm │ ├── class-with-method.m │ ├── class-with-method.s │ ├── class-with-methods-arm64.s │ ├── class-with-methods-old.s │ ├── class-with-methods.ll │ ├── class-with-methods.m │ ├── class-with-methods.s │ ├── compile-to-llvm.sh │ ├── constarray.m │ ├── define-pp-structs.m │ ├── define_block_with_capture.m │ ├── define_block_with_capture.s │ ├── define_block_without_capture.m │ ├── empty-category.m │ ├── empty-category.s │ ├── empty-class-arm64.s │ ├── empty-class.llvm-templateasm │ ├── empty-class.m │ ├── empty-class.s │ ├── empty-function-arm64.s │ ├── empty-function.m │ ├── empty-function.s │ ├── function-passing-block.m │ ├── function-passing-block.s │ ├── function-passing-nsstring.m │ ├── function-returning-arg.m │ ├── function-returning-arg.s │ ├── function-returning-obj-arg-arm64.s │ ├── function-returning-obj-arg.m │ ├── function-returning-obj-arg.s │ ├── function-sending-msg.m │ ├── hello-cc.clangexecutable │ ├── hello-mpw │ ├── hello-mpw.m │ ├── hello-mpw.macho │ ├── hello-tcc.c │ ├── hello-tcc.tccmachoexecutable │ ├── llvm2dylib.sh │ ├── main-with-called-function.c │ ├── method-returning-arg-category-arm64.s │ ├── method-returning-arg-category.m │ ├── method-returning-arg-category.s │ ├── method-returning-arg-category.s.bc │ ├── method-returning-arg-category.s.s │ ├── two-classes.m │ ├── use_class.m │ └── use_class.s └── testelfnative.m ├── ObjectiveArithmetic ├── Info.plist ├── MPWBigInteger.h ├── MPWBigInteger.m ├── ObjectiveArithmetic.h └── nsnumberadd.m ├── ObjectiveSmalltalk.map ├── ObjectiveSmalltalk.xcodeproj ├── marcel.mode1v3 ├── marcel.pbxuser ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── ObjectiveSmalltalk.xccheckout │ └── xcuserdata │ │ └── marcel.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcshareddata │ └── xcschemes │ ├── MPWCSourceKit.xcscheme │ ├── MethodServer.xcscheme │ ├── ObjSTNative.xcscheme │ ├── ObjectiveArithmetic.xcscheme │ ├── ObjectiveSmalltalk-iOS.xcscheme │ ├── ObjectiveSmalltalk.xcscheme │ ├── ObjectiveSmalltalkTouch.xcscheme │ ├── ObjectiveSmalltalkTouchUI.xcscheme │ ├── ObjectiveSmalltalkUI.xcscheme │ ├── PyObjS.xcscheme │ ├── Sails.xcscheme │ ├── SailsTouch.xcscheme │ ├── SchemeFUSE.xcscheme │ ├── Smalltalk.xcscheme │ ├── StshFramework.xcscheme │ ├── TestObjectiveSmalltalk.xcscheme │ ├── iMethodServer.xcscheme │ ├── runsails.xcscheme │ ├── sl.xcscheme │ ├── stsh.xcscheme │ └── stui.xcscheme ├── ObjectiveSmalltalkTouch ├── Info.plist └── ObjectiveSmalltalkTouch.h ├── ObjectiveSmalltalkTouchUI ├── Info.plist ├── MPWColorStore.h ├── MPWColorStore.m ├── MPWFontStore.h ├── MPWFontStore.m ├── MPWSTTouchUITests.h ├── MPWSTTouchUITests.m ├── ObjectiveSmalltalkUI.h ├── Resources │ ├── UIKitEnums.json │ └── UIKitInit.st ├── STUIKitAdditions.m ├── UIView+dictionary.h ├── UIView+dictionary.m ├── UIViewBuilderSmalltalkViewController.h └── UIViewBuilderSmalltalkViewController.m ├── ObjectiveSmalltalkUI ├── AppKitInit.st ├── CLIView.h ├── CLIView.m ├── FSCommandHistory.h ├── FSCommandHistory.m ├── MPWAppDelegate.h ├── MPWAppDelegate.m ├── MPWClassMethodSwitchStore.h ├── MPWClassMethodSwitchStore.m ├── MPWColorStore.h ├── MPWColorStore.m ├── MPWDocumentScheme.h ├── MPWDocumentScheme.m ├── MPWFontStore.h ├── MPWFontStore.m ├── MPWMethodBrowser.h ├── MPWMethodBrowser.m ├── MPWMethodBrowser.xib ├── NSView+dictionary.h ├── NSView+dictionary.m ├── ObjectiveSmalltalkUI-Info.plist ├── ObjectiveSmalltalkUI-Prefix.pch ├── ObjectiveSmalltalkUI.h ├── STButton.h ├── STButton.m ├── STPopUpButton.h ├── STPopUpButton.m ├── STProgramTextView.h ├── STProgramTextView.m ├── STProgressIndicator.h ├── STProgressIndicator.m ├── STSlider.h ├── STSlider.m ├── STTextField.h ├── STTextField.m ├── STUIAppKitAdditions.m ├── STUITests.h ├── STUITests.m ├── STViewScheme.h ├── STViewScheme.m ├── ShellView.h ├── ShellView.m ├── appkit-enums.json ├── classdef-method-browser-scheme.stsh └── en.lproj │ └── InfoPlist.strings ├── ObjectiveSwift ├── Info.plist ├── ObjectiveSwift.h └── StSwiftBridge.swift ├── Papers ├── 109_Smalltalk.pdf └── AnsiSmalltalkDraft1-9.pdf ├── PyObjS ├── PyObjS.docc │ └── PyObjS.md ├── PyObjS.h ├── Resources │ ├── constant-webdav.py │ ├── env-scheme-webdav.py │ ├── objs-interop.py │ └── runWebDAV.st ├── STPython.h ├── STPython.m ├── STPythonObject.h ├── STPythonObject.m ├── pyobjc-api.h └── pyobjc-compat.h ├── README.md ├── S3Scheme ├── Info.plist ├── MPWS3Scheme.h ├── MPWS3Scheme.m └── S3Scheme.h ├── Sails ├── Code │ ├── STEntity.h │ ├── STEntity.m │ ├── STEntityList.h │ ├── STEntityList.m │ ├── STHypertextProcessor.h │ ├── STHypertextProcessor.m │ ├── STPathToTemplateNameMapper.h │ ├── STPathToTemplateNameMapper.m │ ├── STRootMapper.h │ ├── STRootMapper.m │ ├── STSiteBundle.h │ ├── STSiteBundle.m │ ├── STSiteServer.h │ ├── STSiteServer.m │ ├── STTemplateStore.h │ ├── STTemplateStore.m │ ├── Sails.h │ ├── SailsGenerator.h │ └── SailsGenerator.m ├── GNUmakefile ├── Resources │ ├── htmx.js │ └── simple-dynamic.sited │ │ ├── Info.json │ │ ├── Resources │ │ ├── bonsai-base.css │ │ ├── bonsai-sample.html │ │ ├── bonsai.css │ │ ├── dummy.css │ │ ├── hi.html │ │ ├── index.html │ │ ├── mustard │ │ │ ├── mustard-blog.html │ │ │ ├── mustard-cart.html │ │ │ └── mustard-ui.min.css │ │ ├── mysstyle-dummy.css │ │ ├── pageTemplate.html │ │ ├── picnic │ │ │ └── picnic.min.css │ │ ├── purecss │ │ │ ├── blog-styles.css │ │ │ ├── blog.html │ │ │ ├── photo-gallery-styles.css │ │ │ ├── photo-gallery.html │ │ │ └── pure-min.css │ │ ├── root.html │ │ ├── skelet │ │ │ ├── app.css │ │ │ ├── skelet.css │ │ │ └── skelet.html │ │ └── style.css │ │ └── Sources │ │ ├── DynamicSite.st │ │ ├── Entity.st │ │ └── StaticSite.st ├── Sails.docc │ └── Sails.md ├── android-gmake.sh ├── base.make ├── makeheaderdir └── sl │ └── sails_main.m ├── SailsTouch └── SailsTouch.h ├── SchemeFS ├── Base.lproj │ └── MainMenu.xib ├── Fuse.icns ├── MPWFUSEAppDelegate.h ├── MPWFUSEAppDelegate.m ├── MPWSchemeFilesystem.h ├── MPWSchemeFilesystem.m ├── SchemeFS-Info.plist ├── SchemeFS-Prefix.pch ├── en.lproj │ ├── Credits.rtf │ └── InfoPlist.strings ├── hellodoc.icns └── main.m ├── SchemeFUSE ├── SchemeFUSE-Info.plist ├── SchemeFUSE-Prefix.pch ├── SchemeFUSE.h ├── SchemeFUSE.m └── en.lproj │ └── InfoPlist.strings ├── SchemeFUSETests ├── SchemeFUSETests-Info.plist ├── SchemeFUSETests.m └── en.lproj │ └── InfoPlist.strings ├── Schemes ├── MPWBlockFilterScheme.h ├── MPWBlockFilterScheme.m ├── MPWBundleScheme.h ├── MPWBundleScheme.m ├── MPWClassScheme.h ├── MPWClassScheme.m ├── MPWDefaultsScheme.h ├── MPWDefaultsScheme.m ├── MPWDyLibScheme.h ├── MPWDyLibScheme.m ├── MPWEnvScheme.h ├── MPWEnvScheme.m ├── MPWFileSchemeResolver.h ├── MPWFileSchemeResolver.m ├── MPWFileWatcher.h ├── MPWFileWatcher.m ├── MPWFrameworkScheme.h ├── MPWFrameworkScheme.m ├── MPWGlobalVariableStore.h ├── MPWGlobalVariableStore.m ├── MPWMethodScheme.h ├── MPWMethodScheme.m ├── MPWRefScheme.h ├── MPWRefScheme.m ├── MPWRelScheme.h ├── MPWRelScheme.m ├── MPWResourceScheme.h ├── MPWResourceScheme.m ├── MPWSchemeScheme.h ├── MPWSchemeScheme.m ├── MPWScriptingBridgeBinding.h ├── MPWScriptingBridgeBinding.m ├── MPWScriptingBridgeScheme.h ├── MPWScriptingBridgeScheme.m ├── MPWSelfContainedBindingsScheme.h ├── MPWSelfContainedBindingsScheme.m ├── MPWSpotlightScheme.h ├── MPWSpotlightScheme.m ├── MPWTreeNode.h ├── MPWTreeNode.m ├── MPWTreeNodeScheme.h ├── MPWTreeNodeScheme.m ├── MPWVARBinding.h ├── MPWVARBinding.m ├── MPWVarScheme.h ├── MPWVarScheme.m ├── MPWWindowsScheme.h ├── MPWWindowsScheme.m ├── STPortScheme.h ├── STPortScheme.m ├── STProtocolScheme.h └── STProtocolScheme.m ├── Smalltalk ├── Base.lproj │ ├── Document.xib │ └── MainMenu.xib ├── Images.xcassets │ ├── AppIcon.imageset │ │ ├── Contents.json │ │ └── stapp.png │ └── Contents.json ├── Info.plist ├── NSApplication.st ├── Objective_Smalltalk.entitlements ├── STAppDelegate.h ├── STAppDelegate.m ├── STDocument.h ├── STDocument.m ├── STDocument.st ├── STImage.icns ├── STImage.png ├── Smalltalk.entitlements ├── main.m ├── stapp.icns ├── stapp.iconset │ ├── Resources │ │ └── sketch │ ├── icon_128x128.png │ ├── icon_256x256.png │ ├── icon_32x32.png │ ├── icon_512x512.png │ └── icon_512x512@2x.png └── stapp.png ├── Stsh ├── Classes │ ├── MPWAbstractShellCommand.h │ ├── MPWAbstractShellCommand.m │ ├── MPWCommandBinding.h │ ├── MPWCommandBinding.m │ ├── MPWCommandFilter.h │ ├── MPWCommandFilter.m │ ├── MPWCommandStore.h │ ├── MPWCommandStore.m │ ├── MPWEchoCommand.h │ ├── MPWEchoCommand.m │ ├── MPWExpression+autocomplete.h │ ├── MPWExpression+autocomplete.m │ ├── MPWExternalCommand.h │ ├── MPWExternalCommand.m │ ├── MPWHost.h │ ├── MPWHost.m │ ├── MPWObjectPipeCommand.h │ ├── MPWObjectPipeCommand.m │ ├── MPWREPLViewPrinter.h │ ├── MPWREPLViewPrinter.m │ ├── MPWShellCompiler.h │ ├── MPWShellCompiler.m │ ├── MPWShellProcess.h │ ├── MPWShellProcess.m │ ├── MPWUpcaseFilter.h │ ├── MPWUpcaseFilter.m │ ├── STScript.h │ ├── STScript.m │ ├── STShell.h │ └── STShell.m ├── GNUmakefile ├── MPWShellPrinter.h ├── MPWShellPrinter.m ├── Stsh-Info.plist ├── Stsh-Prefix.pch ├── base.make ├── en.lproj │ └── InfoPlist.strings ├── makeheaderdir ├── stsh.1 ├── stsh_main.m └── stsh_ui.m ├── StshFramework-Info.plist ├── TestObjectiveSmalltalk ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── ClassesToTest.plist ├── Info.plist ├── TestObjectiveSmalltalkAppDelegate.h ├── TestObjectiveSmalltalkAppDelegate.m ├── TestObjectiveSmalltalkController.h ├── TestObjectiveSmalltalkController.m ├── main.m └── testobjectivesmalltalk.m ├── Tests ├── STConnectorTests.h ├── STConnectorTests.m ├── STPropertyPathTests.h ├── STPropertyPathTests.m ├── STTests.h └── STTests.m ├── X11Scheme ├── Info.plist ├── X11Scheme.h ├── win_oper.h ├── win_oper.m ├── win_xcb.h ├── win_xcb.m ├── x11fs.h └── x11fs.m ├── android-gmake.sh ├── base.make ├── createumbrellaincludes ├── getLocalMethods ├── h.template ├── iMethodServer └── iMethodServer-Prefix.pch ├── llvm-config ├── llvm-components.txt └── llvm.xcconfig ├── m.template ├── makeheaderdir ├── objective-smalltalk.xcworkspace ├── contents.xcworkspacedata ├── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── objective-smalltalk.xccheckout └── xcuserdata │ └── marcel.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── old ├── Makefile ├── Makefile.postamble ├── Makefile.preamble ├── Notes.rtf ├── PB.project └── base.make ├── raspi ├── GNUmakefile ├── MPWBCMStore.h ├── MPWBCMStore.m ├── MPWGPIOPin.h ├── MPWGPIOPin.m ├── base.make ├── blink.st ├── pollbuttonstate.st ├── stsh_main.m └── timeled.st ├── scripts ├── .gitignore ├── ESUG-Demo │ ├── filteradd3 │ ├── fromTo │ ├── homefileserver.stsh │ ├── memhttpserver-arrow.stsh │ ├── presentation.st │ ├── sqlite-prop-protocols.stsh │ └── toupper ├── FUSE │ ├── mountplist-arrows.stsh │ ├── mountplist-options.stsh │ └── mountplist.stsh ├── HPI-Mar-2024 │ └── presentation.st ├── Macoun-2019 │ ├── Macoun-2019-Presentation.st │ │ └── windows │ ├── browser-demo.txt │ ├── filtered-homefileserver.stsh │ ├── fromTo │ ├── homefileserver.stsh │ ├── memhttpserver-arrow.stsh │ ├── presentation.txt │ ├── sqlite-prop-protocols.stsh │ ├── toupper │ └── toupper-writeObject ├── XTC-2022 │ ├── Basic-Demo.st │ ├── browser.st │ ├── filebrowser.st │ ├── hello-world-http-ppath.stsh │ ├── hello.txt │ ├── sample-slide.st │ └── xtc-presentation.st ├── channels │ ├── .gitignore │ ├── listdirs.st │ ├── prime-sieve.st │ └── primes.go ├── cloud │ ├── .gitignore │ ├── hetzner.st │ ├── host.st │ ├── ocean.st │ ├── s3dir.st │ ├── scurl.st │ └── sftp.st ├── compile │ ├── stbundle │ ├── stc │ ├── stfwk │ └── stlib ├── constraints │ ├── basicconstraint.st │ ├── syncdirectories-constraint.st │ ├── syncdirectories-copy.st │ ├── syncdirectories.st │ └── syncsftp-directory.st ├── db │ └── sqlite-nofmdb.st ├── demo │ ├── homefileserver.stsh │ ├── memhttpserver.stsh │ ├── mountplist.stsh │ └── stcat.stsh ├── eip │ ├── loanbroker-bank-rest.st │ ├── loanbroker-procedural.st │ ├── loanbroker-schemes.st │ ├── loanbroker-stream.st │ └── loanbroker-streamarg.st ├── fakestore.st ├── graphics │ ├── gezira-snowflakes.st │ ├── gezira-stars.st │ └── gezira-stroked-stars.st ├── hello.plist ├── hi.rb ├── htmx │ ├── clickme.htmx │ ├── hello-htmx.stsh │ └── htmx.js ├── http │ ├── blogger.st │ ├── blogposttable.st │ ├── hardtask-sqlite.st │ ├── hello-world-http-dict.st │ ├── hello-world-http-ppath.stsh │ ├── httpfileserver.st │ ├── httpserver-autorun.st │ ├── httpserver-hello-verbose.stsh │ ├── httpserver-hello.stsh │ ├── httpserver.stsh │ ├── memhttpserver-bench.stsh │ ├── memhttpserver-ppath.stsh │ ├── memhttpserver.st │ ├── oauth-refresh.st │ ├── piparse.st │ ├── postblog-manual.st │ ├── postblog.st │ ├── property-path-http-server │ ├── server.stsh │ ├── tasks-json-api.st │ ├── test.stp │ ├── time.st │ ├── tmpfileserver.stsh │ └── unixsocket-http-server.st ├── listentonotifications ├── metal │ └── metalcompute.st ├── misc │ ├── SFTP-UI-Demo.st │ ├── add3.stsh │ ├── backup │ ├── class-method-browser-scheme.stsh │ ├── classdef-method-browser-scheme.stsh │ ├── countdockerimages.st │ ├── db-http.stsh │ ├── defclass.stsh │ ├── dictstore.st │ ├── docker.st │ ├── earthquakes-async.st │ ├── earthquakes-sawk.st │ ├── earthquakes-sync.st │ ├── envscheme.stsh │ ├── factorial-via-reduce.stsh │ ├── fibserver.stsh │ ├── fizzbuzz.st │ ├── fizzbuzz.stsh │ ├── frameworkscheme.stsh │ ├── fromTo │ ├── genhello-arm.st │ ├── genhello-main.st │ ├── genhelloprintf.st │ ├── hard-tasks.st │ ├── hello-scheme.stsh │ ├── hello.stsh │ ├── homefileserver.stsh │ ├── htmxtest.st │ ├── imageinfo.stsh │ ├── listdockercontainers.st │ ├── listdockerimages-scheme.st │ ├── listdockerimages.st │ ├── listmethods.stsh │ ├── listtasks.st │ ├── logfilechanges.st │ ├── makeWindow.stsh │ ├── memfuse.stsh │ ├── method-store-browser-scheme.stsh │ ├── mountclass.st │ ├── mountclock.st │ ├── mountenv.stsh │ ├── mountscheme.st │ ├── nc.stsh │ ├── pdfpageextract.stsh │ ├── plist2objc.st │ ├── proxy.stsh │ ├── renderpdf2bitmappdf.st │ ├── resourcebrowser-tests.st │ ├── s3rootdir.st │ ├── sawk-filter.st │ ├── scheme-constraints.st │ ├── sentiment.st │ ├── stcat.stsh │ ├── streamxml.st │ ├── tableDict.st │ ├── taskbench-json.st │ ├── taskbench-sqlite.st │ ├── textfield.st │ ├── toupper │ ├── toupper-autorun │ ├── triangle.stsh │ ├── tryreactivecocoa.stsh │ ├── unique.st │ ├── uniqueArgs.stsh │ └── zipTastic.stsh ├── old │ ├── downloadAppStoreIcons.stsh │ └── homefileserver-new.stsh ├── shells │ ├── calsh │ └── pdfsh ├── sport-todo ├── stpy │ └── pyyt.st ├── ui │ ├── Tasks.m │ ├── arraytarget.st │ ├── envtable.st │ ├── gui2file.st │ ├── gui2file2way.st │ ├── gui2filebindings.st │ ├── gui2proc.st │ ├── gui2s3.st │ ├── gui2stdout.st │ ├── gui2upcasefile.st │ ├── hello-ui.st │ ├── homedir-browser.st │ ├── imageview.st │ ├── linktask │ ├── names.json │ ├── runapp │ ├── s3gui.st │ ├── showwindow-button.st │ ├── showwindow.st │ ├── starts3 │ ├── tableview.st │ ├── tasks-ui.st │ └── ui2msgstdout.st ├── ukstug-2021 │ ├── Basic-Demo.st │ ├── browser.st │ ├── filebrowser.st │ ├── hello-world-http-ppath.stsh │ ├── sample-slide.st │ └── ukstug-presentation.st └── wunderground.xml ├── sl.entitlements ├── stapp.png ├── test.stb ├── Info.json ├── Resources │ ├── objst.newsplist │ └── objst.png └── Sources │ ├── STBundleLoadedTestClass1.st │ └── STBundleLoadedTestClass2.st ├── testfile.txt └── varname.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .svn 3 | CVS 4 | ObjectiveSmalltalk.xcodeproj/xcuserdata/ 5 | *.o 6 | *.dylib 7 | *.swp 8 | .headers 9 | TestObjectiveSmalltalk/testobjectivesmalltalk 10 | Stsh/stsh 11 | nsnumberadd 12 | raspi/raspish 13 | a.out 14 | default.profraw 15 | -------------------------------------------------------------------------------- /Classes/MPWAssignmentExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWAssignmentExpression.h 3 | // Arch-S 4 | // 5 | // Created by marcel on Mon Jul 02 2001. 6 | // Copyright (c) 2001 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class STIdentifierExpression; 12 | 13 | @interface MPWAssignmentExpression : STExpression { 14 | STIdentifierExpression* lhs; 15 | id context; 16 | STExpression* rhs; 17 | } 18 | 19 | idAccessor_h( lhs, setLhs ) 20 | idAccessor_h( rhs, setRhs ) 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Classes/MPWBidirectionalDataflowConstraintExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWBidirectionalDataflowConstraintExpression.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 6/3/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWBidirectionalDataflowConstraintExpression : MPWAssignmentExpression 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/MPWBindingLegacy.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWBinding.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 11/22/04. 6 | // Copyright 2004 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class MPWScheme,STIdentifier,STEvaluator; 12 | 13 | -------------------------------------------------------------------------------- /Classes/MPWBlockContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWBlockContext.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 11/22/04. 6 | // Copyright 2004 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | @interface MPWBlockContext : MPWBlockInvocable { 14 | id context; 15 | id block; 16 | } 17 | 18 | +blockContextWithBlock:aBlock context:aContext; 19 | -value; 20 | -value:anObject; 21 | -valueWithObjects:(NSArray*)args; 22 | 23 | -context; 24 | @end 25 | -------------------------------------------------------------------------------- /Classes/MPWBoxerUnboxer+MPWBoxingAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWBoxerUnboxer+MPWBoxingAdditions_m.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 12/8/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWBoxerUnboxer (MPWBoxingAdditions) 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Classes/MPWBridgeReader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWBridgeReader.h 3 | // MPWXmlKit 4 | // 5 | // Created by Marcel Weiher on 6/4/07. 6 | // Copyright 2007 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWFallbackBridgeReader : MPWObject { 13 | id context; 14 | } 15 | 16 | -initWithContext:aContext; 17 | +(void)parseBridgeDict:aDict forContext:aContext; 18 | 19 | -(BOOL)parse:(NSData*)xmlData; 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Classes/MPWCLibrary.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWCLibrary.h 3 | // MPWTalk 4 | // 5 | // Created by Marcel Weiher on 07/05/2005. 6 | // Copyright 2005 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWCLibrary : MPWObject { 13 | id signatures; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Classes/MPWCLibrary.m: -------------------------------------------------------------------------------- 1 | // 2 | // MPWCLibrary.m 3 | // MPWTalk 4 | // 5 | // Created by Marcel Weiher on 07/05/2005. 6 | // Copyright 2005 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "MPWCLibrary.h" 10 | 11 | 12 | @implementation MPWCLibrary 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Classes/MPWDataflowConstraintExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWDataflowConstraintExpression.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 5/31/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWDataflowConstraintExpression : MPWAssignmentExpression 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/MPWDefaultsBinding.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWDefaultsBinding.h 3 | // MPWTalk 4 | // 5 | // Created by Marcel Weiher on 6/4/11. 6 | // Copyright 2011 metaobject ltd. All rights reserved. 7 | // 8 | 9 | #import "MPWBinding.h" 10 | 11 | 12 | 13 | @interface MPWDefaultsBinding : MPWBinding { 14 | NSString *key; 15 | } 16 | 17 | -initWithKey:(NSString*)newKey; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Classes/MPWEvaluable.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWEvaluable.h 3 | // Arch-S 4 | // 5 | // Created by marcel on Mon Feb 13 2006. 6 | // Copyright (c) 2001 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | 12 | @protocol MPWEvaluable 13 | 14 | -(NSObject*)evaluateIn:aContext; 15 | -(NSObject*)evaluate; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /Classes/MPWExpression+autocomplete.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWExpression+autocomplete.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 5/13/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @class STEvaluator; 12 | 13 | 14 | 15 | @interface STExpression (autocomplete) 16 | 17 | 18 | -(NSArray*)completionsForString:(NSString*)s withEvaluator:(STEvaluator*)evaluator resultName:(NSString **)resultName; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/MPWFastMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWFastMessage.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 9/9/06. 6 | // Copyright 2006 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWFastMessage : MPWObject { 13 | SEL selector; 14 | int count; 15 | } 16 | 17 | +messageWithSelector:(SEL)aSelector typestring:(char*)newTypestring; 18 | -sendTo:receiver withArguments:(id*)args count:(int)argCount; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/MPWFastSuperMessage.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWFastSuperMessage.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 27.03.21. 6 | // 7 | 8 | #import "MPWFastMessage.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWFastSuperMessage : MPWFastMessage 13 | 14 | @property (nonatomic,assign) Class superclassOfTarget; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Classes/MPWGetAccessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWGetAccessor.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 21/07/2005. 6 | // Copyright 2005 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class MPWInstanceVariable; 12 | 13 | @interface MPWGetAccessor : MPWAbstractInterpretedMethod { 14 | MPWInstanceVariable* ivarDef; 15 | } 16 | 17 | +accessorForInstanceVariable:(MPWInstanceVariable*)ivarDef; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Classes/MPWLLVMCompiler.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWLLVMCompiler.h 3 | // MPWTalk 4 | // 5 | // Created by Marcel Weiher on 17/8/06. 6 | // Copyright 2006 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWLLVMCompiler : MPWEvaluator { 13 | id llvmMethod; 14 | id methodHeader; 15 | } 16 | 17 | idAccessor_h( methodHeader, setMethodHeader ) 18 | 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/MPWLiteralArrayExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWLiteralArrayExpression.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 1/22/17. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWLiteralArrayExpression : MPWComplexLiteralExpression 12 | 13 | @property (nonatomic, retain) NSArray *objects; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Classes/MPWLiteralDictionaryExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWLiteralDictionaryExpression.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 1/22/17. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWLiteralDictionaryExpression : MPWComplexLiteralExpression 12 | 13 | -(void)addKey:key value:value; 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Classes/MPWLiteralExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWLiteralExpression.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 5/17/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWLiteralExpression : STExpression 12 | { 13 | id theLiteral; 14 | } 15 | 16 | idAccessor_h(theLiteral, setTheLiteral) 17 | 18 | @property (nonatomic, strong) NSString *className; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/MPWMethodMirror.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWMethodMirror.h 3 | // MPWTest 4 | // 5 | // Created by Marcel Weiher on 5/30/11. 6 | // Copyright 2011 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWMethodMirror : NSObject 13 | { 14 | SEL selector; 15 | IMP imp; 16 | const char *typestring; 17 | } 18 | 19 | -initWithSelector:(SEL)newSel typestring:(const char*)newTypes; 20 | -(SEL)selector; 21 | -(IMP)imp; 22 | -(void)setImp:(IMP)newImp; 23 | -(NSString*)name; 24 | -(const char*)typestring; 25 | @end 26 | -------------------------------------------------------------------------------- /Classes/MPWMethodType.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWMethodType.h 3 | // psdb 4 | // 5 | // Created by Marcel Weiher on 22/01/2006. 6 | // Copyright 2006 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWMethodType : MPWObject { 13 | NSString* typeName; 14 | NSString* methodClassName; 15 | } 16 | 17 | +methodTypeWithName:(NSString*)name className:(NSString*)className; 18 | 19 | //-(NSString*)name; 20 | //-(NSString*)className; 21 | -(NSString*)typeName; 22 | -(Class)methodClass; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Classes/MPWObjCGenerator.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWObjCGenerator.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 15/07/2005. 6 | // Copyright 2005 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWObjCGenerator : MPWByteStream { 13 | 14 | } 15 | 16 | -(void)generateVariableWithName:aName; 17 | -(void)writeMessage:selector toReceiver:receiver withArgs:args; 18 | -(void)writeStatements:aList; 19 | 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Classes/MPWObjectMirror.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWObjectMirror.h 3 | // MPWTest 4 | // 5 | // Created by Marcel Weiher on 5/30/11. 6 | // Copyright 2011 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class MPWClassMirror; 12 | 13 | @interface MPWObjectMirror : NSObject 14 | { 15 | id theObject; 16 | } 17 | 18 | -initWithObject:anObject; 19 | +mirrorWithObject:anObject; 20 | -(MPWClassMirror*)classMirror; 21 | -(Class)setObjectClass:(Class)aClass; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Classes/MPWPropertyPathMethod.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWPropertyPathGetter.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 8/26/18. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | @class STPropertyPathDefinition; 13 | 14 | @interface MPWPropertyPathMethod : MPWAbstractInterpretedMethod 15 | 16 | 17 | -(instancetype)initWithPropertyPaths:(PropertyPathDef*)newPaths count:(int)count verb:(MPWRESTVerb)verb; 18 | 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/MPWRecursiveIdentifier.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWRecursiveIdentifier.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 6.1.10. 6 | // Copyright 2010 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import "STIdentifier.h" 10 | 11 | 12 | @interface MPWRecursiveIdentifier : STIdentifier { 13 | STIdentifier *nextIdentifier; 14 | } 15 | 16 | objectAccessor_h(STIdentifier*, nextIdentifier, setNextIdentifier ) 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Classes/MPWSelfContainedBinding.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWSelfContainedBinding.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 5/22/18. 6 | // 7 | 8 | #import 9 | 10 | @interface MPWSelfContainedBinding : NSObject 11 | 12 | @property (nonatomic, strong) id value; 13 | 14 | +(instancetype)bindingWithValue:newValue; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Classes/MPWSetAccessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWSetAccessor.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 21/07/2005. 6 | // Copyright 2005 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWSetAccessor : MPWGetAccessor { 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Classes/MPWStatementList.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWStatementList.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 11/22/04. 6 | // Copyright 2004 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWStatementList : STExpression { 13 | id statements; 14 | } 15 | 16 | objectAccessor_h( NSMutableArray*, statements, setStatements ) 17 | 18 | -(void)addStatement:aStatement; 19 | +statementList; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Classes/MPWTaggedFloat.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWTaggedFloat.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 7/18/12. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWTaggedFloat : NSProxy 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/MPWVariableExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWVariableExpression.h 3 | // MPWTalk 4 | // 5 | // Created by marcel on Mon Jul 02 2001. 6 | // Copyright (c) 2001 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWVariableExpression : MPWExpression { 13 | id name; 14 | id scheme; 15 | id evaluationEnvironment; 16 | } 17 | 18 | idAccessor_h( name, setName ) 19 | idAccessor_h( scheme, setScheme ) 20 | idAccessor_h( evaluationEnvironment, setEvaluationEnvironment ) 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Classes/STAWK.h: -------------------------------------------------------------------------------- 1 | // 2 | // STAWK.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 18.06.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STAWK : MPWFilter 13 | 14 | @property (nonatomic,strong) NSString *separator; 15 | @property (nonatomic,strong) id block; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Classes/STConnectionDefiner.h: -------------------------------------------------------------------------------- 1 | // 2 | // STConnectionDefiner.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 8/8/12. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface STConnectionDefiner : STExpression 12 | { 13 | id lhs,rhs; 14 | } 15 | -lhs; 16 | -rhs; 17 | 18 | @end 19 | 20 | 21 | @interface NSObject(connecting) 22 | 23 | -defaultComponentInstance; 24 | +defaultComponentInstance; 25 | -(Protocol*)defaultInputProtocol; 26 | -defaultInputPort; 27 | -defaultMessageInPortWithProtocol:aProtcol; 28 | -defaultOutputPort; 29 | 30 | -(NSDictionary*)ports; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Classes/STConnector.h: -------------------------------------------------------------------------------- 1 | // 2 | // STConnector.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 09/02/2006. 6 | // Copyright 2006 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class STMessagePortDescriptor; 12 | 13 | @interface STConnector : NSObject { 14 | } 15 | 16 | @property (nonatomic,strong) STMessagePortDescriptor *source,*target; 17 | 18 | -(BOOL)connect; 19 | -(BOOL)isCompatible; 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Classes/STConnector.m: -------------------------------------------------------------------------------- 1 | // 2 | // STConnector.m 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 09/02/2006. 6 | // Copyright 2006 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import "STConnector.h" 10 | 11 | 12 | @implementation STConnector 13 | 14 | -(BOOL)isCompatible { return NO; } 15 | -(BOOL)connect { return NO; } 16 | 17 | -(void)dealloc 18 | { 19 | [_source release]; 20 | [_target release]; 21 | [super dealloc]; 22 | } 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Classes/STFilterDefinition.h: -------------------------------------------------------------------------------- 1 | // 2 | // STFilterDefinition.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 8/1/18. 6 | // 7 | 8 | #import 9 | 10 | @class STScriptedMethod; 11 | 12 | @interface STFilterDefinition : STClassDefinition 13 | 14 | @property (nonatomic, strong) STScriptedMethod *filterMethod; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Classes/STFilterDefinition.m: -------------------------------------------------------------------------------- 1 | // 2 | // STFilterDefinition.m 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 8/1/18. 6 | // 7 | 8 | #import "STFilterDefinition.h" 9 | 10 | @implementation STFilterDefinition 11 | 12 | 13 | -(NSString*)defaultSuperclassName 14 | { 15 | return @"MPWFilter"; 16 | } 17 | 18 | -(void)dealloc 19 | { 20 | [_filterMethod release]; 21 | [super dealloc]; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Classes/STIdentifier.h: -------------------------------------------------------------------------------- 1 | // 2 | // STIdentifier.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 6.1.10. 6 | // Copyright 2010 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class MPWReference; 13 | 14 | @interface STIdentifier : MPWGenericIdentifier { 15 | } 16 | 17 | 18 | +identifierWithName:(NSString*)name; 19 | -evaluatedIdentifierNameInContext:aContext; 20 | 21 | -(MPWReference*)bindingWithContext:aContext; 22 | 23 | -resolveRescursiveIdentifierWithContext:aContext; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Classes/STJittableData.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWJittableData.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 26.09.22. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STJittableData : NSObject 13 | 14 | -(instancetype)initWithCapacity:(long)initialCapacity; 15 | -(const void*)bytes; 16 | -(void*)mutableBytes; 17 | -(void)appendBytes:(const void*)newBytes length:(long)newLength; 18 | -(unsigned long)length; 19 | -(long)capacity; 20 | -(void)makeExecutable; 21 | -(void)makeWritable; 22 | 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Classes/STMessageConnector.h: -------------------------------------------------------------------------------- 1 | // 2 | // STMessageConnector.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 20.02.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @class STMessagePortDescriptor; 13 | 14 | @interface STMessageConnector : STConnector 15 | 16 | @property (nonatomic,strong) id protocol; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /Classes/STNotificationDefinition.h: -------------------------------------------------------------------------------- 1 | // 2 | // STNotificationDefinition.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 20.05.23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STNotificationDefinition : STConnectionDefinition 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Classes/STNotificationDefinition.m: -------------------------------------------------------------------------------- 1 | // 2 | // STNotificationDefinition.m 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 20.05.23. 6 | // 7 | 8 | #import "STNotificationDefinition.h" 9 | 10 | @implementation STNotificationDefinition 11 | 12 | @end 13 | 14 | 15 | #import 16 | 17 | @implementation STNotificationDefinition(testing) 18 | 19 | +(void)someTest 20 | { 21 | EXPECTTRUE(false, @"implemented"); 22 | } 23 | 24 | +(NSArray*)testSelectors 25 | { 26 | return @[ 27 | // @"someTest", 28 | ]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/STObjectTemplate.h: -------------------------------------------------------------------------------- 1 | // 2 | // STObjectTemplate.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 13.02.21. 6 | // 7 | 8 | #import 9 | 10 | @class MPWComplexLiteralExpression; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface STObjectTemplate : STExpression 15 | 16 | @property (nonatomic, strong) NSString *literalClassName; 17 | @property (nonatomic, strong) MPWComplexLiteralExpression *literal; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /Classes/STPort.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPort.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 23.08.23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STPort : NSObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Classes/STPort.m: -------------------------------------------------------------------------------- 1 | // 2 | // STPort.m 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 23.08.23. 6 | // 7 | 8 | #import "STPort.h" 9 | 10 | @implementation STPort 11 | 12 | @end 13 | 14 | 15 | #import 16 | 17 | @implementation STPort(testing) 18 | 19 | +(void)someTest 20 | { 21 | EXPECTTRUE(false, @"implemented"); 22 | } 23 | 24 | +(NSArray*)testSelectors 25 | { 26 | return @[ 27 | // @"someTest", 28 | ]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/STPostExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPostExpression.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 26.05.23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STPostExpression : MPWAssignmentExpression 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Classes/STProgram.h: -------------------------------------------------------------------------------- 1 | // 2 | // STProcess.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 16.01.23. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface NSObject(stprocess) 12 | 13 | -main:args; 14 | -Stdout; 15 | +(int)intMain:(NSArray *)args; 16 | +(int)mainArgc:(int)argc argv:(char**)argv; 17 | 18 | @end 19 | 20 | 21 | 22 | @interface STProgram : NSObject 23 | 24 | @property (nonatomic,strong ) NSString *name; 25 | 26 | 27 | @end 28 | 29 | -------------------------------------------------------------------------------- /Classes/STPropertyMethodHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPropertyMethodHeader.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 02.07.23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STPropertyMethodHeader : MPWMethodHeader 13 | 14 | -(instancetype)initWithTemplate:(MPWReferenceTemplate*)template verb:(MPWRESTVerb)verb; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Classes/STPropertyPathDefinition.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPropertyPathDefinition.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 8/6/18. 6 | // 7 | 8 | #import 9 | 10 | @class MPWReferenceTemplate,STScriptedMethod; 11 | 12 | @interface STPropertyPathDefinition : NSObject 13 | 14 | @property (nonatomic, strong) MPWReferenceTemplate* propertyPath; 15 | 16 | -(void)setMethod:(STScriptedMethod*)method forVerb:(MPWRESTVerb)verb; 17 | -(STScriptedMethod*)methodForVerb:(MPWRESTVerb)verb; 18 | 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/STProtocolDefinition.h: -------------------------------------------------------------------------------- 1 | // 2 | // STProtocolDefinition.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 19.02.19. 6 | // 7 | 8 | #import 9 | 10 | @class MPWInstanceVariable,STScriptedMethod; 11 | 12 | @interface STProtocolDefinition : STConnectionDefinition 13 | 14 | 15 | 16 | -(void)defineProtocol; 17 | 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /Classes/STSubscriptExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // STSubscriptExpression.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 29.07.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STSubscriptExpression : STExpression 13 | 14 | @property (nonatomic,strong) STExpression *receiver; 15 | @property (nonatomic,strong) STExpression *subscript; 16 | 17 | -evaluateAssignmentOf:value in:aContext; 18 | -convertToQueryIfNecessary; 19 | 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Classes/STSystem.h: -------------------------------------------------------------------------------- 1 | // 2 | // STSystem.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 02.01.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STSystem : NSObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Classes/STTargetActionSenderPort.h: -------------------------------------------------------------------------------- 1 | // 2 | // STTargetActionSenderPort.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 26.02.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STTargetActionSenderPort : STPort 13 | 14 | -initWithControl:aControl; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Classes/STVariableDefinition.h: -------------------------------------------------------------------------------- 1 | // 2 | // STVariableDefinition.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 01.07.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @class STTypeDescriptor; 13 | 14 | @interface STVariableDefinition : STExpression 15 | 16 | @property (nonatomic,strong) NSString *name; 17 | @property (nonatomic,strong) STTypeDescriptor *type; 18 | 19 | -initWithName:(NSString*)newName type:(STTypeDescriptor*)newType; 20 | 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Classes/ViewBuilderPreviewNotification.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewBuilderPreviewNotification.h 3 | // ViewBuilder 4 | // 5 | // Created by Marcel Weiher on 08.03.21. 6 | // Copyright © 2021 Marcel Weiher. All rights reserved. 7 | // 8 | //#import 9 | 10 | @protocol ViewBuilderAppKitPreviewNotification 11 | 12 | -(void)evaluateNewCode:(NSNotification*)notification; 13 | 14 | @end 15 | 16 | @protocol ViewBuilderUIKitPreviewNotification 17 | 18 | -(void)evaluateNewCode:(NSNotification*)notification; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /ExamplePrograms/7GUIs/1-Counter-constraint.viewd/Sources/viewdef.st: -------------------------------------------------------------------------------- 1 | "Doesn't currently work". 2 | 3 | model:count ← 1. 4 | 5 | button ← #Button{ #title: 'count' }. 6 | button → { model:count ← model:count + 1. protocol:ModelDidChange notify. }. 7 | label ← #Label{ }. 8 | view := #Grid{ #rows: [ 9 | [ label, button ] 10 | ] }. 11 | 12 | label |= model:count. 13 | 14 | view. -------------------------------------------------------------------------------- /ExamplePrograms/7GUIs/1-Counter-model.viewd/Sources/viewdef.st: -------------------------------------------------------------------------------- 1 | init:count ← 1. 2 | button ← #Button{ #title: 'Count' }. 3 | button → { model:count ← model:count + 1. }. 4 | #Grid{ #rows: [ 5 | [ #Label{ #ref: ref:model:count }, button ] 6 | ] }. -------------------------------------------------------------------------------- /ExamplePrograms/7GUIs/1-Counter.viewd/Sources/viewdef.st: -------------------------------------------------------------------------------- 1 | init:model:count ← 1. 2 | button ← #Button{ title: 'count' }. 3 | button → { model:count ← model:count + 1. }. 4 | 5 | #Grid{ #rows: [ 6 | [ #Label{ ref: ref:model:count }, button ] 7 | ] }. 8 | -------------------------------------------------------------------------------- /ExamplePrograms/7GUIs/2-Temperature Converter.viewd/Sources/viewdef.st: -------------------------------------------------------------------------------- 1 | 2 | filter f2c |{ ^object intValue - 32 / 1.8 | rounded. }. 3 | filter c2f |{ ^object intValue * 1.8 + 32 | rounded. }. 4 | 5 | celsiusField ← #NumberField{ intValue: 0 }. 6 | fahrenheitField ← #NumberField{ intValue:32 } . 7 | 8 | celsiusField → c2f → fahrenheitField. 9 | fahrenheitField → f2c → celsiusField. 10 | 11 | #Grid{ rows: [ 12 | [ celsiusField, #Label{ stringValue:'º Celsius '} ], 13 | [ fahrenheitField, #Label{ stringValue:'º Fahrenheit '} ], 14 | ] }. 15 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | Loop 3 | HelloWorld 4 | sawk-filter 5 | CollectFor 6 | HelloHTTP 7 | PrintFile 8 | hello.txt 9 | PutFile 10 | HelloSchemes 11 | PrintArgs 12 | TwoClasses 13 | large.csv 14 | SchemeDefHTTP 15 | NativeInt 16 | SchemeDef-simple.st 17 | sawk-filter-1 18 | NativeIntCheating 19 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/CollectFor.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | var range. 6 | var added. 7 | range := 1 to: 10. 8 | added := range collect + 1. 9 | self Stdout println: range. 10 | self Stdout println: added. 11 | 0. 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/FibServer.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | framework:ObjectiveHTTPD load. 3 | scheme FibServer 4 | { 5 | -fib: n { 6 | n < 2 ifTrue: { n. } ifFalse: { (self fib:n - 1) + (self fib:n - 2). }. 7 | } 8 | /factorial/:n { 9 | get { 10 | self fib: n intValue | stringValue. 11 | } 12 | } 13 | } 14 | 15 | FibServer scheme serveOnPort: 8081 16 | NSRunLoop currentRunLoop run. 17 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/HelloHTTP.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | var dict. 6 | var store. 7 | store := class:MPWDictStore store. 8 | scheme:db := store. 9 | db:hello := 'World'. 10 | store serveOnPort:9001 intValue. 11 | class:NSRunLoop currentRunLoop run. 12 | 0. 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/HelloSchemes.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | var store. 6 | scheme:db := class:MPWDictStore store. 7 | db:hello := 'Hello World'. 8 | db:hi := 'hi there, world'. 9 | store := scheme:db. 10 | store serveOn:9001. 11 | class:NSRunLoop currentRunLoop run. 12 | 0. 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/HelloScript.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | stdout println:'Hello ObjS interpreted world!'. 3 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/HelloWorld.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ExamplePrograms/NativeCompiler/HelloWorld.bak -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/HelloWorld.o-bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ExamplePrograms/NativeCompiler/HelloWorld.o-bak -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/HelloWorld.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | self Stdout println:'Hello ObjS native world!'. 6 | 0. 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/HelloWorldAndClass: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ExamplePrograms/NativeCompiler/HelloWorldAndClass -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/HelloWorldAndClass.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | +someClassMethod { 32. } 4 | -main:args 5 | { 6 | self Stdout println:'Hello ObjS native world!'. 7 | self Stdout println: self class someClassMethod stringValue. 8 | 0. 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/Initialise.st: -------------------------------------------------------------------------------- 1 | 2 | class TestInitialize { 3 | +(void)initialize { 4 | stdout println:'Hello World'. 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/Loop.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | 1 to: 10 do: { :i | 6 | self Stdout println:'Hello ObjS loopy world: ' , i stringValue. 7 | }. 8 | 0. 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/NativeInt.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | var from. 6 | from := 4. 7 | self Stdout println:('Hello ObjS native world!' substringFromIndex:from). 8 | 0. 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/NativeIntCheating.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | var from. 6 | from := 4 intValue. 7 | self Stdout println:('Hello ObjS native world!' substringFromIndex:from). 8 | 0. 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/PrintArgs-old: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ExamplePrograms/NativeCompiler/PrintArgs-old -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/PrintArgs.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | var max. 6 | var stdout. 7 | stdout := self Stdout. 8 | max := class:NSNumber numberWithInt:args count. 9 | 1 to: max - 1 do:{ :i | 10 | stdout println: args[i]. 11 | }. 12 | 0. 13 | } 14 | } 15 | 16 | #Hello new main: [1,2,3]. 17 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/PrintFile.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | self Stdout println: file:HelloWorld.st . 6 | 0. 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/PutFile.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | file: hello.txt := 'Hello World!'. 6 | 0. 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/SchemeDefHTTP-script.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | framework:ObjectiveHTTPD load. 3 | scheme Hello 4 | { 5 | /hi { 6 | get { 7 | 'Simple GET Property Path without parameters'. 8 | } 9 | } 10 | /hi/:p1 { 11 | get { 12 | 'GET property path /hi/:p1 with paramater: ' stringByAppendingString:p1. 13 | } 14 | } 15 | } 16 | 17 | Hello scheme serveOnPort: 8081 18 | NSRunLoop currentRunLoop run. 19 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/SchemeDefHTTP.o-with-ppath-struct-broken: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ExamplePrograms/NativeCompiler/SchemeDefHTTP.o-with-ppath-struct-broken -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/SchemeDefHTTP.st: -------------------------------------------------------------------------------- 1 | scheme HelloServer 2 | { 3 | /hi/:p1 { 4 | get { 5 | 'hello: ',p1. 6 | } 7 | } 8 | -main:args 9 | { 10 | self waitOnPort: 8081 intValue. 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/TestClassMethodsWork.st: -------------------------------------------------------------------------------- 1 | class TestClassWithClassMethods : STNonNilTestProgram { 2 | +theAnswer { 32. } 3 | -main:args { self class theAnswer - 32. } 4 | } 5 | -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/TwoClasses.o-bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ExamplePrograms/NativeCompiler/TwoClasses.o-bak -------------------------------------------------------------------------------- /ExamplePrograms/NativeCompiler/TwoClasses.st: -------------------------------------------------------------------------------- 1 | class Hello 2 | { 3 | -main:args 4 | { 5 | var greeter. 6 | greeter := class:Greeter new. 7 | self Stdout print: 'greeter: '. self Stdout println:greeter. 8 | greeter greet:'Hello World via greeter' on:self Stdout. 9 | 0. 10 | } 11 | } 12 | class Greeter 13 | { 14 | -greet:msg on:stdout { 15 | stdout println:msg. 16 | } 17 | -main:args { 18 | self Stdout println:'greeter''s main called'. 19 | 0. 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-blog.sited/Info.json: -------------------------------------------------------------------------------- 1 | {"site":"BlogSite"} 2 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-blog.sited/Resources/PostDisplay.html: -------------------------------------------------------------------------------- 1 |

This is a blog entry, really

2 | 3 |

{title}

4 |

5 |

6 | {body} 7 |

8 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-blog.sited/Resources/PostEdit.html: -------------------------------------------------------------------------------- 1 |

Edit Blog Post

2 | 3 |

4 |

5 | Title:
6 |

7 | Body:
8 |

9 |

10 | 11 | 12 |

13 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-blog.sited/Resources/PostList.html: -------------------------------------------------------------------------------- 1 |

This is the blog list

2 | 3 | {#.} 4 | {title}. edit delete

5 | {/.} 6 |

7 | new

8 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-blog.sited/Resources/PostNew.html: -------------------------------------------------------------------------------- 1 |

New Blog Post

2 | 3 |

4 |

5 | Title:
6 |

7 | Body:
8 |

9 |

10 | 11 | 12 |

13 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-blog.sited/Resources/Site.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {.} 4 | 5 | 6 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-blog.sited/Sources/Post.st: -------------------------------------------------------------------------------- 1 | class Post : STEntity { 2 | var title. 3 | var body. 4 | -description { 5 | "Post with title: '{this:title}' body '{this:body}'". 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-blog.sited/Sources/TemplateNames.st: -------------------------------------------------------------------------------- 1 | 2 | scheme TemplateNames { 3 | var baseName. 4 | /:id/edit { 5 | get { 6 | "{this:baseName}Edit.html". 7 | } 8 | } 9 | 10 | / { 11 | get { 12 | "{this:baseName}List.html". 13 | } 14 | } 15 | /new { get { 16 | "{this:baseName}New.html". 17 | } } 18 | /:id { 19 | get { 20 | "{this:baseName}Display.html". 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-htmx-blog.sited/Info.json: -------------------------------------------------------------------------------- 1 | {"site":"BlogSite"} 2 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-htmx-blog.sited/Resources/PostDisplay.html: -------------------------------------------------------------------------------- 1 |

This is a blog entry, really

2 | 3 |

{title}

4 |

5 |

6 | {body} 7 |

8 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-htmx-blog.sited/Resources/PostEdit.html: -------------------------------------------------------------------------------- 1 |

Edit Blog Post

2 | 3 |

4 |

5 | Title:
6 |

7 | Body:
8 |

9 |

10 | 11 | 12 |

13 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-htmx-blog.sited/Resources/PostList.html: -------------------------------------------------------------------------------- 1 |

This is the blog list

2 | 3 | {#.} 4 | {title}. edit delete

5 | {/.} 6 |

7 | new

8 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-htmx-blog.sited/Resources/PostNew.html: -------------------------------------------------------------------------------- 1 |

New Blog Post

2 | 3 |

4 |

5 | Title:
6 |

7 | Body:
8 |

9 |

10 | 11 | 12 |

13 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-htmx-blog.sited/Resources/Site.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {.} 4 | 5 | 6 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-htmx-blog.sited/Sources/Post.st: -------------------------------------------------------------------------------- 1 | class Post : STEntity { 2 | var title. 3 | var body. 4 | -description { 5 | "Post with title: '{this:title}' body '{this:body}'". 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/dynamic-htmx-blog.sited/Sources/TemplateNames.st: -------------------------------------------------------------------------------- 1 | 2 | scheme TemplateNames { 3 | var baseName. 4 | /:id/edit { 5 | get { 6 | "{this:baseName}Edit.html". 7 | } 8 | } 9 | 10 | / { 11 | get { 12 | "{this:baseName}List.html". 13 | } 14 | } 15 | /new { get { 16 | "{this:baseName}New.html". 17 | } } 18 | /:id { 19 | get { 20 | "{this:baseName}Display.html". 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/todomvc-htmx.sited/Info.json: -------------------------------------------------------------------------------- 1 | { 2 | "site": "ToDoMVC" 3 | } 4 | -------------------------------------------------------------------------------- /ExamplePrograms/Sails/todomvc-htmx.sited/Sources/ToDoMVC.st: -------------------------------------------------------------------------------- 1 | scheme ToDoMVC { 2 | var bundle. 3 | var count. 4 | -init { 5 | self ← super init. 6 | this:count ← 0. 7 | stdout println: self description. 8 | self. 9 | } 10 | /htmx { get { this:bundle resources at:'htmx.js'. } } 11 | /{ get { this:bundle resources at:'clickme.htmx'. } } 12 | /clicked { get { 13 | stdout println:'clicked'. 14 | stdout println: this:count stringValue. 15 | this:count ← this:count + 1. "Clicked count: {this:count}". } } 16 | } 17 | -------------------------------------------------------------------------------- /GNUstep/build-gnuste-stsh-deploy: -------------------------------------------------------------------------------- 1 | docker build -t stsh-deploy stsh-deploy 2 | -------------------------------------------------------------------------------- /GNUstep/objst-docker-ARM/README.md: -------------------------------------------------------------------------------- 1 | Note: this build script downloads clang binaries for Aarch64. 2 | 3 | ubuntu-16.04-clang-9.0-runtime-2.0-ARM 4 | -------------------------------------------------------------------------------- /GNUstep/objst-docker-ARM/test.sh: -------------------------------------------------------------------------------- 1 | docker build -t gnustep-clang-ubuntu1604 testing/. 2 | docker run gnustep-clang-ubuntu1604 3 | -------------------------------------------------------------------------------- /GNUstep/objst-docker-ARM/testing/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN apt-get update && apt-get install -y clang build-essential wget git sudo 4 | RUN git clone https://github.com/plaurent/gnustep-build 5 | RUN cp gnustep-build/*.sh . 6 | RUN cp gnustep-build/ubuntu-16.04-clang-9.0-runtime-2.0-ARM/*.sh . 7 | RUN chmod +x *.sh 8 | RUN /bin/bash -c "./GNUstep-buildon-ubuntu1604_arm.sh" 9 | 10 | CMD [ "/bin/bash", "-c", "export PS1=allow_bash_to_run; source ~/.bashrc; ./demo.sh" ] 11 | -------------------------------------------------------------------------------- /GNUstep/stsh-deploy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | ENV LC_ALL en_US.UTF-8 4 | ENV LANG en_US.UTF-8 5 | ENV TZ 'Europe/Berlin' 6 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 7 | 8 | 9 | RUN apt-get update && apt-get install -y \ 10 | libreadline6-dev \ 11 | libxml2 \ 12 | libedit-dev 13 | 14 | 15 | RUN useradd -ms /bin/bash gnustep 16 | 17 | COPY bashrc /home/gnustep/.bashrc 18 | COPY profile /home/gnustep/.profile 19 | COPY bashrc /root/.bashrc 20 | COPY profile /root/.profile 21 | COPY bashrc /.bashrc 22 | COPY profile /.profile 23 | 24 | CMD ["bash"] 25 | 26 | -------------------------------------------------------------------------------- /GNUstep/stsh-deploy/profile: -------------------------------------------------------------------------------- 1 | . .bashrc 2 | -------------------------------------------------------------------------------- /MPWCSourceKit/MPWCSourceKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWCSourceKit.h 3 | // MPWCSourceKit 4 | // 5 | // Created by Marcel Weiher on 7/23/18. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for MPWCSourceKit. 11 | FOUNDATION_EXPORT double MPWCSourceKitVersionNumber; 12 | 13 | //! Project version string for MPWCSourceKit. 14 | FOUNDATION_EXPORT const unsigned char MPWCSourceKitVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /MPWCSourceKit/MPWClangImporter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWClangImporter.h 3 | // MPWCSourceKit 4 | // 5 | // Created by Marcel Weiher on 7/23/18. 6 | // 7 | 8 | #import 9 | 10 | @protocol CImporterDelegate 11 | 12 | -(void)globalVariable:(NSString*)name type:(NSString*)type; 13 | -(void)enumCase:(NSString*)name value:(long)value; 14 | 15 | 16 | @end 17 | 18 | 19 | @interface MPWClangImporter : NSObject 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /MPWCSourceKit/clang-c/README: -------------------------------------------------------------------------------- 1 | These headers for clang-c are only used on Mac OS X, because we link to a private system copy of libclang.dylib. 2 | -------------------------------------------------------------------------------- /MPWCascadeExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWCascadeExpression.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 12/1/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWCascadeExpression : STExpression 12 | { 13 | NSMutableArray *messageExpressions; 14 | } 15 | 16 | -(void)addMessageExpression:messageExpression; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /MethodServer/MethodServer-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'MethodServer' target in the 'MethodServer' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /MethodServer/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /MethodServerTouch/MethodServerTouch.h: -------------------------------------------------------------------------------- 1 | // 2 | // MethodServerTouch.h 3 | // MethodServerTouch 4 | // 5 | // Created by Marcel Weiher on 7/6/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for MethodServerTouch. 12 | FOUNDATION_EXPORT double MethodServerTouchVersionNumber; 13 | 14 | //! Project version string for MethodServerTouch. 15 | FOUNDATION_EXPORT const unsigned char MethodServerTouchVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /ObjSTNative/.gitignore: -------------------------------------------------------------------------------- 1 | testelfnative 2 | -------------------------------------------------------------------------------- /ObjSTNative/MPWARMObjectCodeGeneratorExternalTestsMachO.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWARMObjectCodeGeneratorExternalTestsMachO.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 11.05.24. 6 | // 7 | 8 | #import "STObjectCodeGeneratorARM.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWARMObjectCodeGeneratorExternalTestsMachO : STObjectCodeGeneratorARM 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjSTNative/MPWCPUSimulator.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWCPUSimulator.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 11.01.22. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | 13 | #define MEMSIZE 4096 14 | 15 | @interface MPWCPUSimulator : NSObject 16 | { 17 | unsigned long R[32]; 18 | double FR[32]; 19 | unsigned long M[MEMSIZE]; 20 | 21 | } 22 | 23 | -(void)interpret:(int)start; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /ObjSTNative/MPWELFRelocationTable.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWELFRelocationTable.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 29.06.24. 6 | // 7 | 8 | #import "MPWELFSection.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWELFRelocationTable : MPWELFSection 13 | 14 | -(int)typeOfRelocEntryAt:(int)offset; 15 | -(int)offsetOfRelocEntryAt:(int)offset; 16 | -(int)symbolIndexAtOffset:(int)offset; 17 | 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /ObjSTNative/MPWELFSymbolTable.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWELFSymbolTable.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 04.05.24. 6 | // 7 | 8 | #import "MPWELFSection.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWELFSymbolTable : MPWELFSection 13 | 14 | -(NSString*)symbolNameAt:(int)anIndex; 15 | -(int)symbolInfoAtIndex:(int)anIndex; 16 | -(int)symbolTypeAtIndex:(int)anIndex; 17 | -(long)symbolValueAtIndex:(int)anIndex; 18 | -(int)symbolSectionAtIndex:(int)anIndex; 19 | 20 | 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /ObjSTNative/MPWELFTextSection.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWELFTextSection.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 29.06.24. 6 | // 7 | 8 | #import "MPWELFSection.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWELFTextSection : MPWELFSection 13 | 14 | -(int)typeOfRelocEntryAt:(int)offset; 15 | -(int)offsetOfRelocEntryAt:(int)offset; 16 | 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /ObjSTNative/MPWELFWriter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWELFWriter.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 05.05.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWELFWriter : MPWObjectFileWriter 13 | 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /ObjSTNative/MPWMethodDescriptor.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWMethodDescriptor.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 5/21/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWMethodDescriptor : NSObject 12 | { 13 | NSString *symbol; 14 | NSString *name; 15 | NSString *objcType; 16 | } 17 | 18 | objectAccessor_h(NSString*, symbol, setSymbol) 19 | objectAccessor_h(NSString*, name, setName) 20 | objectAccessor_h(NSString*, objcType, setObjcType) 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /ObjSTNative/MPWMethodDescriptor.m: -------------------------------------------------------------------------------- 1 | // 2 | // MPWMethodDescriptor.m 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 5/21/14. 6 | // 7 | // 8 | 9 | #import "MPWMethodDescriptor.h" 10 | 11 | @implementation MPWMethodDescriptor 12 | 13 | 14 | objectAccessor(NSString*, symbol, setSymbol) 15 | objectAccessor(NSString*, name, setName) 16 | objectAccessor(NSString*, objcType, setObjcType) 17 | 18 | -(void)dealloc 19 | { 20 | [symbol release]; 21 | [name release]; 22 | [objcType release]; 23 | [super dealloc]; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /ObjSTNative/MPWStringTableWriter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWStringTableWriter.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 06.05.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWStringTableWriter : NSObject 13 | 14 | +(instancetype)writer; 15 | -(int)stringTableOffsetOfString:(NSString*)theString; 16 | 17 | @property (readonly) long length; 18 | @property (readonly) NSData *data; 19 | 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /ObjSTNative/ObjSTNative-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ObjSTNative' target in the 'ObjSTNative' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /ObjSTNative/ObjSTNative.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjSTNative.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 2/26/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #import 12 | -------------------------------------------------------------------------------- /ObjSTNative/Resources/testelfnative/Resources/add.elf-o: -------------------------------------------------------------------------------- 1 | ../../../TestResources/add.elf-o -------------------------------------------------------------------------------- /ObjSTNative/Resources/testelfnative/Resources/empty-function-clang.elf-o: -------------------------------------------------------------------------------- 1 | ../../../TestResources/empty-function-clang.elf-o -------------------------------------------------------------------------------- /ObjSTNative/STJittedMethod.h: -------------------------------------------------------------------------------- 1 | // 2 | // STJittedMethod.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 09.10.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STJittedMethod : STScriptedMethod 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjSTNative/STJittedMethod.m: -------------------------------------------------------------------------------- 1 | // 2 | // STJittedMethod.m 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 09.10.24. 6 | // 7 | 8 | #import "STJittedMethod.h" 9 | 10 | @implementation STJittedMethod 11 | 12 | @end 13 | 14 | 15 | #import 16 | 17 | @implementation STJittedMethod(testing) 18 | 19 | +(void)testCanJitSimpleMethod 20 | { 21 | // EXPECTTRUE(false, @"implemented"); 22 | } 23 | 24 | +(NSArray*)testSelectors 25 | { 26 | return @[ 27 | @"testCanJitSimpleMethod", 28 | ]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ObjSTNative/STMethodSymbols.h: -------------------------------------------------------------------------------- 1 | // 2 | // STMethodSymbols.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 12.07.23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STMethodSymbols : NSObject 13 | 14 | 15 | @property (nonatomic, strong ) NSMutableArray *symbolNames; 16 | @property (nonatomic, strong ) NSMutableArray *methodNames; 17 | @property (nonatomic, strong ) NSMutableArray *methodTypes; 18 | 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /ObjSTNative/STNativeCompilerTestsMachO.h: -------------------------------------------------------------------------------- 1 | // 2 | // STNativeCompilerTestsMachO.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 11.05.24. 6 | // 7 | 8 | #import "STNativeMachOCompiler.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STNativeCompilerTestsMachO : STNativeMachOCompiler 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjSTNative/STNativeJitCompiler.h: -------------------------------------------------------------------------------- 1 | // 2 | // STNativeJitCompiler.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 12.10.24. 6 | // 7 | 8 | #import "STNativeCompiler.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STNativeJitCompiler : STNativeCompiler 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjSTNative/STNativeMachOCompiler.h: -------------------------------------------------------------------------------- 1 | // 2 | // STNativeMachOCompiler.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 12.10.24. 6 | // 7 | 8 | #import "STNativeCompiler.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STNativeMachOCompiler : STNativeCompiler 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjSTNative/STNativeMachOCompiler.m: -------------------------------------------------------------------------------- 1 | // 2 | // STNativeMachOCompiler.m 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 12.10.24. 6 | // 7 | 8 | #import "STNativeMachOCompiler.h" 9 | 10 | @implementation STNativeMachOCompiler 11 | 12 | @end 13 | 14 | 15 | #import 16 | 17 | @implementation STNativeMachOCompiler(testing) 18 | 19 | +(void)someTest 20 | { 21 | EXPECTTRUE(false, @"implemented"); 22 | } 23 | 24 | +(NSArray*)testSelectors 25 | { 26 | return @[ 27 | // @"someTest", 28 | ]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/ConstArray.framework/ConstArray: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/ConstArray.framework/ConstArray -------------------------------------------------------------------------------- /ObjSTNative/TestResources/add.aarch64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/add.aarch64 -------------------------------------------------------------------------------- /ObjSTNative/TestResources/add.c: -------------------------------------------------------------------------------- 1 | int add(int a,int b) { 2 | return a+b; 3 | } 4 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/add.elf-o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/add.elf-o -------------------------------------------------------------------------------- /ObjSTNative/TestResources/add.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/add.macho -------------------------------------------------------------------------------- /ObjSTNative/TestResources/addelf.aarch64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/addelf.aarch64 -------------------------------------------------------------------------------- /ObjSTNative/TestResources/call-external-fn.c: -------------------------------------------------------------------------------- 1 | extern int other(int arg); 2 | int fn(int arg) { return other(arg); } 3 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/call-external-fn.elf-o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/call-external-fn.elf-o -------------------------------------------------------------------------------- /ObjSTNative/TestResources/call-external-fn.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/call-external-fn.macho -------------------------------------------------------------------------------- /ObjSTNative/TestResources/class-with-method.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/class-with-method.macho -------------------------------------------------------------------------------- /ObjSTNative/TestResources/define-pp-structs.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/define-pp-structs.macho -------------------------------------------------------------------------------- /ObjSTNative/TestResources/empty-function-clang.elf-o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/empty-function-clang.elf-o -------------------------------------------------------------------------------- /ObjSTNative/TestResources/function-calling-block.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/function-calling-block.macho -------------------------------------------------------------------------------- /ObjSTNative/TestResources/function-passing-block.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/function-passing-block.macho -------------------------------------------------------------------------------- /ObjSTNative/TestResources/function-passing-nsstring.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/function-passing-nsstring.macho -------------------------------------------------------------------------------- /ObjSTNative/TestResources/hashPlus200.aarch64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/hashPlus200.aarch64 -------------------------------------------------------------------------------- /ObjSTNative/TestResources/main_for_add.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern int add(int a,int b); 4 | 5 | int main(int argc, char *argv[] ) { 6 | printf("res: %d\n",add(3,4)); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/testclass_objc.m: -------------------------------------------------------------------------------- 1 | // 2 | // testclass_objc.m 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 25.10.22. 6 | // 7 | 8 | #import 9 | 10 | @interface TestClass:NSObject {} 11 | -(long)method; 12 | 13 | @end 14 | @implementation TestClass 15 | 16 | -(long)method { return [self hash]+200; } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/two-classes.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/two-classes.macho -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_arithmetic.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface ArithmeticTester : NSObject {} 5 | -(NSNumber*)arithmeticTest; 6 | @end 7 | 8 | int main(int argc, char *argv[] ) { 9 | ArithmeticTester* a = [ArithmeticTester new]; 10 | printf("a=%ld\n",[[a arithmeticTest] longValue]); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_block.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | extern int (^global_block)(int); 5 | 6 | int (^local_block)(int)=^(int a){ return a+12; }; 7 | 8 | int main(void) { 9 | int a = global_block(3); 10 | int b = local_block(3); 11 | printf("a=%d, b=%d\n",a,b); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_class.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/TestResources/use_class.macho -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_class_that_creates_nsobject.mfile: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface TestClassWithClassRef:NSObject {} 5 | -tester; 6 | @end 7 | 8 | int main(void) { 9 | TestClassWithClassRef *testinstance=[TestClassWithClassRef new]; 10 | NSLog(@"testinstance: %@",testinstance); 11 | NSLog(@"will send msg 'tester''"); 12 | id testObject=[testinstance tester]; 13 | NSLog(@"testObject: %@",testObject); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_class_with_two_strings.mfile: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface TestClassTwoStrings : NSObject {} 5 | -method1; 6 | -method2; 7 | @end 8 | 9 | 10 | int main(void) { 11 | id tester = [TestClassTwoStrings new]; 12 | NSLog(@"method1: '%@'",[tester method1]); 13 | NSLog(@"method2: '%@'",[tester method2]); 14 | 15 | if ([[tester method1] isEqual:@"Hello World!"] && 16 | [[tester method2] isEqual:@"2nd string"]) { 17 | return 0; 18 | } else { 19 | return 1; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_concatter.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface Concatter : NSObject {} 5 | -concat:a and:b; 6 | @end 7 | 8 | int main(int argc, char *argv[] ) { 9 | id concatter = [Concatter new]; 10 | id s1=@"Hello "; 11 | id s2=@"World!"; 12 | NSLog(@"result: %@",[concatter concat:s1 and:s2]); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_filter.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface Upcaser : MPWFilter 5 | @end 6 | 7 | int main(int argc, char *argv[] ) { 8 | id a = [Upcaser streamWithTarget:[MPWByteStream Stdout]]; 9 | [a writeObject:@"some text"]; 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_st_block.mfile: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | extern id (^theBlock_l1)(); 5 | 6 | int main(void) { 7 | [MPWBlockContext class]; 8 | id b = [theBlock_l1 value:@(20)]; 9 | printf("b=%p\n",b); 10 | NSLog(@"b=%@",b); 11 | if ([b intValue]==23) { 12 | return 0; 13 | } else { 14 | return 1; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_string_const_class.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface StringTest : NSObject {} 5 | -(NSString*)stringAnswer; 6 | @end 7 | 8 | 9 | 10 | int main(int argc, char *argv[] ) { 11 | id a = [StringTest new]; 12 | NSLog(@"will get answer"); 13 | NSString* answer = [a stringAnswer]; 14 | NSLog(@"did get answer %p",answer); 15 | NSLog(@"class of constring string %p",[@"asdasdasdasdasd" class]); 16 | NSLog(@"class of answer %p",[answer class]); 17 | NSLog(@"answer: '%@'",answer); 18 | NSLog(@"length of answwer: %ld",answer.length); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /ObjSTNative/TestResources/use_testclass.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface TestClass : NSObject {} 5 | -(long)method; 6 | @end 7 | 8 | int main(int argc, char *argv[] ) { 9 | id a = [TestClass new]; 10 | printf("a=%ld\n",[a method]); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /ObjSTNative/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ObjSTNative/macho-headers/mach-o/compact_unwind_encoding.modulemap: -------------------------------------------------------------------------------- 1 | module MachO.compact_unwind_encoding [system] { 2 | header "compact_unwind_encoding.h" 3 | export * 4 | } 5 | -------------------------------------------------------------------------------- /ObjSTNative/macho-headers/mach-o/dyld.modulemap: -------------------------------------------------------------------------------- 1 | module MachO.dyld [system] { 2 | header "dyld.h" 3 | export * 4 | 5 | explicit module utils { 6 | header "utils.h" 7 | export * 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ObjSTNative/makeheaderdir: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mkdir -p .headers 3 | cd .headers 4 | for header in `find .. -type f -name '*.h' ` 5 | do 6 | ln -s $header 7 | done 8 | ln -s . ObjSTNative 9 | -------------------------------------------------------------------------------- /ObjSTNative/stc: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-stc:file 3 | framework:ObjSTNative load. 4 | generator := MPWCodeGenerator generator. 5 | 6 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/.gitignore: -------------------------------------------------------------------------------- 1 | hello.c 2 | hello.s 3 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/another-empty-class.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Hi : NSObject {} @end 4 | @implementation Hi 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/call-external-fn.c: -------------------------------------------------------------------------------- 1 | extern int other(int arg); 2 | int fn(int arg) { return other(arg); } 3 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/class-with-method.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Hi : NSObject {} 4 | 5 | -(NSArray*)components:(NSString*)s splitInto:(NSString*)delimiter; 6 | @end 7 | 8 | @implementation Hi 9 | 10 | -(NSArray*)components:(NSString*)s splitInto:(NSString*)delimiter 11 | { 12 | return [s componentsSeparatedByString:delimiter]; 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/compile-to-llvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cc -Wall -Os -S -emit-llvm -c $1 3 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/constarray.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSString *constant_nsstring_test=@"string"; 4 | NSArray *constant_nsarray_test=@[ @"string1", @"string2" ]; 5 | 6 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/define-pp-structs.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | id get(id self,SEL _cmd) { 4 | return nil; 5 | } 6 | PropertyPathDefs defs = { 7 | MPWRESTVerbGET,2, { 8 | {(id)@"hi/there",(IMP)get,NULL }, 9 | {(id)@"hi/:more",(IMP)get,NULL } 10 | } 11 | 12 | }; 13 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/empty-category.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @implementation NSObject(empty) 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/empty-class.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EmptyCodeGenTestClass01 : NSObject {} @end 4 | @implementation EmptyCodeGenTestClass01 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/empty-function-arm64.s: -------------------------------------------------------------------------------- 1 | .section __TEXT,__text,regular,pure_instructions 2 | .build_version macos, 11, 0 sdk_version 11, 0 3 | .globl _fn ; -- Begin function fn 4 | .p2align 2 5 | _fn: ; @fn 6 | .cfi_startproc 7 | ; %bb.0: 8 | mov w0, #4 9 | ret 10 | .cfi_endproc 11 | ; -- End function 12 | .section __DATA,__objc_imageinfo,regular,no_dead_strip 13 | L_OBJC_IMAGE_INFO: 14 | .long 0 15 | .long 64 16 | 17 | .subsections_via_symbols 18 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/empty-function.m: -------------------------------------------------------------------------------- 1 | int fn() { return 4; } 2 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/function-passing-block.m: -------------------------------------------------------------------------------- 1 | extern int fn(int (^block)(int)); 2 | int bfn(int a) { return fn( ^(int a){ return a + 3; } ); } 3 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/function-passing-nsstring.m: -------------------------------------------------------------------------------- 1 | extern int fn( id a ); 2 | int sbfn() { return fn(@"hi"); } 3 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/function-returning-arg.m: -------------------------------------------------------------------------------- 1 | id fn(id arg) { return arg; } 2 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/function-returning-obj-arg.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSWindow* fn(NSWindow *arg) { return arg; } 4 | 5 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/function-sending-msg.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | long lengtuOfString(NSString *arg) { return [arg length];} 5 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/hello-cc.clangexecutable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/test-compiles/hello-cc.clangexecutable -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/hello-mpw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/test-compiles/hello-mpw -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/hello-mpw.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char *argv[] ) { 4 | [[MPWByteStream Stdout] println:@"Hello World"]; 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/hello-mpw.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/test-compiles/hello-mpw.macho -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/hello-tcc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) { 4 | printf("Hello tcc (compile me with tcc)\n"); 5 | return 0; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/hello-tcc.tccmachoexecutable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/test-compiles/hello-tcc.tccmachoexecutable -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/llvm2dylib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | base=`basename $1 .s` 3 | llc -filetype=obj $base.s -o $base.o 4 | ld -dynamic -macosx_version_min 10.8 -dylib -o $base.dylib $base.o -framework Foundation -lSystem 5 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/main-with-called-function.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern int fn(int); 4 | 5 | int other(int arg) 6 | { 7 | return printf("other was called with %d\n",arg); 8 | } 9 | 10 | int main(int argc, char *argv[]) { 11 | return fn(3); 12 | } 13 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/method-returning-arg-category.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @implementation NSObject(empty) 4 | 5 | -empty:arg { return arg; } 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/method-returning-arg-category.s.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjSTNative/test-compiles/method-returning-arg-category.s.bc -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/two-classes.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface FirstClass : NSObject {} 4 | 5 | -(NSArray*)components:(NSString*)s splitInto:(NSString*)delimiter; 6 | @end 7 | 8 | @implementation FirstClass 9 | 10 | -(NSArray*)components:(NSString*)s splitInto:(NSString*)delimiter 11 | { 12 | return [s componentsSeparatedByString:delimiter]; 13 | } 14 | 15 | @end 16 | 17 | @interface SecondClass : NSObject {} 18 | @end 19 | 20 | @implementation SecondClass 21 | -hi { return self; } 22 | -there { return self; } 23 | -more { return self; } 24 | @end 25 | -------------------------------------------------------------------------------- /ObjSTNative/test-compiles/use_class.m: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | 5 | id functionThatReferencesClass(void) { 6 | [NSNumber new]; 7 | return [NSObject new]; 8 | } 9 | -------------------------------------------------------------------------------- /ObjectiveArithmetic/MPWBigInteger.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWBigInteger.h 3 | // ObjectiveArithmetic 4 | // 5 | // Created by Marcel Weiher on 14.08.19. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWBigInteger : NSObject 13 | 14 | +(instancetype)numberWithString:(NSString*)s; 15 | +(instancetype)numberWithLong:(long)l; 16 | -(instancetype)add:(MPWBigInteger*)other; 17 | -(instancetype)sub:(MPWBigInteger*)other; 18 | -(instancetype)mul:(MPWBigInteger*)other; 19 | -(instancetype)div:(MPWBigInteger*)other; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /ObjectiveArithmetic/ObjectiveArithmetic.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectiveArithmetic.h 3 | // ObjectiveArithmetic 4 | // 5 | // Created by Marcel Weiher on 14.08.19. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for ObjectiveArithmetic. 11 | FOUNDATION_EXPORT double ObjectiveArithmeticVersionNumber; 12 | 13 | //! Project version string for ObjectiveArithmetic. 14 | FOUNDATION_EXPORT const unsigned char ObjectiveArithmeticVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /ObjectiveSmalltalk.map: -------------------------------------------------------------------------------- 1 | 2 | framework module ObjectiveSmalltalk { 3 | umbrella header "ObjectiveSmalltalk.h" 4 | module * { export * } 5 | export * 6 | 7 | } 8 | 9 | -------------------------------------------------------------------------------- /ObjectiveSmalltalk.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ObjectiveSmalltalk.xcodeproj/project.xcworkspace/xcuserdata/marcel.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/ObjectiveSmalltalk.xcodeproj/project.xcworkspace/xcuserdata/marcel.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ObjectiveSmalltalkTouchUI/MPWColorStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWColorStore.h 3 | // ObjectiveSmalltalkTouchUI 4 | // 5 | // Created by Marcel Weiher on 25.01.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWColorStore : MPWAbstractStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkTouchUI/MPWFontStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWFontStore.h 3 | // ObjectiveSmalltalkTouchUI 4 | // 5 | // Created by Marcel Weiher on 26.01.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWFontStore : MPWAbstractStore 13 | 14 | @property (nonatomic, strong) NSDictionary *nameMap; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkTouchUI/MPWSTTouchUITests.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWSTTouchUITests.h 3 | // ObjectiveSmalltalkTouchUI 4 | // 5 | // Created by Marcel Weiher on 28.02.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWSTTouchUITests : STCompiler 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkTouchUI/UIView+dictionary.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+dictionary.h 3 | // ObjectiveSmalltalkTouch 4 | // 5 | // Created by Marcel Weiher on 20.01.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface UIView(dictionary) 13 | -(instancetype)initWithDictionary:(NSDictionary *)dict; 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkTouchUI/UIViewBuilderSmalltalkViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // UIViewBuilderMockup 4 | // 5 | // Created by Marcel Weiher on 09.01.21. 6 | // Copyright © 2021 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "ViewBuilderPreviewNotification.h" 12 | 13 | 14 | 15 | @interface UIViewBuilderSmalltalkViewController : UIViewController 16 | 17 | @property (nonatomic, strong) IBOutlet UITextView *log; 18 | @property (nonatomic, strong) IBOutlet UIView *preview; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/MPWAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWAppDelegate.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 31.03.19. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @class STCompiler; 13 | 14 | @interface MPWAppDelegate : NSObject 15 | 16 | @property (nonatomic, strong) STCompiler *compiler; 17 | 18 | -(void)loadSmalltalkMethods; 19 | 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/MPWClassMethodSwitchStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWClassMethodSwitchStore.h 3 | // ViewBuilderFramework 4 | // 5 | // Created by Marcel Weiher on 06.03.19. 6 | // Copyright © 2019 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MPWClassMethodSwitchStore : MPWMappingStore 14 | 15 | @property (nonatomic, assign) BOOL showClassMethods; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/MPWColorStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWColorStore.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 07.03.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWColorStore : MPWAbstractStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/MPWDocumentScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWDocumentScheme.h 3 | // SketchView 4 | // 5 | // Created by Marcel Weiher on 6/4/13. 6 | // Copyright (c) 2013 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface MPWDocumentScheme : MPWScheme 13 | { 14 | NSMutableSet *_referencedDocuments; 15 | id currentDocument; 16 | } 17 | 18 | -(NSSet*)referencedDocuments; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/MPWFontStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWFontStore.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 07.03.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWFontStore : MPWAbstractStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/NSView+dictionary.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSView+dictionary.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 6/15/17. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSView(dictionary) 12 | 13 | -(instancetype)initWithDictionary:(NSDictionary *)aDictionary; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/ObjectiveSmalltalkUI-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/ObjectiveSmalltalkUI.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectiveSmalltalkUI.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 5/14/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | #import 14 | #import 15 | #import 16 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/STButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // STButton.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 04.09.23. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface STButton : NSButton 14 | 15 | @property (nonatomic, strong) MPWReference *enabledRef; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/STPopUpButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPopUpButton.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 22.09.23. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @protocol ModelDidChange; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface STPopUpButton : NSPopUpButton 16 | 17 | @property (nonatomic, strong) MPWReference *ref; 18 | @property (nonatomic, strong) MPWReference *enabledRef; 19 | @property (nonatomic, assign) BOOL inProcessing; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/STProgramTextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // STProgramTextView.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 19.08.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @class STCompiler; 13 | 14 | @interface STProgramTextView : MPWProgramTextView 15 | 16 | @property (nonatomic, strong) STCompiler *compiler; 17 | 18 | -(IBAction)doIt:sender; 19 | -(IBAction)printIt:sender; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/STProgressIndicator.h: -------------------------------------------------------------------------------- 1 | // 2 | // STProgressIndicator.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 25.09.23. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface STProgressIndicator : NSProgressIndicator 14 | 15 | @property (nonatomic, strong) MPWReference *ref,*enabledRef,*minRef,*maxRef; 16 | 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/STSlider.h: -------------------------------------------------------------------------------- 1 | // 2 | // STSlider.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 25.09.23. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface STSlider : NSSlider 14 | 15 | @property (nonatomic, strong) MPWReference *ref; 16 | @property (nonatomic, strong) MPWReference *enabledRef; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/STTextField.h: -------------------------------------------------------------------------------- 1 | // 2 | // STTextField.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 27.02.21. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @protocol ModelDidChange; 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface STTextField : NSTextField 15 | 16 | @property (nonatomic, strong) MPWReference *ref; 17 | @property (nonatomic, strong) MPWReference *enabledRef; 18 | @property (nonatomic, assign) BOOL inProcessing; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/STUITests.h: -------------------------------------------------------------------------------- 1 | // 2 | // STUITests.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 25.02.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STUITests : STTests 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/STViewScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // STViewScheme.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 06.04.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STViewScheme : MPWAbstractStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /ObjectiveSmalltalkUI/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ObjectiveSwift/ObjectiveSwift.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectiveSwift.h 3 | // ObjectiveSwift 4 | // 5 | // Created by Marcel Weiher on 29.10.18. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for ObjectiveSwift. 11 | FOUNDATION_EXPORT double ObjectiveSwiftVersionNumber; 12 | 13 | //! Project version string for ObjectiveSwift. 14 | FOUNDATION_EXPORT const unsigned char ObjectiveSwiftVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /ObjectiveSwift/StSwiftBridge.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StSwiftBridge.swift 3 | // ObjectiveSwift 4 | // 5 | // Created by Marcel Weiher on 29.10.18. 6 | // 7 | 8 | import Cocoa 9 | 10 | class StSwiftBridge: NSObject { 11 | public func hello() { 12 | print("hello world") 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Papers/109_Smalltalk.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Papers/109_Smalltalk.pdf -------------------------------------------------------------------------------- /Papers/AnsiSmalltalkDraft1-9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Papers/AnsiSmalltalkDraft1-9.pdf -------------------------------------------------------------------------------- /PyObjS/PyObjS.docc/PyObjS.md: -------------------------------------------------------------------------------- 1 | # ``PyObjS`` 2 | 3 | Summary 4 | 5 | ## Overview 6 | 7 | Text 8 | 9 | ## Topics 10 | 11 | ### Group 12 | 13 | - ``Symbol`` -------------------------------------------------------------------------------- /PyObjS/PyObjS.h: -------------------------------------------------------------------------------- 1 | // 2 | // PyObjS.h 3 | // PyObjS 4 | // 5 | // Created by Marcel Weiher on 27.05.23. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for PyObjS. 11 | FOUNDATION_EXPORT double PyObjSVersionNumber; 12 | 13 | //! Project version string for PyObjS. 14 | FOUNDATION_EXPORT const unsigned char PyObjSVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /PyObjS/Resources/objs-interop.py: -------------------------------------------------------------------------------- 1 | #!env python3 2 | 3 | ## #!/opt/homebrew/opt/python@3.9/bin/python3.9 4 | 5 | import objc 6 | from cheroot import wsgi 7 | from wsgidav.wsgidav_app import WsgiDAVApp 8 | from Cocoa import NSBundle 9 | 10 | objs = NSBundle.bundleWithPath_("/Library/Frameworks/ObjectiveSmalltalk.framework") 11 | objs.load() 12 | 13 | envscheme = objc.lookUpClass("MPWEnvScheme").new() 14 | print(envscheme.at_("HOME")) 15 | -------------------------------------------------------------------------------- /PyObjS/Resources/runWebDAV.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | framework:PyObjS load 3 | py := STPython new. 4 | py loadSchemeWebDAV. 5 | largerDict ← #MPWDictStore{ a: 1, b: 2, c: 3 , d: 4, e: 5 , f: 6, g: 7, h: 8 }. 6 | smallDict ← #MPWDictStore{ a: 1, b: 2 } 7 | #py runWebDAV: scheme:defaults port:8080 at:'defaults' 8 | #py runWebDAV: ref:file:/Users/marcel/ asScheme port:8081 at:'tmp-mount1' 9 | #py runWebDAV: smallDict port:8082 at:'dict' 10 | py runWebDAV: scheme:env port:8083 at:'env' 11 | -------------------------------------------------------------------------------- /PyObjS/STPython.h: -------------------------------------------------------------------------------- 1 | // 2 | // STYtb_dlp.h 3 | // PyObjS 4 | // 5 | // Created by Marcel Weiher on 27.05.23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STPython : MPWAbstractStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /S3Scheme/MPWS3Scheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWS3Scheme.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 1/7/17. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWS3Scheme : MPWScheme 12 | 13 | @property NSTimeInterval timeout; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /S3Scheme/S3Scheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // S3Scheme.h 3 | // S3Scheme 4 | // 5 | // Created by Marcel Weiher on 1/7/17. 6 | // 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for S3Scheme. 12 | FOUNDATION_EXPORT double S3SchemeVersionNumber; 13 | 14 | //! Project version string for S3Scheme. 15 | FOUNDATION_EXPORT const unsigned char S3SchemeVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Sails/Code/STEntity.h: -------------------------------------------------------------------------------- 1 | // 2 | // STEntity.h 3 | // Sails 4 | // 5 | // Created by Marcel Weiher on 05.03.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STEntity : NSObject 13 | 14 | +(instancetype)id:(long)newId; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Sails/Code/STEntityList.h: -------------------------------------------------------------------------------- 1 | // 2 | // STEntityList.h 3 | // Sails 4 | // 5 | // Created by Marcel Weiher on 05.03.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STEntityList : MPWAbstractStore 13 | 14 | -(id )templateNameMapper; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Sails/Code/STHypertextProcessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // STHypertextProcessor.h 3 | // Sails 4 | // 5 | // Created by Marcel Weiher on 02.02.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STHypertextProcessor : NSObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Sails/Code/STPathToTemplateNameMapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPathToTemplateNameMapper.h 3 | // Sails 4 | // 5 | // Created by Marcel Weiher on 05.03.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STPathToTemplateNameMapper : MPWAbstractStore 13 | 14 | @property (nonatomic,strong) NSString *baseName; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Sails/Code/STRootMapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // STRootMapper.h 3 | // Sails 4 | // 5 | // Created by Marcel Weiher on 05.03.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STRootMapper : MPWMappingStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Sails/Code/STSiteBundle.h: -------------------------------------------------------------------------------- 1 | // 2 | // STSiteBundle.h 3 | // SiteBuilding 4 | // 5 | // Created by Marcel Weiher on 03.08.20. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @class STSiteServer; 13 | 14 | @interface STSiteBundle : STBundle 15 | 16 | -(void)startWebServerOnPort:(int)port; 17 | -(void)setupSite; 18 | -(void)runSite:(int)port; 19 | 20 | 21 | @property (readonly) STSiteServer *siteServer; 22 | @property (readonly) id renderer; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Sails/Code/STTemplateStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // STTemplateStore.h 3 | // Sails 4 | // 5 | // Created by Marcel Weiher on 05.03.24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STTemplateStore : MPWMappingStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Info.json: -------------------------------------------------------------------------------- 1 | { 2 | "site": "DynamicSite" 3 | } 4 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Resources/dummy.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: blue; 3 | } 4 | h1 { 5 | color: navy; 6 | margin-left: 20px; 7 | } 8 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Resources/hi.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | hello Bonsai Base!
7 | 8 | root 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sails 4 | 5 | 6 | 7 |

8 | 9 |

It's working: you are sailing statically!

10 | 11 |

12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Resources/mysstyle-dummy.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: blue; 3 | } 4 | h1 { 5 | color: navy; 6 | margin-left: 20px; 7 | } 8 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Resources/pageTemplate.html: -------------------------------------------------------------------------------- 1 | 2 |

3 |
4 | 5 | {body} 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Resources/root.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Hello My Really Nice World!
7 | Simple Bonsai
8 | Bonsai Sample
9 | Mustard Blog Sample
10 | Mustard Cart Sample
11 | Skelet Sample
12 | PureCSS Blog Sample
13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Resources/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: lightgrey; 3 | } 4 | h1 { 5 | color: navy; 6 | margin-left: 20px; 7 | } 8 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Sources/DynamicSite.st: -------------------------------------------------------------------------------- 1 | 2 | scheme DynamicSite { 3 | var bundle. 4 | 5 | /*:p { get { 6 | "You are sailing dynamically!". 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Sources/Entity.st: -------------------------------------------------------------------------------- 1 | {name}:{superclassName} \{ 2 | {#instanceVariableDescriptions}var {name}. {/instanceVariableDescriptions} 3 | } 4 | -------------------------------------------------------------------------------- /Sails/Resources/simple-dynamic.sited/Sources/StaticSite.st: -------------------------------------------------------------------------------- 1 | 2 | scheme StaticSite { 3 | var bundle. 4 | /*:p { |= { 5 | path := p length = 0 ifTrue: { 'index.html'. } ifFalse: { p. }. 6 | path := p = '/' ifTrue: { 'index.html'. } ifFalse: { path. }. 7 | resource := self bundle cachedResources at:path. 8 | result := path. 9 | resource ifNotNil:{ result := resource. }. 10 | result. 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sails/Sails.docc/Sails.md: -------------------------------------------------------------------------------- 1 | # ``Sails`` 2 | 3 | Summary 4 | 5 | ## Overview 6 | 7 | Text 8 | 9 | ## Topics 10 | 11 | ### Group 12 | 13 | - ``Symbol`` -------------------------------------------------------------------------------- /Sails/android-gmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | source ~/Library/Android/GNUstep/arm64-v8a/share/GNUstep/Makefiles/GNUstep.sh 4 | export SDK=/Users/marcel/programming/Examples/Android/Android-from-Scratch/android_sdk 5 | export CC="$SDK/ndk/26.2.11394342/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android33-clang" 6 | 7 | 8 | 9 | make $1 10 | -------------------------------------------------------------------------------- /Sails/makeheaderdir: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mkdir -p .headers 3 | cd .headers 4 | for header in `find .. -type f -name '*.h' ` 5 | do 6 | ln -s $header 7 | done 8 | ln -s . Sails 9 | -------------------------------------------------------------------------------- /SailsTouch/SailsTouch.h: -------------------------------------------------------------------------------- 1 | // 2 | // SailsTouch.h 3 | // SailsTouch 4 | // 5 | // Created by Marcel Weiher on 25.04.25. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for SailsTouch. 11 | FOUNDATION_EXPORT double SailsTouchVersionNumber; 12 | 13 | //! Project version string for SailsTouch. 14 | FOUNDATION_EXPORT const unsigned char SailsTouchVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | #import 18 | 19 | -------------------------------------------------------------------------------- /SchemeFS/Fuse.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/SchemeFS/Fuse.icns -------------------------------------------------------------------------------- /SchemeFS/MPWFUSEAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWAppDelegate.h 3 | // SchemeFS 4 | // 5 | // Created by Marcel Weiher on 11/3/11. 6 | // Copyright (c) 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class GMUserFileSystem; 12 | 13 | @interface MPWFUSEAppDelegate : NSObject { 14 | GMUserFileSystem* fs_; 15 | } 16 | 17 | 18 | @property (assign) IBOutlet NSWindow *window; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /SchemeFS/MPWSchemeFilesystem.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWSchemeFilesystem.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 11/3/11. 6 | // Copyright (c) 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class MPWScheme; 12 | 13 | @interface MPWSchemeFilesystem : NSObject 14 | 15 | @property (nonatomic,strong) MPWScheme *scheme,*extensionIcons,*fileIcons; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /SchemeFS/SchemeFS-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SchemeFS' target in the 'SchemeFS' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /SchemeFS/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /SchemeFS/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /SchemeFS/hellodoc.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/SchemeFS/hellodoc.icns -------------------------------------------------------------------------------- /SchemeFS/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SchemeFS 4 | // 5 | // Created by Marcel Weiher on 11/3/11. 6 | // Copyright (c) 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **)argv); 14 | } 15 | -------------------------------------------------------------------------------- /SchemeFUSE/SchemeFUSE-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /SchemeFUSE/SchemeFUSE.h: -------------------------------------------------------------------------------- 1 | // 2 | // SchemeFUSE.h 3 | // SchemeFUSE 4 | // 5 | // Created by Marcel Weiher on 10/26/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface SchemeFUSE : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SchemeFUSE/SchemeFUSE.m: -------------------------------------------------------------------------------- 1 | // 2 | // SchemeFUSE.m 3 | // SchemeFUSE 4 | // 5 | // Created by Marcel Weiher on 10/26/13. 6 | // 7 | // 8 | 9 | #import "SchemeFUSE.h" 10 | 11 | @implementation SchemeFUSE 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SchemeFUSE/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /SchemeFUSETests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Schemes/MPWBlockFilterScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWBlockFilterScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 7/12/12. 6 | // 7 | // 8 | 9 | #import 10 | 11 | typedef id (^FilterBlock)(id ); 12 | 13 | @interface MPWBlockFilterScheme : MPWMappingStore 14 | { 15 | id identifierFilter,valueFilter; 16 | 17 | } 18 | 19 | idAccessor_h( identifierFilter, setIdentifierFilter) 20 | idAccessor_h( valueFilter, setValueFilter) 21 | 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Schemes/MPWBundleScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWBundleScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 5/28/11. 6 | // Copyright 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWBundleScheme : MPWFileSchemeResolver { 13 | NSBundle *bundle; 14 | } 15 | 16 | +schemeWithBundle:(NSBundle*)aBundle; 17 | +mainBundleScheme; 18 | +classBundleScheme:(Class)aClass; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Schemes/MPWClassScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWClassScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 1/9/09. 6 | // Copyright 2009 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import "MPWScheme.h" 10 | 11 | 12 | @interface MPWClassScheme : MPWScheme { 13 | 14 | } 15 | 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Schemes/MPWDefaultsScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWDefaultsScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 6/4/11. 6 | // Copyright 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWDefaultsScheme : MPWScheme { 13 | NSString *domain; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Schemes/MPWDyLibScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWDyLibScheme.h 3 | // ObjSTNative 4 | // 5 | // Created by Marcel Weiher on 29.05.23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWDyLibScheme : MPWAbstractStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Schemes/MPWEnvScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWEnvScheme.h 3 | // MPWShellScriptKit 4 | // 5 | // Created by Marcel Weiher on 11/25/10. 6 | // Copyright 2010 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MPWEnvScheme : MPWScheme { 12 | 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Schemes/MPWFileSchemeResolver.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWFileSchemeResolver.h 3 | // MPWShellScriptKit 4 | // 5 | // Created by Marcel Weiher on 6/7/08. 6 | // Copyright 2008 Apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class MPWFileReference; 12 | 13 | @interface MPWFileSchemeResolver : MPWDiskStore { 14 | 15 | } 16 | 17 | 18 | -(void)startWatching:(MPWFileReference*)binding; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Schemes/MPWFileWatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWFileWatcher.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 8/26/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @protocol FileWatching 12 | -(void)didChange; 13 | @end 14 | 15 | @interface MPWFileWatcher : NSObject 16 | 17 | +(instancetype)watcher; 18 | -(void)watchFile:(NSString*)filename withDelegate:delegate; 19 | 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Schemes/MPWFrameworkScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWFrameworkScheme.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 4/15/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWFrameworkScheme : MPWScheme 12 | 13 | @end 14 | 15 | @class MPWCFunction; 16 | 17 | @interface NSBundle(SymbolLoading) 18 | 19 | -(MPWCFunction*)functionNamed:(NSString*)fname; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Schemes/MPWGlobalVariableStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWGlobalVariableStore.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 22.01.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWGlobalVariableStore : MPWAbstractStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Schemes/MPWMethodScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWMethodScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 10/21/11. 6 | // Copyright (c) 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class STCompiler; 12 | 13 | @interface MPWMethodScheme : MPWScheme 14 | { 15 | STCompiler *interpreter; 16 | NSMutableArray *exceptions; 17 | } 18 | 19 | -(void)addException:(NSException*)exception; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Schemes/MPWRefScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWRefScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 25.12.09. 6 | // Copyright 2009 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWRefScheme : MPWSelfContainedBindingsScheme { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Schemes/MPWRelScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWRelScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 5/10/11. 6 | // Copyright 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class MPWReference; 12 | 13 | @interface MPWRelScheme : MPWPathRelativeStore { 14 | } 15 | 16 | -initWithRef:(MPWReference*)aBinding; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Schemes/MPWResourceScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWResourceScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 5/15/11. 6 | // Copyright 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWResourceScheme : MPWScheme { 13 | MPWScheme *underlyingScheme; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Schemes/MPWResourceScheme.m: -------------------------------------------------------------------------------- 1 | // 2 | // MPWResourceScheme.m 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 5/15/11. 6 | // Copyright 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import "MPWResourceScheme.h" 10 | #import 11 | 12 | @implementation MPWResourceScheme 13 | 14 | objectAccessor(MPWScheme*, underlyingScheme, setUnderlyingScheme ) 15 | 16 | 17 | 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Schemes/MPWSchemeScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWSchemeScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 6/30/10. 6 | // Copyright 2010 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWSchemeScheme : MPWAbstractStore { 13 | NSMutableDictionary *_schemes; 14 | } 15 | 16 | -(NSDictionary*)schemes; 17 | -(void)setSchemeHandler:(id )aScheme forSchemeName:(NSString*)schemeName; 18 | +(instancetype)currentScheme; 19 | +(void)setCurrentScheme:(MPWSchemeScheme*)newScheme; 20 | +(instancetype)createGlobalSchemeScheme; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Schemes/MPWScriptingBridgeBinding.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWScripingBridgeBinding.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 5/31/11. 6 | // Copyright 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import "MPWVARBinding.h" 10 | 11 | 12 | @interface MPWScriptingBridgeBinding : MPWVARBinding { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Schemes/MPWScriptingBridgeScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWScriptingBridgeScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 5/31/11. 6 | // Copyright 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWScriptingBridgeScheme : MPWVarScheme { 13 | NSMutableDictionary *bridges; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Schemes/MPWSelfContainedBindingsScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWSelfContainedBindingsScheme.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 5/28/18. 6 | // 7 | 8 | #import 9 | 10 | @interface MPWSelfContainedBindingsScheme : MPWScheme 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Schemes/MPWSpotlightScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWSpotlightScheme.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 2/13/18. 6 | // 7 | 8 | #import 9 | 10 | @interface MPWSpotlightScheme : MPWScheme 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Schemes/MPWTreeNodeScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWTreeNodeScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 11/23/11. 6 | // Copyright (c) 2012 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MPWTreeNodeScheme : MPWScheme 12 | { 13 | id root; 14 | } 15 | 16 | -root; 17 | 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Schemes/MPWVARBinding.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWVARBinding.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 17.12.09. 6 | // Copyright 2009 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWVARBinding : MPWReference { 13 | id baseObject; 14 | BOOL isObserving; 15 | } 16 | 17 | -initWithBaseObject:newBase pathComponents:(NSArray*)newPathComponents; 18 | -initWithBaseObject:newBase path:newPath; 19 | +bindingWithBaseObject:newBase path:newPath; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Schemes/MPWVarScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWVarScheme.h 3 | // Arch-S 4 | // 5 | // Created by Marcel Weiher on 25.12.09. 6 | // Copyright 2009 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class STEvaluator; 12 | 13 | @interface MPWVarScheme : MPWSelfContainedBindingsScheme { 14 | } 15 | 16 | @property (nonatomic, strong ) STEvaluator *context; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Schemes/MPWWindowsScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWWindowsScheme.h 3 | // ObjectiveSmalltalkUI 4 | // 5 | // Created by Marcel Weiher on 2/12/18. 6 | // 7 | 8 | #import 9 | 10 | @interface MPWWindowsScheme : MPWScheme 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Schemes/STPortScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPortScheme.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 26.02.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STPortScheme : MPWAbstractStore 13 | 14 | @property (nonatomic,strong) id source; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Schemes/STProtocolScheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // STProtocolScheme.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 21.02.21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STProtocolScheme : MPWAbstractStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Smalltalk/Images.xcassets/AppIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "stapp.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Smalltalk/Images.xcassets/AppIcon.imageset/stapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/Images.xcassets/AppIcon.imageset/stapp.png -------------------------------------------------------------------------------- /Smalltalk/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Smalltalk/Objective_Smalltalk.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Smalltalk/STAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Objective-Smalltalk 4 | // 5 | // Created by Marcel Weiher on 24.03.19. 6 | // 7 | 8 | #import "MPWAppDelegate.h" 9 | #import 10 | 11 | 12 | @interface STAppDelegate : MPWAppDelegate 13 | 14 | 15 | -(IBAction)showWorkspace:(id)sender; 16 | -(IBAction)showREPL:(id)sender; 17 | 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /Smalltalk/STDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // Document.h 3 | // Smalltalk 4 | // 5 | // Created by Marcel Weiher on 31.03.19. 6 | // 7 | 8 | #import 9 | 10 | @interface STDocument : NSDocument 11 | 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /Smalltalk/STImage.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/STImage.icns -------------------------------------------------------------------------------- /Smalltalk/STImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/STImage.png -------------------------------------------------------------------------------- /Smalltalk/Smalltalk.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Smalltalk/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Smalltalk 4 | // 5 | // Created by Marcel Weiher on 31.03.19. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, const char * argv[]) { 11 | return NSApplicationMain(argc, argv); 12 | } 13 | -------------------------------------------------------------------------------- /Smalltalk/stapp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/stapp.icns -------------------------------------------------------------------------------- /Smalltalk/stapp.iconset/Resources/sketch: -------------------------------------------------------------------------------- 1 | c scale: 2.5. 2 | 3 | c rect:700; clip. 4 | blue := (c colorRed:0.0 green:0.3 blue:0.9 alpha:1.0). 5 | c setFillColor: blue. 6 | c setFont:(NSFont fontWithName:'Futura Condensed ExtraBold' size:290). 7 | c translate: 10 @ 120. 8 | c show:'>_'. 9 | c translate:175 @ 0. 10 | c scale:0.45. 11 | image := NSBitmapImageRep imageRepWithContentsOfFile: '/Users/marcel/programming/Kits/ObjectiveSmalltalk/Smalltalk/STImage.png' . 12 | c drawImage: image. 13 | 14 | 15 | -------------------------------------------------------------------------------- /Smalltalk/stapp.iconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/stapp.iconset/icon_128x128.png -------------------------------------------------------------------------------- /Smalltalk/stapp.iconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/stapp.iconset/icon_256x256.png -------------------------------------------------------------------------------- /Smalltalk/stapp.iconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/stapp.iconset/icon_32x32.png -------------------------------------------------------------------------------- /Smalltalk/stapp.iconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/stapp.iconset/icon_512x512.png -------------------------------------------------------------------------------- /Smalltalk/stapp.iconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/stapp.iconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /Smalltalk/stapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/Smalltalk/stapp.png -------------------------------------------------------------------------------- /Stsh/Classes/MPWCommandBinding.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWCommandBinding.h 3 | // StshFramework 4 | // 5 | // Created by Marcel Weiher on 25.07.22. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWCommandBinding : MPWStreamableReference 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWCommandFilter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWCommandFilter.h 3 | // MPWShellScriptKit 4 | // 5 | // Created by Marcel Weiher on 06/03/2006. 6 | // Copyright 2006 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWCommandFilter : MPWFlattenStream { 13 | id shellProcess; 14 | NSFileHandle* processStdin; 15 | NSFileHandle* processStdout; 16 | BOOL eofReached; 17 | BOOL configured; 18 | BOOL running; 19 | BOOL isTarget; 20 | BOOL doLines; 21 | MPWScanner * scanner; 22 | } 23 | 24 | -initWithTarget:aTarget command:aCommand; 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWCommandStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWCommandStore.h 3 | // StshFramework 4 | // 5 | // Created by Marcel Weiher on 24.07.22. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWCommandStore : MPWAbstractStore 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWEchoCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWEchoCommand.h 3 | // MPWShellScriptKit 4 | // 5 | // Created by Marcel Weiher on 6/2/07. 6 | // Copyright 2007 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWEchoCommand : MPWFilter { 13 | id toEcho; 14 | } 15 | 16 | -pipe:otherCommand; 17 | 18 | @end 19 | 20 | @interface MPWWriteStream(wrapped) 21 | 22 | -(MPWWriteStream*)wrappedAsMPWStream; 23 | -process; 24 | -adaptCommand:aCommand; 25 | // -pipe:other; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWExpression+autocomplete.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWExpression+autocomplete.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 5/13/14. 6 | // 7 | // 8 | 9 | #import "STExpression.h" 10 | 11 | @class STEvaluator; 12 | 13 | 14 | 15 | @interface STExpression (autocomplete) 16 | 17 | 18 | -(NSArray*)completionsForString:(NSString*)s withEvaluator:(STEvaluator*)evaluator resultName:(NSString **)resultName; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWExternalCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWExternalCommand.h 3 | // MPWShellScriptKit 4 | // 5 | // Created by Marcel Weiher on 6/2/07. 6 | // Copyright 2007 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import "MPWAbstractShellCommand.h" 10 | 11 | 12 | @interface MPWExternalCommand : MPWAbstractShellCommand { 13 | id path; 14 | BOOL isText; 15 | } 16 | 17 | boolAccessor_h( isText, setIsText ) 18 | -runWithArgs:(NSArray*)args; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWHost.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWHost.h 3 | // MPWFoundation 4 | // 5 | // Created by Marcel Weiher on 14.07.22. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWHost : NSObject 13 | 14 | @property (readonly) NSString *name; 15 | @property (readonly) NSString *user; 16 | 17 | 18 | -(id )store; 19 | -(id )http; 20 | -(void)run:(NSString*)command outputTo:(NSObject *)output; 21 | -(NSData*)run:(NSString*)command; 22 | 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWObjectPipeCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWObjectPipeCommand.h 3 | // MPWShellScriptKit 4 | // 5 | // Created by Marcel Weiher on 19/2/07. 6 | // Copyright 2007 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import "MPWAbstractShellCommand.h" 10 | 11 | 12 | @interface MPWObjectPipeCommand : MPWAbstractShellCommand 13 | { 14 | id commandClass; 15 | } 16 | 17 | -initWithCommandClass:newCommandClass name:newName; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWREPLViewPrinter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWREPLViewPrinter.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 02.10.19. 6 | // 7 | 8 | #import "MPWShellPrinter.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MPWREPLViewPrinter : MPWShellPrinter 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWREPLViewPrinter.m: -------------------------------------------------------------------------------- 1 | // 2 | // MPWREPLViewPrinter.m 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 02.10.19. 6 | // 7 | 8 | #import "MPWREPLViewPrinter.h" 9 | 10 | @implementation MPWREPLViewPrinter 11 | 12 | 13 | -(int)terminalWidth 14 | { 15 | return 1000; 16 | } 17 | 18 | -(int)numColumnsForTerminalWidth:(int)terminalWidth maxWidth:(int)maxWidth 19 | { 20 | return 1; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWShellCompiler.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWShellCompiler.h 3 | // MPWShellScriptKit 4 | // 5 | // Created by Marcel Weiher on 4/10/06. 6 | // Copyright 2006 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWShellCompiler : STCompiler { 13 | 14 | } 15 | 16 | -executeShellExpression:compiledExpression; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Stsh/Classes/MPWUpcaseFilter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWUpcaseFilter.h 3 | // MPWShellScriptKit 4 | // 5 | // Created by Marcel Weiher on 2/2/07. 6 | // Copyright 2007 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MPWUpcaseFilter : MPWFilter { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Stsh/Classes/STScript.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWStScript.h 3 | // MPWShellScriptKit 4 | // 5 | // Created by Marcel Weiher on 6/10/07. 6 | // Copyright 2007 Marcel Weiher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class STShell; 12 | 13 | @interface STScript : MPWObject { 14 | id filename; 15 | id data; 16 | id methodHeader; 17 | id script; 18 | } 19 | 20 | +scriptWithContentsOfFile:(NSString*)filename; 21 | 22 | -(void)executeInContext:(STShell *)executionContext; 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Stsh/MPWShellPrinter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MPWShellPrinter.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 5/22/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface MPWShellPrinter : MPWNeXTPListWriter 12 | 13 | @property (nonatomic, assign) id environment; 14 | 15 | -(void)printNames:(NSArray*)names limit:(int)completionLimit; 16 | 17 | 18 | -(void)writeDirectory:aBinding; 19 | -(void)writeFancyDirectory:aBinding; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Stsh/Stsh-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /Stsh/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Stsh/makeheaderdir: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mkdir -p .headers 3 | cd .headers 4 | apply 'ln -s %1' `find .. -type f -name '*.h' ` 5 | ln -s . Stsh 6 | -------------------------------------------------------------------------------- /TestObjectiveSmalltalk/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /TestObjectiveSmalltalk/TestObjectiveSmalltalkAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TestObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 02.12.18. 6 | // 7 | 8 | #import 9 | 10 | @interface TestObjectiveSmalltalkAppDelegate : UIResponder 11 | 12 | @property (strong, nonatomic) UIWindow *window; 13 | 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /TestObjectiveSmalltalk/TestObjectiveSmalltalkAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // TestObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 02.12.18. 6 | // 7 | 8 | #import "TestObjectiveSmalltalkAppDelegate.h" 9 | 10 | 11 | @interface TestObjectiveSmalltalkAppDelegate () 12 | 13 | @end 14 | 15 | @implementation TestObjectiveSmalltalkAppDelegate 16 | 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | 21 | return YES; 22 | } 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /TestObjectiveSmalltalk/TestObjectiveSmalltalkController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // TestObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 02.12.18. 6 | // 7 | 8 | #import 9 | 10 | @interface TestObjectiveSmalltalkController : UIViewController 11 | 12 | @property (nonatomic,strong) IBOutlet UILabel *success; 13 | @property (nonatomic,strong) IBOutlet UILabel *failure; 14 | @property (nonatomic,strong) IBOutlet UITextView *failureLog; 15 | 16 | 17 | 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /TestObjectiveSmalltalk/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TestObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 02.12.18. 6 | // 7 | 8 | #import 9 | #import "TestObjectiveSmalltalkAppDelegate.h" 10 | 11 | int main(int argc, char * argv[]) { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([TestObjectiveSmalltalkAppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Tests/STConnectorTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // STConnectorTests.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 19.11.20. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STConnectorTests : STTests 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Tests/STPropertyPathTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // STPropertyPathTests.h 3 | // ObjectiveSmalltalk 4 | // 5 | // Created by Marcel Weiher on 19.11.20. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface STPropertyPathTests : STTests 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /X11Scheme/X11Scheme.h: -------------------------------------------------------------------------------- 1 | // 2 | // X11Scheme.h 3 | // X11Scheme 4 | // 5 | // Created by Marcel Weiher on 2/8/18. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for X11Scheme. 11 | FOUNDATION_EXPORT double X11SchemeVersionNumber; 12 | 13 | //! Project version string for X11Scheme. 14 | FOUNDATION_EXPORT const unsigned char X11SchemeVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | #import 19 | -------------------------------------------------------------------------------- /X11Scheme/x11fs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define WID_STRING_LENGTH 11 3 | typedef enum {X11FS_SUCCESS, X11FS_FAILURE} X11FS_STATUS; 4 | 5 | #import 6 | 7 | 8 | @interface X11Scheme:MPWScheme 9 | @end 10 | -------------------------------------------------------------------------------- /android-gmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | source ~/Library/Android/GNUstep/arm64-v8a/share/GNUstep/Makefiles/GNUstep.sh 4 | export SDK=/Users/marcel/programming/Examples/Android/Android-from-Scratch/android_sdk 5 | export CC="$SDK/ndk/26.2.11394342/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android33-clang" 6 | 7 | 8 | 9 | make $1 10 | -------------------------------------------------------------------------------- /createumbrellaincludes: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | find . -type f -name '*.h' | sed 's"./.*/"#import 5 | 6 | @interface $FILENAMESANSEXTENSION$ : MPWObject 7 | { 8 | 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /iMethodServer/iMethodServer-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'iMethodServer' target in the 'iMethodServer' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /llvm-config/llvm-components.txt: -------------------------------------------------------------------------------- 1 | jit interpreter nativecodegen -------------------------------------------------------------------------------- /makeheaderdir: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mkdir -p .headers 3 | cd .headers 4 | for header in `find .. -type f -name '*.h' ` 5 | do 6 | ln -s $header 7 | done 8 | ln -s . ObjectiveSmalltalk 9 | -------------------------------------------------------------------------------- /objective-smalltalk.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /objective-smalltalk.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /objective-smalltalk.xcworkspace/xcuserdata/marcel.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/objective-smalltalk.xcworkspace/xcuserdata/marcel.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /raspi/MPWBCMStore.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface MPWBCMStore : MPWAbstractStore 4 | 5 | -(void)writePin:(int)pin value:(int)value; 6 | -(int)readPin:(int)pin; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /raspi/MPWGPIOPin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface MPWGPIOPin:MPWBinding 4 | 5 | @property (nonatomic, strong ) id target; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /raspi/blink.st: -------------------------------------------------------------------------------- 1 | #!env raspish 2 | blinker ← #Blinker{ #seconds: 1 }. 3 | blinker → ref:gpio:17. 4 | blinker run. 5 | gpio:17 ← 0. 6 | -------------------------------------------------------------------------------- /raspi/pollbuttonstate.st: -------------------------------------------------------------------------------- 1 | #!env raspish 2 | last := 0. 3 | {true} whileTrue:{ 4 | new := gpio:21. 5 | last = new ifFalse:{ 6 | last := new. 7 | stdout println:new. 8 | }. 9 | }. 10 | -------------------------------------------------------------------------------- /raspi/timeled.st: -------------------------------------------------------------------------------- 1 | #!env raspish 2 | 1 to:10000 do: { gpio:17 ← true. gpio:17 ← false. } 3 | -------------------------------------------------------------------------------- /scripts/.gitignore: -------------------------------------------------------------------------------- 1 | *.db 2 | *.s 3 | HelloWorld 4 | -------------------------------------------------------------------------------- /scripts/ESUG-Demo/filteradd3: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | extension NSData { -intValue { self stringValue intValue. } }. 3 | filter adder |{ ^object intValue + 3. } 4 | filter multiplier |{ ^object intValue * 3. } 5 | #filter full |[ multiplier, adder ]. 6 | (stdin -> multiplier -> adder -> rawstdout ) run 7 | -------------------------------------------------------------------------------- /scripts/ESUG-Demo/fromTo: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-from:from to:to 3 | stdout do println:(from to: to ) each 4 | -------------------------------------------------------------------------------- /scripts/ESUG-Demo/homefileserver.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | home := ref:file:{env:HOME}/Sites asScheme. 4 | cache := MPWCachingStore store. 5 | server := MPWSchemeHttpServer serverOnPort:8082. 6 | 7 | server -> cache -> home. 8 | 9 | server start:nil. 10 | shell runInteractiveLoop. 11 | 12 | -------------------------------------------------------------------------------- /scripts/ESUG-Demo/memhttpserver-arrow.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | scheme:site := MPWSiteMap scheme. 4 | server := MPWSchemeHttpServer serverOnPort:8081. 5 | server -> scheme:site. 6 | server start:nil. 7 | stdout println:'site: := value'. 8 | shell runInteractiveLoop. 9 | -------------------------------------------------------------------------------- /scripts/ESUG-Demo/toupper: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | filter toupper |{ ^object stringValue uppercaseString. } 3 | (stdin -> toupper -> rawstdout ) run 4 | -------------------------------------------------------------------------------- /scripts/FUSE/mountplist.stsh: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-mountplist:plistRef 3 | 4 | framework:ObjectiveHTTPD load. 5 | framework:SchemeFUSE load. 6 | server := MPWSchemeHttpServer new. 7 | server server setPort: 8082. 8 | 9 | plist := plistRef value stringValue propertyList. 10 | theScheme := MPWPlistStore storeWithDictionary:plist. 11 | 12 | server setScheme: theScheme. 13 | scheme:base := theScheme. 14 | 15 | server start:nil. 16 | fs := theScheme mountAt:'/Volumes/SchemeFS' . 17 | 18 | shell runInteractiveLoop. 19 | 20 | fs unmount. 21 | -------------------------------------------------------------------------------- /scripts/Macoun-2019/Macoun-2019-Presentation.st/windows: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/scripts/Macoun-2019/Macoun-2019-Presentation.st/windows -------------------------------------------------------------------------------- /scripts/Macoun-2019/browser-demo.txt: -------------------------------------------------------------------------------- 1 | browser := MPWBrowser new. 2 | browser setStore: ref:file:/ asScheme. 3 | browser openInWindow:'File Browser'. 4 | 5 | scheme DotFilter : MPWMappingStore { 6 | -mapRetrievedObject:anObject forReference:ref { 7 | anObject isKindOfClass: MPWDirectoryBinding ifTrue: { 8 | refs := anObject contents select: { :ref | 9 | ref pathComponents lastObject hasPrefix:'.' not. 10 | }. 11 | anObject := MPWDirectoryBinding alloc initWithContents: refs. 12 | }. 13 | anObject. 14 | } 15 | }. 16 | -------------------------------------------------------------------------------- /scripts/Macoun-2019/fromTo: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-from:from to:to 3 | stdout do println:(from to: to ) each 4 | -------------------------------------------------------------------------------- /scripts/Macoun-2019/homefileserver.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | home := ref:file:{env:HOME}/Sites asScheme. 4 | cache := MPWCachingStore store. 5 | server := MPWSchemeHttpServer serverOnPort:8082. 6 | 7 | server -> cache -> home. 8 | 9 | server start:nil. 10 | shell runInteractiveLoop. 11 | 12 | -------------------------------------------------------------------------------- /scripts/Macoun-2019/memhttpserver-arrow.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | scheme:site := MPWSiteMap scheme. 4 | server := MPWSchemeHttpServer serverOnPort:8081. 5 | server -> scheme:site. 6 | server start:nil. 7 | stdout println:'site: := value'. 8 | shell runInteractiveLoop. 9 | -------------------------------------------------------------------------------- /scripts/Macoun-2019/toupper: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | filter toupper |{ ^object stringValue uppercaseString. } 3 | (stdin -> toupper -> rawstdout ) run 4 | -------------------------------------------------------------------------------- /scripts/Macoun-2019/toupper-writeObject: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | 3 | class toupper : MPWFilter { 4 | -writeObject:anObject sender:aSender { 5 | self target writeObject:anObject stringValue uppercaseString. 6 | } 7 | }. 8 | 9 | 10 | (stdin -> toupper -> rawstdout ) run 11 | -------------------------------------------------------------------------------- /scripts/XTC-2022/browser.st: -------------------------------------------------------------------------------- 1 | #MPWFileBrowser{ #store: scheme:defaults } openInWindow:'Defaults'. 2 | 3 | 4 | browser := MPWMethodBrowser alloc initWithDefaultNib. 5 | browser setMethodStore: smalltalk methodStore. 6 | 7 | browser view window makeKeyAndOrderFront:nil -------------------------------------------------------------------------------- /scripts/XTC-2022/filebrowser.st: -------------------------------------------------------------------------------- 1 | #MPWFileBrowser{ #store: (ref:file:/Users/marcel/programming asScheme) } openInWindow:'Plist' . -------------------------------------------------------------------------------- /scripts/XTC-2022/hello-world-http-ppath.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | 4 | scheme SiteMap { 5 | /hello { |= { 'Hello World!'. } } 6 | }. 7 | SiteMap serveOnPort:8090. 8 | shell runInteractiveLoop. 9 | -------------------------------------------------------------------------------- /scripts/XTC-2022/hello.txt: -------------------------------------------------------------------------------- 1 | Hello XTC folks! -------------------------------------------------------------------------------- /scripts/channels/.gitignore: -------------------------------------------------------------------------------- 1 | primes 2 | -------------------------------------------------------------------------------- /scripts/channels/listdirs.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-listdirs:dir 3 | (( dir directoryStream) → #MPWPrintLiner{} → stdout ) run 4 | -------------------------------------------------------------------------------- /scripts/cloud/.gitignore: -------------------------------------------------------------------------------- 1 | myocean.st 2 | -------------------------------------------------------------------------------- /scripts/cloud/host.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | host := MPWHost host:'130.61.236.203' user:'ubuntu'. 3 | scheme:webserver := host http. 4 | shell runInteractiveLoop. 5 | -------------------------------------------------------------------------------- /scripts/cloud/s3dir.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-ls 3 | dir := args count > 0 ifTrue:{ args lastObject.} ifFalse:{ '.'. }. 4 | scheme:s3 := ref:http://localhost:10001/ asScheme 5 | buckets := (MPWMAXParser parser process: s3:{dir})['Contents']. 6 | buckets collect at:'Key' 7 | -------------------------------------------------------------------------------- /scripts/cloud/scurl.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-scurl:urlref 3 | urlref value. 4 | -------------------------------------------------------------------------------- /scripts/cloud/sftp.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-scpto:host as:user 3 | framework:ObjectiveSSH load. 4 | session := SSHConnection new. 5 | session setHost:host. 6 | session setUser:user. 7 | scheme:sftp := session store. 8 | stdout println:'sftp:/ '. 9 | shell runInteractiveLoop. 10 | -------------------------------------------------------------------------------- /scripts/compile/stc: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-compile:source 3 | framework:ObjSTNative load. 4 | basename := source stringValue stringByDeletingPathExtension. 5 | compiler := STNativeCompiler compiler. 6 | compiled := compiler compileProcessToMachoO: (compiler compile: file:{source}). 7 | objectFileName := basename , '.o'. 8 | file:{objectFileName} := compiled. 9 | compiler linkObjects: #[ basename ] toExecutable: basename inDir: nil additionalFrameworks:[ 'ObjectiveHttpd' ]. 10 | -------------------------------------------------------------------------------- /scripts/compile/stlib: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-compile:source 3 | framework:ObjSTNative load. 4 | basename := source stringValue stringByDeletingPathExtension. 5 | compiler := STNativeCompiler compiler. 6 | compiled := compiler compileClassToMachoO: (compiler compile: file:{source}). 7 | objectFileName := basename , '.o'. 8 | sharedLibName := "lib{basename}.A.dylib". 9 | stdout println:sharedLibName. 10 | file:{objectFileName} := compiled. 11 | compiler linkObjects: #[ basename ] toSharedLibrary: sharedLibName inDir: nil withFrameworks:[ 'ObjectiveHttpd', 'ObjectiveSmalltalk', 'MPWFoundation', 'Foundation' ]. 12 | -------------------------------------------------------------------------------- /scripts/constraints/basicconstraint.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | scheme:l := MPWLoggingStore storeWithSource: MPWDictStore store. 3 | scheme:default := scheme:l. 4 | a ← 3. b ← 5. 5 | a |= b 6 | a 7 | b 8 | b := 52 9 | var:stdout println:a. 10 | -------------------------------------------------------------------------------- /scripts/constraints/syncdirectories-constraint.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-sync:sourceRef to:targetRef 3 | source ← sourceRef asScheme. 4 | target ← targetRef asScheme. 5 | 6 | (target |= source) update. 7 | 8 | runLoop run. 9 | -------------------------------------------------------------------------------- /scripts/constraints/syncdirectories-copy.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-sync:sourceRef to:targetRef 3 | source ← sourceRef asScheme. 4 | target ← targetRef asScheme. 5 | 6 | target copyFrom: source. 7 | -------------------------------------------------------------------------------- /scripts/constraints/syncdirectories.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-sync:source to:target 3 | sourceScheme ← source asScheme. 4 | copier := MPWRESTCopyStream streamWithSource:sourceScheme target:target asScheme. 5 | sourceScheme setLog:copier. 6 | runLoop run. 7 | -------------------------------------------------------------------------------- /scripts/constraints/syncsftp-directory.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-sync:source to:host user:user dir:dir 3 | framework:ObjectiveSSH load. 4 | sourceScheme ← source asScheme. 5 | session := SSHConnection new. 6 | session setHost:host. 7 | session setUser:user. 8 | 9 | scheme:sftp := session store. 10 | targetScheme := ref:sftp:{dir} asScheme. 11 | 12 | targetScheme |= sourceScheme. 13 | 14 | runLoop run. 15 | -------------------------------------------------------------------------------- /scripts/demo/homefileserver.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | context loadFramework:'MPWSideWeb' 3 | server := MPWSchemeHttpServer new. 4 | server server setPort:8081. 5 | base := ref:file:{env:HOME}/Sites asScheme. 6 | server setScheme: base. 7 | 8 | server start:nil. 9 | shell runInteractiveLoop 10 | 11 | -------------------------------------------------------------------------------- /scripts/demo/memhttpserver.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | context loadFramework:'ObjectiveHTTPD' 3 | scheme:site := MPWSiteMap scheme. 4 | site:/hi := 'Hello World!'. 5 | (scheme:site -> (MPWSchemeHttpServer serverOnPort:8081)) start:nil. 6 | stdout println:'site: := value'. 7 | shell runInteractiveLoop 8 | -------------------------------------------------------------------------------- /scripts/demo/stcat.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-stcat:file 3 | file value. 4 | -------------------------------------------------------------------------------- /scripts/fakestore.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | scheme:store ← #MPWJSONConverterStore{} → ref:https://fakestoreapi.com/ asScheme. 3 | shell runInteractiveLoop. 4 | -------------------------------------------------------------------------------- /scripts/hello.plist: -------------------------------------------------------------------------------- 1 | { 2 | "a" = 2; 3 | "b" = { 4 | "hello" = "world"; 5 | "dict" = { 6 | "another" = "level"; 7 | "more" = "contentlevel"; 8 | "anotherdir" = { 9 | "even" = "more"; 10 | "andyet" = "stillmore"; 11 | "nested" = { 12 | "hi" = "there"; 13 | }; 14 | }; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /scripts/hi.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | require 'sinatra' 3 | 4 | get '/hi' do 5 | "Hello World!" 6 | end 7 | -------------------------------------------------------------------------------- /scripts/htmx/clickme.htmx: -------------------------------------------------------------------------------- 1 | 2 | 3 | Here is some text.

4 | 5 | 6 | 7 | 10 | 13 |

14 | Here is more text.

15 | 16 | 17 | -------------------------------------------------------------------------------- /scripts/htmx/hello-htmx.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | 4 | scheme SiteMap { 5 | var count. 6 | -init { 7 | self ← super init. 8 | this:count ← 0. 9 | self. 10 | } 11 | /htmx { get { file:htmx.js } } 12 | /hello { get { file:clickme.htmx } } 13 | /clicked { get { this:count ← this:count + 1. "Clicked count: {this:count}". } } 14 | }. 15 | SiteMap serveOnPort:8090. 16 | shell runInteractiveLoop. 17 | -------------------------------------------------------------------------------- /scripts/http/blogger.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-blogger 3 | scheme:https setHeaders: #{ Content-Type: 'application/json' }. 4 | scheme:https setAccessToken: keychain:password/blogger.com/access_token stringValue. 5 | blogid ← '8397311766319215218'. 6 | theRef ← ref:https://www.googleapis.com/blogger/v3/blogs/{blogid}/ 7 | scheme:blogger ← theRef asScheme 8 | shell runInteractiveLoop. 9 | -------------------------------------------------------------------------------- /scripts/http/blogposttable.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | 3 | #!env st 4 | #-blogger 5 | scheme:https setAccessToken: keychain:password/blogger.com/access_token stringValue. 6 | #scheme:https setAccessToken: env:TOKEN. 7 | blogid ← '8397311766319215218'. 8 | theRef ← ref:https://www.googleapis.com/blogger/v3/blogs/{blogid}/ 9 | scheme:blogger ← theRef asScheme 10 | a := (scheme:blogger at:'posts/?fields=kind%2Citems(title%2Cid)' ) at:'items' 11 | table ← #MPWTableView{items:(a)}. 12 | app runFromCLI:(table inScrollView:(200@400 extent: 500@600)). 13 | -------------------------------------------------------------------------------- /scripts/http/hello-world-http-dict.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-serve 3 | framework:ObjectiveHTTPD load. 4 | 5 | #MPWDictStore{ #hello: 'Hello World!' } 6 | -------------------------------------------------------------------------------- /scripts/http/hello-world-http-ppath.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | 4 | scheme SiteMap { 5 | /hello { |= { 'Hello World!'. } } 6 | }. 7 | SiteMap serveOnPort:8090. 8 | shell runInteractiveLoop. 9 | -------------------------------------------------------------------------------- /scripts/http/httpfileserver.st: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-serve:dir 3 | framework:ObjectiveHTTPD load. 4 | server := MPWSchemeHttpServer new. 5 | server server setPort:8088. 6 | base := dir asScheme. 7 | cache := base cachedBy: MPWSiteMap scheme. 8 | 9 | server setScheme: cache . 10 | #server setScheme: base. 11 | 12 | server start:nil. 13 | shell runInteractiveLoop. 14 | 15 | -------------------------------------------------------------------------------- /scripts/http/httpserver-autorun.st: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-fileserver:dir 3 | framework:ObjectiveHTTPD load. 4 | httpserver := (MPWSchemeHttpServer serverOnPort:8081). 5 | 6 | server := dir ⇨ httpserver. 7 | httpserver. 8 | -------------------------------------------------------------------------------- /scripts/http/httpserver-hello-verbose.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | port := 8081. 4 | server ⇦ MPWHTTPServer new. 5 | server setPort:port. 6 | server start:nil. 7 | stdout println:server port. 8 | shell runInteractiveLoop 9 | -------------------------------------------------------------------------------- /scripts/http/httpserver-hello.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-serve 3 | framework:ObjectiveHTTPD load. 4 | MPWHTTPServer. 5 | -------------------------------------------------------------------------------- /scripts/http/httpserver.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-fileserver:dir 3 | framework:ObjectiveHTTPD load. 4 | httpserver := (MPWSchemeHttpServer serverOnPort:8081). 5 | 6 | server := dir ⇨ (MPWCachingStore memoryStore) ⇨ httpserver. 7 | server start:nil. 8 | 9 | shell runInteractiveLoop. 10 | 11 | -------------------------------------------------------------------------------- /scripts/http/memhttpserver-bench.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | scheme:site := MPWSiteMap scheme. 4 | hello := 'Hello World!' asData mutableCopy. 5 | stdout println:hello. 6 | 1 to:0 do:{ :i | hello appendData:hello.}. 7 | site:/hi := hello. 8 | (scheme:site -> (MPWSchemeHttpServer serverOnPort:8081)) start:nil. 9 | stdout println:'site: := value'. 10 | shell runInteractiveLoop. 11 | -------------------------------------------------------------------------------- /scripts/http/memhttpserver-ppath.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | 4 | class SiteMap : MPWScheme { 5 | /hello { |= { 'Hello World!'. } } 6 | /scheme/:key { |= { scheme:scheme. }} 7 | /:arg/count { |= { arg length stringValue. }} 8 | /*:path { |= { 'Path: ', path stringValue. }} 9 | } 10 | 11 | scheme:site := SiteMap scheme. 12 | stdout println: site:hello. 13 | stdout println: site:this/is/a/path. 14 | server := MPWSchemeHttpServer serverOnPort:8081. 15 | scheme:site -> server. 16 | server start:nil. 17 | shell runInteractiveLoop. 18 | -------------------------------------------------------------------------------- /scripts/http/memhttpserver.st: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | scheme:site serveOnPort:8081. 4 | stdout println:'site: := value'. 5 | shell runInteractiveLoop. 6 | -------------------------------------------------------------------------------- /scripts/http/postblog-manual.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-post:title text: body 3 | scheme:https setHeaders: #{ Content-Type: 'application/json' }. 4 | scheme:https setAccessToken: keychain:password/blogger.com/access_token stringValue. 5 | blogid ← '8397311766319215218'. 6 | theRef ← ref:https://www.googleapis.com/blogger/v3/blogs/{blogid}/ 7 | scheme:blogger ← theRef asScheme 8 | postDict := #{ kind: 'blogger#post', blog: #{ id: blogid }, title: title, content: body value stringValue }. 9 | postResponse := ref:blogger:posts/ post: postDict asJSON. 10 | stdout println:postResponse. 11 | -------------------------------------------------------------------------------- /scripts/http/server.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | server := MPWHTTPServer new. 4 | server setPort:8080. 5 | server start:nil. 6 | 7 | scheme:cms := MPWSiteMap scheme. 8 | server setDelegate: scheme:cms 9 | 10 | shell runInteractiveLoop 11 | 12 | -------------------------------------------------------------------------------- /scripts/http/test.stp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Example 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /scripts/http/time.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | framework:ObjectiveHTTPD load. 3 | 4 | scheme Time { 5 | /time { get { NSDate date stringValue. } } 6 | }. 7 | server ← #MPWSchemeHttpServer{ port: 8090 } → Time scheme. 8 | stdout println:'Serving on port: 8090'. 9 | server run. 10 | -------------------------------------------------------------------------------- /scripts/http/tmpfileserver.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | server := MPWHTTPServer new. 4 | server setPort:8081. 5 | server start:nil. 6 | base := ref:file:/tmp/ asScheme 7 | cache := base cachedBy: MPWSiteMap scheme. 8 | 9 | server setDelegate: cache . 10 | #server setDelegate: base. 11 | 12 | shell runInteractiveLoop 13 | 14 | -------------------------------------------------------------------------------- /scripts/http/unixsocket-http-server.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | framework:ObjectiveHTTPD load 3 | server := MPWSchemeHttpServer server 4 | server setScheme: (MPWDictStore storeWithDictionary: #{ #hello: 'World' }). 5 | ref:file:/tmp/mysocket delete. 6 | server server setUnixDomainSocketPath:'/tmp/mysocket' 7 | stdout println: server server socket. 8 | server server startHttpd ifTrue:{ stdout println:'server started'. } ifFalse: { stdout println:'server failed to start'.}. 9 | shell runInteractiveLoop. 10 | -------------------------------------------------------------------------------- /scripts/listentonotifications: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | name := 'com.metaobject.ViewBuilder-ios-playing' 3 | a := #MPWDistributedNotificationReceiver{ #notificationName:name }. 4 | a → stdout. 5 | a run. 6 | NSRunLoop mainRunLoop run. 7 | -------------------------------------------------------------------------------- /scripts/metal/metalcompute.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | metal := framework:metal 3 | metal load. 4 | initfun ← metal functionNamed:'MTLCreateSystemDefaultDevice' 5 | defaultdevice ← initfun value. 6 | stdout println:defaultdevice. 7 | -------------------------------------------------------------------------------- /scripts/misc/SFTP-UI-Demo.st: -------------------------------------------------------------------------------- 1 | framework:StshFramework load. 2 | host := #MPWRemoteHost{ 3 | #name: '130.61.236.203', 4 | #user:'ubuntu' 5 | }. 6 | 7 | s := host store 8 | 9 | scheme:s := s. 10 | 11 | #MPWBrowser{ #store: s } openInWindow:'Oracle' 12 | 13 | -------------------------------------------------------------------------------- /scripts/misc/add3.stsh: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-addToThree:arg 3 | arg+3. 4 | -------------------------------------------------------------------------------- /scripts/misc/backup: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-backup:destination 3 | scheme:dests ← #MPWDictStore{ blue: '08F89A95-8A9E-4926-B240-D367FBE8C177', nahrat: 'CC0C9B9A-ACD8-4B11-A8FA-48843E2E72DF', defiant: 'A1C91C5F-A424-41FB-BFAC-70BDFAE30905' }. 4 | 5 | ref:dests:{destination} ifNotBound: { 6 | d ← scheme:dests dict allKeys stringValue. 7 | stdout println:"Invalid destination {destination} valid destinations are: {d}.". 8 | shell exit. 9 | }. 10 | sh:tmutil/startbackup/--block/--destination/{dests:{destination}}. 11 | 12 | -------------------------------------------------------------------------------- /scripts/misc/countdockerimages.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-countdockerimages 3 | scheme:docker := MPWJSONConverterStore -> ref:file:/var/run/docker.sock asUnixSocketStore. 4 | docker:/images/json count 5 | -------------------------------------------------------------------------------- /scripts/misc/db-http.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-db:db 3 | framework:sqlitescheme load. 4 | framework:ObjectiveHTTPD load. 5 | 6 | scheme:db ← #MPWSqliteScheme { 'path': db } 7 | (scheme:db -> (MPWSchemeHttpServer serverOnPort:8081)) start:nil. 8 | shell runInteractiveLoop. 9 | -------------------------------------------------------------------------------- /scripts/misc/defclass.stsh: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | 3 | class Koan : NSObject { 4 | 5 | var tracker. 6 | 7 | -setTrackerToFalse:aString 8 | { 9 | stdout println:'false: ', aString. 10 | } 11 | 12 | -setTrackerToTrue:aString 13 | { 14 | stdout println:'true: ', aString. 15 | } 16 | 17 | } 18 | 19 | a := Koan new. 20 | a setTrackerToFalse:'falsy'. 21 | a setTrackerToTrue:'hi'. 22 | a setTracker:'hi'. 23 | stdout println:a tracker. 24 | -------------------------------------------------------------------------------- /scripts/misc/dictstore.st: -------------------------------------------------------------------------------- 1 | extension NSDictionary { 2 | -at:ref { self objectForKey:ref stringValue. } 3 | -at:ref put:value { value ifNotNil:{ self setObject:value forKey:ref stringValue. }. } 4 | -deleteAt:ref { self removeObjectForKey:ref stringValue. } 5 | -evaluateIdentifier:id withContext:c { self at:id. } 6 | } 7 | 8 | shell runInteractiveLoop. 9 | -------------------------------------------------------------------------------- /scripts/misc/docker.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-countdockerimages 3 | scheme:docker := MPWJSONConverterStore -> ref:file:/var/run/docker.sock asUnixSocketStore. 4 | stdout println:'example: docker:/images/json count'. 5 | shell runInteractiveLoop. 6 | -------------------------------------------------------------------------------- /scripts/misc/earthquakes-async.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | stream ← ref:https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv linesAfter:1. 3 | stream do: { :theLine | 4 | values ← theLine componentsSeparatedByString:','. 5 | time ← values[0]. 6 | latitude ← values[1]. 7 | longitude ← values[2]. 8 | magnitude ← values[4]. 9 | stdout println:"Quake: magnitude {magnitude} on {time} at {latitude} {longitude}". 10 | }. 11 | stream awaitResultForSeconds:20. 12 | -------------------------------------------------------------------------------- /scripts/misc/earthquakes-sawk.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-sawk:file 3 | file csv: { :time :latitude :longitude :depth :magnitude | 4 | stdout println:"Magnitude: {magnitude} location: {latitude},{longitude} time: {time}". 5 | }. 6 | -------------------------------------------------------------------------------- /scripts/misc/earthquakes-sync.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | data ← https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv. 3 | lines ← data processedWith: MPWBytesToLines. 4 | lines ← lines subarrayWithRange: (1 to: lines count - 1). 5 | lines do: { :theLine | 6 | values ← theLine componentsSeparatedByString:','. 7 | time ← values at:0. 8 | latitude ← values at:1. 9 | longitude ← values at:2. 10 | magnitude ← values at:4. 11 | stdout println:"Quake: magnitude {magnitude} on {time} at {latitude} {longitude}". 12 | }. 13 | -------------------------------------------------------------------------------- /scripts/misc/envscheme.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | # 3 | 4 | class EnvScheme : MPWScheme { 5 | /:envVar { |= { NSProcessInfo processInfo environment objectForKey:envVar. }} 6 | } 7 | scheme:env := EnvScheme scheme. 8 | stdout println:'Scheme defined, try env:'. 9 | shell runInteractiveLoop. 10 | -------------------------------------------------------------------------------- /scripts/misc/factorial-via-reduce.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-factorial:n 3 | framework:ObjectiveArithmetic load. 4 | class STScanner { -defaultIntClass { MPWBigInteger. } } 5 | (1 to:n) reduce * 1 6 | -------------------------------------------------------------------------------- /scripts/misc/fibserver.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | 4 | server := MPWFibServer new. 5 | server setPort:8087. 6 | server startHttpd. 7 | shell runInteractiveLoop 8 | -------------------------------------------------------------------------------- /scripts/misc/fizzbuzz.st: -------------------------------------------------------------------------------- 1 | 1 to: 100 do:{ :i | fizz := ((i mod:3) = 0). buzz := ((i mod:5) = 0). s:=i. fizz ifTrue:{s :='fizz'}. buzz ifTrue:{ s:='buzz'}. (buzz * fizz) ifTrue:{s := 'fizzbuzz'} . stdout println:s. }. 2 | -------------------------------------------------------------------------------- /scripts/misc/fizzbuzz.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | 1 to: 100 do:{ :i | 3 | fizz := ((i mod:3) = 0). 4 | buzz := ((i mod:5) = 0). 5 | s:=i. 6 | fizz ifTrue:{s :='fizz'. }. 7 | buzz ifTrue:{ s:='buzz'. }. 8 | (buzz * fizz) ifTrue:{s := 'fizzbuzz'. } . 9 | stdout println:s. 10 | }. 11 | -------------------------------------------------------------------------------- /scripts/misc/frameworkscheme.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | fwkscheme := MPWSequentialScheme scheme. 3 | fwkscheme addScheme: ref:file:/Library/Frameworks/ asScheme. 4 | fwkscheme addScheme: ref:file:/System/Library/Frameworks/ asScheme. 5 | #filter := MPWBlockFilterScheme filterWithSource:fwkscheme idFilter:{ :name | name, '.framework'. ] valueFilter:[ :dir | stdout println:dir. dir. }. 6 | filter := MPWBlockFilterScheme filterWithSource:fwkscheme idFilter:{ :name | name, '.framework'.} valueFilter:{ :dir | dir.} . 7 | scheme:framework := filter. 8 | shell runInteractiveLoop. 9 | -------------------------------------------------------------------------------- /scripts/misc/fromTo: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-from:from to:to 3 | stdout do println:(from to: to ) each 4 | -------------------------------------------------------------------------------- /scripts/misc/genhello-main.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-gen:msg 3 | 4 | messageLabel ← 'message'. 5 | main ← '_main'. 6 | 7 | framework:ObjSTNative load 8 | arm := MPWARMAssemblyGenerator stream 9 | arm global: main; 10 | align:2; 11 | label:main; 12 | mov:0 value:1; 13 | adr:1 address:messageLabel; 14 | mov:2 value: msg length; 15 | mov:16 value:4; 16 | svc: 128; 17 | mov:0 value:0; 18 | ret; 19 | label:messageLabel; 20 | asciiz:msg. 21 | 22 | file:hello-main.s := arm target 23 | 24 | -------------------------------------------------------------------------------- /scripts/misc/hard-tasks.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | 3 | class Task { 4 | var done. 5 | var title. 6 | } 7 | 8 | scheme todo { 9 | 10 | /tasks { 11 | |= { 12 | #( #Task{ #done: false, #title: 'Clean Room' } , #Task{ #done: true, #title: 'Check Twitter' } ). 13 | } 14 | } 15 | }. 16 | 17 | scheme:todo := todo new. 18 | shell runInteractiveLoop. 19 | -------------------------------------------------------------------------------- /scripts/misc/hello-scheme.stsh: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-greet 3 | scheme greeter { 4 | /hi { |= { 'Hello World!'. }} 5 | } 6 | scheme:hi := greeter store. 7 | hi:hi 8 | -------------------------------------------------------------------------------- /scripts/misc/hello.stsh: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-greet 3 | 'Hello World!' 4 | -------------------------------------------------------------------------------- /scripts/misc/homefileserver.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-homeserver 3 | framework:ObjectiveHTTPD load. 4 | server := MPWSchemeHttpServer new. 5 | server server setPort:8088. 6 | base := ref:file:{env:HOME}/Sites asScheme. 7 | cache := base cachedBy: MPWSiteMap scheme. 8 | 9 | server setScheme: cache . 10 | 11 | server. 12 | -------------------------------------------------------------------------------- /scripts/misc/htmxtest.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | # 3 | # 4 | 5 | 6 | framework:ObjectiveHTTPD load. 7 | html := file:clickme.htmx . 8 | scheme SiteMap { 9 | /hello { |= { file:clickme.htmx. } } 10 | /clicked { |= { "Was clicked!". } } 11 | }. 12 | stdout println:SiteMap. 13 | SiteMap serveOnPort:8090. 14 | shell runInteractiveLoop. 15 | 16 | -------------------------------------------------------------------------------- /scripts/misc/imageinfo.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-imageInfo:image 3 | framework:AppKit load. 4 | NSBitmapImageRep alloc initWithData: image value. 5 | -------------------------------------------------------------------------------- /scripts/misc/listdockercontainers.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-ls 3 | scheme:docker := MPWJSONConverterStore -> ref:file:/var/run/docker.sock asUnixSocketStore. 4 | docker:/containers/json 5 | -------------------------------------------------------------------------------- /scripts/misc/listdockerimages.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-ls 3 | scheme:docker := MPWJSONConverterStore -> ref:file:/var/run/docker.sock asUnixSocketStore. 4 | docker:/images/json 5 | -------------------------------------------------------------------------------- /scripts/misc/listmethods.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-allClasses 3 | 4 | framework:Cocoa load. 5 | a := MPWClassMirror allUsefulClasses. 6 | a do: { :aClassMirror | 7 | stdout println: aClassMirror name. 8 | stdout println:'------'. 9 | stdout do println: aClassMirror methodMirrors collect name each. 10 | stdout println:''. 11 | stdout println:''. 12 | }. 13 | -------------------------------------------------------------------------------- /scripts/misc/logfilechanges.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-logChanges:source 3 | sourceScheme ← source asScheme. 4 | sourceScheme setLog:stdout. 5 | runLoop run. 6 | -------------------------------------------------------------------------------- /scripts/misc/makeWindow.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:AppKit load. 3 | NSApplication sharedApplication. 4 | window := NSWindow alloc initWithContentRect:( 20@200 extent: 400@100 ) styleMask: 15 backing: NSBackingStoreBuffered defer:0. 5 | window makeKeyAndOrderFront:nil. 6 | shell runInteractiveLoop. 7 | 8 | -------------------------------------------------------------------------------- /scripts/misc/memfuse.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-mount:text 3 | framework:ObjectiveHTTPD load. 4 | framework:SchemeFUSE load. 5 | server := MPWHTTPServer new. 6 | server setPort: 8082. 7 | stdout println: 'memhttpserver listeing in port: ',server port stringValue. 8 | server start:nil. 9 | 10 | scheme:base := MPWSiteMap scheme. 11 | base:/hi.txt := text asData. 12 | server setDelegate: scheme:base . 13 | 14 | fs1 := SchemeFUSE alloc initWithScheme: scheme:base . 15 | fs := fs1 mountAtPath:'/Volumes/SchemeFS' volname:'SchemeFS'. 16 | 17 | 18 | shell runInteractiveLoop 19 | 20 | -------------------------------------------------------------------------------- /scripts/misc/mountclass.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | 3 | framework:SchemeFUSE load. 4 | 5 | fs := MPWClassScheme store mountAt:'/Volumes/SchemeFS' . 6 | 7 | shell runInteractiveLoop. 8 | 9 | fs unmount. 10 | -------------------------------------------------------------------------------- /scripts/misc/mountclock.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | framework:SchemeFUSE load. 3 | 4 | scheme clock { 5 | /date { |= { 6 | #NSDate{} stringValue lf. 7 | } } 8 | -childrenOfReference:aRef { 9 | #[ 'date' ]. 10 | } 11 | -hasChildren:aRef { 12 | aRef path = '/'. 13 | } 14 | }. 15 | 16 | 17 | scheme:txt := #MPWExtensionMapper{ #extension: 'txt' , #source: (clock store) } 18 | 19 | 20 | fs := scheme:txt mountAt: '/Volumes/clock'. 21 | 22 | shell runInteractiveLoop. 23 | 24 | fs unmount. 25 | -------------------------------------------------------------------------------- /scripts/misc/mountenv.stsh: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | framework:SchemeFUSE load. 3 | 4 | scheme:txt := #MPWExtensionMapper{ #extension: 'txt' , #source: scheme:env }. 5 | fs := scheme:txt mountAt: ref:/Volumes/SchemeFS. 6 | 7 | shell runInteractiveLoop 8 | 9 | fs unmount. 10 | -------------------------------------------------------------------------------- /scripts/misc/mountscheme.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-mount: theScheme 3 | framework:SchemeFUSE load. 4 | 5 | scheme:txt := #MPWExtensionMapper{ #extension: 'txt' , #source: scheme:{theScheme} }. 6 | 7 | 8 | fs := scheme:txt mountAt: ref:/Volumes/SchemeFS. 9 | 10 | shell runInteractiveLoop 11 | 12 | fs unmount. 13 | -------------------------------------------------------------------------------- /scripts/misc/nc.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-nc:remote 3 | s := remote stream 4 | stdout println:s url. 5 | s setTarget:MPWByteStream Stdout. 6 | in := MPWFDStreamSource fd:0. 7 | in setTarget:(MPWByteStream streamWithTarget:s). 8 | s open. 9 | s async run. 10 | in run. 11 | -------------------------------------------------------------------------------- /scripts/misc/pdfpageextract.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-pdf:name from:from to:to 3 | framework:EGOS load. 4 | pdf := MPWPDFFile pdfFileWithContentsOfMappedFile: name. 5 | outstream := MPWPDFByteStream stream. 6 | writer := MPWPDFWriter streamWithTarget:outstream. 7 | pages := pdf pages subarrayWithRange: (from to: to ). 8 | writer outputPages:pages. 9 | writer close. 10 | file:out.pdf := writer target target 11 | -------------------------------------------------------------------------------- /scripts/misc/plist2objc.st: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-plist2objc:file 3 | plist := file value rawData stringValue propertyList. 4 | plist allKeys do:{ :key | stdout println:('@"' , key , '" : @"',(plist objectForKey:key),'", '). }. 5 | -------------------------------------------------------------------------------- /scripts/misc/proxy.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | server := MPWSchemeHttpServer new. 4 | server server setPort: 8082. 5 | stdout println: 'memhttpserver listeing in port: ',server server port stringValue. 6 | server start:nil. 7 | 8 | scheme:base := MPWSiteMap scheme. 9 | base:/hi := 'Hello World!'. 10 | server setScheme: scheme:base . 11 | 12 | shell runInteractiveLoop 13 | 14 | -------------------------------------------------------------------------------- /scripts/misc/renderpdf2bitmappdf.st: -------------------------------------------------------------------------------- 1 | framework:EGOS_Cocoa load 2 | 3 | pdf := MPWPDFDocument alloc initWithData: file:/tmp/nightingale.pdf 4 | 5 | drawingContext := MPWCGBitmapContext grayBitmapContext: ( 595 @ 842 ) scale: (600 / 72 ). 6 | 7 | 8 | drawingContext fillBackgroundWithColor: (drawingContext colorGray: 1.0 alpha:1.0). 9 | pdf drawCGPageNo:0 onContext: drawingContext. 10 | 11 | file:/tmp/page1.png := drawingContext image representationUsingType: 4 properties: #{} -------------------------------------------------------------------------------- /scripts/misc/s3rootdir.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-ls 3 | scheme:s3 := ref:http://localhost:10001/ asScheme 4 | buckets := MPWMAXParser parser process: s3:. 5 | buckets := buckets at:'Buckets' 6 | buckets := buckets objectsForKey:'Bucket' 7 | buckets collect objectForKey:'Name' 8 | -------------------------------------------------------------------------------- /scripts/misc/sawk-filter.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-sawk:file 3 | block := { :time :latitude :longitude :depth :magnitude | 4 | stdout println:"Magnitude: {magnitude} location: {latitude},{longitude} time: {time}". 5 | } 6 | awk ← STAWK stream. 7 | awk setBlock:block. 8 | awk setSeparator:','. 9 | lines := file lines. 10 | lines -> awk. 11 | lines run. 12 | -------------------------------------------------------------------------------- /scripts/misc/scheme-constraints.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | source := MPWDictStore store. 3 | scheme:dest := MPWDictStore store. 4 | scheme:source := ( scheme:dest |= source ). 5 | shell runInteractiveLoop. 6 | 7 | -------------------------------------------------------------------------------- /scripts/misc/sentiment.st: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-sentiment:text 3 | (ref:http://text-processing.com/api/sentiment/ postForm: #{ #text: text }) 4 | -------------------------------------------------------------------------------- /scripts/misc/stcat.stsh: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-stcat:file 3 | file value. 4 | -------------------------------------------------------------------------------- /scripts/misc/streamxml.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-parse:xmlIn 3 | parser := MPWMAXParser parser. 4 | parser setStreamingThreshhold:1. 5 | parser setUndefinedTagAction:1. 6 | source := xmlIn source. 7 | target := ref:file:/tmp/rows.plist writeStream. 8 | parser → target. 9 | source → parser. 10 | parser parse: xmlIn value. 11 | #source run. 12 | target close. 13 | -------------------------------------------------------------------------------- /scripts/misc/textfield.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-text 3 | #NSTextField{ #frame:(180@24) }. 4 | -------------------------------------------------------------------------------- /scripts/misc/toupper: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | filter toupper |{ ^object stringValue uppercaseString. } 3 | (stdin -> toupper -> rawstdout ) run 4 | -------------------------------------------------------------------------------- /scripts/misc/toupper-autorun: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-upper 3 | filter toupper |{ ^object stringValue uppercaseString. } 4 | -------------------------------------------------------------------------------- /scripts/misc/triangle.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:EGOS_Cocoa load. 3 | target := MPWByteStream fileName:'triangle.pdf'. 4 | c := MPWCGPDFContext pdfContextWithTarget:target size:595@842. 5 | 6 | c page:nil content:{ :c | 7 | c setFillColor:(c colorRed:1.0 green:0 blue:0 alpha:1.0). 8 | c translate:10. 9 | c moveto:0 :0. 10 | c lineto:400 :0. 11 | c lineto:200 :400. 12 | c closepath. 13 | c fill. 14 | }. 15 | c close. 16 | target close. 17 | -------------------------------------------------------------------------------- /scripts/misc/tryreactivecocoa.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ReactiveCocoa load. 3 | signal := ((RACSignal interval:1) startWith:NSDate date) map:{ :date | val := date stringValue. stdout println:val. val. }. 4 | a := #{ #a : 2 }. 5 | trampoline := (RACSubscriptingAssignmentTrampoline alloc initWithTarget:a nilValue:nil). 6 | trampoline setObject:signal forKeyedSubscript:'b'. 7 | NSRunLoop currentRunLoop runUntilDate:(NSDate dateWithTimeIntervalSinceNow:2). 8 | stdout println:'after runloop'. 9 | 2. 10 | -------------------------------------------------------------------------------- /scripts/misc/unique.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-unique:t 3 | words ← t value stringValue componentsSeparatedByCharactersInSet:NSCharacterSet whiteSpaceAndPunctuation. 4 | lower ← words collect lowercaseString. 5 | unique ← NSSet setWithArray:lower. 6 | stdout do println: unique allObjects sorted each. 7 | -------------------------------------------------------------------------------- /scripts/misc/uniqueArgs.stsh: -------------------------------------------------------------------------------- 1 | #!env stsh 2 | #-unique 3 | (NSSet setWithObjects:args ) allObjects 4 | -------------------------------------------------------------------------------- /scripts/misc/zipTastic.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-zip:zipCode 3 | ref:http://zip.elevenbasetwo.com withArgs zip:zipCode | value. 4 | -------------------------------------------------------------------------------- /scripts/old/homefileserver-new.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | 4 | ((MPWSchemeHttpServer serverOnPort:8082) -> ref:file:{env:HOME}/Sites) start:nil. 5 | 6 | shell runInteractiveLoop. 7 | 8 | -------------------------------------------------------------------------------- /scripts/shells/calsh: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-calsh:calendarName 3 | framework:EventKit loadIn:context. 4 | store := EKEventStore alloc initWithAccessToEntityTypes: EKEntityTypeReminder. 5 | calendar := ((store calendarsForEntityType: EKEntityTypeReminder ) selectWhereValueForKey:'title' isEqual:calendarName) lastObject. 6 | stdout println:'store: ' , store description. 7 | stdout println:'calendar: ' , store description. 8 | shell runInteractiveLoop. 9 | 10 | -------------------------------------------------------------------------------- /scripts/shells/pdfsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | #-pdfsh:file 3 | framework:EGOS_Cocoa load. 4 | pdf := MPWPDFDocument alloc initWithData: file value. 5 | shell runInteractiveLoop 6 | -------------------------------------------------------------------------------- /scripts/stpy/pyyt.st: -------------------------------------------------------------------------------- 1 | #!env st 2 | #-download:urlstring 3 | framework:PyObjS load 4 | scheme:py := STPython new 5 | py:module/sys/path/append call:'/opt/homebrew/lib/python3.9/site-packages'. 6 | py:module/yt_dlp/_real_main call:['--format', 'mp4', urlstring]. 7 | -------------------------------------------------------------------------------- /scripts/ui/Tasks.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Task:NSObject{} 4 | @property(nonatomic,strong) id id,done,title; 5 | @end 6 | @implementation Task 7 | 8 | -copyWithZone:aZone 9 | { 10 | return [self retain]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /scripts/ui/arraytarget.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-array 3 | field ← #TextField{frame:(180@24) }. 4 | filter Empty |{ ^object. }. 5 | empty ← #Empty{}. 6 | field → empty. 7 | app runFromCLI:field. 8 | stdout println: empty target. 9 | 10 | -------------------------------------------------------------------------------- /scripts/ui/envtable.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-envtable 3 | #MPWTableView{items: env:. dicts } inScrollView:(200@400 extent: 500@600) 4 | -------------------------------------------------------------------------------- /scripts/ui/gui2file.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-s3 3 | text ← #NSTextField{ frame:(180@24) }. 4 | text → ref:file:/tmp/hello.txt. 5 | -------------------------------------------------------------------------------- /scripts/ui/gui2file2way.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-s3 3 | scheme:tmpf := ref:file:/tmp asScheme. 4 | scheme:tmpf setLog: protocol:ModelDidChange. 5 | field ← #STTextField{ frame:(180@24), binding: ref:tmpf:hello.txt }. 6 | -------------------------------------------------------------------------------- /scripts/ui/gui2filebindings.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-s3 3 | text ← #NSTextField{ frame:(180@24) }. 4 | text → ref:file:/tmp/hello.txt. 5 | -------------------------------------------------------------------------------- /scripts/ui/gui2proc.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-text 3 | 4 | text ← #NSTextField{ frame:(180@24) }. 5 | 6 | text → { stdout println:$0. }. 7 | -------------------------------------------------------------------------------- /scripts/ui/gui2s3.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-s3 3 | # local simulator is 'minio', needs to be configured using its 4 | # web UI to allow anonymous access to the bucket, so can't 5 | # just put files and serve them. 6 | # experiment more with authentication 7 | 8 | scheme:s3 ← ref:http://localhost:10001/ asScheme 9 | scheme:s3 source setHeaders: #{ user: 'minioadmin' , password: 'minioadmin' }. 10 | text ← #NSTextField{ frame:(180@24) }. 11 | 12 | text → ref:s3:bucket1/message.txt. 13 | -------------------------------------------------------------------------------- /scripts/ui/gui2stdout.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-field 3 | text ← #NSTextField{ #frame: (180@24) }. 4 | text → stdout. 5 | -------------------------------------------------------------------------------- /scripts/ui/gui2upcasefile.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-s3 3 | text ← #NSTextField{ frame:(180@24) }. 4 | filter Upcase |{ ^object uppercaseString. }. 5 | text → (#Upcase{} → ref:file:/tmp/hello.txt ). 6 | -------------------------------------------------------------------------------- /scripts/ui/hello-ui.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-label 3 | #Label{ text: 'Hello World!', frame:(180@24) }. 4 | -------------------------------------------------------------------------------- /scripts/ui/homedir-browser.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | scheme:home := ref:file:{env:HOME} asScheme. 3 | 4 | browser := MPWBrowser new 5 | 6 | browser setRef: ref:home:/ 7 | home:/ 8 | browser description 9 | browser openInWindow:'Home'. 10 | -------------------------------------------------------------------------------- /scripts/ui/imageview.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-image: imagePath 3 | image := NSImage alloc initWithContentsOfFile: imagePath. 4 | 5 | #NSImageView{ image: image }. 6 | -------------------------------------------------------------------------------- /scripts/ui/linktask: -------------------------------------------------------------------------------- 1 | #!env st 2 | framework:ObjSTNative load. 3 | 4 | # link the Tasks.i file, compile with cc -c Tasks.m 5 | 6 | compiler := STNativeCompiler compiler. 7 | compiler linkObjects: [ 'Tasks' ] toSharedLibrary:'tasks.dylib' inDir: nil withFrameworks:[ 'Foundation' ] 8 | -------------------------------------------------------------------------------- /scripts/ui/names.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "first": "Marcel", "last": "Weiher" }, 3 | { "first": "Peter", "last": "Alexander"}, 4 | { "first": "Hello", "last": "World"}, 5 | { "first": "Hi", "last": "There"} 6 | ] 7 | -------------------------------------------------------------------------------- /scripts/ui/s3gui.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-s3 3 | scheme:s3 ← ref:http://defiant.local:2345/ asScheme 4 | text ← #NSTextField{ #stringValue:'', #frame:(10@45 extent:180@24) }. 5 | text → ref:s3:bucket1/msg.txt. 6 | text. 7 | -------------------------------------------------------------------------------- /scripts/ui/showwindow-button.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | text ← #NSTextField{ #stringValue:'', #frame: (10@45 extent: 180@24) }. 3 | button ← #NSButton{ #title:'OK', #target:app, #theAction:'terminate:', #frame: (50@10 extent: 100@30) }. 4 | window ← #NSWindow{ #frame: (300@300 extent: 200@105), #title:'Window', #views: #[ text, button] }. 5 | text → MPWPrintLiner → stdout. 6 | app runFromCLI:window. 7 | -------------------------------------------------------------------------------- /scripts/ui/showwindow.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | text ← #NSTextField{ stringValue:'', frame:(10@45 extent:180@24) }. 3 | window ← #NSWindow{ frame:(300@300 extent:200@105),title:'Enter Text', views:#[text]}. 4 | text → MPWPrintLiner → stdout. 5 | app runFromCLI:window. 6 | -------------------------------------------------------------------------------- /scripts/ui/starts3: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | fakes3 -r /tmp/fakes3root -p 10001 3 | -------------------------------------------------------------------------------- /scripts/ui/tableview.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-table:json 3 | j := #MPWJSONConverterStore{ mutable: true } → scheme:file 4 | a ← j at:json. 5 | a firstObject at:'first' put:'Hello'. 6 | table ← #MPWTableView{items:(a)}. 7 | app runFromCLI:(table inScrollView:(200@400 extent: 500@600)). 8 | stdout do println: table items each. 9 | -------------------------------------------------------------------------------- /scripts/ui/tasks-ui.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-taskstable 3 | framework:Sails load 4 | 5 | class Task : STEntity { 6 | var title. 7 | var done. 8 | } 9 | 10 | 11 | taskList ← #( #Task{ id:0, title: 'Submit paper', done: false }, #Task{ id:1, title: 'Write code', done: true } ). 12 | 13 | stdout println:'hi'. 14 | stdout println: taskList. 15 | 16 | table ← #MPWTableView{items: taskList }. 17 | 18 | table inScrollView:(200@400 extent: 500@600). 19 | -------------------------------------------------------------------------------- /scripts/ui/ui2msgstdout.st: -------------------------------------------------------------------------------- 1 | #!env stui 2 | #-field 3 | text ← #NSTextField{ #frame: (180@24) }. 4 | text → port:stdout/println: . 5 | -------------------------------------------------------------------------------- /scripts/ukstug-2021/browser.st: -------------------------------------------------------------------------------- 1 | #MPWFileBrowser{ #store: scheme:defaults } openInWindow:'Defaults'. 2 | 3 | 4 | browser := MPWMethodBrowser alloc initWithDefaultNib. 5 | browser setMethodStore: smalltalk methodStore. 6 | 7 | browser view window makeKeyAndOrderFront:nil -------------------------------------------------------------------------------- /scripts/ukstug-2021/filebrowser.st: -------------------------------------------------------------------------------- 1 | #MPWFileBrowser{ #store: (ref:file:/Users/marcel/programming asScheme) } openInWindow:'Plist' . -------------------------------------------------------------------------------- /scripts/ukstug-2021/hello-world-http-ppath.stsh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/stsh 2 | framework:ObjectiveHTTPD load. 3 | 4 | scheme SiteMap { 5 | /hello { |= { 'Hello World!'. } } 6 | }. 7 | SiteMap serveOnPort:8090. 8 | shell runInteractiveLoop. 9 | -------------------------------------------------------------------------------- /sl.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.disable-library-validation 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /stapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/stapp.png -------------------------------------------------------------------------------- /test.stb/Info.json: -------------------------------------------------------------------------------- 1 | { 2 | "site": "ObjectiveSTSite" 3 | } 4 | -------------------------------------------------------------------------------- /test.stb/Resources/objst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpw/Objective-Smalltalk/7f899452d5006be3dc8c48495014e083dfc33bdb/test.stb/Resources/objst.png -------------------------------------------------------------------------------- /test.stb/Sources/STBundleLoadedTestClass1.st: -------------------------------------------------------------------------------- 1 | class _STBundleLoadedTestClass2 : NSObject 2 | { 3 | var testVar. 4 | -testMethod { 5 | 43. 6 | } 7 | 8 | }. 9 | -------------------------------------------------------------------------------- /test.stb/Sources/STBundleLoadedTestClass2.st: -------------------------------------------------------------------------------- 1 | class _STBundleLoadedTestClass1 : NSObject 2 | { 3 | var server. 4 | -testMethod { 5 | 42. 6 | } 7 | 8 | }. 9 | -------------------------------------------------------------------------------- /testfile.txt: -------------------------------------------------------------------------------- 1 | this is a test file -------------------------------------------------------------------------------- /varname.txt: -------------------------------------------------------------------------------- 1 | a --------------------------------------------------------------------------------