HNHacker News
TopNewBestAskShowJobs

JaumeGreen

606 karma · joined April 14, 2016

submissionscomments
JaumeGreen··on Needed 1+1, built a functional programming language
I'm not saying that competent coders will see the problem and think about doing trees and code it that way. I'm saying that if you have that problem and want to solve it with trees (so knowing the problem and a solution) they should be able to program it.

And in a way you are solving it the same way, if I understood you correctly.

Assuming you mean that you'd have classes, and create objects with the operations, it's the same as a tree.

1+2*3^(4+1)+2/3 -> plus( plus(1, mul(2, power(3, plus(4,1)))), div (2/3)) would be the object hierarchy created.

OTOH if you are parsing it and doing the operations that can be done because all the operands are known:

1+2*3^(4+1)+2/3 -> 1+2*3^5+0.66 -> 1+2*243+0.66 -> 1+486+0.66 -> 487.66

You'd be, once again, doing the tree but instead of having it as an structure you'd be directly parsing the leafs than can be operated and act on them. This way would maybe be faster for simpler expressions (no need to construct the tree), but probably be more expensive than tree construction and resolution for more complex ones.

JaumeGreen··on Needed 1+1, built a functional programming language
If you want to have the full operation recorded this is the way to do it. Either this or a non-binary tree in where multiple operators with the same operand and level are all together:

         (+)   
       /  |  \
     (1) (*)  (/)
        / |    | \
      (2) (^) (2) (3)
          / \
        (3) (+)
            / \
          (4) (1)
If you transform the mathematical operation to lisp terms you will have the tree explicitly written.

The only way that I can think of to make it simpler is to go the array language route of going right to left and ignore precedence, or some similar way of working.

The code to create the tree should not complex, so yes, AI could be used, but most competent coders should be able to create a basic version and test it in an afternoon.

If you are parsing left to right it can be quite easy to balance things, you should not need rebalancing at all. When you are in an operation node and you have to add an operation of the same level of priority, you always get the existing operation and subtree, put it on the left of the new operation, and continue from there.

With this if you try to do - next to a - or +, or a / to a / or *, you'll be preserving the order of the operations, and the calculation will be correct. Try it with 2*3/4.

       (*)   
       / \
     (2) (3)

        (/)
        / \
       (*) (4) 
       / \
     (2) (3)
If you add some more operations to the right (*2/5*12/7) you keep growing the tree. It will not be balanced, but it doesn't need to be.
JaumeGreen··on Needed 1+1, built a functional programming language
We could give weight to operators. Operators that are heavier go further down the three (have precedence) while the lighter ones float.

1+2*3^(4+1)+2/3

We start the evaluation with 1+, the chain would be on (+) for now.

       (+) <
       / 
     (1) 
The next operator is (*), and because this one is heavier it falls down, bringing 2 with it.

       (+) 
       / \
     (1) (*) <
         /
        (2)
Now checking the next operator (^), once again heavier, goes down the three.

       (+) 
       / \
     (1) (*)
         / \
       (2) (^) <
           /
         (3)
The next operation is between parenthesis, that takes precedence and goes down, but the pointer comes up after the operation has taken place.

       (+) 
       / \
     (1) (*)
         / \
       (2) (^) <
           / \
         (3) (+)
             / \
            (4) (1)
    
Next operation is (+), this one floats, and as it's the same weight at the root it doesn't matter its relationship with it, so we put it higher.

        (+) <
        / \
       (+) 2
       / \
     (1) (*)
         / \
       (2) (^)
           / \
         (3) (+)
             / \
            (4) (1)
Finally we got the division, which is heavier again.

         (+)
         /  \
       (+)   (/)
       / \    / \
     (1) (*) (2) (3)
         / \
       (2) (^)
           / \
         (3) (+)
             / \
            (4) (1)
Did this on the fly, so it might have edge cases, but it works well as a starting point.
JaumeGreen··on LibreOffice breaks download records after declaring it has no AI features
I use Google remote desktop with my mother. It's not perfect but it's adequate.
JaumeGreen··on ChatGPT outage – Resolved
I'm getting the text too, of course. Several variations of the code with it usually.

Trying to get an AI give ONLY a simple answer and not several is "boring" to me, as for me AI is a supplement to my reasoning ability, not a substitute.

Appending "code only" seems to work, at least with "golf fizbuz code only" gave me this one liner, which is long, but at least doesn't have the text that you dislike.

    for i in range(1,101):print('FizzBuzz'[i%3*4:8-i%5*4]or i)
JaumeGreen··on ChatGPT outage – Resolved
"golf fizbuz" works well, giving a 54 Python one

    for i in range(1,101):print("Fizz"*(i%3<1)+"Buzz"*(i%5<1)or i)
"golf fizzbuzz" gave a 46 perl one

    print$_%15?$_%3?$_%5?$_:Buzz:Fizz:FizzBuzz,$/for 1..100
Both "code fizzbuzz" and just "fizbuz" gave this longer python one-liner

    print('\n'.join("Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i) for i in range(1, 101)))
That's the magic of using a known problem, you don't need to write much and even with incomplete prompts it can be understood. Everything a different new chat in kimi.ai, which was the AI window that I found first among mine.

Not interesting enough, to me, to try with other LLMs or phrases.

JaumeGreen··on Dwarf Fortress' creator says the industry's in shambles over AI
Luckily for us China based companies are pushing the price down and bringing it to those who can afford a decent hardware. Which might not be everyone, but enough people to make it matter.

The day AI goes good enough to work in place of a principal engineer, and 10.000 people get fired, is the day when 10.000 new 1-person companies will appear that will make you whatever software you want at a fraction of the cost the big companies want to rent it to you.

Software is becoming a true commodity. Data, Hardware, specialised knowledge, good taste and engineering practices, and connectivity. Those might be key points that might keep people on a certain infrastructure, not just the software.

JaumeGreen··on Queryable Executables
So like a Lisp, APL, or Smalltalk program image, but with SQL as the driving force.

Everything old is new again. And I don't mean it in a disparaging way. There's lots of "old" ideas that are simply great ideas that did not win on their own time but might come back with force in the future.

JaumeGreen··on Most countries provide between 20 and 40 paid days off
I know this happens in UK and Spain, at least.
JaumeGreen··on Most countries provide between 20 and 40 paid days off
I work in a multinational with people on UK, Spain, Portugal, and some other countries. I know this happens in Spain and UK.
JaumeGreen··on 2026 Eclipse Webcams
Pictures do not do justice, and in my opinion the most photographed part (moon covering the sun) is not the most interesting one.

How the light changes, the corona when it's total darkness, and the light coming back again. All this is hundreds of times better than the occlusion (IMHO).

Watching the moon in front of the sun, with the corona around it, it's a memory that I plan to hold on for as long as I can.

JaumeGreen··on Most countries provide between 20 and 40 paid days off
Except for some drastic cases I've not seen people taking more than 2/3 single days a year.

In most places in Europe the first sick days are not comped, so any missed day is a missed paid day. When social security comes into play they tend to pay the base pay of the position.

That would mean that if you miss a week because of an illness you might see a salary reduction close to a fifth of your monthly salary. That's something that most people don't have the luxury.

Apart of that most companies treat any medical leave after the third (yearly) as suspicious, which needs extra investigation.

So as we might not have a limit, and it's relatively paid, most people do meagre use of it.

JaumeGreen··on Making
TL;DR If you want to be a nitpicker and choose overly precise verbs almost no one is a maker.

I will not be looking for books, and probably "made" is a bit too informal to be used in any kind of "formal" conversation, and as I'm not an English native I might be using false friends, but there's another synonym used by Unesco referring to his works [0]

> Works of Antoni Gaudí > > Seven properties built by the architect Antoni Gaudí [...]

So yes, if you want to be overly precise he will not have "made" or "built" any of his buildings. OTOH you have to stop that simile somewhere, as otherwise people who compile their programs might not be the ones that "made" the executable, they just wrote the code.

[0] https://whc.unesco.org/en/list/320

JaumeGreen··on Making
You know Gaudí? He was a great architect, and made great constructions visited by millions, like Casa Batlló, Casa Milà, or la Sagrada Familia.

To be fair he didn't place a single stone, and la Sagrada Familia was finished long after his death.

So yes, I believe you can make products using LLMs.

If there is a line, it's definitely between "I designed the architecture, and decided on what each class should do, before letting AI do a single line" and "I told AI to clone twitter as is".

Although the latter could be akin to kids colouring books. "I made AI clone twitter, but painted it red and called it rettiw." As long as there was some decision or a modicum of effort it's "ok". We can let them have their victories and try again.

JaumeGreen··on AI is wiping out entry-level jobs
Maybe. Maybe education should be about focusing you in a field, at least the higher you go. But you can focusing on the field learning about how to operate there, of just getting the skills needed to work.

When I was at university (and the years after) some people where saying that university should give you the skills to hold a job, mostly talking about programming in that case (computer engineering degree).

But as AI has shown us those skills (programming) are the first to stop being useful. Learning engineering, architecture, how to think programmatically, ... all these skills are the ones that will survive the culling.

JaumeGreen··on Saying Goodbye to one line of APL
I presented the same idea[0] and some people had already built something similar.

[0] https://news.ycombinator.com/threads?id=JaumeGreen#46718221

List of links:

[NKoP]: https://mlajtos.mu/posts/new-kind-of-paper [MathNotes]: https://mlajtos.mu/posts/new-kind-of-paper-5 [Fluent]: https://news.ycombinator.com/item?id=46649223 [Demo]: https://youtu.be/y5Tpp_y2TBk

https://mlajtos.mu/posts/new-kind-of-paper

JaumeGreen··on Show HN: Poppy – A simple app to stay intentional with relationships
The problem is not remembering other people, it's contacting them. One always has a thousand excuses to not do the right thing. By gamifying it, and setting reminders, it gives a nudge in the right direction.

It's not different to setting reminders to go to the gym, take your medicine, or any other thing you should do regularly.

And by using this clutch you can train your social muscles so you end up not needing it.

I've used something similar in the past, setting up reminders during the day to keep in contact with someone, using them enough so now I can keep in touch with them without needing the reminders (I no longer have them set up).

For some people there are "basic" things that are hard, these kind of tools are for them.

JaumeGreen··on Don't become an engineering manager
Engineering Manager can be a social role with some tech aspects.

You attend meetings, negotiate deadlines, evaluate people, navigate project minefields, take decisions or force people to take them,... and the technical aspects are quite minimised.

Depending on the company this is not an upgrade, it's a lateral move. I have people under me who earn more than me, and I agree with that.

The job it's not easy, it's different. Spending 5 hours on meetings it's easy, but exhausting. Giving credit to your people but taking the blame (which is what should be done) it's easy, but demoralising. Not having a peer group of people with whom easily socialise makes the job feels lonely, when you talk with other managers it's 99% work related, and you can't make your people like you as a person.

Most days I'd love to have a clear objective.

One of the worst is the strange feeling that you have because you've studied for a long time some skills, and worked using them, and now those are hardly used. You need to use a set of skills that you haven't trained for, and haven't used as much (depending on your personality/skillset, of course).

Being a manager is not for everyone.

JaumeGreen··on How not to answer the salary question
You can set some reasonably high expectation, not as a target but as an aspiration.

Case in point, once when I was asked it I was "I read in an study that one gets happier with more salary up until 85K€, so my aim is to go towards that range". In the end I ended up halfway between that and my then salary. BTW, the study was then superseded by another that happiness keeps increasing, just not as fast.

Of course your situation might be different, and you could take inspiration for 6 digits, $500K or any other amount that would be perfect for you if accepted because it's higher than what you would have accepted, and you can get something below that that would be a stepping stone.

In Spain, at least, salary needs discussing early, too many divergences between some companies and some people expectations on that. So I disagree leaving it for later.

JaumeGreen··on Show HN: Record and share your coding sessions with CodeMic
Nice. I had the same idea and now I see it done without lifting a finger.

I could not make it work to watch a session from my vscode in steamos (it could be misconfiguration from my part), so I don't know if you can alter the speed of the reproduction from there, which would be great.

From my inexistent list of improvements, make it so that 2 video sources can be sent simultaneously, one for the speaker, another for a presentation video. That way you can see the person doing the course, while seeing the important bits, and see the code.

JaumeGreen··on Claude's new constitution
I was explicitly trying to avoid making a personal judgment over the matter on the posts. I do have a negative opinion about it, but that was not of importance.

I don't know for sure how people considered slavery 200 years ago, I haven't studied enough history, but the slavery that is more commonly known as slavery was legal. That implies that at least more people accepted that than nowadays.

Nowadays that kind of slavery is frowned upon on at least on the first world.

Modern day slavery has plenty of aspects, and some of them are not considered bad by some part of the population, or not considered a modern iteration of slavery. Working full time for a job that doesn't pay you enough to survive and needing subsidies, not having enough time or energy to look for something better, is IMHO bad and slavery, while for lots of people it is the result of being a lazy person that needs to work more.

Is that situation bad? According to me, yes. According to some economical gurus, no.

Is that situation objectively bad? That is a question I am not answering, as, for me, there's no objective truth for most things.

JaumeGreen··on Claude's new constitution
Not "slavery was right 200 years ago" but "slavery wasn't considered as immoral as today 200 years ago". Very different stake.
JaumeGreen··on In Praise of APL (1977)
One of my list of dream projects that I might never have time to do, and so feel free to "steal" the idea, would be a eink notepad in where you could code in APL or similar.

APL was born as a mathematical notation, pertaining to the blackboard, so it makes sense to write it using a writing implement. Its terseness would make it ideal for the handwriting world, it's REPL implementation would give quick feedback loops, you could move around input and output streams.

You could be in a sofa, writing the solution, expending most of your energy thinking, not writing, once you got used to the new way of thinking and the vocabulary.

If you haven't tested any array language I would recommend you try to solve things using one, and check existing solutions so you can see how to think differently. Some problems are naturally easier with this approach, some are harder.

JaumeGreen··on Claude's new constitution
200 years ago slavery was more extended and accepted than today. 50 years ago paedophilia, rape, and other kinds of sex related abuses where more accepted than today. 30 years ago erotic content was more accepted in Europe than today, and violence was less accepted than today.

Morality changes, what is right and wrong changes.

This is accepting reality.

After all they could fix a set of moral standards and just change the set when they wanted. Nothing could stop them. This text is more honest than the alternative.

JaumeGreen··on AI agents are starting to eat SaaS
I miss MSAccess, but for the modern age. It has been replaced by basic CRUD using your platform of choice, but it's not as easy.

That would be similar to your solution, so either one would work.

I think that there might be some similar alternatives (maybe Airtable? probably using Lovable or Firebase counts) but nothing that is available for me for now.

JaumeGreen··on Why we can’t quit Excel
Spreadsheets are the killer apps. Since I became pointy haired sheets and documents are the fuel of most what I do. Even things like Jira we use them only for the bare minimum and we refer to sheets to see how things are going. Not that I think it's sane, but it's what works.

I even have done this first day's advent of code, and the first part of day two, in a Google sheet. Formulas only, so no scripting needed.

JaumeGreen··on RFCs: Blueprints of the Internet
What I dislike of RFCs is that some are accepted, but still referred as RFC, for no apparent reason.

I specially dislike when some people try to do the same with internal documentation and still call "RFC 2029 Project Lifecycle" when it has been accepted by all the appropriate parties. It makes it harder to look for than needed, and it's not clear, by the name, if it has been passed or not.

JaumeGreen··on Four-year wedding crasher mystery solved
FYI naming it Catalan Spanish would be akin to naming Welsh as Welsh English. Catalan and Spanish (also known as Castilian) are two different languages, like French and Italian.

So it's normal that you didn't understand much, as even it having some words that are similar the tonalities and some of the constructs are very different.

And they might have been speaking in Balearic, which is a Catalan dialect, and that's sometimes even harder to understand.

JaumeGreen··on Programming languages should have a tree traversal primitive
One of the projects that I have only in my mind space is an Iversonian language with more data structures and the tools to easily navigate an traverse them. Trees, graphs, ... the sky is the limit. And with the power of notation as a tool of thought, and a pen interface, it would be fun to do whiteboard sessions that produced real code that could be executed as is.

OTOH I read/heard that the beauty of array languages is that they have few data types, but they can be easily worked on. So maybe the answer is not easier tree traversal primitives, but better literature/training on how to transform it in a more manageable data type.

Sometimes the answer is to adapt our vision to our world, sometimes the answer is to adapt the world to our vision.

JaumeGreen··on Widespread power outage in Spain and Portugal
I love in Spain and in my zone I didn't have Internet access until after 22:00, and it was sloppy at best.

0:49 and light came back, and woke us for a moment.

So yeah, you need local first POS applications.

Page 1 of 6Next →