obb

Péter Szalai 2022-05-19T07:05:15.414449Z

hey, I'm trying to write script and run it in vscode. is there any way to make autocompletion happen. I'm a clojure/JXA beginner, so e.g showing possible methods on js/Applications would help me a lot. or know what function are available from ObjC thanks for all the work

borkdude 2022-05-19T07:36:32.105239Z

@szalaipeti.vagyok Maybe this helps a bit? https://github.com/babashka/obb#explore-app-specific-apis

Péter Szalai 2022-05-19T07:41:30.853639Z

yes I've seen that. I don't expect the app specific autocompletion. What I would like is just the js functions. e.g if I type js/the it shows me js/Application as a possible variable. is that possible?

borkdude 2022-05-19T07:43:25.124929Z

Perhaps try:

$ obb -e '(js/Object.getOwnPropertyNames js/Application)'
#js ["length" "name" "prototype" "currentApplication"]

borkdude 2022-05-19T07:43:51.771549Z

This also works:

$ obb -e '(js/Object.getOwnPropertyNames js)'
#js ["NaN" "undefined" "Infinity" "$APP" "shadow$provide" "isNaN" "isFinite" "escape" "unescape" "decodeURI" "decodeURIComponent" "encodeURI" "encodeURIComponent" "eval" "globalThis" "parseInt" "parseFloat" "ArrayBuffer" "EvalError" "RangeError" "ReferenceError" "SyntaxError" "TypeError" "URIError" "AggregateError" "Proxy" "Reflect" "JSON" "Math" "console" "Int8Array" "Int16Array" "Int32Array" "Uint8Array" "Uint8ClampedArray" "Uint16Array" "Uint32Array" "Float32Array" "Float64Array" "BigInt64Array" "BigUint64Array" "DataView" "Date" "Error" "Boolean" "Map" "Number" "Set" "Symbol" "WeakMap" "WeakSet" "Object" "Function" "Array" "RegExp" "String" "Promise" "BigInt" "WeakRef" "FinalizationRegistry" "Intl" "__private__" "delay" "Automation" "Progress" "ObjC" "Path" "Library" "Ref" "$" "Application" "ObjectSpecifier" "obb_lib_dir" "run" "obb_brew"]

borkdude 2022-05-19T07:44:13.554369Z

But I understand it's not really optimal. What we need is an nREPL implementation which offers auto-completions

borkdude 2022-05-19T07:44:25.704389Z

This is possible, but it needs some work, porting it over from other projects

Péter Szalai 2022-05-19T07:46:10.243559Z

ahh this already helps a lot thank you.