HNHacker News
TopNewBestAskShowJobs

linkdd

2,632 karma · joined June 19, 2019

email: david.jose.delassus@gmail.com

  - https://link-society.com
  - https://krouter.cloud
  - https://flowg.cloud
  - https://linkdd.github.io
  - https://david-delassus.medium.com
submissionscomments
linkdd··on Ask HN: Am I Misunderstanding TailwindCSS?
My favorite toolset is:

  - vue3 + typescript
  - scss
  - bulma ( https://bulma.io )
  - https://coolors.co/ to create color palettes
I've also worked with the Quasar Framework ( https://quasar.dev ), which gives you a lot out of the box, but I love the simplicity of vue3 on its own.
linkdd··on Ask HN: Am I Misunderstanding TailwindCSS?
I know how to work with flexbox, grids, etc... I know how to create layouts.

But designing something from scratch that has been designed better by a framework, I don't want to do that. It's not my specialty for a reason.

I know how to customize and implements new features over frameworks like Bootstrap and Bulma. And I use Sass a lot for that purpose. But no, I won't rewrite a navbar component each time I start a new project.

linkdd··on Ask HN: Am I Misunderstanding TailwindCSS?
I don't know for React/Angular, but with VueJS you have:

  <style scoped>
  .a-class-that-will-not-leak { /* ... */ }
  </style>
Considering this feature, what's the difference between writing CSS properties or using Tailwind's @apply ?

Also, such CSS classes are also available in frameworks like Bootstrap or Bulma:

  <a class="has-text-weight-bold has-text-centered">
But they also give me:

  <nav class="navbar"> ... </nav>
Which would be responsive and functional, unlike the one I would implement with homemade CSS.
linkdd··on Windows 11’s first big update arrives with Android apps, taskbar changes, more
Give me back the tiles in the start menu!

I pin the apps I use all day long to the taskbar. And I used the tiles in the start menu for apps I use once in a while but still want quick access. And I use the search for everything else.

The tiles are the single greatest UI feature of Microsoft the past few years. Windows Phone was my favorite mobile OS because of this. Give me a colored box with some text on it, icons are hard to read, especially if you got a lot of them.

linkdd··on Httpie accidentally made themselves private and lost all GitHub stars
How does this happen "by accident" ?

There is a modal window that forces you to type the name of your repository. One would need to accidently:

- click on make private - type "httpie/httpie" - click "i understand the consequences"

linkdd··on Show HN: Wordle Without Waiting a Day
Ah sorry I misunderstood you.

It seems the list I downloaded is very much incomplete. I should change the message from "Not a word" to "Word is not in the list", it would be more accurate.

linkdd··on Show HN: Wordle Without Waiting a Day
Thanks for the feedback, yes a lot of words are hard to guess :)

But DRAPE is a word: https://dictionary.cambridge.org/dictionary/english/drape

I downloaded the list from an online dictionary, I would be surprised if it weren't.

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
Unpractical for me, my "devel" folder is organized as follow:

  |-+ orga (github, gitlab, other)
  | |-+ domain (infra, business, research, ...)
  | | |-+ repo-name
VS Code do not support hierarchies of projects in a workspace, so I would just have a huge list of `project-name` where project-name would be manually renamed to `orga/domain/repo-name`.
linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
> Go is terrific for multithreaded apps.

Yes, true. But so is Erlang/Elixir.

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
Because I mostly worked with teams who built internal tools, be it monitoring solutions, or APIs consumed by BI tools, or custom CMDBs, custom CMS, etc...

Every single one of them was deploying the projects on the internal infrastructure, sometimes a small Kubernetes cluster, some other times just an EC2 instance, most of the time just one or two VMs.

Each employee was given a computer with a VPN client pre-installed, to connect to the internal infra.

The biggest company I've worked with had 10k employees, still not enough to see any impact on performance on the slowest single-threaded service we made.

When deploying, we were simply adding to the internal DNS server an A record "service.internal-domain.tld" pointing to the IP of our server. No load balancer, no reverse proxies, no HTTP/2 in the stack.

It's cheap, it works, it's certainly not something you would do if you were serving a SaaS application to millions of user on the world wide web, but it's definitely enough for internal stuff.

Even Google does not have more than 100k of employees.

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
In theory: explicit error handling.

An error should be taken care of immediately, or propagated with some additional context. Returning the error instead of throw/catch makes this explicit and forces the developer to think about it.

In practice: a lot of boilerplate code.

Rust does this better with the Result type and the ? operator.

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
There is a difference between switching protocol, and:

  - not migrating to broadband from 56k modem
  - not upgrading to a browser version which supports HSTS
  - not trying anything with new features at all
HTTP/1.1 still serves its purpose, successfully, without any impact on performance/usability. I'm not Google, I'm not serving a webpage to 8 billions devices at the same time.

Sure I can try HTTP/2 (and I did), and HTTP/3 (and I will). But when it comes to distributing an application/service to customers, I'll automatically choose the battle-tested 30 years old technology which is supported by everyone and every device.

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
Yes, it basically render webpack obsolete :P I've not yet created a product used by so many people that this optimization was needed, maybe tomorrow?

> If your website has a lot of small files served

What about JSON/GraphQL APIs?

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
I deploy on Kubernetes, so it will be behind an Ingress controller (NGinX, Istio, ...) if it needs to be exposed to the outer world.

If I was deploying to baremetal, I would either have a HAProxy/Keepalived reverse-proxy, or a load balancer that most probably supports it.

But HTTP/1.1 have not yet failed me, so I have not yet considered the migration.

If it's not broken, don't fix it :)

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
I think the only reason Go was adopted is because Google was behind and pushing it.

But the result is that today, the ecosystem is huge. Implementing a kubectl plugin in Go is far easier than in other languages. Many things are in fact simpler with Go thanks to its vast stdlib and ecosystem.

I hate it, and yet... It's still useful to me.

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
My biggest annoyance is that the Go language is full of implicit conventions/behaviors:

  - interface implementation is implicit
  - "export" is based on the function/type/member name (first letter uppercase)
  - private functions/types/members are private within a package not a single file
  - ...
This is painful because when you read a single file, you need to know about the rest of the code. This makes it very hard to get started with a new codebase, especially a huge codebase.

The other annoyances I have are just petty, like "if err != nil", zero-values, or the fact that VS Code still does not support Go projects in subdirectories (I like to open my whole "devel" folder).

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
> If you use Go or gRPC

I'm not. My go-to web frameworks are Elixir/Phoenix, Python/Django, NodeJS/ApolloServer.

I have an irrational hatred for the Go language, but still use it to develop quickly some CLI tools.

linkdd··on HTTP/3: Everything you need to know about the next-generation web protocol
When HTTP/2 came out, I was wondering how long it would take for the billions of websites/APIs/webservices/... out there to migrate from HTTP/1.1

HTTP/2 came out in 2014, and since then I still haven't seen it used in production in the jobs I worked at.

Now, I wonder again, will HTTP/4 be released before we migrate to HTTP/3 ?

The real question here is, what are the arguments in favor of a migration? When starting a new web project, should you really consider anything else than HTTP/1.1?

linkdd··on [dead]
The officiel website is https://neutralino.js.org

The domain is `js.org`, neutralino being a subdomain ? Or is it a custom TLD `.js.org` ?

linkdd··on Ask HN: Why do we never see inovation in web browsers?
To add some examples to this complete answer:

- https://stackbrowser.com/ - https://www.uzbl.org/ (abandonned) - https://luakit.github.io/

linkdd··on dwm
> It's not uncommon with tiling WMs that have good multi-monitor support, but you really can't find it in traditional WMs

That's because this feature is not a Freedesktop standard. The X11 root window have a property _NET_NUMBER_OF_DESKTOPS and a few more[0] to help implement this behavior.

Most tiling WMs choose to ignore this standard in favor of this great feature. But the WMs of Gnome, Xfce, KDE, etc... will probably never implement it just in case some apps don't support it (like some games that needs to be floating windows in tiling WMs).

  [0] - https://specifications.freedesktop.org/wm-spec/1.3/ar01s03.html
linkdd··on Learn Python is a bad choice and I explain in detail why – CodeX
> You hear this "learn the fundamentals first" so many times and it really bothers me as I don't think it's great advice

Exactly. This is also why we don't teach ZFC set theory to 5 years old. We start with "1 + 1 = 2".

When they learn functions, like sqrt, we don't tell them about imaginary numbers.

This is true for ANY subject. You start at the surface, and you dig deeper. Analogies made at the beginning will help you make a mental visualisation of what happens. 99% of the time, those analogies are just false, and that's ok.

Imagine teaching to a 10 years old about quantum mechanics because it's wrong to say that the universe is made of many tiny balls...

linkdd··on Would I go about creating a programming language
Interesting article.

I've been designing my own language for the past year and a half: https://letlang.dev

I feel like the phase 2 of the design is very long, longer every time I have a question like:

  - how would I do this?
  - does this syntax make sense with the rest of the language?
  - is this feature really useful? how would it be used?
As for the compiler, I've often started to write the parser for an ever-changing syntax, while the AST did not change that much.

Now, I use a different approach: I write the AST and then the compiling/transpiling/interpreting phase. This allows me to make unit tests and make sure things work the way I intend it to. The parser will be the last piece of the puzzle.

After 1 year and a half, I just began writing the compiler, and I expect to switch between implementation and design quite often as I encounter road blocks. I'm also expecting to cut some features to get a first MVP out, but the AST will be there.

linkdd··on “Deltacron”: Cyprus discovers new Covid variant combining omicron and delta
Covid variants should use semantic versioning.
linkdd··on Elasticlunr, a full-text search library for Elixir
I'd say even using mnesia as an option for disc copies.
linkdd··on Show HN: A task runner / simpler Make alternative written in Go
Some interesting ideas for sure.

But by reading the "Usage" guide, I did not find how to implement this:

  EXEC = example.exe
  SOURCES = src/main.c src/example.c # ...
  OBJECTS = src/main.o src/example.o # ...
  HEADERS = includes/example.h # ...

  all: $(EXEC)

  $(EXEC): $(OBJECTS)
    $(CC) $(LDFLAGS) $^ -o $@

  %.o: %.c $(HEADERS)
    $(CC) $(CFLAGS) -c $< -o $@
On another note, make is not that hard, it's available on every platform, a Makefile can be very short even for complex build systems. I'm not sure replacing it with a YAML file is such a great idea.

Don't get me wrong, some of the features exposed here are very good and I would like to have them in make:

  - .env support and dynamic variables (like the GIT_COMMIT example)
  - namespaces
  - explicit fingerprinting
  - cleanup with defer
  - dry run mode
linkdd··on Ask HN: Who wants to collaborate?
I'm writing a new functional language using Rust as a side project.

The repository is not yet opensource because it's in a very early stage (syntax/grammar not definitive, AST not definitive, ...), but if you'd like to help, feel free to contact me (my email is public on github: https://github.com/linkdd

The key features of the language are:

1. values does not have a single type, instead a type declares what values it has:

  class int(n: number) check
    frac(n) = 0
  end

  42 is int     # true
  42 is number  # true
  42 is string  # false
2. Equations that have one or more solutions yields a boolean (need to implement a SAT solver)

  class even(n: int) check
    thereis k: int, n = 2 * k
  end

  42 is int   # true
  42 is even  # true
  43 is even  # false
3. Expressive type definitions:

  class odd(n: int & !even)

  43 is even  # false
  43 is odd   # true

  class result(r: (:ok | :error, any))

  (:ok, 42) is result         # true
  (:error, "oops") is result  # false
  # NB: `:ok` and `:error` are atoms like in Erlang/Elixir
4. Generics:

  class ok<T>(val: (:ok, T))
  class err<T>(val: (:error, T))
  class result<T, E>(r: ok<T> | err<E>)

  ok<int>(42) is result<int, string>          # true
  err<string>("oops") is result<int, string>  # true
5. Set builder notation:

  let s = { x: int | x > 0 }
  s is set<int>  # true

  let russel_paradox = { x: set | x not in x }
  # impossible:
  #   set class does not exist, but the generic class set<T> does
  #   set<T> can only contains T, therefore:
  #     { x: set<int> | x not in x }
  #   is invalid as well, since set<int> is not an int
6. Map/Filter/Reduce operators:

  let sum_of_even_ints_below_10 = { x: int }
    |map x => x * 2
    |filter x => x < 10
    |reduce[0] acc, x => x + acc
7. First order logic operators:

  (true ==> true) = true
  (true ==> false) = false
  (false ==> true) = true
  (false ==> false) = true

  (true <==> true) = true
  (true <==> false) = false
  (false <==> true) = false
  (false <==> false) = true
8. Rust-like Pattern matching:

  x := 42
  y := match x {
    42 => true
    _ => false
  }
9. Goroutines and streams

  func worker(s: stream<int>) -> :ok
  do
    let val: int
    s >> val
    s << (val * 2)
    :ok  # single point of return, last expression is the return statement
  end

  func main() -> (:ok | :error)
  do
    let s: stream<int>

    run worker(s)

    s << 1
    let val: int
    s >> val
    
    match val {
      2 => :ok,
      _ => :error
    }
  end
10. For now, it's an interpreted language, but I'd like to compile to LLVM IR instead
linkdd··on Ask (Poll?) HN: How many hats are you wearing?
Me and my associate wear all the hats.

We are a 2 man team trying to get our product on the market. Our main skills are technical and we're trying to learn (the hard way) the commercial/marketing skills because we funded this out of our pocket and do not have infinite money.

linkdd··on Ask HN: What is your favorite programming language and why?
Erlang/Elixir: The language, the ecosystem, the packaging/distribution, everything is so well thought and carefully designed.

Typescript: The type system is very expressive, and easy to read unlike more powerful ones like Haskell.

Shell (bash): Yes, no other language comes close to compose programs together and manipulate/redirect text to/from files/other programs. I wish for another language to give me the opportunity to write something like:

  export BAR="foo-$(wget https://some-api.example.com | jq -r .some-field)"
  cat <<EOF | kubectl apply -f -
  ---
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: example
  data:
    foo: $BAR
  EOF
Makefile: The simplest/most portable way of abstracting/automating complex commands. I'd choose make above any other tooling that has been reinventing the wheel (looking at you gulp, grunt, etc...). Whenever I'm working with teammates/coworkers, telling them "just run 'make' to setup your dev env" is just priceless.

One could argue that my last 2 entries are not programming languages, yet they are powerful tool that IMHO every dev should know.

linkdd··on Ask HN: What is a good joke that shows your personal sense of humor?
A belgian, an american and a french walks into a swimming pool. The owner tells them it's a magic pool, you say a word and you dive into a pool made of that word.

The belgian says "beer" and dive into a beer-filled pool.

The american says "dollar" and dive into a dollar-filled pool.

The french runs, slips and says "shit!".

← PreviousPage 14 of 29Next →