JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Nov 28 02:34
welp
Nov 28 02:34
|| google apple.com
Nov 28 02:34
:(
Nov 28 02:33
|| mdn array sort
Oct 4 18:06
@RyanM good idea, i'll accept a PR from VLAZ or anyone else just don't have time to do it. But should be pretty simple.
Sep 26 17:03
especially since it's super read heavy
Sep 26 17:01
i started using sqlite to back web apps, which isn't really proper, but given that i know these apps aren't going to need to scale, i kinda feel its simplicity is worth it
Aug 17 07:17
@matt just create a dockerfile for James so i can deploy him that way
Aug 15 17:53
me being too lazy to test things locally
Aug 15 17:53
Aug 15 17:51
bonus points to anyone here who wants to dockerize him, so i don't have to deal with it again
Aug 15 17:51
alright looks like he's back
Aug 15 17:51
|| status
Aug 15 17:49
||> console.log("Woo hoo")
Aug 15 17:49
|| status
Aug 14 22:05
something like that
Aug 14 22:05
then go to the SO directory and run it
Aug 14 22:05
@matt yarn && yarn build
Aug 12 02:45
James is dead until someone figures out how to fix it :(
Aug 12 02:44
so for example plugins/build now was bot, platforms, and plugins folders instead of just putting the plugins files directly in the build folder
Aug 12 02:44
for some reason typescript used to produce files directly in thebuild directly, now it's creating directories for each package in the build directory
Aug 12 02:43
i cant figure it out
Aug 12 02:22
now there is an issue with typescript
Aug 12 02:22
@ParkingMaster fixed this
Aug 11 22:04
cc @KevinB
Aug 11 22:04
maybe node-fetch isn't comptible with new versions
Aug 11 22:03
@chatbot/so: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './node-fetch' is not defined by "exports" in /../Node/JamesSOBot/node_modules/fetch-cookie/package.json
@chatbot/so:     at exportsNotFound (node:internal/modules/esm/resolve:299:10)
@chatbot/so:     at packageExportsResolve (node:internal/modules/esm/resolve:646:9)
@chatbot/so:     at resolveExports (node:internal/modules/cjs/loader:628:36)
@chatbot/so:     at Module._findPath (node:internal/modules/cjs/loader:718:31)
@chatbot/so:     at Module._resolveFilename (node:internal/modules/cjs/loader:1205:27)
Aug 11 22:03
okay there seems to be an issue with node-fetch
Aug 11 21:47
i'm spending max an hour to fix this otherwise, he's gone for good
Aug 11 21:47
yeah i updated node
Aug 11 21:24
i broke james
Aug 11 21:24
uh oh
Jul 28 02:58
(like the command line provides an interface, but it should be doing exactly what i am manually)
Jul 28 02:58
yes, but i want to do it manually
Jul 28 02:57
it's just ffmpeg
Jul 28 02:55
like using the c library
Jul 28 02:55
it uses ffmpeg via ffi
Jul 28 02:54
(if you're wondering, using the scaler to actually do resizing breaks it further, i just used a different library)
Jul 28 02:53
fn generate_thumbnail(entry: &DirEntry, width: u32, height: u32) -> Result<RgbImage, VideoError> {
        ffmpeg_next::init().unwrap();
        let mut context = ffmpeg_next::format::input(&entry.path())?;
        let stream = context.streams().best(ffmpeg_next::media::Type::Video).ok_or(VideoError::FfmpegError(ffmpeg_next::Error::StreamNotFound))?;
        let codec = Context::from_parameters(stream.parameters())?;
        let mut decoder = codec.decoder().video()?;

        let mut decoded = VideoFrame::empty();
Jul 28 02:53
this is the half broken video conversion piece
Jul 28 02:53
Next.js/React
Jul 28 02:53
it's in rust tho
Jul 28 02:52
@matt i might eventually
Jul 28 02:52
|| status
Jul 27 20:51
but it's not a huge deal because i use this mainly for photos
Jul 27 20:51
i seem to have one major bug on the backend, ffmpeg isn't generating (some) video thumbnails properly
Jul 27 20:50
frontend done
Jul 27 20:50
woohoo
Jul 26 22:05
damn this thing actually works, might be able to deploy it
Jul 26 15:25
i fucking hate front end