lucsoft
lucsoft
DDeno
Created by Daimonm4a on 4/4/2024 in #help
I can't download fetch
sorry can't help you ethically here.
29 replies
DDeno
Created by Daimonm4a on 4/4/2024 in #help
I can't download fetch
29 replies
DDeno
Created by Daimonm4a on 4/4/2024 in #help
I can't download fetch
are you rocking discord without protection? Why don't use use a discord wrapper, does everything for you
29 replies
DDeno
Created by Daimonm4a on 4/4/2024 in #help
I can't download fetch
post it here
29 replies
DDeno
Created by Daimonm4a on 4/4/2024 in #help
I can't download fetch
i heard UDP+QUIC is the new kid in town
29 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
ahh okay i see
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
No description
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
oh so maybe you want to look into deno tasks?
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
typo*
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
yes, but btw if you subprocess is deno again maybe look into workers
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
but because its not pipe though "javascript" you itself can't read it
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
so if you process prints out Hello World deno would print our Hello World
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
inherit means it uses the same stdout as deno
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
the deno std also has stream helpers like a csv stream parser or json stream parser when you are parsing multiple lines
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
you can get the stream of stdout (which itself is a stream) and pipe and modify it. we get raw binary as stream but we want that a string stream so we can print it out or do other stuff with it
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
const process = new Deno.Command("top", { stdout: "piped" }).spawn();

async function reader() {
const stream = process.stdout
.pipeThrough(new TextDecoderStream())
for await (const message of stream) {
console.log(message);
}
}

reader(); // not calling await so its "non blocking"
const process = new Deno.Command("top", { stdout: "piped" }).spawn();

async function reader() {
const stream = process.stdout
.pipeThrough(new TextDecoderStream())
for await (const message of stream) {
console.log(message);
}
}

reader(); // not calling await so its "non blocking"
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
yes you can use WHATWG Stream for that
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
if you don't need spawn() then its simpler:
new Deno.Command("uptime")
.output()
.then((x) => new Response(x.stdout).text())
.then(console.log);
new Deno.Command("uptime")
.output()
.then((x) => new Response(x.stdout).text())
.then(console.log);
as with that the stdout is piped by default
27 replies
DDeno
Created by Kay on 4/4/2024 in #help
Log output from Deno.ChildProcess while its running
if you have more questions please let me know
27 replies