What is the output?
Anonymous Quiz
18%
["ID0", "ID1", "ID2"]
26%
["1", "2", "3"]
49%
["ID1", "ID2", "ID3"]
7%
["ID1", "ID2", "ID2"]
π8π€6π₯4β€1
SPONSORED BY Lantern Cloud π―ββοΈ
Vector database on top of Postgres for AI
π» What we got wrong about HTTP imports
Ryan Dahl
Vector database on top of Postgres for AI
Ryan Dahl
Please open Telegram to view this post
VIEW IN TELEGRAM
β€3π3π₯1
SPONSORED BY Lantern Cloud π―ββοΈ
Vector database on top of Postgres for AI
β CHALLENGE
Vector database on top of Postgres for AI
function* fibGenerator() {
let a = 0, b = 1;
while (true) {
let next = a + b;
a = b;
b = next;
yield next;
}
}
const gen = fibGenerator();
const fibArray = Array.from({ length: 5 }, () => gen.next().value);
console.log(fibArray);
Please open Telegram to view this post
VIEW IN TELEGRAM
β€4π€©1
What is the output?
Anonymous Quiz
11%
Error
32%
[0, 1, 1, 2, 3]
27%
[1, 1, 2, 3, 5]
30%
[1, 2, 3, 5, 8]
π₯7π6
SPONSORED BY Lantern Cloud π―ββοΈ
Vector database on top of Postgres for AI
π€ JS-PyTorch: A PyTorch-Like Library for JavaScript
Recently renamed from JS-Torch, this brings some of the magic from Pythonβs popular PyTorch library to JavaScript for training and testing neural networks in particular. We linked to it earlier this year, but it has added GPU support thanks to GPU.js.
Eduardo Leao
Vector database on top of Postgres for AI
Recently renamed from JS-Torch, this brings some of the magic from Pythonβs popular PyTorch library to JavaScript for training and testing neural networks in particular. We linked to it earlier this year, but it has added GPU support thanks to GPU.js.
Eduardo Leao
Please open Telegram to view this post
VIEW IN TELEGRAM
β€6π3π₯2
CHALLENGE
function* alternatingGenerator() {
yield 1;
yield 2;
yield 3;
}
const gen = alternatingGenerator();
const result = [gen.next().value, gen.next().value, gen.next().value].reduce((acc, curr) => acc + curr, 0);
console.log(result);
π1
π7β€6π₯4π€©2
Or, as they put it: βElectrify Node.js with the power of Rust.β Neon makes it relatively easy to write code in the popular, high speed systems language and run it from Node, much like any other native extension.
Neon Contributors
Please open Telegram to view this post
VIEW IN TELEGRAM
π7π₯4β€2
CHALLENGE
function* reverseGenerator(arr) {
for (let i = arr.length - 1; i >= 0; i--) {
yield arr[i];
}
}
const result = [...reverseGenerator([1, 2, 3, 4, 5])].join('');
console.log(result);
π3π€1
π16β€5π₯4
A fantastic community maintained resource that presents a category-based way to find packages and libraries. For example, you can check out HTTP frameworks, browser testing, query builders, and more. You can compare libraries in various ways, see their download count, or edit/submit listings yourself.
Maxim Orlov
Please open Telegram to view this post
VIEW IN TELEGRAM
β€6π₯3π2
CHALLENGE
const weakMap = new WeakMap();
const obj1 = {};
const obj2 = {};
weakMap.set(obj1, 'value1');
weakMap.set(obj2, 'value2');
const arr = [obj1, obj2];
const result = arr.map(obj => weakMap.get(obj)).join(', ');
console.log(result);
π3β€1
What is the output?
Anonymous Quiz
12%
Error
17%
"value1, undefined"
20%
"undefined, undefined"
50%
"value1, value2"
π14β€8π₯7
CHALLENGE
function* idGenerator() {
let id = 1;
while (true) {
yield id++;
}
}
const gen = idGenerator();
const weakMap = new WeakMap();
const objs = [{}, {}, {}];
objs.forEach(obj => weakMap.set(obj, gen.next().value));
const result = objs.map(obj => weakMap.get(obj)).filter(id => id % 2 === 0);
console.log(result);
π5β€4π₯2
π3π₯1
A simple abstraction for Node.js worker_threads, allowing you to create and share a Map (hash table) between worker threads and the main process.
Please open Telegram to view this post
VIEW IN TELEGRAM
β€6π4π₯2
CHALLENGE
const weakMap = new WeakMap();
const obj = {};
(function() {
const obj1 = { name: 'inner' };
weakMap.set(obj1, 'inner value');
})();
const result = weakMap.get(obj);
console.log(result);
π8
π14β€4π€4π₯1
If you missed the Google I/O Angular session, you missed not only the latest updates on Angular but also the Generative Art Gallery demo which I had so much fun building. The demo has all of my favorite technologies, including AI, Angular and WebXR. It also was a very pleasant developer experience. Let me tell you why!
AyΕegΓΌl YΓΆnet
Please open Telegram to view this post
VIEW IN TELEGRAM
β€5π3π₯2
CHALLENGE
const weakMap = new WeakMap();
const obj = {};
const gen = (function* () {
yield 'value1';
yield 'value2';
})();
weakMap.set(obj, gen.next().value);
console.log(weakMap.get(obj));
console.log(gen.next().value);
π4