skysight-inc/HackerNews huggingface dataset:
Another problem with Bluetooth is that most devices cater to the lowest common denominator which means even though there are ways to make it better, most devices stick to older protocols to make sure it works with old, outdated garbage.
DIY Candy Claw Machine
Noob question, I was not able to follow what the advantages of using session types were. What am I missing?

Follow up,
1. How would session types differ from contract based testing?
2. Is there a notion of versioning on the types?
3. If there were better type support (ie. Well defined sum and product types) for wire protocols (protobufs etc) would that solve any of the problems session types might?
Previously: 2017 HN discussion of similar link about the Somali shilling from same blog: https://news.ycombinator.com/item?id=14414272

I am delighted by this as a real world physical example of a proof-of-work currency.
> That might be true if you live in a cave but when you are working on a team of 6-8 people with a team lead then basically none of that is true

Yes, I agree if you have an established team and there is a strict hierarchical development cycle/roles then rules will be enforced. But how about other team dynamics or lone developers that push their code into the world. How many js libraries import explicitly or implicitly an addition library (too many to count on top of my head but not enough to bother writing a script for you to show). There is a lot of bad code out there that were created by bad untrained tech managers and lone coding wolves because some standards have not yet been refined yet or agreed upon(standards like ssl, aes encryption).

> liberal agenda?

You lost me there? And maybe I lost myself as well

> Uncle Bob
When I said Bryan, i misspoke and was refering to Uncle Bob. But do you agree with self-imposed or external? They lead down very different paths
Repost from a day ago [0] because it didn't take off.

[0]: https://news.ycombinator.com/item?id=18766327
iOS devices will outright not charge if there’s just 5V on the port. Even the lowest charging current requires some sort of resistor arrangement.

Fortunately it seems like bridging the two data lines (essentially a 0 ohm resistor) is what’s needed to allow high-current charging (I think it’s 2 amps), so as long as your supply can withstand it (which pretty much every single device can, given that it’s tied to its own 5V rail which can supply many amps) you can just bridge the two pins together. Worst case scenario the overcurrent protection on the port will protect the source device.
> This is not to say that there aren't reasons to write large comment blocks, or architecture documents, but that they are often better written not while the system is being first built, but later, in a maintenance cycle, when someone already had wished for the comments, and has regained the knowledge the hard way.

I don't think the "Lean Manufacturing" approach works here. By the time someone "pulls" you for a comment, you've already lost the most important knowledge that should go into the comments - why the code is the way it is. Maybe you'll recall it when asked, hopefully not missing anything crucial. Meanwhile, comments are extremely cheap to write as you're writing the code, and even before you're writing the code (you did spend the time thinking about what you'll write, and aren't just "coding from the hip", right?).
> 4096 SSL keys.

Why do you say this? You should keep in mind the following:

1. Most TLS vulnerabilities occur due to design or implementation flaws, not due to insufficient key size (in particular side channel attacks of various flavors);

2. RSA is not the only algorithm which can be used for TLS. In fact, it’s not even the most advisable one. You can also use authenticated encryption via AES-GCM or Curve25519. These are safer. “4096 bit keys” are not a coherent recommendation for these algorithms, because security doesn’t correlate with key size;

3. You generally want to choose libraries which are secure by default and don’t require (or encourage!) developers to make decisions about details like key sizes. Choose an algorithm if you kust (avoid RSA!), but limit further decision making.
it is very often not a willing listener. and there is plenty of content that should be blocked between participants regardless of their willingness to share it.
It’s much like reproductive freedom. Someone gets a moral high horse that not everyone shares and decides that your life is not yours to control.
In most cases you can use the car port and just make a custom cable that bridges the two data pins together which tells the phone to use high current charging. The car’s port’s overcurrent protection will kick in if it’s an issue but I’ve got such a cable and so far I have yet to see any issues and I’ve used it for years with hundreds of different devices. No fire yet.
I use my AirPods everyday for input and output on macOS and it sometimes connects, sometimes fails, sometimes I need to reboot the laptop to make it work.

The main problem with AirPods seems to be that they don't make sound because of BT failure. Apple could have missed this detail.
> That's... not the point. Jumping around is.

There is a tradeoff: Small functions make high-level logic clearly visible and easy to find, at the price of forcing you to jump around when you want to dive into implementation details. Putting everything into one big function lets you follow all the implementation details without jumping, at the price of making you read everything to actually understand what the code is doing.

The latter is the biggest price you can possibly make me pay. Jumping around is a minor inconvenience.
most articles from after about 2000 have a version on arxiv, if the conferences and venues aren't already open access. in CS this is almost always substantially the same work as gets published in a conference or journal.

Google Scholar the title in quotes and you will almost always find either the arXiv PDF or a version from the author website, conveniently linked along with well-formatted bibliographic information.

also re ACM, an unlimited-access subscription to every ACM publication runs $198/year with an ACM professional membership (cheaper for students), if you have a moral objection to just using sci-hub.

don't know if there's something similar for IEEE.

things are way better in CS than basically any other field. not to say there aren't huge obstacles to connecting researchers and practitioners. but access to journals doesn't have to be one, once you know the same tricks grad students use when not on campus wifi.
Estonia goes digital to end bureaucracy
Pardon the off-topic, but hello, stranger!

So glad I found someone else who also got help from games for their anxiety and panic attacks. I've also undergone some crappy health-related stuff this year and the only thing which I believe pulled me out of it and fixed my crippling anxiety while I recovered was Just Cause 3. I think it was the wingsuit flying coupled with the open-world exploration. It was basically the only activity which could bring my heart rate down to the 60s (It's very counter-intuitive, even for me, how a fast-paced game managed to calm me down) . Not even reading had this effect on me. My friends don't play games and I'm not social at all (twitch, xbox, etc..) so I'm very glad I see someone else in a similar situation.
The internet needs some sort of fast, widely acceptable pay-with-one-click system. If the article asked me to pay 10 cents to read, I'd do it.
You are making the mistaking of supposing you conclusion as hypothesis, don't you. Because:

> The universe is by definition a closed system.

There is no de-finit-ion, that's my hole point (excuse the pun, it fits better than any other time)

> The universe is all that exists, if there is something that could have an effect on it, it would be part of the universe.

Yes sure, but what if it's endless? That's not closed in the sense of thermodynamics I don't think.

To conclude from your statement, that the universe is a closed system, kind of requires to presume universal entropy increase, in case of infinity. I can't do the maths though, so I might be wrong. It's just a hunch.

> The universe is expanding, distances are getting bigger,

The visible ...

background radiation may invite inference, but really you get interference.

> and there is no reason to think that it'll suddenly decide to stop and get small again.

In a e.g. 10^50 years would not exactly be suddenly

> Once a fire has burned to ash, you can't turn it back into wood again. Cyclical time is wishful thinking, contradicted by all evidence.

I don't disagree.
This is an old video meme talking about a dystopian future in America

I think it was used on Alex Jones sites as a counterpoint to Obama care, when it was merely a campaign promise in 2008

Its an OOLLD video

It had pictures of some clerk checking your information in some Windows ME interface
I've never seen a git commit comment describing the "why" of code. "Added foo.\n\nImplemented az Bar because of blorgz." isn't nearly enough of a rationale, and that's the best description I see people making.

Also, the whole point of putting something in a comment is that you have to read it when working through code around that comment. Putting a note in a commit log instead ensures that crucial information important to the code will not be visible, and most likely not read at all, when working on that code.
The report [0] might be one of the most damning I've seen for a little while.

DES-encrypted AWS S3 creds with unlimited access baked in. Hashcat makes short work (hours) of DES these days.

OpenSSl 1.0.1g, a rather outdated and rather vulnerable. Integer overflow, easily DOS-able, and double-free, amongst others.

And all of this with proof it works, whilst the company blusters.

> Siwak was adamant that the “accusations are false,” but did not say why.

... As far as I can tell without breaching my local laws by running the exploits... S3 hasn't revoked those keys yet, or required a more limited policy.

[0] https://www.0dayallday.org/guardzilla-video-camera-hard-code...
Tobacco causes cancer through Tobacco-specific nitrosamines generated during curing and burning. It’s not simply a matter of burning leaves.
Wonderfully stated.

One thing that deep, static type systems often lend themselves to is complex types, and those complex types lead to complicated designs; and if I have the option, I'd rather spend my time designing a simple architecture than exhaustively testing and validating a complicated one.

Since using clojure (roughly the last 3 years in data-pipeline style architecture) I try to follow a principle of writing functions that do just one thing, simply, and do it well, keeping the interface as basic as possible. Almost all of the time when writing clojure, I'm writing functions that act on a couple of built-in types and return one built-in type, usually the same one as before.

Additionally, I try to isolate side effects.

Following these principes, I find that even when I'm dealing with a stinker of a namespace or running into a runtime error, it's pretty cheap to try it out in the REPL and get to refactoring.

That said, I kind of want my cake and to eat it too. I do miss static types -- just not as much as I missed them when I was writing Javascript or Ruby. If I write a new clojure library now, yes, I would try to instrument it (at least the public api) with clojure-spec. If I could re-design clojure, I'd leave out null and maybe build a more intuitive interface to clojure-spec to use it as a kind of progressive validation system via annotations and type hints.
This was on the front page yesterday.

https://news.ycombinator.com/item?id=18769110
Its an old meme against obamacare when it was merely a campaign promise

Ive seen this video on youtube back in like 2008
McDonalds is a real estate company that happens to also sell an occasional hamburger. The FDA requires that hamburgers not be cooked in snake oil.
Works for me with NoScript enabled in Firefox.

(It even works in emacs! https://i.imgur.com/NHI7Hh2.png)
Yeah. JFDI is about as simple and effective as it gets.
Someone should just start uploading terabytes of data to S3 using their key. They'll get the message eventually.
Sometimes a lot. Because what I'm really doing in my head then is the design work (writing a sentence actually helps with that) - the work that's actually necessary to write the code well.

When I read something saying "writing thoughtful comments is too much work" I really read this as "thinking about the code you write is too much work, it's better to write whatever crap that first comes to mind".
In my case, AirPods + MB Pro 2013, BT just disconnects for no reason sometimes, other times it refuses to connect. And it's Apples to Apples. Considering the hefty price tag for both devices, the fact that they often fail to produce sound is shameful.
We also need a proper tooling for ASIC and FPGA chip design, see the efforts of SymbiFlow [1].

[1] http://symbiflow.github.io/
> The poster never said they were meaningless, simply that they aren't violence.

Indeed, and the top post in this thread didn’t use the word “violence.”

The point is that words do have profound impacts on society. Words can and do lead to material conditions which may cause actual harm to someone’s day to day life.

As I said, regardless of where one falls on Facebook’s right to pick and choose their own standards, let’s not pretend words are so meaningless they will never lead to material changes in someone’s life. That’s a silly implication. We fight hard for speech precisely because words have so much power.

Edit: clarifying.
If the developer next to you refactored the code without refactoring the comments, they did a shit job. Period. They need to be told to go back and fix it.
Foreigners generally don’t appear at all in Chinese credit systems, to the point that we can’t get credit cards on our own even if we have a lots of money in the bank and a continuing direct deposit.

I really shouldn’t be using my real name on HN, however.
Probably. How do you monetize this though? You can't easily do it the black-hat way (not every vuln is worth something and you gotta have channels for distribution).

On the other hand we got bug bounties which are never paid using bullshit excuses and so you can't monetize it using white-hat ways too.

The correct solution seems to be to research distribution channels for black hat ways? Doesn't sound constructive.
I learned, as part of other neurological investigations, that I may suffer from "dysgraphia", which is actually neurological difficulty with writing that doesn't affect other common tasks (e.g. typing). Turns out it's in the sort of family with dyslexia and dyscalculia, but much less diagnosed since it is less relevant these days.

So maybe it's not about how hard you tried or a failure of learning, but that you're just not meant to write longhand and it's not your fault. I certainly felt better about my abysmal handwriting after learning some of the mechanisms behind it.
Eh. YMMV

Some of us prefer a lean emacs, rather than the kitchen sink.
> When you break things apart you also fossilize that way of approaching the problem, which often makes it more difficult to see orthogonal approaches and refactor towards them later.

This is particularly true on teams where a significant proportion of the developers is reticent to refactor code as they go. It seems that given a developer with a sub-80th (or so)-percentile propensity to refactor, the more broken up the solution is (into smaller functions, methods, classes, modules, etc.), the less likely that developer will be to refactor the solution when an obviously better approach exists.
All the major Java IDEs take type and scope into consideration for code completion precedence. Eclipse did this at least as far back as around 2005 when I first was using it.
Good: High-level comments that provide context, history, and motivation for the current design.

Also good: Line comments that explain cryptic details (eg, the semantics behind bit manipulations) or link to things like protocol definitions.

Bad: Line comments that simply repeat what the code does.
Note this is mostly (entirely?) old news, first reported by Motherboard. c.f. https://motherboard.vice.com/en_us/article/xwk9zd/how-facebo...

(via https://twitter.com/josephfcox/status/1078443875784683521 )
Prema Entha Madhuram by Ravikumar Pediredla
In JavaScript the problem is #2. People who develope in this technology want it easy right the fuck now. Failure avoidance is absolutely the name of the game. It is so prevalent there is even a name for it: invented here.

I can say this in all fairness as somebody who writes in that language fulltime for more than a decade.
The copy is not very well written, for example the part about the engine with variable compression has it backwards. The longer stroke lowers the compression which is favorable to the turbo.
How soon? I've rarely seen it happen in a meaningful way (i.e. other than someone using automated refactoring on some name, and breaking some comment reference that wasn't written in a way the autorefactor tool could read). When it happens and you see it, you should fix it like any other bug.

Key trick is writing comments as close as possible to the code they affect. Then it's hard to miss affected comments if one's not doing a shoddy job.
Look, if the people posting racist hate-speech get banned from all the sites I use, my life is much better. They can go take their trash somewhere else.

You are defending some pretty awful excuses for humans....
I've seen so many embeddable text editors with a server-mode recently. Anyone know if there's a common API standard for editor-as-a-service yet?
> How this wasn't considered database 101 decades ago just blows my mind.

Decades ago they didn't have distributed data stores.
1) If you haven't, take this MOOC: https://www.coursera.org/learn/learning-how-to-learn

2) Machine learning and computational neuroscience are two different fields. You really don't need to understand neuroscience to contribute meaningfully to machine learning.

You'd be much better served by studying mathematics like real/complex/functional analysis, abstract algebra, probability, etc.

3) If you've struggled with suicidal thoughts, anxiety, and depression, don't bother waiting to see a therapist. Finding a therapist should be the first thing on your list.
> Interactive REPL based workflow (think of programming in Clojure like playing a difficult video game based on trial and error with emulator save states vs without).

What?

I'm not sure I understand what that's even trying to say?

Is it trying to say, think of programming as playing a difficult computer game, and using a REPL like having save states?

...because it sounds like you are saying programming in Clojure is like playing a difficult video game based on trial and error, which is a really rubbish endorsement.

> To touch on the video game analogy - imagine playing one of the old Mega Man games, Dark Souls, or Battletoads. Now, imagine that instead of getting feedback (a death) that results in a hard restart at the beginning, you instead just get taken back one action / event that caused an error (a single failed function call in REPL). That's like loading a save state, and if you like easy mode, you'll love the Clojure REPL.

?

mmm... but if your analogy is 'this is like doing something really hard, but you can timestep back to save state so it's not so bad', then you're still basically saying writing Clojure is really hard.

I don't think that's really a fair thing to say about Clojure, it's just a terrible analogy.

Expressing things in Clojure is what it excels at; if you want an anology the REPL is more like a minecraft sandbox that you just continually keep building in, rather, than planning out your structure on paper before you start playing.
The amount of circlejerking in this thread is unbelievable. Go is a horrible language, and if this code were posted anonymously, these same idiots calling it "the jazz music of software development" and "space shuttle style" (copied verbatim from the actual code comments to boot) would be deconstructing and denigrating it to the last fine detail. Hilarious.
What if I don't want any kind of smoke in public places?

I know I'm well into the minority on this one, but I think it's antisocial behavior to smoke anything where the general public will catch so much as a whiff of it and the people who knowingly do it are jerks, but for some reason this is very normalized behavior. I'm not anti-drug though; smoke whatever you want cloistered away from the public.
I agree that there are reasons for Maybe a to be a different type from (a | nil) but there are also good reasons to prefer (a | nil). Like most things, it's a set of tradeoffs. What I appreciated about this talk was that he went into the benefits of thinking about types in this way. It's (relatively) common to see the benefits of Maybe a explained, but more rare to see the benefits of full union types explained.
Way over-engineered. What most people don’t realize is that Bluetooth isn’t just a PHY layer, or a data decription or ‘just’ an anything - it’s everything. Who would make a spec to be 6 layers of an OSI model (only a slight exageration).

USB doesn’t really care what you send over it after a few base class types, BT does.

BT Classic is really bad in the type of designed by committee way. BT Low Energy is alright imo, but intentionally limited (no SPP, 16bit SIG approved GATTS, a 5.0 feature doesn’t “need” to fully support 5.0 in order to be called a BTLE5 device). I think the BY SIG is too big to get out of its own way.
Yes, the default of a lot of languages, (Java, C, etc) where nil is implicitly a member of every other type is a bad default. But that's a separate question.
What helped me, was moving into a different programming field. I moved from Python/C/C++ to iOS development. Learning the new APIs can give you a big boost in job satisfaction.

> For a bunch of reasons, changing jobs isn't that easy at the moment

There's always a reason to not rock the boat. I prepared plans to start freelancing, and then our daughter was born. Quickly after that, my partner left me. I still struggled on and went freelancing. Now things are fine again, the relationship healed, etc. but you need to make changes, and make them quickly or else you may ruin your career.
This has come up a few times on HN if you're curious about the previous discussions:

https://hn.algolia.com/?query=gameprogrammingpatterns.com&so...
This is really interesting a surprising to read. I play fortnite and I feel like overall it has raised my stress levels a bit. Maybe I need to learn from you and practice being calm, or just get better at the game :)
Thanks, wow, I guess I just never dug deep enough past the Aurora marketing, which I see now actually talks about its "distributed storage system".
You are forgetting the tremendous advantages that Go offers for many projects over alternative languages.

There are no perfect languages, that is certain.
Way easier to maintain code that is verbose, I have never been a fan of abstracting functionality with the purpose of having less code to read
WoT proved it 8 years ago.
The Seth Godin talk is “This is broken”. Very entertaining.

https://www.ted.com/talks/seth_godin_this_is_broken_1/up-nex...
> I guess I overlooked it because the other way is so logically trivial, since it basically boils down

Yeah, that's (part of) Hickey's point. That the "best" type systems fail this test, and require manual programmer work to solve this problem. Again, I'm saying this as someone who really appreciates Haskell.
Will Intuit acquire Xero?
Counterpoints / sidenotes: that price is really, really low. We probably should pay more for milk but the industry was dereguated in 2001.

https://www.dairyaustralia.com.au/industry/prices/farmgate-m...