News for hackers. Stuff that matters.

devnull3

In the beginning, I was trying to use Rust like C (which I think lot of people do) and was struggling with the borrow checker. I had a light bulb in my head one day to read the function signature and see if its '&self' or '&mut self'.

If any one API of a struct/enum has '&mut self' then its instance cannot be shared across threads without using a mutex (which brings its own friend along i.e Arc). This led me to structure the code in my mind much in advance to prevent borrow checker issues.

Another use of this is while embedding an object in a struct. When I realized that '&mut self' infects everything up the call chain it was a big learning moment. That is the embedding struct also needs a mutable borrow as well.

Re:Generating Mazes on Sunday August 25, 2024 @10:32AM (#41347566)
Under pressure, I suggested the following:

1. Only one solution (or path in this case) should exist

2. No loops (meaning the valid solution does not cross it-self)

3. The length of false path from correct path should not be more than 4

Re:Generating Mazes on Sunday August 25, 2024 @05:09AM (#41345760)
Maze(s) triggers PTSD in me. I was asked to write a code to generate one using a 100x100 grid in an Google interview in 40 min such that it was "fair". It was for L6/L7 (IC) position. I wrote a working code and the interviewer even acknowledged that I had atleast have a working code compared to others. The actual time I had was 30 min as 10 min included upfront discussion about what "fair" means and some time after-the-code discussion on improvements.

I was rejected with lean-no-hire (or weak-no-hire .. I don't remember the exact term but basically not a strong reject).

Re:Amazon S3 now supports conditional writes on Tuesday August 20, 2024 @05:13PM (#41304142)
How is this priced? Is it Get + Put or only Put?
We humans have to be exact about the word exact. This is my point really. Same with AI.
> will do exactly what they are told

If you have to encode the exact if-else conditions, then how it is different than regular software development.

We want AI to be as intelligent as Humans. This is the holy grail. But humans are also whimsical, irrational and slave to emotions. So we are attempting to design a system which is replicate this nature as well.

So we want a system which we want it to behave in just about "perfect" manner (i.e. intelligent but not going astray). What passes as "perfect" is subjective and there will be different definitions of it.

Now to control this you want a capability to precisely define the allowed and dis-allowed behaviour. At this point we are essentially circling back to the software systems before the AI.

Re:Cosmic: A New Desktop Environment on Thursday August 08, 2024 @12:17PM (#41193163)
> a visually appealing GUI

I think it requires a combination of things: a good taste, a sense of visual design and programming. The first two is more of art form.

Most of the developers on these projects are really good at programming but its rare to get a good combination mentioned above AND willing to work on open source over multiple years consistently.

Update: Also someone in the decision making hierarchy needs to have a keen sense of design. Example: Steve Jobs learnt calligraphy and even though he did not actually designed it he would certainly veto and pass feedback to the developers.

If there is a such a breakthrough then the hackers or even spy agencies will not reveal it. They will instead silently make use of it. It will be essentially a backdoor for them.
This demonstrates why it can be hard to be intuitive with large numbers and exponential in nature.
Re:Zig vs. Rust at work: the choice we made on Thursday June 20, 2024 @04:21AM (#40736276)
C-interop while certainly more involved in Rust compared to Zig, it is generally a one-off effort (for most projects). wards it's generally an incremental effort to map additional C code. I am not sure I would make this an important factor but to each his own.
Re:Tesla's FSD – A Useless Technology Demo on Saturday June 15, 2024 @05:24AM (#40688562)
> old Italian city

Try traffic in India [1][2] If it were a game, then India will be the last boss fight in ultra-hard mode.

[1] https://www.youtube.com/watch?v=KnPiP9PkLAs

[2] https://youtu.be/WC2FUEmKEu8?t=412

Re:I am not yet ready to switch to Zig from Rust on Friday June 14, 2024 @12:47PM (#40682394)
Any idea how many years away Zig is from v1.0?

As someone sold on Rust, I really want Zig to succeed.

That is the reason AWS & Azure are much more successful when it comes to enterprise customers. This is where the real money is.
Also AI (as promised) will deliver a customized solution to an extent that for a human to even solve the problems in it will need a lot of context. This in itself makes it dependent on humans. Also you have to factor in knowledge redundancy, non-availability of your personnel. So you will always have to account for more people than AI promises.
Re:Ramanujan's Lost Notebook on Tuesday April 16, 2024 @02:55AM (#40049059)
Atheism is an accepted school of thought in Hinduism [1]

Indian philosophy is diverse and vast. See the comparison of these philosophies [2]

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

[2] https://en.wikipedia.org/wiki/Indian_philosophy#Comparison_o...

Re:AutoDev: Automated AI-driven development by Microsoft on Saturday March 16, 2024 @11:23AM (#39726707)
I don't think so AI will replace SW jobs. It will definitely change the way engineers work.

Software development involves:

1. Understanding the requirement

2. Solving the problem with given constraints (and thereby innovate)

3. Talking to stakeholders

4. Code (& unit tests)

5. Review #4

6. Troubleshoot in testing

7. Troubleshoot in prod, both perf & subtle issues (this is hard)

8. Take the input from #6 & #7 and use it as a feedback back to #2

9. Answering questions from users/support which involve suggesting workarounds and not just factual answers. Suggesting a workaround itself is a mini-problem solving which is an intersection of domain knowledge, knowing code at hand, understanding customer's situation, etc.

Coding is hardly taxing and time consuming when there is clarity what needs to be done and how it needs to be done.

Point #4 itself has sub-dimensions like performance, maintainability, test-ability, security, etc and it involves lot of subjective calls. Sometimes you have to deal with undocumented behavior of an API which is a tribal knowledge.

To troubleshoot in prod (esp subtle issues) require deep knowledge of the code at hand. This itself is a challenge when you are dealing with generated code and something you have not written yourself. Think about a human dealing with an existing large code-base when joining a team.

I understand all of the above is a spectrum and there are jobs in SWE which do not require so much rigor.

Key ability for breakthrough and the rest will fall in place: Code generated by AI is consistently put to production without human intervention for a sufficiently complex problem considering all good attributes (like backward compatibility, performance, etc)

"A Better Way of Reading" -> in what way? All I see is teleprompter like text on screen when I click one of the links.
Re:OpenDevin on Wednesday March 13, 2024 @05:06AM (#39689385)
I don't think so AI will replace SW jobs. It will definitely change the way engineers work.

Software development involves:

1. Understanding the requirement

2. Solving the problem with given constraints (and thereby innovate)

3. Talking to stakeholders

4. Code (& unit tests)

5. Review #4

6. Troubleshoot in testing

7. Troubleshoot in prod, both perf & subtle issues (this is hard)

8. Take the input from #6 & #7 and use it as a feedback back to #2

9. Answering questions from users/support which involve suggesting workarounds and not just factual answers. Suggesting a workaround itself is a mini-problem solving which is an intersection of domain knowledge, knowing code at hand, understanding customer's situation, etc.

Coding is hardly taxing and time consuming when there is clarity what needs to be done and how it needs to be done.

Point #4 itself has sub-dimensions like performance, maintainability, test-ability, security, etc and it involves lot of subjective calls. Sometimes you have to deal with undocumented behavior of an API which is a tribal knowledge.

To troubleshoot in prod (esp subtle issues) require deep knowledge of the code at hand. This itself is a challenge when you are dealing with generated code and something you have not written yourself. Think about a human dealing with an existing large code-base when joining a team.

I understand all of the above is a spectrum and there are jobs in SWE which do not require so much rigor.

Key ability for breakthrough and the rest will fall in place: Code generated by AI is consistently put to production without human intervention for a sufficiently complex problem considering all good attributes (like backward compatibility, performance, etc)

Re:Google's morale crisis is about to get worse on Monday March 04, 2024 @05:04AM (#39588724)
See the issue with AI or (AGI) is that it is trying to model or imitate a system which is irrational, whimsical and inconsistent i.e. human. So the o/p of an AI system will be subjected to bias by humans especially when there is no universal right & wrong.
Re:Show HN: I made a HTMX Playground 100% in the browser on Monday January 08, 2024 @05:36AM (#38910302)
OMG! I had a flashback. Do any of you remember HP Quality Center?. Its early versions had entire UI in activeX and I remember a bunch of progress bars installing DLLs.
Re:Bad NEWS, Emacs on Sunday December 10, 2023 @09:48AM (#38591841)
I could not understand and hence I asked the question. The thing I understood was that this broke some peoples flow.
Re:Bad NEWS, Emacs on Sunday December 10, 2023 @09:38AM (#38591776)
I am a Vim guy. Can someone explain what exactly is broken?
Re:Looking for elegant code bases written in Golang on Saturday December 09, 2023 @05:47PM (#38586936)
You can start with Go's standard library: https://github.com/golang/go/tree/master/src
I know, though lot of major religions do not think so.
> so it isn't new

I agree but so far mainly philosophers & intellectuals used to ponder. With advancement in tech many believed that intellectual or creative work is safe. I think now this is a jolt to a lot of white-collar folks who are looped in with the recent advancements in AI.

Its not that intellectual or creative work will vanish but a lot of the current work will be commoditized.

These things have suddenly going mainstream and lot of ppl (including me) are having existential question: what does it mean to be a human?

PS: It will be fun to do in "damn nature u r scary" voice & style [1]

[1] https://www.youtube.com/watch?v=-vlFHlSm1r4

Re:Fourteen Years of Go on Saturday November 11, 2023 @07:56AM (#38229910)
Reminds me of a dialogue from the movie: "The Pursuit of Happyness"

Interviewer: What would you say if man walked in here with no shirt, and I hired him? What would you say?

Will Smith: He must have had on some really nice pants.

Go has some really nice pants i.e Simplicity with good enough performance, backed by big corp.

Simplicity scales!

I had a look at https://racket-lang.org. Where we can download this build? [1]

[1] Assuming that the merge has happened since the announcement was on Oct 16

Older »