Readit News logoReadit News
cwp commented on Ternary Operators   buttondown.com/hillelwayn... · Posted by u/azhenley
pistoleer · 10 months ago
After some thinking, the ternary conditional operator can be decomposed into 2 composing binary operators like such:

? takes a bool, a T, and returns option<T>

true?b == Result b

false?b == None

: takes an Option<T> and a T and returns T

Result x : y == x

None : y == y

However, in most languages (looking at you php) the ?: act as a type of parenthesis: in a?b:c, any expression goes into b, no matter it's precedence.

cwp · 10 months ago
Nice. Another aspect of the ternary operator is conditional evaluation. Beyond parenthesis, in a?b:c, only one of b and c get evaluated.
cwp commented on Ask HN: Is it possible to make FAANG salaries without working there?    · Posted by u/zer0sand0nes
javier123454321 · a year ago
I also came from a place with unlimited and I loved it. Makes me wonder if the people that regurgitate the notion that it's a trap actually have worked in places with unlimited.
cwp · a year ago
Agreed. I was skeptical at first, but I've worked at several companies with unlimited PTO and they all specifically encouraged people to take time off. One place was explicit that the reason they switched to unlimited was to get people to take vacations: "PTO is not meant to be a bonus when you leave the company. We want you to rest and recharge."

My current company recently made a rule that you have to apply for time off through the HR software. Not make it harder to take PTO—all requests are auto-approved-just so HR can track it. At the next all-hands the CEO said something like "You guys work really hard... we're, uh, worried." My manager has been bugging me to take a proper vacation instead of my usual day off here and there.

There are certainly awful, exploitative workplaces out there. But there are also great companies run by good people.

cwp commented on Anthropic: Expanding Access to Claude for Government   anthropic.com/news/expand... · Posted by u/Luuucas
noodlesUK · a year ago
I can imagine that for many government tasks, there would be a need for a reduced-censorship version of the AI model. It's pretty easy running into the guardrails on ChatGPT and friends when you talk about violence or other spicy topics.

This then begs the question of what level of censorship reduction to apply. Should government employees be allowed to e.g., war-game a mass murder with an AI? What about discussing how to erode civil rights?

cwp · a year ago
Sure. Everyone, including government employees, should be allowed to discuss anything with AI. The problem is actually doing illegal things, which is... already illegal.
cwp commented on Apple's On-Device and Server Foundation Models   machinelearning.apple.com... · Posted by u/2bit
mdhb · a year ago
I don’t actually think this is complicated and reading a comment is not the same thing as scraping the internet and you obviously know that.

A few factors that come to mind would be:

- scale

- informed consent which there was none in this case

- how you are going to use that data. For example using everybody others work so the worlds richest company can make more money from it while giving back nothing in return is a bullshit move.

cwp · a year ago
Reading a comment is exactly the same thing as scraping the internet, you just stop sooner.
cwp commented on Apple's On-Device and Server Foundation Models   machinelearning.apple.com... · Posted by u/2bit
cush · a year ago
Reading, no. Selling derivative works using, yes.
cwp · a year ago
If I read your comment, then write a reply, is it a derivative work?
cwp commented on Ask HN: What rabbit hole(s) did you dive into recently?    · Posted by u/RetroTechie
cwp · a year ago
I got a ZSA Voyager split keyboard and then spent weeks exploring custom layouts. The first question was QWERTY vs something better. Then there was layers and layer navigation. And should I swap out the key switches? And Keyboard Maestro.

Now I'm trying to abandon 30 years of muscle memory and typing at 4 wpm while I learn Colemak-DH. Maybe what I should really do is build a custom 34-key board...

cwp commented on Pkl, a Programming Language for Configuration   pkl-lang.org/blog/introdu... · Posted by u/bioballer
zelphirkalt · 2 years ago
Maybe not always, but surely in most cases of too complex a config, it is a case of ad-hoc grown config, representing what one wants to actually configure badly, and/or underlying abstractions of the thing one wants to configure matching badly what one wants to do. In most cases it would be good to take a step back, or multiple ones at that, and really ask oneself: "What is it, that I actually want to configure here?" and think about why it cannot be a simpler config. What abstractions would actually make expressing that config easy.

Often one will get to a very simple config format in the end. Of course, when one has to deal with very complex formats created by others, already widespread in use, on cannot easily change the format. Maybe that is the reason we get these meta config tools.

cwp · 2 years ago
Sure. There are undoubtedly a lot of config formats that are overly complex.

But sometimes the complexity is irreducible. Kubernetes is one such case. The model is very well thought out, and just about as simple as it could get without removing functionality. It has sensible defaults, built-in versioning, well-defined schema etc. But if you want to describe a complete installation of a distributed system with many heterogenous processes, spread across many hosts, communicating in specific ways, with specific permissions, persistence, isolation, automatic scaling, resilience, etc, there are a lot of details. I've worked with systems that have thousands of lines of configuration, and honestly that's not extraordinary. Many people on this site will rightly scoff and say, "psshh, that's nothing."

Configuration languages are a really important area of research in the tech industry right now, and every time someone posts one on here, there are a huge number of dismissive comments. Fine. Not everyone has this problem, but it's a real problem, and solving it represents a real advance in the state of the art.

cwp commented on Sam Altman, OpenAI board open talks to negotiate his possible return   bloomberg.com/news/articl... · Posted by u/YetAnotherNick
cwp · 2 years ago
/me sighs

The board has not been consistently candid in its communications with... anyone.

cwp commented on ZeroMQ – Relicense from LGPL3 and exceptions to MPL 2.0   github.com/zeromq/libzmq/... · Posted by u/excerionsforte
cobertos · 2 years ago
Is it very common to contact _every_ maintainer and back out changes from ones who don't respond for license changes?

I feel like I've heard of many larger companies doing relicenses on their open source without this kind of effort.

cwp · 2 years ago
Yeah. This is how Squeak changed the license from SqueakL to Apache and MIT. That code has a lot of history, so it was a pretty big effort, but worth it in the end.
cwp commented on ZeroMQ – Relicense from LGPL3 and exceptions to MPL 2.0   github.com/zeromq/libzmq/... · Posted by u/excerionsforte
sneak · 2 years ago
* an organization that doesn’t believe in software freedoms

If you believe in software freedoms, then there will never be any reason to need to relicense, nor would you want to.

Free software is an ideology, like human rights. You can’t use it only sometimes and be said to support it.

cwp · 2 years ago
The FSF disagrees with you on that.

u/cwp

KarmaCake day4461February 20, 2007
About
ML Engineering at https://vannevarlabs.com/
View Original