HNHacker News
TopNewBestAskShowJobs

ValentinA23

277 karma · joined August 10, 2024

submissionscomments
ValentinA23··on Ask HN: What Are You Working On? (October 2024)
Interesting. I've been exploring this space too, but for a LLM-driven MUD (multiplayer text-based game). The most challenging aspect is coming up with an architecture that can easily lend itself to handling "semantic collisions" in a multiplayer context, pretty much like non-neural game engines handle spaceship collisions, or prevent a player from entering a box if another player is in it, but going beyond and handling more abstract, more "semantic" aspects, such as narrative elements.

By the way you should get interested in "narratology" at large. There are benefits to driving the LLM generation with an explicit representation of the narrative structure. For instance if the bad guy turns out to be the good guy, then, narrative logic demands that the good guy was the bad guy all along. As a consequence, appearance and deceit should be keystones values of the hero's arch. There are many interdisciplinary approaches to this domain, some more naturalist/empirical such as trope databses, some theoretical like 70s semiotics while some other framework approach the problem from the perspective of cognition and entropy.

Even though I haven't really started coding anything, this is a very interesting topic to think about because of the technical challenges it raises as well as the scope of the project. Any papers exposing new LLM use and prompting techniques is of potential interest to me now.

It is a wide space

ValentinA23··on Ask HN: What are you working on? (October 2024)
I'm experimenting with a "new" kind of lisp macros.

Macros in lisp are just normal functions that receive the code they wrap as argument and return some modified code. Typically they will just wrap the passed code into some more code. But then there are code walking macro: macros that will traverse passed code to modify it in depth.

What I'm working on is "code diving" macros. Not only will they traverse the passed code, but they will resolve called functions and macros, fetch their source code and traverse it too. And so on. All the redefined fns/macros are accumulated in a let/macrolet binding, topologically sorted by call/dependency order. Instrumented code will call these local redefinitions, shadowing the global definition lexically.

This allow the programmer to write truly local monkey-patches for existing code he doesn't have control over (e.g, code from another library for instance). I'm writing this in Clojure, and the traditional way to do this is to temporarily change the global definitions of targeted variables using with-redefs. This is problematic because other threads will see these redefinitions, and not just threads created within the instrumented code, but already existing threads too.

Another way to do it is to just redefine the targeted functions globally, but then your modifications are available to the whole program for the rest of its execution.

ValentinA23··on Microsoft and OpenAI's close partnership shows signs of fraying
Unless you're OpenAI and provided like 98% of ai generated text that was posted to the internet.
ValentinA23··on Beyond Procedure Calls as Component Glue: Connectors Deserve Metaclass Status
I come for this kind of comments
ValentinA23··on Rama on Clojure's terms, and the magic of continuation-passing style

    (defn test-dbg7 [] ;; test buffers
        (record "test-dbg.svg"
                (let [c ^{:name "chan"} (async-dbg/chan 1)]
                  ^{:name "thread"}
                  (async-dbg/thread
                    (dotimes [n 3]
                      ^{:name "put it!"} (async-dbg/>!! c n))
                    ;; THE BUG IS HERE. FORGOT TO CLOSE GODAMNIT
                    #_(async-dbg/close! c))
                  (loop [x (async-dbg/<!! c)]
                    (when x
                      (println "-->" x)
                      (recur ^{:name "take it!"} (async-dbg/<!! c)))))))
The code above produces the following before hanging:

    --> 0
    --> 1
    --> 2
https://pasteboard.co/L4WjXavcFKaM.png

In this test case, everything sits nicely within the same let statement, but these puts and reads to the same channel could be in different source files, making the bug hard to track.

Once the bug is corrected the sequence diagram should look like this:

https://pasteboard.co/CCyGZKUUkVFL.png

ValentinA23··on Rama on Clojure's terms, and the magic of continuation-passing style
No it is different because libraries such as core.async or Rama rely on inversion of control [1]: the framework is in charge of the control flow and code fed to the framework will be executed by some kind of black box. To achieve this, these frameworks build their own machinery on top of existing core facilities (normal functions, call stacks, etc) to implement similar concepts (rama ops for instance) one level above. The real issues arise when something goes wrong.

If you're lucky you'll get an exception but it won't tell you anything about the process you described at the framework level using the abstractions it offers (like core.async channels). The exception will just tell you how the framework's "executor" failed at running some particular abstraction. You'll be able to follow the flow of the executor but not the flow of the process it executes. In other words the exception is describing what is happening one level of abstraction too low.

If you're not lucky, the code you wrote will get stuck somewhere, but issuing a ^C from your REPL will have no effect because the problematic code runs in another thread or in another machine. The forced halting happens at the wrong level of abstraction too.

These are serious obstacles because your only recourse is to bisect your code by commenting out portions of it just to identify where the problem arises. I personally have resorted to writing my own half-baked core.async debugger, implementing instrumentation of core.async primitives gradually, as I need them.

Having said that, I don't think this is a fatal flaw of inversion of control, and in fact looking at the problem closely I don't think the root issue is that they come with their own black box execution systems. Those are not black boxes, as shown by the stack traces these frameworks produce which give a clear picture of their internals, they are grey boxes leaking info about one execution level into another level. And this happens because these frameworks (talking about core.async specifically, maybe this isn't the case with Rama) do not but should come with their own exception system to handle errors and forced interruption. Lacking these facilities they fallback on spitting a trace about the executor instead of the executed process.

What does implementing a new exception system entails ?

Case 1, your IoC framework does not modify the shape of execution, it' still a call-tree and there is a unique call-path leading to the error point, but it changes how execution happens, for instance it dislocates the code by running it on different machines/threads. Then the goal is to aggregate those sparse code points that constitute the call-path at the framework's abstraction level. You'll deal with "synthetic exceptions" that still have the shape of a classical exception with a stack of function calls, except that these calls are in succession only from the framework semantics; at a lower-level, they are not.

Case 2, the framework also changes the shape of execution, you're not dealing with a mere call-tree anymore, you're using a dataflow, a DAG. There is not a single call-path up to the error point anymore, but potentially many. You need to replace the stack in your exception type by a graph-shaped trace in addition to handling sparse code point aggregation as in case 1.

Aggregation to put in succession stack trace elements that are distant one abstraction level lower and to hide parts of the code that are not relevant at this level. And new exception types to account for different execution shapes.

In addition to these two requirement, you need to find a way to stitch different exception types together to bridge the gap between the executor process and the executed process as well as between the executed process and callbacks/continuations/predicates the user may provide using the native language execution semantics.

[1] https://en.wikipedia.org/wiki/Inversion_of_control

ValentinA23··on Swarm, a new agent framework by OpenAI
I'm inclined to think it from the start
ValentinA23··on Psilocybin bests SSRI for major depression in first long-term comparison
Not a cure but a treatment (sample size: 1)

https://www.reddit.com/r/pssdhealing/comments/10tjyen/a_trea...

ValentinA23··on Swarm, a new agent framework by OpenAI
>People really don't understand how much better LLM swarms get with more agents. I never hit a point of diminishing returns on text quality

Could you elaborate please ?

One use for swarms is to use multiple agents/prompts in place of one single agent with one long prompt in order to increase performance by splitting one big task into many. It is very time consuming though, as it requires experimenting to determine how best to divide one task into subtasks, including writing code to parse and sanitize each task output and plug it back into the rest of the agent graph.

Dspy [1] seems to target this problem space but last time I checked it only focused on single prompt optimization (by selecting which few shots examples lead to the best prompt performance for instance), but even though I have seen papers on the subject, I have yet to find a framework that tackles the problem of agent graph optimization although research on this topic has been done [2][3][4]

[1]DSPy: The framework for programming—not prompting—foundation models: https://github.com/stanfordnlp/dspy

[2]TextGrad: Automatic 'Differentiation' via Text -- using large language models to backpropagate textual gradients: https://github.com/zou-group/textgrad

[3]What's the Magic Word? A Control Theory of LLM Prompting: https://arxiv.org/abs/2310.04444

[4]Language Agents as Optimizable Graphs: https://arxiv.org/abs/2402.16823

ValentinA23··on Psilocybin bests SSRI for major depression in first long-term comparison
https://en.wikipedia.org/wiki/Selective_serotonin_reuptake_i...

>Post-SSRI sexual dysfunction (PSSD)[62][63] refers to a set of symptoms reported by some people who have taken SSRIs or other serotonin reuptake-inhibiting (SRI) drugs, in which sexual dysfunction symptoms persist for at least three months[64][65][66] after ceasing to take the drug. The status of PSSD as a legitimate and distinct pathology is contentious; several researchers have proposed that it should be recognized as a separate phenomenon from more common SSRI side effects.[67]

>The reported symptoms of PSSD include reduced sexual desire or arousal, erectile dysfunction in males or loss of vaginal lubrication in females, difficulty having an orgasm or loss of pleasurable sensation associated with orgasm, and a reduction or loss of sensitivity in the genitals or other erogenous zones. Additional non-sexual symptoms are also commonly described, including emotional numbing, anhedonia, depersonalization or derealization, and cognitive impairment.[64][68] The duration of PSSD symptoms appears to vary among patients, with some cases resolving in months and others in years or decades;

https://www.pssdnetwork.org/

At least, the mushroom didn't steal my mojo

ValentinA23··on Nobel Peace Prize for 2024 awarded to Nihon Hidankyo
My opa was also a Dutch POW, and his story is one for the books. He was assigned to work at a sake distillery just outside of Hiroshima. When the bomb hit, he was in the middle of taste-testing a new batch—he always claimed he was more of a quality control expert than a prisoner. The explosion sent him flying into a stack of sake barrels, and he ended up with a head full of rice wine and a newfound appreciation for the finer things in life.

The distillery, being built like a fortress to withstand earthquakes, somehow remained standing. Opa used to say that if he ever got nuked again, he'd want to be surrounded by sake barrels—apparently, they make for excellent shock absorbers.

Every New Year, he'd tell us about "the time I survived a nuclear blast with nothing but a sake buzz." He'd chuckle, pour himself a small glass of the weakest beer he could find, and toast to "the power of fermented rice."

ValentinA23··on Show HN: Open source framework OpenAI uses for Advanced Voice
What if I'm watching TV and use the AI to control it ? It should only react to my voice (a problem I had that forced me to use a wake word).
ValentinA23··on Vanishing Culture: Preserving Cookbooks
My flowgraphs are not worth showing yet. Laying out graphs properly without human intervention is ... very hard, and this is a fascinating field with a lot of ongoing research.

I can however point you to some designs I generated using dall-e (non-sensical and with a perplexing flow, but the illustration are a good start towards something gorgeous): https://imgur.com/a/1NN8DaU

There are also other ways to use LLMs to explore culinary arts, for instance these "equations" pertaining to caramel:

    1. Creaminess (creamy texture in caramel)
    Creaminess ↑ ⇔ Cream ↑ + Butter ↑ + Milk ↑
    Creaminess ↓ ⇔ Sugar ↑ (hard caramel) + Water ↑ (syrup texture)
    
    2. Hardness (firmness or brittleness of the caramel)
    Hardness ↑ ⇔ Cooking temperature ↑ + Sugar ↑
    Hardness ↓ ⇔ Butter ↑ + Cream ↑ + Shorter cooking time ↓
    
    3. Chewiness (soft, stretchy caramel)
    Chewiness ↑ ⇔ Butter ↑ + Cream ↑ + Glucose syrup ↑
    Chewiness ↓ ⇔ Cooking temperature ↑ + Sugar ↑
    
    4. Stickiness (caramel that adheres to teeth or surfaces)
    Stickiness ↑ ⇔ Sugar ↑ + Longer cooking time ↑
    Stickiness ↓ ⇔ Butter ↑ + Cream ↑ + Shorter cooking time ↓
    
    5. Color (darker caramel)
    Color ↑ (darker) ⇔ Cooking temperature ↑ + Longer cooking time ↑
    Color ↓ (lighter) ⇔ Lower temperature ↓ + Shorter cooking time ↓
    
    6. Sweetness (perceived sugar taste)
    Sweetness ↑ ⇔ Sugar ↑ + Cooking time (slightly shorter) ↓
    Sweetness ↓ ⇔ Butter ↑ + Salt ↑ + Longer cooking time ↑ (more bitterness)
    
    7. Bitterness (burnt or deeper flavor)
    Bitterness ↑ ⇔ Cooking temperature ↑ + Longer cooking time ↑
    Bitterness ↓ ⇔ Lower temperature ↓ + Shorter cooking time ↓

It's difficult to get this kind of info without having a lot of experience in a specific culinary space. I've never cooked caramel seriously so I can't tell if this is right (looks like though), but I have started to master ice cream production this summer, and the set of equations ChatGPT generated was on point, so I guess I can trust those too.
ValentinA23··on Vanishing Culture: Preserving Cookbooks
>just 'adjusted' enough to claim it's different than the original publication.

Is this really a problem ? Last time I checked recipes are not subject to copyright laws in most countries although the text of the recipe is. It's pretty important since I'm building a recipe text to recipe flowgraph converter (using LLMs, of course).

ValentinA23··on Vanishing Culture: Preserving Cookbooks
I'm building something to automate this. Copy paste recipe text/url -> get flowgraph.

Edit: thought the link was about this: https://fluidvisual.com/flowchartrecipes/

Edit 2: "Chapter 2 Resource theories: Monoidal preorders and enrichment", in particular page 2

https://ocw.mit.edu/courses/18-s097-applied-category-theory-...

Edit 3: one problem the representation used on www.cookingforengineers.com has is that it can only represent recipes whose structure is that of a tree: every step can have multiple direct ancestors but leads to only one descendant. Not all steps of all recipes have this "convergence" property. See the lemon meringue pie example in the link above, where yolk and whites are processed separately (filling and meringnue respectively) before being merged in the last step (covering the pie with meringue)

ValentinA23··on Open source maintainers underpaid, swamped by security, and going gray
Thank you! I needed a robust algo to enumerate loops in directed multigraphs, and found an implementation of Hawick's algorithm in D. Instead of writing my own implementation in the language I use, I decided to just compile the code I found and call the binary. Went super-smoothly, even though I had never used D. Great work!
ValentinA23··on Contextual Retrieval
Another approach I saw is to build a conceptual graph using entity extraction and have the LLM suggest search paths through that graph to enhance the retrieval step. The LMM is fine-tuned on the conceptual graph for this specific task. Could work in your case, but you need to deal with an ontology that suits your use case, in other words it must already contain restaurant location, type of dishes served and opening hours.
ValentinA23··on Contextual Retrieval
Interesting. One problem I'm facing is using RAG to retrieve applicable rules instead of knowledge (chunks): only rules that may apply to the context should be injected into the context. I haven't done any experiment, but one approach that I think could work would be to train small classifiers to determine whether a specific rule could apply. The main LLM would be tasked with determining whether the rule indeed applies or not for the current context.

An example: let's suppose you're using an LLM to play a multi user dungeon. In the past your character has behaved badly with taxis so that the game has decided to create a rule that says that whenever you try to enter a taxi you're kicked out: "we know who you are, we refuse to have you as a client until you formally apologize to the taxi company director". Upon apologizing, the rule is removed. Note that the director of the taxi company could be another player and be the one who issued the rule in the first place, to be enforced by his NPC fleet of taxis.

I'm wondering how well this could scale (with respect of number of active rules) and to which extent traditional RAG could be applied. It seems deciding whether a rule applies or not is a problem that is more abstract and difficult than deciding whether a chunk of knowledge is relevant or not.

In particular the main problem I have identified that makes it more difficult is the following dependency loop that doesn't appear with knowledge retrieval: you need to retrieve a rule to identify whether it applies or not. Does anyone know how this problem could be solved ?

ValentinA23··on FTC: Vast Surveillance of Users by Social Media and Video Streaming Companies
The DOJ has just launched a corporate whistleblower program, you should look into it maybe it covers your case:

https://www.justice.gov/criminal/criminal-division-corporate...

>As described in more detail in the program guidance, the information must relate to one of the following areas: (1) certain crimes involving financial institutions, from traditional banks to cryptocurrency businesses; (2) foreign corruption involving misconduct by companies; (3) domestic corruption involving misconduct by companies; or (4) health care fraud schemes involving private insurance plans.

>If the information a whistleblower submits results in a successful prosecution that includes criminal or civil forfeiture, the whistleblower may be eligible to receive an award of a percentage of the forfeited assets, depending on considerations set out in the program guidance. If you have information to report, please fill out the intake form below and submit your information via CorporateWhistleblower@usdoj.gov. Submissions are confidential to the fullest extent of the law.

ValentinA23··on Hezbollah pager explosions kill several people in Lebanon
I've seen some videos. Shattered hips, abdominal wounds, hands without fingers. I haven't seen any dead person, just maimed bodies. Mission successful I guess. Oh and one kid.
ValentinA23··on Hezbollah pager explosions kill several people in Lebanon
A friend of mine who visited Lebanon (and the Hezbollah museum, he gave me a Hezbollah cap by the way) then went to Israel and was subjected to a thorough explosive material search. They basically swiped some kind of broom all over his body (with a focus on genitals) and put it in some device (some kind of spectrometer ?).
ValentinA23··on Hezbollah pager explosions kill several people in Lebanon
I recently discover explosive welding is a thing. It uses PETN packaged as a thin sheet.

https://en.wikipedia.org/wiki/Detasheet

ValentinA23··on A lonely man in his 30s found welcome and community at spin class
>this is, rarely, a problem

It depends on how handsome the guy is. Imagine the following situation. Comp-sci class in uni. 30 guys, 5 women. 4 hit on you. 3 offer sex. Date one, and it's a shitshow. I'm not even talking about other guys being jealous.

ValentinA23··on g1: Using Llama-3.1 70B on Groq to create o1-like reasoning chains
Quiet-STaR: Language Models Can Teach Themselves to Think Before Speaking

https://arxiv.org/pdf/2403.09629

> In the Self-Taught Reasoner (STaR, Zelikman et al. 2022), useful thinking is learned by inferring rationales from few-shot examples in question-answering and learning from those that lead to a correct answer. This is a highly constrained setting – ideally, a language model could instead learn to infer unstated rationales in arbitrary text. We present Quiet-STaR, a generalization of STaR in which LMs learn to generate rationales at each token to explain future text, improving their predictions.

>[...]

>We generate thoughts, in parallel, following all tokens in the text (think). The model produces a mixture of its next-token predictions with and without a thought (talk). We apply REINFORCE, as in STaR, to increase the likelihood of thoughts that help the model predict future text while discarding thoughts that make the future text less likely (learn).

ValentinA23··on Powerful, Open-Source, Programmatic CAD
Writing a transpiler targeting OpenScad is trivial, at least the part that is comparable to a markup language. Control flow, arithmetic and datastructures can be handled one level above in the transpiled language, because OpenScad never produces data – you can't ask it to determine the volume of an union for instance – so two way communication between your code and the geometric engine is not an issue. Just like build123d it seems.
ValentinA23··on Learning to Reason with LLMs
Maybe the model doesn't do multiple queries but just one long query guided by thought tokens.
ValentinA23··on Learning to Reason with LLMs
Quiet-STaR: Language Models Can Teach Themselves to Think Before Speaking

https://arxiv.org/abs/2403.09629

ValentinA23··on For those who hear voices, the ‘broken brain’ explanation is harmful
Hearing voices from the outside vs from the inside boils down to brain anatomy:

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3004180/

>Two homogeneous subgroups of patients were defined based on the hallucination spatial location: patients with only outer space hallucinations (N = 12) and patients with only inner space hallucinations (N = 15). Between-group differences were then assessed using 2 complementary brain morphometry approaches: voxel-based morphometry and sulcus-based morphometry. Convergent anatomical differences were detected between the patient subgroups in the right temporoparietal junction (rTPJ).

ValentinA23··on Lucee: A light-weight dynamic CFML scripting language for the JVM
CFML ?
ValentinA23··on Alexander Grothendieck
The root cause for his departure from mathematics was his categorical refusal to let the military-industrial complex invest in his research at Bures-sur-Yvette.

Source: https://www.jp-petit.org/Nouvelles/Grothendieck.htm

- I know the story. He was a man viscerally opposed to militarism. He once said "he'd rather be shot than wear a uniform." One day a letter arrived at IHES in Bures, where the army's scientific services, called DRET at the time (Direction of Research and Technical Studies), now DGA (Delegation for Armament Applications), offered a grant of four thousand francs (650 euros). When he came across this paper, he flushed red, saying "No way we're accepting a penny from these people!" His colleagues tried to change his mind: "Listen, Alexandre, don't be so rigid. It'll pay for photocopies..."

- And then?

- He said, "It's not difficult, we'll put it to a vote. The IHES scientific council will decide whether or not to accept money from the soldiery. But if you accept this grant, I solemnly warn you: you'll have my resignation in your hands within the minute that follows."

- And what happened?

- They didn't take his threat seriously. The vote took place and the four thousand francs were accepted by a majority of one vote. His face then turned grey, hard as marble. He took a letterhead paper and simply wrote: "I have the honor to tender my resignation" then handed it to the council members and turned on his heel. The next day he didn't show up at his office, nor the day after. Paperwork began to pile up. There were letters from all over the world.

- He was a Fields Medal winner.

- His reputation was such that he attracted the greatest mathematicians on the planet to the Institute. For everyone, he was the beacon of Algebraic Geometry, illuminating the entire planet with all its light. At first, people thought it was depression or a disappearance. At IHES, he occupied an official apartment. After a week, they ended up calling a locksmith to open the door. The apartment was empty. Masses of his papers were found in a trash can. He had thrown everything away, his notes, his books, his reports, his correspondence.

- Incredible! ...

- Wait, weeks and months passed without anyone knowing where he had gone. You can't imagine the panic at the Institute. Scientists started calling from all corners of the world. They had to answer and admit that he had resigned. People wanted to know why he had acted this way, under what circumstances this had happened, where he had gone, what he was doing now. The most unbelievable rumors were circulating. At one point, they thought he had committed suicide, but as some people had met him, they had to face the facts: he was apparently still alive. We have a letter from him dated two years after his resignation from IHES addressed to a company providing organic fertilizers, where he complains that these do not meet the specified standards. It was indeed his signature and, it must be said, his style.

- And since then?

- Since then, nothing. The world's greatest mathematician simply vanished one fine day. He simply let the scientific community know that he wanted nothing more to do with this environment. He announced, through a letter he addressed to one of his former students, his decision to withdraw completely. As people had finally located him in this small village near Carpentras where he had rented a small farm, they hoped to flush him out by offering him a new prize, the Crafoord Foundation prize. This must have been in the early eighties. The amount was around forty million francs.

← PreviousPage 3 of 4Next →