Readit News logoReadit News
jasperry commented on I'm working on implementing a programming language all my own   eli.li/to-the-surprise-of... · Posted by u/ingve
austin-cheney · 6 hours ago
In languages that have block scope a procedure is that block. It’s a boundary but receives no input and does not return output. Functions do allow input and do return output. This distinction is clear in C lang that has both functions and procedures.

As a new language design feature procedures could be assigned to references for reuse in the same way as calling a function by name/variable.

jasperry · 2 hours ago
I've never heard of blocks in block-scoped languages being called procedures. I feel like the word "block" is well understood and serves the purpose fine. In lots of other languages, things called procedures do take input, like Ruby, which has first-class Procs like you mentioned.
jasperry commented on I'm working on implementing a programming language all my own   eli.li/to-the-surprise-of... · Posted by u/ingve
mastermage · 10 hours ago
That's why procedure is so much better of a name. It's not a hill I'm willing to die on but I think it's correct.
jasperry · 7 hours ago
Seconded. Languages could even use "function" only for pure functions and "procedure" for everything else. Pascal uses "procedure" for things that don't return a value, but I think the pure vs. side effect distinction is more useful.
jasperry commented on I'm working on implementing a programming language all my own   eli.li/to-the-surprise-of... · Posted by u/ingve
austin-cheney · 20 hours ago
I love that you are using colon for the assignment operator. This is absolutely correct. Most languages use the equal sign as the assignment operator in most contexts and then the colon in limited contexts. This comes from Fortan and its just wrong. The equal sign should be reserved for comparisons, because that is what it means in mathematics.
jasperry · 17 hours ago
To push back a little: Designing the syntax of a programming language always involves tradeoffs; nothing is "just wrong". For better or worse, equal sign as assignment has become widely used and understood. I think the author's use of colon is neat, but it is confusing if you're used to seeing that as the type indicator; again, a tradeoff. I like the look of := as the assignment operator but it adds another shifted key to type, which can push you that much closer to RSI for such a common operation.
jasperry commented on Paracetamol disrupts early embryogenesis by cell cycle inhibition   academic.oup.com/humrep/a... · Posted by u/XzetaU8
kuschku · 6 days ago
That's why it's recommended to combine a half dose of ibuprofen and a half dose of paracetamol at the same time. (Plus some vitamin C)

Together they have higher pain killung effects than each alone, and the side effects are reduced as they affect different body parts. And the vitamin C reduces the damage to the stomach lining.

jasperry · 6 days ago
That's very interesting about vitamin C, I never heard that it can reduce stomach lining damage. It's surprising because things with vitamin C tend to give me heartburn, I assumed because they were acidic. Do you have any references?
jasperry commented on Unity reintroduces the Runtime Fee through its Industry license   unity.com/products/unity-... · Posted by u/finnsquared
pjmlp · 9 days ago
I replied on a sibling thread.

However I would point out that before Unity took off, jMonkeyEngine had a good following.

And since reference counting is also garbage collection from CS point of view, I would add Swift with the game development kits, however that is pretty much Apple only, thus not really the same league.

Microsoft unfortunately since XNA, the whole DirectX team has been anti .NET, they didn't even provided Windows Runtime Components for .NET Native, even though it would have been relatively easy to do so, as it is based on COM (plus some extras).

The moment key people responsible for XNA left the building, it was done.

https://youtu.be/wJY8RhPHmUQ?si=QvtVZHhB6ZhT95eT

jasperry · 9 days ago
jMonkeyEngine is on my list of things I want to do a project in. I hope it continues to get support. It might be better for 3D than Godot (based on hearsay anyway)
jasperry commented on Unity reintroduces the Runtime Fee through its Industry license   unity.com/products/unity-... · Posted by u/finnsquared
TremendousJudge · 9 days ago
Why do you see C# adoption in gaming as desirable? Honest question. I think it's a good enough language, but why would it be a good fit specifically for building games?
jasperry · 9 days ago
I'm not the parent poster, but to me it's not about C# in particular, but that there is basically no other well-supported gamedev framework in a language that's 1) statically typed, 2) garbage-collected for safety and productivity, 3) has decent performance, and 4) has good tooling/IDEs. JavaScript, C++, and Python/GDScript are all missing at least one of those. Java could possibly fill the gap, but it's still clunkier to program in than C#, and no Java game framework has much traction.

I'd be ecstatic if there were something checking those boxes that wasn't owned by Microsoft.

jasperry commented on A general Fortran code for solutions of problems in space mechanics [pdf]   jonathanadams.pro/blog-ar... · Posted by u/keepamovin
kjellsbells · 12 days ago
Idle question: in the days before TeX, when manuscripts like this were hammered out on Remington office typewriters, how did authors handle symbols?

In this manuscript for example you can see that power superscripts are really just regular numbers typed at an offset (perhaps rotating the paper around the platen one notch instead of the two that would be a whole line feed). But what about the vectors and the giant sigma? All hand drawn over the top of a typed manuscript?

jasperry · 12 days ago
Yes, I believe they're drawn or stenciled in. Some amount of care has been taken here to produce a more professional-looking result, but you can find plenty of old typed papers where math is obviously handwritten in. Like John Nash's thesis: https://library.princeton.edu/sites/g/files/toruqf6021/files...
jasperry commented on Occult books digitized and put online by Amsterdam’s Ritman Library   openculture.com/2025/08/2... · Posted by u/Anon84
jasperry · 15 days ago
"There is a sense in which we are all alchemists." --Schopenhauer
jasperry commented on OCaml as my primary language   xvw.lol/en/articles/why-o... · Posted by u/nukifw
jolmg · 17 days ago
> bool -> bool has 2^2=4 values

Not the best example since 2*2=4 also.

How about this bit of Haskell:

  f :: Bool -> Maybe Bool
That's 3 ^ 2 = 9, right?

  f False = Nothing
  f False = Just True
  f False = Just False
  f True = Nothing
  f True = Just True
  f True = Just False
Those are 6. What would be the other 3? or should it actually be a*b=6?

EDIT: Nevermind, I counted wrong. Here are the 9:

  f x = case x of
    True -> Nothing
    False -> Nothing

  f x = case x of
    True -> Nothing
    False -> Just False

  f x = case x of
    True -> Nothing
    False -> Just True

  f x = case x of
    True -> Just False
    False -> Nothing

  f x = case x of
    True -> Just False
    False -> Just False

  f x = case x of
    True -> Just False
    False -> Just True

  f x = case x of
    True -> Just True
    False -> Nothing

  f x = case x of
    True -> Just True
    False -> Just False

  f x = case x of
    True -> Just True
    False -> Just True

jasperry · 17 days ago
You didn't list all functions, just input-output pairs. Each function is a map from every possible input to an output:

f1 False = Nothing, f1 True = Nothing

f2 False = Nothing, f2 True = Just True

...

This gives the correct 3^2 = 9 functions.

jasperry commented on OCaml as my primary language   xvw.lol/en/articles/why-o... · Posted by u/nukifw
loxs · 17 days ago
I migrated from OCaml to Rust around 2020, haven't looked back. Although Rust is quite a lot less elegant and has some unpleasant deficiencies (lambdas, closures, currying)... and I end up having to close one one eye sometimes and clone some large data-structure to make my life easier... But regardless, its huge ecosystem and great tooling allows me to build things comparatively so easily, that OCaml has no chance. As a bonus, the end result is seriously faster - I know because I rewrote one of my projects and for some time I had feature parity between the OCaml and Rust versions.

Nevertheless, I have fond memories of OCaml and a great amount of respect for the language design. Haven't checked on it since, probably should. I hope part of the problems have been solved.

jasperry · 17 days ago
Your comment makes me think the kind of people who favor OCaml over Rust wouldn't necessarily value a huge ecosystem or the most advanced tooling. They're the kind who value the elegance aspect above almost all else, and prefer to build things from the ground up, using no more than a handful of libraries and a very basic build procedure.

u/jasperry

KarmaCake day653May 13, 2015View Original