News for hackers. Stuff that matters.

kasbah

Re:Tiny Little Office on Thursday October 15, 2026 @09:41AM (#50103594)
There is an issue with clipping off the context menu:

https://postimg.cc/0r4jrF59

Re:Actual Size Online Ruler (Mm,Cm,Inches) on Wednesday July 30, 2025 @04:04AM (#44731876)
Is it not possible to use `window.devicePixelRatio` instead of calibration?

https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...

Re:Type safe web stack with Rust and TypeScript on Friday July 04, 2025 @11:32AM (#44465402)
It's pretty straight forward to include the output of `wasm-pack` into a vite project. The output is a node module in a folder with the wasm files and a single "main" JS file.

Because I wanted to load WASM in a web worker for my project [1] I needed to use vite-plugin-wasm and `wasm-pack build --target web` but without that constraint you should be able to import the main JS file from the wasm-pack output directory using wasm-pack's default `bundler` target and no vite plugins.

[1]: https://github.com/kasbah/calm-go-pattern-search

Re:Game Programming in Prolog on Friday October 11, 2024 @10:40AM (#41809884)
Interesting, thanks. I am especially interested in the idea of introducing player-defined concepts.

Would you be able to recommend a Datalog implementation that allows independant n-ary relations. Ideally one I can use from Python or Javascript in a sort of sandboxed way, as I am doing with Datascript, but if you have any recommendation at all it would be helpful to me.

Re:Game Programming in Prolog on Friday October 11, 2024 @06:44AM (#41808274)
To me the interesting thing is the logic programming "rules" and their overlap with game rules. Inspired by work at Stanford on the logic programming based Game Description Language [1] I implemented Tic Tac Toe in Datascript yesterday: https://github.com/kasbah/datascript-games/blob/e06a37025bf9...

I am still not clear whether there isn't a more succinct rule definition than what I have there. In the Stanford paper you have rules like:

   (<= (column ?n ?x)
     (true (cell 1 ?n ?x))
     (true (cell 2 ?n ?x))
     (true (cell 3 ?n ?x)))
But in Datascript I have to do much more rigmarole around shuffling the data around:

  [(column ?n ?x) 
    [?current "ident" "current"] 
    [?coord0 "type" "coord"] 
    [?coord1 "type" "coord"] 
    [?coord2 "type" "coord"]
    [?coord0 "m" 0] 
    [?coord1 "m" 1] 
    [?coord2 "m" 2] 
    [?coord0 "n" ?n] 
    [?coord1 "n" ?n] 
    [?coord2 "n" ?n] 
    [?coord0 "name" ?key0] [?current ?key0 ?x]
    [?coord1 "name" ?key1] [?current ?key1 ?x]
    [?coord2 "name" ?key2] [?current ?key2 ?x]]
I don't know if this is down to Datascript/Datomic Datalog limitations or more the limitations of my understanding.

How do you approach your experiments? If you have any of your work to share or some tips on what I am doing I'd be very interested.

[1]: https://www.cs.uic.edu/~hinrichs/papers/love2006general.pdf

Re:LoaderShip – CSS-Only Loaders on Friday January 19, 2024 @05:36AM (#39053873)
"Reticulating splines"
Re:Show HN: Hacker News for AI News on Wednesday August 30, 2023 @09:22AM (#37321748)
Use Lobste.rs with a filter: https://lobste.rs/filters
Shameless plug: the Kitspace page helps you build one yourself.

https://kitspace.org/boards/github.com/ottercast/ottercastau...

I was going to post this! I really enjoyed this episode (and also, all the other episodes of your podcast).
Re:Xiaomi’s humanoid drummer beats expectations? on Thursday December 08, 2022 @03:59PM (#33913317)
I find this DIY yellow drum machine robot from 14 years ago much more impressive.

https://www.youtube.com/watch?v=_RyodnisVvU

Re:Jqjq: Jq Implementation of Jq on Friday November 25, 2022 @10:13AM (#33743063)
In all seriousness Python's json.tool is a great option here.

    cat big.json | python3 -m json.tool
or

    python3 -m json.tool big.json
It has since at least 1991 when Graphviz was first released.

https://en.wikipedia.org/wiki/Graphviz

Re:Asdf – the language tool version manager on Tuesday October 25, 2022 @06:34AM (#33328670)
When I invoke `docker compose up` on my project with Docker version 20.10.18 it says:

    The new 'docker compose' command is currently experimental.
Re:LXC and LXD: a different container story on Friday September 23, 2022 @01:28PM (#32954754)
What do you mean by Watchguard? I did a search but didn't find anything. Did you mean Watchtower maybe?

https://github.com/containrrr/watchtower

Re:GHC 9.4.1 is now available on Friday August 12, 2022 @01:12PM (#32441361)
Not yet but I'm going to try and crib from https://github.com/ocharles/dot-files/blob/master/nvim/init.... when I have some time to waste.
Why does that matter? It seems you can run Lyra on the client and you can run other JS search engines on the "edge" (all that's needed is a JS runtime if I understand it correctly). It would be interesting to see how Lyra compares in these benchmarks.
Re:Show HN: Pipes puzzle (a.k.a. Net) on a hexagonal grid on Tuesday July 26, 2022 @10:42AM (#32238950)
You might enjoy an existing app called Infinity Loop. It's a similar puzzle game using the traditional square puzzle-piece shape.
Re:Show HN: GitHop on Friday July 15, 2022 @06:57AM (#32106843)
Seems to have been added: https://github.com/madprops/githop
Re:Open Gamma Detector on Tuesday July 05, 2022 @12:14PM (#31990111)
PCB manufacturers accept a format called "Gerber" files. They are basically drawings of all the layers of the PCB. You can download the Gerber files from the Kitspace page and send/upload them to a manufacturer of choice or even use one of the links to auto-upload them for you to Aisler, OSHPark, PCBWay or JLCPB.

Since the PCB is the board only, component information is actually not required to manufacture it. If you want a functioning device however you do have to source the components (e.g. from Digikey) and solder them to the PCB. I would recommend starting with an easier circuit (the electron-detector above might be a good candidate!) and ideally find someone to teach and help you (maybe at a local hackerspace? youtube tutorials might get you there if not?)

There's also this popular comic for teaching soldering to beginners that might help: https://mightyohm.com/blog/2011/04/soldering-is-easy-comic-b.... More links like this can be found on our list: https://github.com/kitspace/awesome-electronics/

The other option is to have a manufacturer solder it for you (e.g. Aisler and JLCPCB will do this for you), but if you have no experience building and debugging electronics I wouldn't recommend it (since it can get expensive and you can easily end up with a non-functioning device).

Re:Open Gamma Detector on Tuesday July 05, 2022 @09:17AM (#31987849)
Nice to hear. I'm the creator of Kitspace.org and I've spent a lot of time making the 1-click ordering work. It's an open source platform by the way: https://github.com/kitspace

I'm far from an expert on this subject and am not sure if it fits the definition of "scintillation", but here's another particle detector that uses photodiodes:

- electron-detector: https://kitspace.org/boards/github.com/ozel/diy_particle_det...

- alpha-spectrometer: https://kitspace.org/boards/github.com/ozel/diy_particle_det...

Older »