D
Deno

help

ML with FFI

NNeTT10/13/2022
Suppose you wish to do some machine learning stuff with Deno, would it be optimal to use FFI with C over Rust? That may be a strange thing to ask but I was just curious as someone who knows less C than Rust. Haven't tried FFI with C so wanted to know if it was worth it.
Ddjdev10/13/2022
yep, definitely there's https://github.com/denosaurs/netsaur which has a C backend although much WIP atm but for simple models its performance is on par with tensorflow and even better
NNeTT10/13/2022
Guess I gotta learn some C then
Ddjdev10/13/2022
don't really need to, Rust can be used as well
NNeTT10/13/2022
I specifically had that doubt because Netsaur seemed cool and my rust FFI was like 1.7x slower than JS code itself Tho it's mostly just me and my bad code
Ddjdev10/13/2022
yea language shouldn't matter here, there must be something with the code
NNeTT10/13/2022
Certainly I guess I'll go try to improve my rust code then Thanks btw
Ddjdev10/13/2022
np, and btw make sure your ffi calls go through fast api otherwise they'll be just slow

Looking for more? Join the community!

Recommended Posts
Is there a way to determine what modules have been dynamically imported at runtime?The builtin tools to compile/bundle/vendor don't account for dynamic imports (understandably), but iweird interfacehow can a class implement this interface ```ts interface I { (): void type: string }``` or a `cnpm specifier import typesso when I do something like ```ts import * as rx from 'npm:rxjs' console.log(rx) ``` I do have the error Unsupported scheme node for module `nodemodule`. Supported schemesI'm trying to import a module using: ```js import { example } from "npm:example"; ``` Inside `examplesbuild_deno_loader importing Deno modulesA dependancy I use imports modules like "fs" and I want esbuild_deno_loader to treat them as externaIs there a good dataframe library for deno?I use the nodejs bindings for pola.rs for now but I'd like to move from nodejs to deno. This is my ltype a whole directory to make sure each file in the directory exports a default module of a type.Can you type a whole directory to make sure that every file in the directory is exporting a default help mehow do i get the contents of the html, i tried this, but its not loggingextract generic type of generic classhow to get typeof generic type in generic class ```ts class GenericClass<T> {} ``` i want to extractGithub Repository File Tree Generator based on Deno?Is there some project file tree generator written in TS / Deno?How to import the Image class to Deno Fresh?I'm trying to access an image's `naturalHeight` and `naturalWidth`. But when I construct the objectsub sub domain on deno.devIs it possible to create a sub sub domain with deno.dev, example, invite.my-bot.deno.dev, support.myhow to cli run node modules without --compatSo `deno run --compat` has now been removed in favor of `npm:` specifiers https://deno.com/blog/v1.2Intellisense on an import not working, works for friendI cannot for the life of me get `import * as bsdeno from "https://raw.githubusercontent.com/KivalEvaHow to create a broadcast system with streams and oak?i'm trying to create a simple "web-radio" to learn more about streams with deno and oak. i'm stuck oDeno.serveTls with self signed certificatei try to create a webserver but i cannot use self signed certificates, how can i solve this ? ```jReadableStream to JSONi cant seem to get a JSON out of the request.body i attached pictures for the front end JS request cdistinguis `netERR_CONNECTION_TIMED_OUT` from `netERR_CERT_AUTHORITY_INVALID`i get `net::ERR_CERT_AUTHORITY_INVALID` because i use self signed certs on the domain `localhost` nCommand doesn't work in deno task but works outside of deno taskThe command in question: ```(find . -name '*.js'; find . -name '*.as') | grep -v bundle | xargs wc -How do I patch a std api?Hello. This person posted in this command that they "patched" the `vm.isContext` function to return