Hacker Newsnew | past | comments | ask | show | jobs | submit | writebetterc's commentslogin

The students had identical answers, I presume

Which, in a subject like algebra, is extremely suspicious ("how could both of them get the exact same WRONG answer?").

> Which, in a subject like algebra, is extremely suspicious ("how could both of them get the exact same WRONG answer?").

In Germany, the traditional sharp-tongued answer of pupils to the question "How could both of you get the exact same WRONG answer (in the test)?" is: "Well, we both have the same teacher." :-)


This is very similar to how Java's object monitors are implemented. In OpenJDK, the markWord uses two bits to describe the state of an Object's monitor (see markWord.hpp:55). On contention, the monitor is said to become inflated, which basically means revving up a heavier lock and knowing how to find it.

I'm a bit disappointed though, I assumed that you had a way of only using 2 bits of an object's memory somehow, but it seems like the lock takes a full byte?


The lock takes two bits.

It’s just that if you use the WTF::Lock class the. You get a full byte simply because the smallest possible size of a class instance in C++ is one byte.

But there’s a template mixing thing you can use to get it to be two bits (you tell the mixin which byte to steal the two bits from and which two bits).

I suspend the same situation holds in the Rust port.

I am very familiar with how Java does locks. This is different. Look at the ParkingLot/parking_lot API. It lets you do much more than just locks, and there’s no direct equivalent of what Java VMs call the inflated or fat lock. The closest thing is the on demand created queue keyed by address.


The idea is that six bits in the byte are free to use as you wish. Of course you'll need to implement operations on those six bits as CAS loops (which nonetheless allow for any arbitrary RMW operation) to avoid interfering with the mutex state.

In a single-threaded context, I think 'giant array array of bytes' is still correct? Performance, not so much.

> This part of the blog didn't seem very accurate.

It was a sufficient amount of understanding to produce this allocator :-). I think that if we have beginner[0] projects posted and upvoted, we must understand that the author's understanding may be lacking some nuance.

[0] author might be a very good programmer, just not familiar with this particular area!


I brought that up for their further reading since that part seemed to be the weakest part of the post.

I think this is good work anyway.


Moxie doesn't want to federate, that's the main issue I believe.

The goal isn't to exchange facts, it's to bond.

Well I doubt I'm going to bond by being subjected to painful boredom, and neither will they. I've found it's so socially common to completely forget all of these things people tell you in small talk too, because I'd remember every one of these facts about the other person due to low frequency interactions, while they'll be like "I've never met this man in my life" the next time I talk to them and I can't help but find that a bit hurtful.

I think smalltalks just didn't bring you to the right topic, if you were to reach topic you both fancy, you would definitely remember each other. If anything, having a smalltalk is nicer than staying in awkward silence.

> I doubt I'm going to bond by being subjected to painful boredom, and neither will they

Which is why it's important to surround yourself with likeminded folk.

Nobody is compelling you to do this with every single person you meet.


What value does the word have? When I'm writing a compiler, it doesn't matter whether I target C or asm, or Javascript, as my output language. I'll still write it the same way.


OK, but words are not only for compiler-writers. As someone who encounters your compiler, if it targets an output language at a similar level as the input language it will give me a headstart in understanding what it does if I see it referred to as a transpiler rather than simply a compiler.

Overall, I find this discussion very odd. It seems like a kind of deletionism for the dictionary. I mean, what's the use of the word 'crimson'? Anything that's crimson is also just 'red'. Why keep 'large' when we have 'big'? You could delete a large percentage of English words by following this line of thinking.


It gives you a better idea what a thing does?


To me, it doesn't. If someone says "tsc is a transpiler", it gives me nothing actionable. If you do say "it transpiles to JS", then I've got something, but that could just be "compiles to JS". It doesn't really tell me how the thing is constructed either.


I'd probably say that "transpiler" is not a very useful word with that definition.


Why is it useless? 'Compiler' denotes the general category, within which exist various sub-categories:

For example, a 'native compiler' outputs machine code for the host system, a 'cross compiler' outputs machine code for a different system, a 'bytecode compiler' outputs a custom binary format (e.g. VM instructions), and a 'transpiler' outputs source code. These distinctions are meaningful.


I can’t see why — I do think that the word does convey some sort of useful meaning with the above definition.


I'm sure that if you went back 100 years you'd be less surprised, but of course the rice would've been replaced with oat porridge or potatoes.


The old European one would have been bread: the traditional 2lb/900g ish size loaf would have been consumed in a day. Apparently Turkey still has very high levels of bread consumption.


Germany as well, it is like bread with everything, sometimes feels like back in the middle age, using bread as plates.


Maybe they were on to something we've lost: bread is delicious.


> I think this is a dumb idea, a mix of wishful thinking and immature psychology. You become someone because of your competence, not of what you believe in.

Shit works, it's not dumb at all.


"good outcomes" doesn't have to be the best outcome for you, personally.


There's no part of me that wants to maintain relationships for the express purpose of extracting value in the future for gain -- personal or otherwise.

I simply refuse to let the end justify the means, whatever that end is.


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

Search: