Readit News logoReadit News
d0mine commented on Show HN: Gemini Pro 3 imagines the HN front page 10 years from now   dosaygo-studio.github.io/... · Posted by u/keepamovin
112233 · 5 days ago
It it actively dangerous too. You might be self aware and llm aware all you want, if you routinely read "This is such an excellent point", " You are absolutely right" and so on, it does your mind in. This is worst kind of global reality show mkultra...
d0mine · 5 days ago
It might explain why there is a stereotype the more beautiful woman the crazier she is. (everybody tells her what she wants to hear)
d0mine commented on Alignment is capability   off-policy.com/alignment-... · Posted by u/drctnlly_crrct
stonemetal12 · 6 days ago
Fiction is I have a hypothesis, and since it is not easy to test I will make up the results too. Learning anything from it is a lesson in futility and confirmation bias.
d0mine · 6 days ago
Gedankenexperiments are valid scientific tools. Some predictions of general relativity were confirmed experimentally only 100 years after it was proposed. It is well known that Einstein used Gedankenexperiments.
d0mine commented on What is “literate programming”? (2024)   pqnelson.github.io/2024/0... · Posted by u/joecobb
d-lisp · 8 days ago
Yes, notebooks are a restrictive type of litterate programming, interactive and browser bound.

TeX was "proven" as a text/typography tool by the fact that the source code written in WEB (interleaving pascal and TeX (this is meta (metacircular))) allows for you to "render" the program as a typographed work explaining how TeX is made+ run the program as a mean to create typographic work.

I'm lacking the words for a better explanation of how do I feel sbout the distinction, but in a sense I would say that notebooks are litterate scrips, while TeX is a litterate program ? (The difference is aesthetical)

d0mine · 8 days ago
There is Org Babel in Emacs that can be an alternative to jupyter notebooks for literate programming (research/devopsy tasks). It is more powerful in some aspects and weaker in others.
d0mine commented on Catala – Law to Code   catala-lang.org... · Posted by u/Grognak
embedding-shape · 8 days ago
Law isn't written to cover 100% of real life scenarios and potential cases, it's written with deliberate parts of ambiguity, that will ultimately be up to courts to set the precedents for, in various situations and context.

I think the idea is that you can't really cover 100% of real-life cases in "code", either legal or software, so the areas you'll leave this out of would be those "not-entirely-strict" parts.

d0mine · 8 days ago
The same can be said about driving but self-driving cars exist.
d0mine commented on Fabric Project   github.com/Fabric-Project... · Posted by u/brcmthrowaway
dheepakg · 16 days ago
Should have a better name. There is Fabric, a library in Python, microsoft's SaaS offering
d0mine · 15 days ago
I see fabric python library (open source ssh automation) https://pypi.org/project/fabric/

No connection to microsoft.

d0mine commented on The current state of the theory that GPL propagates to AI models   shujisado.org/2025/11/27/... · Posted by u/jonymo
themafia · 17 days ago
Taken to an extreme:

"Why forbid selling drugs when you can just put a warning label on them? And you could clarify that an overdose is lethal."

It doesn't solve any problems and just pushes enforcement actions into a hopelessly diffuse space. Meanwhile the cartel continues to profit and small time users are temporarily incarcerated.

d0mine · 17 days ago
> cartel continues to profit

It doesn't follow. The reverse is more likely: If you end prohibition, you end the mafia.

d0mine commented on Fifty Shades of OOP   lesleylai.info/en/fifty_s... · Posted by u/todsacerdoti
nr378 · 20 days ago
You can hide fields in Python with a little bit of gymnastics:

  class EncapsulatedCounter:
      def __init__(self, initial_value):
          _count = initial_value

          def increment():
              nonlocal _count
              _count += 1
              return _count

          self.increment = increment


  counter = EncapsulatedCounter(100)
  new_value = counter.increment()
  print(f"New value is: {new_value}")

d0mine · 19 days ago
Usually, a simple function is enough:

    def make_counter(start=0):
      count = start
      def incr():
        nonlocal count
        count += 1
        return count
      return incr
Example:

    >>> c = make_counter()
    >>> c()
    1
    >>> c()
    2
But it hides nothing:

    >>> c.__closure__[0].cell_contents
    2
    >>> c.__closure__[0].cell_contents = -1
    >>> c()
    0
"private" in Python is cultural, not enforced. (you can access `self.__private` from outside too if you want).

d0mine commented on How often does Python allocate?   zackoverflow.dev/writing/... · Posted by u/ingve
jonhohle · a month ago
I’ve tried optimizing some python that’s in the hot path of a build system and a few dozen operations out of over 2K nodes in the ninja graph account for 25-30% of the total build time.

I’ve found python optimization to be nearly intractable. I’ve spent a significant amount of time over the past two decades optimizing C, Java, Swift, Ruby, SQL and I’m sure more. The techniques are largely the same. In Python, however, everything seems expensive. Field lookup on an object, dynamic dispatch, string/array concatenation. After optimization, the code is no longer “pythonic” (which has come to mean slow, in my vernacular).

Are there any good resources on optimizing python performance while keeping idiomatic?

d0mine · a month ago
Idiomatic Python code can be faster than naive C/C++ code. The secret is to offload hot paths outside pure Python. Most such things are written that way already: you do not try to optimize the internal loop for a matrix multiplication in pure Python, you call numpy.dot() instead (pytorch if GPUs can help).

Otherwise, optimizing code in Python is the same as in any other language eg

http://scipy-lectures.org/advanced/optimizing/

https://scikit-learn.org/stable/developers/performance.html

d0mine commented on How I am deeply integrating Emacs   joshblais.com/blog/how-i-... · Posted by u/signa11
raverbashing · a month ago
The more I learn about emacs the more I'm happy I never joined the cult

Don't waste my time with 70s "ergonomics" (if it can even be called that)

The comparisons with art seem almost to the point of offense to me. You're not building art, you're just building another yet plugin for emacs to do what other people do in maybe 5% less efficient ways but won't spend 2 days automating it

d0mine · a month ago
> 5% less efficient

Emacs changes big O. It is not about changing constant factor. If you need N commands with M features then you can implement and combine them in emacs in O(N+M), to get O(N*M) custom commands.

For example, if you need “Search” feature then you can use it everywhere. It can help find you a file in Dired buffer. It can help you find a git chunk in magit. It can help you find todo item in Org mode, etc. It like having a separate `uniq` command instead of implementing it for each shell command (`sort -u` vs. `sort | uniq`). Another example, having `repeat <N> <cmd>` to repeat `<cmd>` command `<N>` times in zsh vs. implementing `<cmd> —repeat <N>` for each command.

The difference is linear vs. quadratic. If you need to do 1000 actions that can be decomposed into 100 commands with 10 features each then in emacs then you need to know and understand ~100 things vs. 1000 in less customizable environments.

d0mine commented on John Carmack on mutable variables   twitter.com/id_aa_carmack... · Posted by u/azhenley
duxup · a month ago
I'm going to maybe out myself as having limited experience here ...

I don't mind the idea here, seems good. But I also don't move a block of code often and discover variable assignment related issues.

Is the bad outcome more often seen in C/C++ or specific use cases?

Granted my coding style doesn't tend to involve a lot of variables being reassigned or used across vast swaths of code either so maybe I'm just doing this thing and so that's why I don't run into it.

d0mine · a month ago
In Python, no user object is modified by a simple assignment to a name. It just binds it.

It is not about mutable/immutable objects , it is about using a name for a single purpose within given scope.

    a = 1
    b = 2
    a = b
"a" name refers to the "2" object. "1" hasn't changed (ints are immutable in Python). If nothing else references it, it might as well disappear (or not).

Though both "single purpose" and immutability may be [distinct] good ideas.

u/d0mine

KarmaCake day4658June 6, 2008
About
email: ZDBtaW5l at google mail
View Original