tripleo, to random
@tripleo@fosstodon.org avatar

All you nutcases still using , what's actually wrong with it?

aka What are the sharp edges?

mjgardner,
@mjgardner@social.sdf.org avatar

@tripleo I would also be remiss not to mention 's included perltrap manual page, which notes both the strict and warnings pragmas and also has nice lists of things for those coming from other languages and tools like , #C and , , , and .

https://perldoc.perl.org/perltrap

joe, to ai

LLaVA (Large Language-and-Vision Assistant) was updated to version 1.6 in February. I figured it was time to look at how to use it to describe an image in Node.js. LLaVA 1.6 is an advanced vision-language model created for multi-modal tasks, seamlessly integrating visual and textual data. Last month, we looked at how to use the official Ollama JavaScript Library. We are going to use the same library, today.

Basic CLI Example

Let’s start with a CLI app. For this example, I am using my remote Ollama server but if you don’t have one of those, you will want to install Ollama locally and replace const ollama = new Ollama({ host: 'http://100.74.30.25:11434' }); with const ollama = new Ollama({ host: 'http://localhost:11434' });.

To run it, first run npm i ollama and make sure that you have "type": "module" in your package.json. You can run it from the terminal by running node app.js <image filename>. Let’s take a look at the result.

Its ability to describe an image is pretty awesome.

Basic Web Service

So, what if we wanted to run it as a web service? Running Ollama locally is cool and all but it’s cooler if we can integrate it into an app. If you npm install express to install Express, you can run this as a web service.

The web service takes posts to http://localhost:4040/describe-image with a binary body that contains the image that you are trying to get a description of. It then returns a JSON object containing the description.

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-18-at-1.41.20%E2%80%AFPM.png?resize=1024%2C729&ssl=1

Have any questions, comments, etc? Feel free to drop a comment, below.

https://jws.news/2024/how-can-you-use-llava-and-node-js-to-describe-an-image/

#AI #JavaScript #LLaVA #LLM #NodeJs #Ollama

nshki, to webdev
@nshki@ruby.social avatar

Hi fediverse. My name is Nishiki and I’m a web dev with 15+ years of experience. I’m making myself available as a mentor for one or two motivated individuals looking to land their first junior engineering position. I’m happy to be able to say over the past few years, I’ve mentored 4 wonderful people who have all managed to land their first tech jobs.

Please email me at hello@nshki.com if interested. A boost for reach is much appreciated!

janl, to random
@janl@narrativ.es avatar

Funny, in it is unnerving to use a library version that has not had a release in four days. https://social.vivaldi.net/@Patricia/112447339260051370

ovid, to Lisp
@ovid@fosstodon.org avatar

, , and are three powerful programming languages that share a common feature.

Nobody knows how the hell to capitalize them.

ovid,
@ovid@fosstodon.org avatar

@tripleo I always have to look up the capitalization of Smalltalk because I get it wrong every time.

Hmm ... should be in that list.

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar

ECMAScript 2025 feature: duplicate named capturing groups for regular expressions
@rauschma
https://2ality.com/2024/05/proposal-duplicate-named-capturing-groups.html

zalasur, to javascript
@zalasur@mastodon.surazal.net avatar

It's been almost a decade since I've done a live coding stream. This will be fun!

Today I'll be migrating my website from React to Lit, which is a lightweight framework built around web components. I have the scaffolding set up mostly, so now it's time to get this done.

Come watch. Ask questions in chat! You don't need to create an account, just a username is needed to participate.

https://video.surazal.net/w/5S7FPXJMZh1i1eqZLY9mcV

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
joelanman, to javascript
@joelanman@hachyderm.io avatar

trying to implement a form submission progress bar in js, but XHR follows the success redirect without telling me (I want to access it and redirect the browser).

Fetch can opt out of that but doesn't have a progress api!

I think I found a workaround for XHR:

xhr.onreadystatechange = function() {

 if (this.readyState === this.DONE) {  
 window.location.href = this.responseURL  
 this.abort()  
 }

}  

kubikpixel, to mastodon
@kubikpixel@chaos.social avatar

The @thunderbird website of @mozilla now has a share button, but for me a button to links from the is the right & free setup for 's.

🔌 Share buttons for the Fediverse
https://github.com/Uden-AI/fediverse-share
:mastodon: https://mastodon.online/@thunderbird/111887224549621258

craigabbott, to javascript
@craigabbott@a11y.info avatar

I was today years old and 4 hours down when I learned you cannot deep clone an instance of a class 😩

MaxArt2501, to javascript
@MaxArt2501@mastodon.social avatar

A response to @cferdinandi 's recent post(s) on JavaScript and Web Components:
https://dev.to/maxart2501/javascript-is-not-the-problem-k4e

I know he didn't explain his position in details, so a 1800-word article sounds a little unfair, but I think dry and sharp statements need adequate context and analysis.

chipx86, to Discord
@chipx86@mastodon.online avatar

Hey, developers: The @reviewboard team's starting a new for devs to hang out, chat, and share what you're building.

https://discord.gg/saMCqHEZ

We have channels for , , / , , , and more.

You don't need to use or contribute to Review Board to hang out. (But you can follow development there, if you want.)

We hope to see people come in and hang out. The aim is a friendly, diverse community of devs.

Feel free to pass along the invite!

stvfrnzl, to Blog
@stvfrnzl@mastodon.online avatar

Five years ago was my graduation from on this very day.

I looked back and wrote a GIANT post: https://stevefrenzel.dev/posts/from-boot-camp-to-blog-five-years-in-the-tech-industry/

Sit back, relax and enjoy the ride.

a11yclub, to CSS
@a11yclub@mastodon.social avatar

Just in: Alongside @karlgroves and @erikKroes, @5t3ph will also be offering a workshop in Amsterdam on 9 June:

Beyond #CSS: #JavaScript Requirements for Accessible Components

Participation in half-day workshops costs from € 25, full-day workshops from € 50. Further workshops can be added at any time. Get your tickets: https://ti.to/tollwerk/accessibility-club-summit-2024

More info: https://accessibility.club/event/accessibility-club-summit-2024#schedule-2024-06-09

decompwlj, to mathematics
@decompwlj@mathstodon.xyz avatar
SocketSecurity, to programming
@SocketSecurity@fosstodon.org avatar

LDAPjs, an LDAP client and server API for Node.js, was decommissioned after its maintainer received an abusive email from a user, raising concerns about this form of abuse as a potential attack vector. #nodejs #JavaScript #opensource https://socket.dev/blog/ldapjs-open-source-project-decommissioned-after-maintainer-receives-abusive-email

YurkshireLad, to javascript
@YurkshireLad@mastodon.social avatar

These questions/answers make me glad I'm not working with anymore!

"lydiahallie/javascript-questions: A long list of (advanced) JavaScript questions, and their explanations"

https://github.com/lydiahallie/javascript-questions

davidbisset, to javascript
@davidbisset@phpc.social avatar

A long list of (advanced) #JavaScript questions, and their explanation (created in 2019). #Programming

https://github.com/lydiahallie/javascript-questions

masukomi, to javascript
@masukomi@connectified.com avatar

#JavaScript Geeks:

🤔 I really want to figure out how to make #FediThready be able to post to a Mastodon server WITHOUT requiring a back-end.

I'm pretty sure it's possible to do OAuth and store the token locally without one, but i would love it if someone could point me to an example of this rather than figuring it out from first principles.

domhabersack, to javascript
@domhabersack@mastodon.social avatar

You can turn off the “x packages are looking for funding” messages that get logged with each npm install by setting

fund = false

in your project’s or user’s npmrc file.

https://domhabersack.com/blog/npm-fund-false

#javascript

leanpub, to Java
@leanpub@mastodon.social avatar

Modern Thymeleaf Bundle https://leanpub.com/b/modern-thymeleaf-bundle by Wim Deblauwe is the featured bundle on the Leanpub homepage! https://leanpub.com wimdeblauwe@mastodon.social

tommi, (edited ) to 11ty
@tommi@pan.rent avatar

Hey tinkerers!

I have a git submodule that I am adding inside the repository of my website, but I want it to be ignored, except for its README.md.

I have tried two different approaches. In both cases I am able to exclude the git submodule, but I can’t find a way to include the README and use it as a regular template.

Option 1: using .eleventyignore

inputdir/submodule<br></br>!inputdir/submodule/README.md<br></br>

Option 2: using .eleventy.js

module.exports = function (eleventyConfig) {<br></br>  eleventyConfig.ignores.add('inputdir/submodule');<br></br>  eleventyConfig.ignores.add('inputdir/submodule/README.md'); // added it first to be sure<br></br>  eleventyConfig.ignores.delete('inputdir/submodule/README.md');<br></br>};<br></br>

Do you have any suggestions to fix this? The ignore section in Eleventy’s documentation is not helping much…

Thanks a lot!

cc: @eleventy @

(https://discord.com/channels/741017160297611315/1022195881698672650/threads/1233153676416254133 and on GitHub Discussions

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines