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

The universe can be divided up into that which is measurable AND reproducible (science), and that which is either not measurable OR not reproducible. For those looking for how the rest of the universe works (the latter), check out the link. Prepare for a paradigm shift... enjoy!


Study physics, statistics, and computer science. Meditate every day. Read Seth Speaks and Law of one. Go to South America and find a shaman to give you Ayahuasca tea. Don't get married until you're 50.


Build stuff.


I'm working on a simple.interface to Riak in Node so that you can just say:

  client.get(key)
or:

  client.put(key, value)
https://www.npmjs.com/package/raku

I am using that to build an ORM and a blog with GraphQL and React.


Craigslist


More details please. This sounds like a good story.


If you really want to reap the value your code creates start an internet-like business with the code that you write. All the value is yours! :)


Thoroughly enjoyed the tutorial, but why would one want to make a custom system call? What superpowers does this give you? Thanks in advance for your answers.


It's your best interface with the kernel. It's simple and high-performance. It's specifically what you want if you want to pass structured data in-memory to the kernel.

In a strict technical sense, there's nothing you need a syscall for, you can just read/write data (or maybe do an ioctl) on a new device node or something. In fact, OpenAFS supports routing its "syscall" on Linux through ioctls on /proc/fs/openafs/syscall, because Linux makes it deliberately annoying to patch the syscall table from a kernel module so as to make life harder for rootkits.

However, it's simpler to pass data structures if you can use a syscall. It's much higher-performance than opening a file node. And if you expect to run in an environment where you don't know if a particular file will exist (e.g., a chroot), it's useful to use a syscall directly, because that's always available. For instance, getrandom was added in July 2014 partly for this reason, and partly so that if you ran out of file descriptors to open /dev/urandom you could still get randomness.

Here are all the syscalls added in the last two years:

* pkey_mprotect, pkey_alloc, pkey_free: support for a new Intel processor feature, Memory Protection Keys https://lwn.net/Articles/643797/

* preadv2, pwritev2: add a flags argument so you can do a non-blocking preadv or pwritev without opening the file in non-blocking mode https://lwn.net/Articles/670231/

* copy_file_range: copy data between two file descriptors, using filesystem support for efficient copies if possible https://lwn.net/Articles/659523/

* mlock2: add a flags argument so you can mlock memory when it's next accessed https://lwn.net/Articles/650538/

* membarrier: force a memory barrier on all running threads to help with userspace RCU, garbage collection, etc. http://man7.org/linux/man-pages/man2/membarrier.2.html

* userfaultfd: implement userspace paging https://www.kernel.org/doc/Documentation/vm/userfaultfd.txt

* execveat: a version of execve that takes a file descriptor (or a fd and relative path) instead of a string to execute http://man7.org/linux/man-pages/man2/execveat.2.html


This is so 1984 it's disturbing. I'm a hardcore Google fan with tons of photos of my children saved to their cloud. All of my business-critical, financial, and personal messages are stored up there. Losing access to all that is like losing your basic human rights. It's scary how dependent I am on this one company for being able to participate in the modern world....


Facebook was once a personal project. I would definitely like to hire that person.


How about TCP over light?



Most of it is, yeah? Fiber-optic cables transmit via laser beams.


Actually p2p file transfer via an infrared port[1] was a fairly common feature on laptops back in the day (this was probably before bluetooth took off). If you're on Windows, have a look in the "Network and Internet" section of the Control Panel. You may still have an Infrared utility there if your computer has that functionality.

[1] https://msdn.microsoft.com/en-us/library/aa940293(v=winembed...


IR was also used for syncing with phones, and printing. Some PDAs (I'm looking at you psion) could print over IR


Back in the day. i used an Orange contract nokia 8310 ir modem and the free phone 0800 number that came with BT internet to give my laptop intenet.

Lasted around 6 months of near 24/7 use before Orange started detecting data and charging contract customers to call 0800 numbers.


I seem to remember the protocol was IrDA, it never worked very well for me.




You can probably use a phone's flash and camera for bidirectional data communication with another phone some distance away.


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

Search: