Better HN
topnewbestaskshowjobs
Log inSign up

MathMonkeyMan

2,676 karma · joined Nov 28, 2019 (7y ago) · 1,131 submissions

Submissions

comment 3y ago · link · parent

if there weren't

comment 3y ago · link · parent

[R5RS][1] is simple.

To get any work done with it, though, you need to write your own Python.

[1]: https://conservatory.scheme.org/schemers/Documents/Standards...

comment 3y ago · link · parent

That's not a red flag, that's a scam.

comment 3y ago · link · parent

I understood the first code listing, but then lost interest.

In C++, classes can have member functions. Classes can also be derived from each other. A class D derived from B inherits all of B's member functions.

So, when you have an instance of D calling one of its B-derived member functions, the B member function sees "this" as a pointer to a B, even though it is a pointer to a "D". That's fine because pointers to D are convertible to pointers to B.

What is proposed here is a way for one of B's member functions to say "this member function can be called only when the current object ('this') has a particular type." In the example, the particular type is "mut<B>", which is analogous to D.

My lizard brain doesn't see how this might be useful.

comment 3y ago · link · parent

Circumcision can be a solution to chronic urinary tract infections in young boys, as was the case with me when I was five.

I've also read that it makes HIV transmission less likely.

Not sure why either would be true, but at least the first is.

comment 3y ago · link · parent

A squeaky wheel at least needs lubrication.

I'm not the judge of who "actually needs" money, but surely there are tons of people in the world (maybe in my neighborhood) who are struggling and would be helped by having some of my money. None of those people are asking me for change on the street or sending me donation letters. Disjoint sets.

comment 3y ago · link · parent

I'm wondering if I'll ever see the day when somebody who asks me for money actually needs it.

comment 3y ago · link · parent

They straight up replace the lens of your eyeball with a plastic one, and as result you can often see better than ever, without glasses. That was the outcome for my dad, anyway.

My dad's side of the family has eye problems: myopia, glaucoma, detached retina, and wet macular degeneration. Hoping my mom's genes spare me the worst of it.

comment 3y ago · link · parent

With center of gravity, adding a person far away from the center moves the center more than if you added them closer to the center.

comment 3y ago · link · parent

I think that a randomly generated completely real looking expert disguise is probably best. And a pain in the ass.

comment 3y ago · link · parent

C++030 is just next year!

comment 3y ago · link · parent

Not at all. I meant

    std::common_type_t<bool, char> ii{};

comment 3y ago · link · parent

I think you meant

    int ii{};

comment 3y ago · link · parent

They do put some effort into getting you to create an account and go online in the installer.

And, when you boot the game, it instead boots a window GUI that I can imagine serves only to display the giant ad to upgrade to the more expensive version of the game. You have to search for the de-emphasized not-quite-a-button below to actually play the game.

This is one of the things I like about truly single-player games, where no interaction with other players is possible. Mostly puzzle games. None of those games have any of these dark patterns or unnecessary connectivity.

I have been enjoying Baldur's Gate 3. Offline :)

comment 3y ago · link · parent

We could give up on thinking of code as:

- a sequence of characters and spaces

- a series of lines

- a fixed grid of characters and spaces

Instead, store code as a parse tree -- comments and all. Then we'd view and edit code using "WYSIWYG" editors solely. No more "cat" and "less", we'd need new tools. No more tty-like terminals, we'd need something more like a web browser.

It would cripple existing workflows and hinder compatibility, but the advantage is that "formatting" would be the viewer's preference. Forget about tab stops and fonts; think more like CSS. It's an extreme version of the tabs people's argument.

Word/Sheets documents come close, in a horrifying way. What I'm describing is more like Graphviz.

comment 3y ago · link · parent

I came here to conclude that Asians and Jews are smarter, and so that's what I have concluded.

comment 3y ago · link · parent

A friend of mine is a line producer for television. Her job sounds like a stressful management job involving lots of middlemen, coordination, miscommunication, and corporate shenanigans. There are writers, directors, actors, and other creative people involved; but, as with anything else, the bulk of people are various forms of social glue just barely holding the thing together.

I guess she at least can take pride when the show finishes production, and sometimes airs.

comment 3y ago · link · parent

Oh, you mean reddit? <https://old.reddit.com/r/help/comments/13ereaq/opening_image...>

comment 3y ago · link · parent

It comes down to ethics. If you need dark patterns to stay in business, then I'd prefer you weren't in business.

Now what if it were _my_ business...

comment 3y ago · link · parent

Or generate three and then blur out lorem ipsum, and never point out until the user has paid that you only ever generate three ideas (or maybe just one).

comment 3y ago · link · parent

I use Verdana. Everyone thinks I'm nuts, but I like reading code that way.

comment 3y ago · link · parent

My guess is that at the time when Bloomberg's infrastructure was considering supporting a message queue, they surveyed existing solutions (mind you that this was a long time ago) and found them lacking for one reason or another, rightfully or not.

RabbitMQ was probably avoided because nobody wanted to learn Erlang.

Also, R&D had a lot of experience building message oriented middleware "from scratch" in a low overhead high availability way, so first instinct was probably to start hacking in C++.

Nowadays it might be the case that some teams within Bloomberg need the performance or would rather have a bespoke solution instead of spending on migrating to something else off the shelf.

Keep in mind that this is a company that has its own implementation of most of the C++ standard library.

comment 3y ago · link · parent

Life is harder without move semantics, but allocators are easier.

comment 3y ago · link · parent

Last time I checked, they weren't even building with optimization, and it was still the fastest thing in the West. Peeved me, but whatever.

"Every byte counts" was the motto of the team that designed it.

comment 3y ago · link · parent

They actually open sourced it!

I worked on this team very briefly. Great team working on some interesting tech.

comment 3y ago · link · parent

Guy Steele Jr. worked on a language called "Fortress." There are a few good talks that he gives:

- (toy problem) https://www.youtube.com/watch?v=ftcIcn8AmSY

- (parallelism) https://www.youtube.com/watch?v=dPK6t7echuA

- (languages) https://www.youtube.com/watch?v=dCuZkaaou0Q

comment 3y ago · link · parent

good enough for Rome

comment 3y ago · link · parent

Multitasking systems gave us processes.

But those were too much.

So we got threads, which are processes that share an address space, file table, and some other things. The scheduler can switch from one to the other more easily than between processes, and data can be shared between threads without needing serialization.

But those were too much.

So we got user space threads, which are logical threads of execution that are driven by a runtime entirely in user space. The runtime adds scheduling hooks into all I/O functions in the standard library, or even uses a system API like Unix signals to preempt logical threads. No system-level context switching is needed. User space threads can be tiny.

But those were too much.

So we got coroutines, which allow a programmer to define logical "threads" of execution that cooperatively interact with each other. There is no assumption about the presence of a scheduler. The programmer either writes their own event loop or invokes one from a library in a "real" logical thread.

I wonder what comes next. As far as [communicating sequential processes][1] are concerned, maybe cooperative coroutines are a low as you can go.

[1]: https://www.cs.cmu.edu/~crary/819-f09/Hoare78.pdf

comment 3y ago · link · parent

2.4 GHz receives noise from a microwave oven. I wonder if infrared receives noise from a gas stove.

comment 3y ago · link · parent

It's disappointing that this is the state of things from a "working programmer" perspective.

Racket is, as far as I understand, a research and teaching language, as well as a viable scheme.

I've used it for some [command line tools and side projects][1], but I never tried to deploy anything with it.

Maybe a new [Chez][2]-based (as Racket now is) scheme is needed: one with much of Racket's nice syntax system, but focused on dependency management, targeted solely at "production" use, and other Serious Business Purposes.

Not it!

I'm not saying that Racket isn't a serious platform -- far from it. But the author's concerns, while expressed as a hot take, might be why Racket doesn't see wider industry adoption.

Or maybe it's a chicken and egg problem.

[1]: https://github.com/dgoffredo?tab=repositories&q=&type=&langu...

[2]: https://www.scheme.com/

1
272829
38