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

Unrelated but I really enjoyed the wavy text effect on “opinions” in the first paragraph


Thank you, it was the integral part of the whole post!


It was a turning point, but Star Trek lore also had Earth go through World War III before things actually got better


And the self-descriptive Eugenics Wars...



Sometimes you can get capacitance to be detected if you hover your finger just millimeters over the trackpad


Could you explain the difference?


A protocol defines a set of primitives and their interactions, along with prescriptions where necessary, but is otherwise pretty loose generally. Especially in a Postels law world. APIs tend to be highly prescriptive with a highly specific interface and a lot of black box.

Think of the difference between an IETF RFC on say SMTP vs an email API - the RFC describes how clients and servers for mail routing interact through an almost dialog, while a typical email API has highly structured interfaces. Another wat to cut it is an API can be tested as it has inputs and return values dependent on those, while a protocol you can generally only assert compliance with the specification of the protocol.

People often assert protocols have something to so with RPC of some sort but that’s not true. Many language support protocols, which can be very similar to interfaces, but don’t have anything to do with OOP, etc. In language protocols it’s slightly different than network/IPC protocols but the intent is similar.


I'm not the most knowledgeable, but a protocol talks to another process through a specific format.

I personally think its more powerful than writing a new process to replace and existing.

My favorite example is an X11 windows manager implementing in about 18 lines of python.

Obviously there's dependencies to talk to the X server, but the power of a protocol comes from any program written in any la gage communicate with existing code.


> My favorite example is an X11 windows manager implementing in about 18 lines of python.

Uh, do you happen to know where to find that project? Sounds pretty comprehensible for most people as an example.


Not sure about that Python project, but years ago I found this very minimal WM in a few hundred lines of C helpful: https://github.com/dylanaraps/sowm

Was a lot easier to understand for me than, say, dwm.


I created my own X11 window manager [1] at the start of this year in around 800 lines of C.

I had been using dwm (4000 lines of C) for many years and wished to write my own for a long time, but what made me take the leap was really steveWM [2] and TinyWM [3] which are both super small.

[1] - https://github.com/ChanderG/cellwm [2] - https://github.com/stodd1031/steveWM [3] - https://github.com/mackstann/tinywm


TinyWM was the starting-point for my wm in Ruby as well. It really drives home just how little you need to get started.


Sure!

https://github.com/mackstann/tinywm

I've run it once a long time ago and worked perfectly fine for me.


They're both poorly defined, but what I think GP meant is they want something that you use something like a socket instead of FFI to interface with. You need an extra data description layer for a 'protocol' in this context because you can't rely on something like the C data model and calling convention as a given.


A couple ways to look at it:

- Protocols are descriptive, APIs are prescriptive

- Protocols are implemented, APIs implement


A protocol is like the line at Subway where an api is a bar & restaurant.


Sorry, I don’t understand this analogy


Protocol = It defines the whole channe with data structures and commands.

API = how do you connect against.


The folks at SaySomethingIn, that originally started with Welsh and other Celtic languages, have recently expanded to Japanese. I haven’t tried it myself, but I’ve found some decent success with one of their other courses. It’s all about spaced repetition and focuses exclusively on listening and speaking.

https://www.saysomethingin.com/en/


Interesting. Learning a language means speaking it.


I think it’s not just the camera LED, but the indicators that appear on screen, like the amber, green, or blue dots that appear in the menu bar when the microphone, camera, or screen recording are accessed by apps.


(2013)


I wrote something like this for fun years ago, although I don’t think I published it. I think my library had a scale defined by a root note and a set of steps. A chord could be constructed from a scale and a root note, with modifiers such as inversions and others like X7, Xb5#13, etc. The scale has the blueprint and the notes follow. You already have the primitives with notes and intervals.

Parsing chords from notes is more difficult, as are most parsing tasks.


I wonder how large of a container that world create. Sounds like a good exercise for the reader :D


The ultimate monorepo.


How to parent/be a parent. I don’t have much choice in the matter, as my firstborn is coming this spring ^_^


New parent here !

Best book hands down - “Be prepared A practical Handbook for new Dads” It’s funny and short and every page is insightful. And you will lol while reading it.

Pathways.org - Great app that suggests activities for right age. And it’s free.


Do you have any other advice that was not covered in that book that you think would be helpful to know about for a first time parent?


Congratulations just had mine a few months ago so this is certainly the skill I’m working on!

Other than that sharpen guitar skills, linear algebra, and as a rubyist thinking about doing something in elixir. But we will see how the time allotment goes with an infant part of the program now.


Same here but within a few weeks :)


Just read the manual that comes with the child. /s

All kidding aside, my kids are 16 and 19 and I am still trying to figure it out.

Pretty sure it is a journey and not a destination.


When I was a young parent, there were moments when I would have strong feelings of inadequacy and feeling paralyzed about what I should do and what I should not do. The most calming thought I had at the time was to remind myself that humans have been parenting for thousands and thousands of years and that I would consider myself to have higher than average intelligence and at least average societal training (through observation of others) about how to care for infants.


we found that manual in "the baby book" by william and martha sears. it was really helpful in the first few years. the book promotes the idea of attachment parenting, which i feel is the right approach. but any parent should decide that for themselves. the general rule for parenting advice though is to only apply advice that makes sense to you. don't let anyone pressure you into doing anything you don't agree with.

i think you'll never stop figuring things out as your kids grow. not with the first few anyways. i guess repetition only comes in with the fourth child or so ;-)


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

Search: