Better HN
topnewbestaskshowjobs
Log inSign up

geoffhill

406 karma · joined Apr 15, 2011 (15y ago) · 64 submissions

Bit flipper.
Submissions

comment 1y ago · link · parent

One of my agents is kinda like this too. The only operation is SPARQL query, and the only accessible state is the graph database.

Since most of the ontologies I'm using are public, I just have to namedrop them in prompt; no schemas and little structure introspection needed. At worst, it can just walk and dump triples to figure out structure; it's all RDF triples and URIs.

One nice property: using structured outputs, you can constrain outputs of certain queries to only generate valid RDF to avoid syntax errors. Probably can do similar stuff with GraphQL.

comment 1y ago · link · parent

Both Clang and GCC have musttail attributes than can force tail calls at specific return statements in C/C++.

3.

Magenta RealTime: An Open-Weights Live Music Model(magenta.withgoogle.com ↗)

2 points · by geoffhill · 1y ago · discuss

comment 1y ago · link · parent

Idk, `o3-mini-high` was able to pop this Prolog code out in about 20 seconds:

  solve(WaterDrinker, ZebraOwner) :-
      % H01: Five houses with positions 1..5.
      Houses = [ house(1, _, norwegian, _, _, _),  % H10: Norwegian lives in the first house.
                 house(2, blue, _, _, _, _),       % H15: Since the Norwegian lives next to the blue house,
                 house(3, _, _, milk, _, _),        %       and house1 is Norwegian, house2 must be blue.
                 house(4, _, _, _, _, _),
                 house(5, _, _, _, _, _) ],
  
      % H02: The Englishman lives in the red house.
      member(house(_, red, englishman, _, _, _), Houses),
      % H03: The Spaniard owns the dog.
      member(house(_, _, spaniard, _, dog, _), Houses),
      % H04: Coffee is drunk in the green house.
      member(house(_, green, _, coffee, _, _), Houses),
      % H05: The Ukrainian drinks tea.
      member(house(_, _, ukrainian, tea, _, _), Houses),
      % H06: The green house is immediately to the right of the ivory house.
      right_of(house(_, green, _, _, _, _), house(_, ivory, _, _, _, _), Houses),
      % H07: The Old Gold smoker owns snails.
      member(house(_, _, _, _, snails, old_gold), Houses),
      % H08: Kools are smoked in the yellow house.
      member(house(_, yellow, _, _, _, kools), Houses),
      % H11: The man who smokes Chesterfields lives in the house next to the man with the fox.
      next_to(house(_, _, _, _, _, chesterfields), house(_, _, _, _, fox, _), Houses),
      % H12: Kools are smoked in a house next to the house where the horse is kept.
      next_to(house(_, _, _, _, horse, _), house(_, _, _, _, _, kools), Houses),
      % H13: The Lucky Strike smoker drinks orange juice.
      member(house(_, _, _, orange_juice, _, lucky_strike), Houses),
      % H14: The Japanese smokes Parliaments.
      member(house(_, _, japanese, _, _, parliaments), Houses),
      % (H09 is built in: Milk is drunk in the middle house, i.e. house3.)
      
      % Finally, find out:
      % Q1: Who drinks water?
      member(house(_, _, WaterDrinker, water, _, _), Houses),
      % Q2: Who owns the zebra?
      member(house(_, _, ZebraOwner, _, zebra, _), Houses).
  
  right_of(Right, Left, Houses) :-
      nextto(Left, Right, Houses).
  
  next_to(X, Y, Houses) :-
      nextto(X, Y, Houses);
      nextto(Y, X, Houses).
Seems ok to me.

   ?- solve(WaterDrinker, ZebraOwner).
   WaterDrinker = norwegian,
   ZebraOwner = japanese .

comment 2y ago · link · parent

I found myself empathizing more with MrBeast and his kid audience than the grump who wrote this article.

comment 3y ago · link · parent

> When we use the $10B satellite that took 25 years to build, we must be secretive about why we point it at a certain part of the sky.

> Then we must gatekeep all data for up to a year, in order to better take personal credit for the findings.

> This will help accelerate scientific progress in the long run.

Statements dreamed up by the utterly deranged.

comment 4y ago · link · parent

You're gonna want that TrueCoat though...

comment 5y ago · link · parent

> not copying and pasting code

https://news.ycombinator.com/item?id=27710287

comment 5y ago · link · parent

For cheap esp32-based smartwatches and wristbands, I've had good success with LILYGO and the esp-idf toolchain.

$18 T-Wristband: https://www.aliexpress.com/item/4000527495064.html

$26 T-Watch-2020: https://www.aliexpress.com/item/4000971508364.html

esp-idf: https://github.com/espressif/esp-idf

comment 6y ago · link · parent

I use NewsBlur in Firefox and via the Android app, and I'm very happy with it.

comment 7y ago · link · parent

I like popcount for converting a 2^N-bit uniformly-distributed random number into a N-bit binomially-distributed one. Each bit of the input simulates a random coin flip.

comment 7y ago · link · parent

None of the other replies try to explain specifics of how this works, so let me illustrate an example of two teams collaborating to add Feature X to the monorepo without branching:

1) Team A checks in their code to provide Feature X. Their code is not used anywhere in the codebase yet, however full unit test coverage exists for the public API; this is required for code review.

2) Team B checks in their code to turn on Feature X in their product, gated under a command-line flag which by default uses the old behavior.

3) Team B checks in an integration test that flips the flag and makes sure everything works as planned.

4) If Team B requires changes to Feature X to get expected behavior, they communicate those changes to Team A and someone from either team (using available human resources) makes the changes.

5) Team B checks in a small change to flip the flag by default.

6) Team B monitors their product. If things go awry, only the very latest change is reverted and repeat (4).

7) Once stability is achieved, Team B checks in a change to remove the flag.

comment 13y ago · link · parent

Most notably missing from this page: how, where, and when can I get one?

comment 13y ago · link · parent

I like this idea a lot!

A less powerful solution implemented completely locally: A "known_hosts" file for SSL certificates for repeat visits. As long as you've visited a site once before, any subsequent visits will be safe.

To deal with certificate upgrades, certificate Y could present a signed verification that it obsoletes a past certificate X. Then, when a client that trusts certificate X receives certificate Y, it can update its "known_hosts" file accordingly. This change would require more than just local changes, but remote cooperation.

comment 13y ago · link · parent

Here's the actual commit that was reverted, for anyone curious like me: http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/com...

Doesn't exactly seem like a lot of work to support this.

16.

HAVEGE: An LGPL random number generator using CPU non-determinism(issihosts.com ↗)

2 points · by geoffhill · 13y ago · discuss

comment 13y ago · link · parent

Amazon Web Services does offer a worldwide CDN, CloudFront. http://aws.amazon.com/cloudfront/

18.

Joe Armstrong: Solving the wrong problem(joearms.github.com ↗)

237 points · by geoffhill · 13y ago · 168 comments

comment 13y ago · link · parent

Racket supports running multiple (sometimes incompatible) dialects of Scheme through the use of a #lang directive.

If you prefix your program with "#lang racket", you get the definitions for the full Racket language, with all of the extensions and libraries that Racket provides.

But if you want to preserve compatibility with the standard and with other implementations, you can prefix your program with "#lang r5rs". It derives from the same base language as Racket.

http://docs.racket-lang.org/r5rs/r5rs-mod.html

20.

Monadic music composition in Haskell(geoffhill.org ↗)

4 points · by geoffhill · 14y ago · discuss

comment 14y ago · link · parent

> Valve has granted these Intel Linux developers complete access to the game's source-code, including the Source Engine. This has allowed Intel's Linux developers to better investigate possible optimizations and tweaks to their driver in order to enhance Source-powered games. Valve has even given them commit access to push back changes to the game company.

That sure is something EA and Ubisoft wouldn't do in a million years.

comment 14y ago · link · parent

So speaking just in terms of the JRE, is there any reason to download it from Oracle instead of Apple? A separate Oracle updating program is a much less elegant solution than the current Software Updates integration that Apple uses.

comment 14y ago · link · parent

Just go into your About Me and enable "hidden from timeline" for the @facebook.com email address. Now everything is back to normal.

comment 14y ago · link · parent

This attitude is extremely anticompetitive. Big guys like Craigslist need to give away their customer base just because they're big? That doesn't make sense to me.

comment 14y ago · link · parent

> "It's hosted on SourceForge, just kidding that was weird and scary"

How the world has changed...

comment 14y ago · link · parent

More clutter.

comment 14y ago · link · parent

Probably a much better idea with the gift of hindsight. However, Objective-C is more than 28 years old, and Go is just 3 years old at time of writing. The Go language has changed and continues to change a lot, and tying such a large platform to it before it is ready would make backwards-compatibility a huge concern for Go, and stifle its innovative growth.
123