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

Concise better, silly


Out of curiosity, any plans on adding push notification primitives?


We go back and forth on what we should add to the platform vs encourage you to do for yourself. For example, you can do this yourself fairly easily with ntfy.sh: https://www.val.town/v/axelav.sendNotification

But wouldn't it be even nicer to have `console.push` in the platform and it'd then prompt you to accept notifications right from our desktop or mobile website? Maybe soon!


I am always hearing from people who'd like to know when somebody replies to one of their comments. It seems like a notification system for Hacker News could be interesting in general. It's not particularly hard to write a script that follows new posts and comments but I'm not so sure how you pick up edits other than just running slow enough that you fetch stuff after the edit window has expired.


You can use https://www.hnreplies.com to get notified when someone replies to your comments.


God bless Dan Grossman keeping this open and running wherever he is: hnreplies.com


For context it's sinking at 0.1 cm / year, versus 50 cm / year in Mexico City and 20 cm / year in Jakarta.


Now I want an internet connected accelerometer for major cities. That's wild! Is that right? That's so much!


nods approvingly while reading hn instead of just sitting on a bench


Related: https://twitter.com/zetalyrae/status/1639474931086901248

My OCaml:

    let foo (x: bar): baz =
      (\* Is this quuxable? *)
      match is_quuxable x with
      | Yes ->
         (* Then, we have to ... \*)

All the OCaml I see in the wild:

    qlet%bind f = 's 't  'a 'b (fun ꙮ -> ꙮ ((<_<')) ꙮ)
    [@@ppx_gov_backdoor (~b~e~p~i~s)]


Functional programming community likes this stuff. They go into the classical mathematicians’ trap of writing more and more general versions of something even though it’s not necessary.


I think this is partly because of the syntax.

When we write human languages (that use a Latin script), we use punctuation to delineate the beginning and end of terms. In a language like C or Rust, terms are surrounded by commas, parentheses, angle brackets, and so on. In OCaml and Haskell, many things that there is syntax for in C-style languages are done as ordinary function calls, which separate terms by only whitespace.

It is easier to read this (Rust):

  let value = some_long_ass_function_name(some_quirky_parameter, another_one);

  another_function(value)
than this (Haskell):

  let value = someLongAssFunctionName someQuirkyParameter anotherOne
  in anotherFunction value
or this (OCaml):

  let value = some_long_ass_function_name some_quirky_parameter another_one in
  another_function value
Individual terms in camel case are difficult to read if they consist of more than a couple words. Consecutive terms in snake case are difficult to read because underscores and whitespace look alike visually.

Haskell and OCaml's idiomatic solution is to use extremely terse names for arguments, type variables, and local variables, out of what seems to be syntactic necessity.


That's because of currying. If you want to partially apply parameters, in your example, with Haskell we would just have to do this:

        someLongAssFunctionName someQuirkyParameter
And we get a function that accepts one parameter. But in Rust you would have to do this:

        move |another_one: i32| {
            some_long_ass_function_name(some_quirky_parameter, another_one)
        }
Which is not easier to read.


It is true that currying looks comparatively awful in Rust. But that is not because Rust uses parentheses and commas. A hypothetical C-style language could use dedicated syntax for currying, like

  some_long_ass_function_name(some_quirky_parameter, ..)
which would be more readable without giving up on punctuation.


Scala does that, with `_` being a "hole in the expression". I wouldn't call it currying though.

  func(param1, _)
Every once in a while you have to make some change to that expression.

  // you may want to write
  func(param1, func2(_))
  // but you need to write the full lambda
  param2 => func(param1, func2(param2))


Ah, now I realized, you're right. The lack of visual distinction between different syntactic elements is what's killing me.


I don't think this is correlated to functional programming. Programmers in general tend to over-architect because we're often learning as we're going and sometimes it's more fun to use some cool concepts. Since design patterns started becoming en vogue back in the day, OOP codebases got filled with those patterns. Now we are left picking up the pieces with things like `AbstractProxyFactoryBean` or whatever. Same thing with JavaScript where that ecosystem is infamous for using tons and tons of npm packages to recreate simple functionality, e.g. 'left-pad a string'. Arcane mathematics-heavy FP code is just how that expresses in FP languages. And in fact, OCaml is actually an antidote to that (for the most part), because it deliberately offers a lower level of abstraction than Haskell. I frequently say that OCaml is like a cross between Haskell and Go.


I don’t know OCaml, or really any language that would help me fully understand the code, but my exposure to OCaml is this stuff, and it looks pretty clean to me. https://github.com/janestreet/base

Of course, I haven’t read every file, so maybe I got lucky with my random sampling.


It's a pretty practical language, so much so that its creators think it's actually a great language to teach Unix programming, and even wrote a book about it: https://ocaml.github.io/ocamlunix/ocamlunix.html

Excerpt:

> Tradition dictates that Unix system programming must be done in C. For this course we found it more interesting to use a higher-level language, namely OCaml, to explain the fundamentals of Unix system programming.

> The OCaml interface to Unix system calls is more abstract. Instead of encoding everything in terms of integers and bit fields as in C, OCaml uses the whole power of the ML type system to clearly represent the arguments and return values of system calls. Hence, it becomes easier to explain the semantics of the calls instead of losing oneself explaining how the arguments and the results have to be en/decoded. (See, for example, the presentation of the system call wait, page ??.)

> Furthermore, due to the static type system and the clarity of its primitives, it is safer to program in OCaml than in C. The experienced C programmer may see these benefits as useless luxury, however they are crucial for the inexperienced audience of this course.

> A second goal of this exposition of system programming is to show OCaml performing in a domain out of its usual applications in theorem proving, compilation and symbolic computation. The outcome of the experiment is rather positive, thanks to OCaml’s solid imperative kernel and its other novel aspects like parametric polymorphism, higher-order functions and exceptions. It also shows that instead of applicative and imperative programming being mutually exclusive, their combination makes it possible to integrate in the same program complex symbolic computations and a good interface with the operating system.


Until they get enlightened.

Related: https://willamette.edu/~fruehr/haskell/evolution.html


Hmm. I haven't seen the latter in OCaml as much. More the opposite; when I first used it, things like list length in the standard library weren't tail recursive. 8-|

Now, Haskell and shudder Scala shudder, on the other hand.


Compared to Haskell, OCaml developers are generally not to fond of custom operators which shield you from some of the worst cases unless you are reading code an Haskeller wrote in OCaml which happens.

For a long time, most of the users were either writing compilers or static analysers for low level languages and a fair share was very knowledgeable in C and system programming. It had a huge impact on what was seen as idiomatic. You can still find trace of it in for exemple the system library which looks more like the C stdlib than a modern standard library or how the compiler finds libraries.

Generally the community used to have a very different "flavour" than the Haskell one (it was also very French to be fair). I think I t’s less true nowadays. Still I would fall from my chair if I ever encounter someone working on the OCaml compiler writing a disparaging disingenuous post on Haskell. Meanwhile, we are here which reflects exactly my general experience with the Haskell community.

Ppx are used more and more often however and it did make code harder to read.


> Still I would fall from my chair if I ever encounter someone working on the OCaml compiler writing a disparaging disingenuous post on Haskell.

This exactly. OCaml devs uniformly respect Haskell and give it its due props for pushing innovation and commercialization in FP. We just think OCaml is pragmatic especially if you ever need to scale up your codebase and team.


Oh, I like Haskell a lot. I'm a bit leery of using it because performance and memory use are still a bit of a dark art, though much less than they used to be.

I just like mocking Haskellers (and Scala) for the symbols. :-)


The latter code looks totally quuxable.


Nah, I think it's already been quuxed up.


Thanks! Whenever I see a generic type i cry a bit.


You can go 100x faster using SIMD on the CPU, instead of doing the linear algebra by hand, then another order of magnitude or two on the GPU.


There is nothing more frustrating than a status page that lies about the state of an API. Feels like insult + injury. I'd rather they not even have a status page!


Unfortunately almost all status pages are for gaslighting purposes when things get really bad.

Easier to tell a developer they’re crazy and their code was wrong than to admit to downtime and violate any SLAs.


There have been various attempts to create status pages that aren’t controlled by the companies they are watching. Not sure which are the most popular now.


That's super cool!


Since there is so much criticism here of NordVPN (in general, not for open-sourcing), what are the VPNs that people like?


I am not related to them, I'm just a user of it. But Mullvad.net is the only decent VPN. (They're the one Mozilla chose to provide their VPN infrastructure)

They've been audited https://mullvad.net/en/blog/2022/6/22/vpn-server-audit-found...

I have no financial incentive to vouch for them. But what do you care, I'm just a random guy on the internet.


Never forget though, Auditing is only proof that it was secure at the moment of the audit. That applies to all VPNs and services.


Rather, auditing is only proof that the parts the auditors looked at were secure against what the the auditors knew to look for, at the moment of the audit.


Auditing might not even cover the entire codebase.

For example, this is the writeup of the DeFi Euler hack yesterday by one of the sites listed auditors, who didn't actually audit the code that caused the bug...

https://medium.com/@omniscia.io/euler-finance-incident-post-...


That's true. Good point.


How about ProtonVPN?


Same company (no matter how hard they try to hide it), so unless it has better pricing or features, if you don't trust Nord, there's no reason you should trust Proton.

Though I do trust both, as Tesonet is based from here (Lithuania) and from my experiences with people who worked there, they have full trust in them and continue to use their services years after leaving the company.


> Same company (no matter how hard they try to hide it)

Do you mean that NordVPN and ProtonVPN are the same 'spiritually' in that they're both companies selling a VPN for profit? Or is there genuinely some business connection between them that I've missed?


In the sense that there's a huge overlap of people who created Nord that are now working on Proton. Might be under the same employer indirectly (Tesonet or whatever they're called now). Whether officially they're under a different company/jurisdiction, that's a different thing.

From Tesonet[1]:

>We also provided ProtonVPN(opens in new tab) with operational and HR support when they decided to open an office in Vilnius.

>Contrary to all the myths and rumors, operations by different services have never been related to each other. The only common resources are the centralized HR and legal teams. We have strictly relied on this philosophy from the beginning in order to avoid any possible conflict of interest.

[1] - https://www.techradar.com/news/moving-the-vpn-industry-forwa...


None of them. No really read that again: None. Of. Them. https://gist.github.com/joepie91/5a9909939e6ce7d09e29

Especially not after Kape Technology bought up review sites and VPNs and updated reviews to shill the ones they own.

Kape Technologies was formerly known as Crossrider before it was acquired by Teddy Sagi, an Israeli billionaire that has spent time in jail for insider trading. Crossrider itself never had that great a reputation itself, what with their primary product being a development platform through which they were frequently used by third parties to invade ad platforms to serve up malware. They are now the owners of ExpressVPN, PIA, CyberGhost, and Zenmate.

https://restoreprivacy.com/kape-technologies-owns-expressvpn...

And then j2 global owns a bunch of others.

https://www.techradar.com/news/pc-mag-owner-j2-global-buys-s...

I'm 99% sure every VPN on the market is a honeypot or data broker at this point.


Mullvad is mostly liked by everybody. Including me.


Mullvad is a great example of how all VPN companies who promote privacy should behave, if only for the signup process itself. Zero personal information required.


Take a look at Mullvad for a VPN done right. Completely anonymous usernames, randomly generated, accepts cryptocurrency or cards purchased anonymously at a physical store with cash.

One concerning issue is the Swedish jurisdiction. The nordic countries are better at privacy, but Sweden is a 14-eyes nation. But I can't say it's better or worse than NordVPN's... Panama.


As long as people still realise that regardless of whether they pay with cash in an envelope or directions to the end of a rainbow, if they connect with their own IP to mullvad’s servers and there’s some compromise of these promises (court order, etc), it’s trivial to be owned.


Or if you wanna pay by cash, just send it to them in an envelope. No need to buy a card first then using that, when you can pay by the alternative that gives you the most privacy.


If you're up to trying something new, we've built a technology to replace consumer privacy VPNs: https://safing.io/spn/

Technical summary of the SPN (Safing Privacy Network):

- A Privacy Network aimed at use cases "between" VPN and Tor.

- Uses onion encryption over multiple hops just like Tor.

- Routes are chosen to cover most distance within the network to increase privacy.

- Exits are chosen near the destination server. This automatically geo-unblocks in many cases.

- Exclude apps and domains/entities from using SPN.

- Change routing algorithm and focus per app.

- Nodes are hosted by Safing (company behind Portmaster) and the community.

- Speeds are pretty decent (>100MBit/s).


Just so everyone knows: only Safing hosts exit nodes. Only relays (the intermediate hops) can come from the community.


Thanks for providing additional information to readers. However, this is not entirely correct. Let me clarify:

- Community nodes are used to diversify server ownership and strengthen the privacy of connections.

- Community nodes may technically act as entry, middle and/or exit nodes.

- Community nodes will never be used for unencrypted connections, only for encrypted connections. We are thinking about a concept of trusted partners, which will also be allowed to handle unencrypted connections - but this is currently not the case.

- We publish advisories [0], which are automatically applied by all clients. This gives us the ability to quickly react to changing situations. Currently, community nodes _are_ being selected as exit nodes, but not as entry nodes.

I hope this cleared things up. I am happy to go into more detail.

[0] https://github.com/safing/intel-data/blob/master/spn/main-in...


Mozilla/Mullvad seem to be liked well enough. It's what I use, but I am doing it for geolocation issues and occasional scraping, so I am less concerned about logging/security.


I set up my own VPN with https://github.com/trailofbits/algo

Hosted on DigitalOcean and the setup was completely automatic, it deletes its own access after its done.

Note you're still beholden to ToS of your host, but tbh they don't seem to care no matter what I do with it.

I know it from here.


One that is not from my country or the political alliance my country is in.


A tonne of people here recommending Mullvad, which is great - they're great - but they don't offer the main selling point of most VPNs, so I feel this question needs qualification:

What are you looking for a VPN for. As much as the ads misrepresent the security & privacy aspects of NordVPN, &c., the vast majority of people use VPNs to watch region-restricted media. Mullvad does not support this.

So ... who's the best provider for watching region-restricted media?

NordVPN honestly seems like a very competitive option here


Mullvad is excellent. No email required, all sorts of payment options including cash in an envelope. Can even get gift cards now.


Perfect Privacy. VPN chaining, setting so your IP address always changes to be the one closest to the server, no logs (audited), stored in ramdisk, unlimited connections and bandwidth because they don't even know who's connecting.

Cons: it can be slow and have issues with disconnects sometimes.


Perfect privacy was at least in the past run by austrian neonazis: https://www.zeit.de/gesellschaft/zeitgeschehen/2012-09/neona...


I didn't know that, but it almost makes me trust their service more. While I don't share their views, I do think technologically capable extremists are probably who I'd most want behind a service that I use as a layer for anonymity and privacy from everyone including government agencies.


They do have reasons to stay private though, you must give them that.


Mullvad


I use AzireVPN because they were one of the first providers to support the WireGuard protocol.

https://www.azirevpn.com/


+1 for Mullvad, I usually only buy time when I'm traveling to secure my traffic in airports/hotels/etc


ProtonVPN


Freedome VPN by F-Secure


There is a mindset where each bookmark is an implicit obligation, and they of course pile up faster than you can go back and peruse them to your satisfaction, so this understandably leads to an unpleasant feeling of unfulfillable obligation.

After getting into all the second brain stuff and trying out quite a few ways of organizing this kind of information, I've started to think very carefully about what sort of implicit commitment I'm making when I write something down. I use a system of tags for things I need to look at later in some way, and I almost never tag links, but I often search back through them to find something particular that comes to mind, and I'm glad I store them.

Maybe you would have success reorienting your perspective to feel like "just" bookmarking is enough, such that there's not an implicit responsibility to come back and do something particular with the bookmarks? Or if you want that responsibility, that you can have one kind of bookmark that you're "just" saving, and another kind that you are okay committing to review?

Then it might become clearer just by the size of the folders if you're "assigning" yourself an impossible amount of work.


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

Search: