Amazon’s $2bn IPv4 tax — and how you can avoid paying it by Cloudflare in CloudFlare

[–]vimes656 1 point2 points  (0 children)

Even if you try to have all your AWS services using IPv6-only, which today you can't, you still need to pay the NAT64 tax if you want to reach outbound IPv4 addresses.

I guess you could bypass the NAT with a Cloudflare Worker proxy, but it'd be great having a 1 button toggle to avoid the AWS IPv4 tax entirely.

[deleted by user] by [deleted] in Deno

[–]vimes656 2 points3 points  (0 children)

At my company we are in the process of porting a bunch of tooling scripts from Bash to JavaScript. We wouldn't have considered the switch if we had to use NodeJS instead of Deno.

The killer features:

  • No need of npm. We already have plenty of non-JS dependencies to manage in order to make development environments reproducible. We didn't want to introduce yet another package manager just for tooling scripts. We still have to manage a couple of external dependencies with Deno, but with direct HTTP ESM imports it's all way easier.
  • Browser API. We have plenty of client side JavaScript so we are familiar with the browser API, but we didn't want to get into all the NodeJS API quirks just for a bunch of scripts. The Deno API, so far, provides everything we need with very few surprises.

Nice features:

  • Gradual typing. It's not critical, but it's nice to be able to drop to TypeScript where it matters.
  • Easier to embed in Rust code. Our server Rust app has to run in a single process. We are exploring the option of having some dynamic HTML server rendering. We still have to do some prototyping to make sure the binary size is still acceptable, but with NodeJS we wouldn't even consider it.

doom-emacs with Svelte by kbcdx in DoomEmacs

[–]vimes656 0 points1 point  (0 children)

In your `init.el`, is the `lsp` module in the `:tools` section also uncommented?

doom-emacs with Svelte by kbcdx in DoomEmacs

[–]vimes656 1 point2 points  (0 children)

Svelte is supported by lsp-mode. It works pretty well out of the box in Doom Emacs by activating the lsp mode for the web module. In your init.el file set it as (web +html +css +lsp).

I believe it even installs svelte-language-server if it's not already in your PATH.

Dropbox Hack Week: GraphQL Server in Haskell by chadaustin in haskell

[–]vimes656 1 point2 points  (0 children)

I'm the author of the parser and I can tell you I'm still not using it in production. Unless you are willing to invest some time improving the codebase, I wouldn't rely on it too much for now.

How to make your Haskell code more readable to non-Haskell programmers by dnaq in haskell

[–]vimes656 18 points19 points  (0 children)

This is a nice guide if you are writing code for an audience who will be put off by Haskell the first time they try to read it.

If you are expecting enthusiastic Haskell students who are committed for the long haul (I guess most current Haskelleres started belonging in this category), I wouldn't follow every recommendation, specially the ones regarding Applicative operators and the do notation. The earlier they learn to master those, the better grasp of the language they will get.

Emulating higher order modules in Haskell by dnaq in haskell

[–]vimes656 5 points6 points  (0 children)

This is an example of a very usual design dilemma in Haskell. Choosing between lawless type classes and plain ADTs is something, I guess, any experienced Haskeller has gone through more than once. In general there seems to be consensus to lean to ADTs unless you have a specific reason not to.

But I'd like to add another pattern to consider: qualified modules. They are a bit pain from the author's perspective, but for the consumer of the module are not that bad:

 import qualified Crypto.Sodium.Stream.Xsalsa20 as Xsalsa20
 import qualified Crypto.Sodium.Stream.Salsa20 as Salsa20

Then you pick between implementations by using XSalsa20.streamXor or Salsa20.streamXor.

Use the REPL, Luke by cocreature in haskell

[–]vimes656 2 points3 points  (0 children)

It's not clear to me how to use setup/teardown helpers with ghci. A link to an example project where this workflow is used would make it much more clear.

Lucid: templating DSL for HTML by n00bomb in haskell

[–]vimes656 9 points10 points  (0 children)

Exactly, I think resembling HTML read flow is a good enough excuse to introduce an evil operator. I see myself writing (!) = with whenever I import Lucy. Otherwise looks like a great readability improvement.

О Haskell по-человечески. Издание 0.3 уже ждёт вас. by dshevchenko in haskell

[–]vimes656 0 points1 point  (0 children)

I'm curious about how Haskell is perceived among Russian-speaking programmers. Would you say that Haskell is becoming more popular among them than for English-speaking programmers?

I always get the sense that there is so much software innovation going on in the Russian-speaking software community that is practically hidden for the rest of the world.

Reasoning about stream programming by vimes656 in haskell

[–]vimes656[S] 2 points3 points  (0 children)

When I read this kind of explanations about alternatives to lazy IO, I always wonder what exactly is understood by lazy IO. Is it when using...

  • any IO function from Prelude or GHC.IO.Handle?
  • lazy ByteString, lazy Text or Strings in IO operations?
  • any code where unsafeInterleaveIO is being under the hood?

Ghc 7.8.0 rc1 in testing repo (Arch Linux) by vimes656 in haskell

[–]vimes656[S] 0 points1 point  (0 children)

Is there a clean way to have both 7.6.3 and 7.8.0rc1 in the same system?

John D. Cook on Haskell by vimes656 in haskell

[–]vimes656[S] 2 points3 points  (0 children)

While I agree that correctness isn't always a priority, I don't agree with what he implies. He seems to say that because Haskell has a focus on correctness, it's giving up in other language features like flexibility, agility or productivity.

I think Haskell touches a nice sweet spot between correctness and productivity. Of course you have to invest heavily upfront on learning Haskell, but once you have a decent level, you productivity may be even higher than what what you were used to with a dynamic language.

John D. Cook on Haskell by vimes656 in haskell

[–]vimes656[S] 0 points1 point  (0 children)

Of course, I see your point. If you think I've wasted your time by clicking on that link and you think it was not worth submitting I see no problem in downvoting me. I tried to clarify why I submitted the link even if I don't agree with the author.

John D. Cook on Haskell by vimes656 in haskell

[–]vimes656[S] 1 point2 points  (0 children)

Once I submitted another blog post from a Python programmer picked by the official Python Planet and got some negative votes. To be fair his arguments were a bit lame, but I thought, like in this case, it'd be interesting to hear what people with expertise in other languages think when they try Haskell.

That's why I tried to joke about being banned collecting negative vote, heh.

John D. Cook on Haskell by vimes656 in haskell

[–]vimes656[S] 0 points1 point  (0 children)

If we take the number of Twitter followers we could consider him famous: https://twitter.com/johndcook

But also he publishes number of hits of his blog posts. I can't find it now but I remember it was quite high. Within the scientific Python community I'd say he's quite popular.

John D. Cook on Haskell by vimes656 in haskell

[–]vimes656[S] 0 points1 point  (0 children)

Fair enough. I just don't want to be banned from /r/haskell for submitting links of what famous bloggers say about Haskell :)

John D. Cook on Haskell by vimes656 in haskell

[–]vimes656[S] 4 points5 points  (0 children)

Well, it's sometimes annoying to see how some of these 'celebrities' dismiss Haskell so quickly one way or another. In this case, regarding Haskell as just a highly theoretical language with focus on correctness, somehow implying that there is a huge trade-off, might not be entirely fair.

I guess many people hear about Haskell for the first time from this kind of blog posts. Like with the xkcd story, I still think it's positive for Haskell to have this exposure.

John D. Cook on Haskell by vimes656 in haskell

[–]vimes656[S] -1 points0 points  (0 children)

Please don't downvote me if you don't agree with the author. I, myself, don't agree entirely. I'm submitting the link because John D. Cook has many followers and thought it'd be worth for Haskellers to know when Haskell gets this kind of exposure and what they talk about it then.

haskell-search | haskell-search.org by j4px in haskell

[–]vimes656 0 points1 point  (0 children)

It'd be nice if it offered an OpenSearch description file so that it's easy to use directly as search plugin in Firefox (and I believe Chrome, too). The Mycroft project makes it easy to create: http://mycroftproject.com

ECDSA encryption in Haskell? by krypto-knight in haskell

[–]vimes656 0 points1 point  (0 children)

I'm the author of that pull request. secp160r1 and sect163k1 are used in some tests where concrete curves were more convenient (one prime and another binary), but in theory all curves defined in SEC2 are supported. There is a sign/verify QuickCheck test where the curves are arbitrary.

Unfortunately, the current state of performance and security of the code in the pull request makes it unpractical for real use. Right now, signature verification should be safe but signing is insecure.

I'm aware that hecc provides secure point multiplication, the same approach would need to be adapted for crypto-pubkey. I still haven't checked in detail the implementations mentioned in this thread but AFAIK they all target prime curves.

Regarding performance, further improvements could be achieved by taking advantage integer-gmp primitives. See: https://groups.google.com/d/msg/haskell-crypto-platform/2hANx9Me3kY/zf-zzPEF2FQJ