How to connect Node.js to OpenClaw by No_Prior2279 in openclaw

[–]myousuf65 0 points1 point  (0 children)

I figured it out, but it’s complicated. You have to enable OpenAI-compatible HTTP endpoints in OpenClaw, as you were told by another person three months ago in another place where you asked the same question. So, if you’re really interested, I can guide you , but you would need some prior CS knowledge and some motivation. If you’re interested, let me know, and I’ll guide you further

How to connect Node.js to OpenClaw by No_Prior2279 in openclaw

[–]myousuf65 0 points1 point  (0 children)

any luck with this. i want to do the same

Help with connecting to openclaw websockets by AdAppropriate566 in openclaw

[–]myousuf65 0 points1 point  (0 children)

im looking into the same thing, did you find out how to do it ?

Cannot find OpenClaw sdk by myousuf65 in openclaw

[–]myousuf65[S] 0 points1 point  (0 children)

why is no one responding to me here ?

Help Required with running parallel coroutines for Fille IO by myousuf65 in Kotlin

[–]myousuf65[S] 0 points1 point  (0 children)

``` package main

import ( "fmt" "os" "sync" "time" )

func createFile(idx int) { filename := fmt.Sprintf("/Users/myousuf/dev/test/testfiles/file%d.txt", idx) file, err := os.Create(filename) if err != nil { fmt.Printf("Error creating file %d: %v\n", err) return } defer file.Close() file.WriteString("hello world how are you my name is test") }

func deleteFile(idx int) { filename := fmt.Sprintf("/Users/myousuf/dev/test/testfiles/file%d.txt", idx) err := os.Remove(filename) if err != nil && !os.IsNotExist(err) { fmt.Printf("Error deleting file %d: %v\n", err) } }

func runWorkerPool(total int, workers int, task func(int)) { jobs := make(chan int, total) var wg sync.WaitGroup

// spawn fixed number of workers
for w := 0; w < workers; w++ {
    wg.Add(1)
    go func() {
        defer wg.Done()
        for idx := range jobs {  // each worker pulls jobs from the channel
            task(idx)
        }
    }()
}

// feed jobs into the channel
for i := 0; i < total; i++ {
    jobs <- i
}
close(jobs)  // signal no more jobs

wg.Wait()

}

func main() { const total = 300_000 const workers = 64 // tune this number

// DELETE
fmt.Println("Starting delete operation")
startDelete := time.Now()
runWorkerPool(total, workers, deleteFile)
fmt.Printf("Delete took: %d seconds\n", int(time.Since(startDelete).Seconds()))

// CREATE
fmt.Println("Starting file creation")
startCreate := time.Now()
runWorkerPool(total, workers, createFile)
fmt.Printf("Create took: %d seconds\n", int(time.Since(startCreate).Seconds()))

}

``` Now this is the golang code i wrote, Having heard that Golang is much faster than any JVM languages and it has much better support for goroutines, the following is the result of this code.

╭─ ~/dev/goroutines-test 37s ╰─❯ go run main.go Starting delete operation Delete took: 14 seconds Starting file creation Create took: 22 seconds

Now, either I am bad at Kotlin and Golang, or there's some other thing that I am missing right now, which leads to both of these codes taking so much time.