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

Not really. Tivoisation is the process of locking your device down with hardware (or other means), so it will only run software signed with your keys.

So the end user can have all the source code they want and still be helpless.

That issue with the GPLv2 was fixed with V3.


Actually it is a recreation of the C65. (Which happened to have a C64 mode) Running 3rd party cores is possible though.


It's on GitHub.


Because in some countries it is/was rather common to receive payments (most often pension payments) in cash that where delivered by the postman. That's why it makes sense in a way.


what's wrong with that?


  *a++
doesn’t increment the value pointed to by `a`, it increments `a` itself. The value remains intact.


   int increment(a)

   {
      return a+1;
   }

   void somefunc()

   {
       int b = 5;

       b = increment(b);

       printf("b now %d\n", b);
   }


that exact example is given in the document and presented as 1 of 2 possible solutions. I believe, the critique in the parent comment was unwarranted, but I thought I maybe missed something.


This is the only proper way of doing that. Having pointers to variables on input that functions modify is ugly and error prone. C gets a lot better the moment you try to make your functions as pure as you can.


What do you think of

  T get_t(int how, char **error);
  int get_val(T *v);
One could rewrite these as

  struct get_t_res {T; char *};
  struct get_t_res get_t(int);

  struct get_val_res {int; T};
  struct get_val_res get_val();
But what do you think of it?


Less clear. I much prefer for functions to do what's on the tin in the most simple way possible.


As long as you don't return structs, as the compiler may introduce memcpys here. C doesn't have C++'s RVO, last time I checked many cases that GCC and Clang did optimize in C++ weren't optimized in C.


True, but still one way I appreciate making C safer is by using poor man's Abstract Data Types with translation units.

For the use cases that are too expensive to use functions, macros can be used instead.

However that is only if C++ cannot be used at all, otherwise don't bother.


That works, at the expense of possibly hiding bugs in plain sight. Macros are a double edged sword in that sense, you can almost but not quite create a DSL on top of C that is a lot more safe but it has its drawbacks, and you need to be very good at mentally modeling macro expansion to read and debug code like that in order to ensure that it does what it seems to be saying that it will do.


Agree, if it is me, I rather use inline functions, but anyway as mentioned only use C when there is no other option.


Do you have an example of that where C++ struct returns are optimized but not C ones?


enjoy: https://gcc.godbolt.org/z/7Pn8eqhdK

that's latest GCC, at -O3


Clang does generate good code https://gcc.godbolt.org/z/z781r7Phh

But yes, sadly I think it's still generally advisable to avoid returning large structs by value.

Note that this has nothing to do with RVO; as I understand it, RVO is about eliding copy constructors, not actual memory copies, and c has no copy constructors and so gets 'RVO' in all cases.


Should be `(*a)++`

Noob mistake


An aspect greatly overlooked in this discussion here is, that an UBI would rid us from a ton of bullshit jobs people are currently forced to do, just to get by. So in a way, an UBI can lead to degrowth eventually, which decreases pollution, traffic jams, energy consumption, waste a.s.o.

I'm looking forward to see what people are going to do with the spare time.


10 or 11, Sinclair ZX Spectrum, BASIC. most likly i started by typing in the examples from the book, working from there. changing lines of code, see what it does to the program. some two years later i got a c64. the basic was a lot worse, but it was the machine i got around my head to assembler, or at least machine code - because i did'nt understand the concept of the assembler, but i very well understood the machine-code-monitor in the final cartridge.

but rasterbars, and softscrollers with (stolen) musik and sprites on the bottom/top border, was as far as i ever got.


yeah, but then of course you are gone completely. that's not what i want (for now). i want to keep my profile and friendlist. every other content should be purged.


yeah, something like that. facebook makes it quite hard to do that, because the delete is in a popup menue and even that is different from item to item. sometimes it's "delete" you have to click, sometimes it's "unlike" sometimes the best one can do is select "hidden from timeline" ...

for me it's quite clear: facebook does not want you to purge something, ever. if you dare to, you should suffer.


I'm not talking about deletes becoming "visible" on the timeline after a delay, I mean that the browser is completely blocked and unresponsive for 4-5 seconds (not minutes!). That makes deleting by hand lots of posts and likes a total PITA.


Could be, or could it be something that seethe user-agent and the influx of deletes from a tool as a denial of service and intentionally throttles responses?

Plausible deniability, right?


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

Search: