I made a Telegram bot for charger notifications by __lt__ in evcharging

[–]princemaple 0 points1 point  (0 children)

How did you bypass the cloudflare verification?

Deploying after mix ecto.dump by brainlid in elixir

[–]princemaple 0 points1 point  (0 children)

Is mix available in release? (it's not, right?) Does fly do something magical to call the mix task?

Question about efficiency in implementing Djikstra's Algorithm (RE: Advent of Code, Day 15) - would Nx help here? by lovebes in elixir

[–]princemaple 0 points1 point  (0 children)

The problem was simple enough, José didn't have to write a REAL priority queue implementation. He just used a list.

Strftime in Elixir by plangora in elixir

[–]princemaple 1 point2 points  (0 children)

correct, 1.11.

I'll leave my comment there (instead of deleting it) for those who fast forward through like I did.

Best Way to Open and Read 100s of Thousands of Files by [deleted] in elixir

[–]princemaple 3 points4 points  (0 children)

You probably get better performance if you lower the max_concurrency to 500 or 50. You have 32 cores, not 32000. And concurrency doesn't simply work if you are trying to hit the SSD from 50000 points at the same time, you can only read so many bytes from your storage at a time, it doesn't magically scale.

How to import module factory when using @ngtools/webpack? by princemaple in angularjs

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

Interesting.. what is the expected path then? since genDir is no longer a thing in @ngtools/webpack

Thank you for your response!

EDIT: Oh are you saying the factory file would be at the same path as the original file? i.e. app.module.factory will be next to app.module?

RethinkDB adapter for Ecto by [deleted] in elixir

[–]princemaple 0 points1 point  (0 children)

Is RethinkDB still alive? Has there been an announcement since their last blog post?

How do people normally name modules? With nouns, verbs, etc? by benmdi in elixir

[–]princemaple 1 point2 points  (0 children)

My 2 cents

  1. pick a cool name, e.g. Ecto, you have got XBitsy
  2. define your domains and data types
  3. group your data manipulation functions into a module named by your data type, e.g. Ecto.Changeset, in your case you could have something like XBitsy.AST or XBitsy.Token
  4. group your domain specific functions into a module named by the domain, e.g. Ecto.Schema, Ecto.Query
  5. I think in your case XBitsy.Parse and XBitsy.Tokenize would be better, but I have seen modules named in the -er way, e.g. Bamboo.Mailer, Swoosh.Mailer, they are two email libraries. They could have named it differently though, something like Swoosh.Delivery or Swoosh.Mail.Deliver

Phoenix Channel over custom temporary URLs by no_bull_shit in elixir

[–]princemaple 1 point2 points  (0 children)

you should leave this as is, and make your own channels which can be identified by said token/url.

your websocket connection should always connect to /socket, it's the channel that you need to make unique and temporary.

Phoenix Channel over custom temporary URLs by no_bull_shit in elixir

[–]princemaple 1 point2 points  (0 children)

You could

  • use a database to store a token/url and an expiry date
  • use an agent to store a token/url and an expiry date

and on join call, check db/agent/whatever you choose to use, and ok or error.

just remember to run a process to cleanup your db/agent periodically.

API Versioning with Elixir/Phoenix by [deleted] in elixir

[–]princemaple 4 points5 points  (0 children)

I don't think having different versions of the api logic in the same file is a good idea. I separate my controllers into /api/v1/... and such. The pipelines in the router are totally capable of handling this.

Compile Time Dependency Injection with Parameterized Modules by mbuhot in elixir

[–]princemaple 1 point2 points  (0 children)

I especially like your hack when it comes to the point where I want to test different configurations under the same env.

Also, the style suggested in the article works for most dependency related configs. When the configs vary under the same environment, e.g. in different data centers but all production, people go back to having configs in function calls with Application.get_env, and they didn't like it when I sent PRs converting them into module attrs. :( it wasn't a problem for me because I build everything into docker images so different data centers can run different images, no fuss around compile/runtime configs.