#plain-english output mode for phobos?

1 messages · Page 1 of 1 (latest)

balmy frigate
#

that sounds hilarious... but i have no clue how you'd do that :D

supple beacon
#

mostly you'd pick some reasonably clear phrases for everything

tropic mist
#

I'd appreciate JS-like output :p

supple beacon
#

i guess to do it well you'd ahve to be api aware so you can change yoru phrasing for things like on_event

balmy frigate
supple beacon
#

but like, local funciton foo() ... end -> there is a local function foo which takes no arguments. Its body does....

balmy frigate
#

hmmmm alright that's an interesting idea

#

it might be less ridiculous than it sounds at first depending on how modular you can make english sentences

supple beacon
#

it's an insane idea, but it woudl be very cool

#

but if you start with just describing syntax and then maybe plug in some api awareness later as needed

#

you coudl probably get something at least usable on simple examples

tropic mist
#

as long as it's parseable without ambiguity

balmy frigate
#

api awareness would probably be much easier with a type resolver/system already in place... but i'm curious in trying something simple first. just to see how hard it would really be

supple beacon
#

yeah it may be that just having types available for explanations may be enough actually 🤔

supple beacon
#

in much the same way we do for disassembly

#

and just by choosing words and phrasing carefully

balmy frigate
#

i'm imagining some of the crazy type descriptions for what the type system should/will be able to do. like
"at this point foo is either a number that is less than 10 or if bar is a string it is less than 20"
idk if it'll actually be that crazy, but it might

balmy frigate
#

something that's hard in english is conveying when a block ends. Something i actually have trouble with when using english in general because my brain is wired like a programming language at this point 😂
but to better explain what i mean

if foo > 100 then
  print("hello world")
  bar(foo)
end

how to say that at end the if block ends without repeating the whole condition. just saying "end of if block" would be too program language like

supple beacon
#

stupid answer: just indent a section?

balmy frigate
#

might be less stupid than you think :D

supple beacon
#

if foo is greater than 100, then:
print "hello world"
call bar with argument foo

#

i would still count that as "plain english mode" 🤷

#

you could even add bullet points if you want (or numbers?)

#

but i too am compilatron🧠

balmy frigate
#

yea that's actually not that bad. reminds me of python, a part about it that i don't like, but oh well. as long as it's readable as english i suppose you're right

tropic mist
#

maybe loop {} would be nice

balmy frigate
#

you mean using {} to indicate blocks? that's not english though, that's a programming language

tropic mist
#

just talking about phobos in general

#

rust has loop {} for while true {}