For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | more zck's commentsregister

I also made some number-based wordle-variants, which I call "numberdle". I found that it was hard to come up with good ways of guessing because wordle has the restriction that most combinations are invalid. You won't ever have to guess xwqqf, because that's not an English word. And more importantly, guessing some letters gives you information about the other letters. If you find out three letters, and have the target as _a_ts, you can use that to figure out the other two letters.

But if you need to guess a number, and you know it's _5_34, having three correct digits don't help you figure it out.

So I made some variants where guessed values do help you figure out the correct answer.

In rationerdle (https://zck.org/numberdle/?variant=rationerdle), you have to guess a rational number x/y, where both x and y are between 1 and 99, inclusive. It displays the rational number you actually guessed, and whether x and y separately are too high or too low.

In factordle (https://zck.org/numberdle/?variant=factordle), the player has to guess the factors of a target number.

In formuladle (https://zck.org/numberdle/?variant=formuladle), there is a graphed straight line, and the player has to guess the mx+b formula that graphs that line.

I would like to make more, but didn't have any other great ideas when I ran out of interest.


>...if you substitute fuel "burning" process with subsonic propagation used in every conventional engines with fuel "explosion" process with supersonic wavefront...

This fragment confused me, because it looks like there are three substitutions. There aren't; there's only one. Read it as:

If you substitute fuel burning (which has subsonic propagation, and is used in every conventional engine) with fuel explosion (which has a supersonic wavefront)...

The first and third "with" link a noun (the respective process) with a property (how fast it shoots gas out the back). The second "with" is the substitution.

English is hard! I'm a native speaker, and I had to take a look at a few webpages to understand just this part! And I'm still left with questions, like why subsonic is described as having "propagation", but supersonic is described as having a "wavefront". Is this a distinction with a difference? I don't know.


I must admit that I'm in fact not a native English speaker and my sentence construction is still jarring at times... sorry for that.

That distinction was not intentional, but IIUC, chemical reactions propagating faster than the speed of sound(of surrounding material, not necessarily of air(which idk how is it even defined, ductile limit or something(of air!?))) has effect of consolidating what would normally be multiple consecutive waves of density changes following one another, into a single shockwave with higher peak pressure, and higher peak pressure in an engine is generally thought to lead to higher exhaust gas velocities and better efficiencies so long that the engine holds. I think this is what some comments mentioning P-V diagrams and Carnot efficiency is meaning to say, except mine is in uneducated terms.


Writing a Forth myself, I find it somewhat frustrating that I have relatively different design restrictions than these guides. I don't need to be incredibly low-power, so I'm using C, not assembly. I'm not a great C coder, and I've never done assembly, so I find it hard (but not impossible) to learn from assembly. Also, because it's not assembly, I can't just JUMP to code the same way assembly can.

It's also frustrating trying to understand some of the lowest-level information. For example, a few systems have a very fundamental `w` variable -- but what is is used for? You can't search for it. Or just using registers and having to remember that %esi is the program counter (aka instruction pointer).

I keep wanting to make a series of diagrams to really understand Forth's program flow. It makes sense in concept, but when I go to program it, there are a lot of nuances I keep missing.


It took me a few tries(over a few years) to properly approach the task of writing a Forth, and when I approached it, I made my Forth in Lua, and all I really did was implement the wordlist in FORTH-83 as the spec indicated, and rewrite every time my model assumptions were off. No diving into assembly listings. Eventually I hit the metaprogramming words and those were where I grasped the ways in which the parser and evaluator overlap in a modal way - that aspect is the beating heart of a bootstrappable Forth system and once you have it, the rest is relatively trivial to build when starting from a high level environment.

The thing is, pretty much every modern high level language tends to feel a bit clumsy as a Forth because the emphasis of the execution model is different - under everything with an Algol-like runtime, there's a structured hierarchy of function calls with named parameters describing subprograms. Those are provisions of the compiler that automate a ton of bookkeeping and shape the direction of the code.

It's easier to see what's going on when starting from the metaphor of a line-number BASIC (as on most 8-bit micros) where program execution is still spatial in nature and there usually aren't function calls and sometimes not even structured loops, so GOTO and global temporaries are used heavily instead. That style of coding maps well to assembly, and the Forth interpreter adds just a bit of glue logic over it.

When I try to understand new systems, now, I will look for the SEE word and use that to tear things down word by word. But I still usually don't need to go down to the assembly(although some systems like GForth do print out an assembly listing if asked about their core wordset).


I understand implementing words as you think they should be. However, you need the core first, and that's where I'm working right now. I'm trying to get the central loop, dictionary, and threading model functional.

Which brings up another complication -- the threading model. There are multiple, of course. But sometimes I want to figure out, for example, what the `w` variable does. Is it different between indirect threading and subroutine threading? Maybe!


One place I've been bitten lately is storing timestamps in Postgres. Postgres lets you store time with a time zone -- but what that means is that upon receiving a timestamptz converts it to UTC and stores that instead.

Which is fine, in a way -- it won't store the wrong instant in time. But it also won't let you know the time the user sees. For example, you might want to tell someone when the store opens.

Fine, you say. You can look up the location of the store and use that to get the timezone. But what about a different case? What about if you want a user to test their blood sugar every day. Did they test their blood sugar on Tuesday? Well, then it depends what timezone they're in. What is the problem with having each user set their time zone? Isn't this just like the store issue?

No! Notably, unlike stores located in fixed buildings, people move around. They go on vacation. And if you don't know where they were when an event happened, you don't know what time the user was.

So it seems you have to, when you get a timestamp with time zone from a user, store the timestamptz, but also store the time zone in the database.

How frustrating, for a database that has a data type called "timestamp with time zone".


I think your problem is higher up the stack. Try running this SQL

create table tz_test ( comment varchar, ts timestamp, ts_tz timestamptz );

insert into tz_test (comment, ts, ts_tz) values ( 'in "local"', TIMESTAMP WITH TIME ZONE '2003-04-12 04:05:06 America/New_York', TIMESTAMP WITH TIME zone '2003-04-12 04:05:06 America/New_York'), ( 'flattened to UTC', (TIMESTAMP WITH TIME ZONE '2003-04-12 04:05:06 America/New_York') at time zone 'UTC', TIMESTAMP WITH TIME zone '2003-04-12 04:05:06 America/New_York'), ( 'in "local" no types', TIMESTAMP WITH TIME ZONE '2003-04-12 04:05:06 America/New_York', '2003-04-12 04:05:06 America/New_York'), ( 'flattened to UTC no types', (TIMESTAMP WITH TIME ZONE '2003-04-12 04:05:06 America/New_York') at time zone 'UTC', '2003-04-12 04:05:06 America/New_York');

select comment, ts, ts AT TIME ZONE 'UTC' as ts_utc, ts_tz, ts_tz AT TIME ZONE 'UTC' as ts_tz_utc, case when ts < ts_tz then 'less' when ts>ts_tz then 'greater' else 'equal' end from tz_test;


I'm not sure this exactly is what I'm thinking about. Yes, `at time zone "UTC"` does the proper conversion, so all times will represent the exact instant they should. But in no cases do you know what time zone the data came in as -- that information is thrown away.

When you look at your data, what is the time a user's watch said when the data was input? What time zone was the data input as?

Here's some queries:

  create table tz_test ( comment varchar, ts_tz timestamptz );
  
  insert into tz_test (comment, ts_tz) values 
  ('midnight US Eastern', timestamp with time zone '2025-05-13 00:00:00-4'),
  ('4am UTC', timestamp with time zone '2025-05-13 04:00:00+0');

  select comment, 
         ts_tz
  from tz_test;
I would expect that one row comes out as midnight, and the other row comes out as 4am. But they both come out as midnight. That's what I don't like.


Oh. I was completely wrong. So you need another column to store the source TZ? That's terrible! I was assuming it worked like Oracle.


One thing that this article talks about, but could be more explicit about, is the different kinds of clown.

There's the kind we all think of -- white face, red nose, at the circus.

But there's other kinds too. I know the most about two related forms: commedia dell'arte and bouffon.

In commedia dell'arte, performers play different "stock characters" based on Italian society in the 1600s, when commedia was originally developed. Commedia is concerned with status within a society: rich/poor, servant/master, young/old. Each character has its own specific mask. One character might be the blue-collar working person, who isn't learned, but is not dumb. Another character is the rich person who thinks themself smart and cultured, but is neither. These performances are often partially scripted, partially improvised. One example is: https://www.youtube.com/watch?v=3DjGoDEks7U

In bouffon (mentioned in the article as the group Mil Grus). These characters are grotesque (physically -- often these performers put foam inside their clothing to make the character look inhuman) and outcasts. You might think of them as a tribe of people thrown out of society in the middle ages, who the king invites back in once a year. Because of their outcast status, they are allowed to say things that people inside that society cannot. One modern example is Red Bastard (who I've studied with), who can be seen here: https://www.youtube.com/watch?v=kFJWnfNUXnc.


I'm also bothered by half-constructed objects. In my previous job, I was on a team creating a Go project that integrated two different parts of the company. It was an HR company, with lots of random fields in objects.

The API given to us often returned objects with only certain values filled out. Go encourages this, because there it is so easy to do that. `StructName{}` will create a struct, and is easier than filling out values. It will fill out all the values with the "zero value" of the thing.

And there's no way to know if you have a zero value! I would commonly get back an object and have to dig into the code or ask people to find out when certain values would be filled out!

Compare to a language where you have to provide a constructor. Fewer people would write:

public ClassName() { var1 = 0; var2 = ""; }

It lead me to be able to trust values less than I had to in other languages I've used.


Yeah, if I could go back in time and tweak Go, removing the idea that zero values should generally be "valid" and that anyone the ability to name an exported type should be able to create a zero value of that type would be pretty high on my list of priorities. Not the highest, but it's up there.

I think it's one of those ideas that makes sense at first because it's easy to come up with examples of objects that can be constructed legally as zero values, and then convince yourself that maybe we live in a world where most values can be so constructed. The standard library has a number of them. However, I find the techniques for constructing them gas out long before the problem is solved. Unfortunately, it's the sort of thing that only really becomes proved once the language goes 1.0 already.

However, in pretty much any language, it's hard to avoid the user having some ability to fill out even "mandatory" fields in some invalid manner. You can impose terrifically strong typing on a value, but if the user wants to slap a "0" into the Price field "just to get the object constructed", there's not a lot you can do to stop them in the end. Or, if "0" is forced to be invalid, 0.01 or some other value. Programmers can be quite creative in pursuing bad ideas in their designs....


> However, in pretty much any language, it's hard to avoid the user having some ability to fill out even "mandatory" fields in some invalid manner.

I 100% agree. It's just that go seems to make it easier to make invalid values than valid ones, because the programmer doesn't have to actually type the values that end up invalid.


Just to respond to the Whatsapp part of the comment, apparently Whatsapp made about $1.7 billion in 2024. https://www.businessofapps.com/data/whatsapp-statistics/


That is suspiciously equal to the "Other revenue" line in Meta's 10-K.

Given that likely rolls up other products I doubt it's all coming from Whatsapp.

[0]: https://d18rn0p25nwr6d.cloudfront.net/CIK-0001326801/1f8bf8e...


Whatsapp was $1/person/year for a license. Wiz is "contact sales for pricing". Presumably that's more than $1/year.

According to Amazon's Wiz integration (https://aws.amazon.com/marketplace/pp/prodview-ibgbkrqusncsm), the lowest cost they have is $24,000/year.


It's based on your workload you are using it for basically. So its not a set price.


I wanted to:

1. Write HTML in org-mode. Org-mode is great for thinking. 2. Publish clean HTML.

The other libraries I was seeing were about exporting arbitrary org files for being consumed online. For example, the built-in exporter has a bunch of html classes that include "org" in them.

So I built a custom exporter: https://hg.sr.ht/~zck/ox-zhtml. It's definitely not documented well, but it works well enough for my use.


This pack contains one pencil of each hardness 9H through 6B. There are 17 hardnesses in that range.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You