Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

I am running decker on bash in linux with ./c/build/decker, How do I print to stdout from that process?

I have tried

shell["/usr/bin/env bash -c \"echo asdas\""]
shell["echo asdas"]
shell["echo asdas > /dev/fd/1"]

which simply returns 0 and do nothing. I am not sure how it works.

print["adasda"] just prints inside the decker interface.

i’d also like to know how to receive from stdin, if that will be possible.

(1 edit) (+1)

Decker does not have the ability to execute shell commands or otherwise interact with the host system without explicit user permission; "shell[]" and similar functions are part of Lilt, which has a similar but distinct set of APIs from Decker itself.

As it happens, there is a way to print to stdout from Decker in the latest source revisions- the "app.print[]" and "app.show[]" functions. Note that this feature is not part of Decker v1.31, the current release at time of writing.

There is  presently no mechanism for polling from stdin. The closest analogy might be to use the alert[] function:

alert["please input a string:" "string"]

hmm, guess i’ll have to mod C decker to do what I want then. Thanks for the info.