NeTT
NeTT
DDeno
Created by NeTT on 1/20/2024 in #help
If I use FFI with Deno Jupyter, will it not print the shared lib's stdout? (like Rust println!())
No description
6 replies
DDeno
Created by NeTT on 7/24/2023 in #help
Speed of generators
How fast are JS generators when used as iterators? To be clear, I see the for..of loop being very slow compared to a plain for or while loop when used on arrays. Is it because the for..of loop is inherently slow or because the iterator behind it is slow?
11 replies
DDeno
Created by NeTT on 7/15/2023 in #help
Custom console.log formatting for a class/object
Is there a way to change the way an object/class is printed in the console? For example, instead of
[1, 2, 3, 4]
[1, 2, 3, 4]
, I want the particular object to be printed as
[1, 2
3, 4]
[1, 2
3, 4]
8 replies
DDeno
Created by NeTT on 5/23/2023 in #help
Uint8Array or Float32Array
Is there any significant difference between using a Float32Array and using a Uint8Array from the same buffer for FFI?
4 replies
DDeno
Created by NeTT on 1/30/2023 in #help
How do I use std/log?
I'm trying to create a log file. I don't seem to be able to make it work tho.
import { handlers, Logger } from "https://deno.land/std@0.175.0/log/mod.ts";

const file_reg = new handlers.FileHandler("INFO", {
filename: "./reg_log",
formatter: "{levelName} {msg}",
});

file_reg.setup();
const logger = new Logger("registration", "INFO", {
handlers: [file_reg],
});
// Log file is created at this point

logger.info("aaa")
// This part is not written to the file
import { handlers, Logger } from "https://deno.land/std@0.175.0/log/mod.ts";

const file_reg = new handlers.FileHandler("INFO", {
filename: "./reg_log",
formatter: "{levelName} {msg}",
});

file_reg.setup();
const logger = new Logger("registration", "INFO", {
handlers: [file_reg],
});
// Log file is created at this point

logger.info("aaa")
// This part is not written to the file
1 replies
DDeno
Created by NeTT on 1/16/2023 in #help
What would be the best third party module implementing `deflate()`?
Currently using npm:pako but I'd like to avoid npm specifiers (modules in general).
1 replies
DDeno
Created by NeTT on 12/28/2022 in #help
What postgres module should I use?
I've been using /x/postgres for almost a year but I see that /x/postgresjs has been updated more recently (and I've seen some articles use it here and there). Does it have any advantage over /x/postgres?
2 replies
DDeno
Created by NeTT on 10/15/2022 in #help
Are pointers supported in Fast API return types?
If no, how do I return pointers?
55 replies
DDeno
Created by NeTT on 10/13/2022 in #help
ML with FFI
Suppose you wish to do some machine learning stuff with Deno, would it be optimal to use FFI with C over Rust?
14 replies