Programming thread

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
You ever accidentally get a correct answer?
From Common Lisp: A Gentle Introduction to Symbolic Computation:
Write MY-UNION a recursive version of UNION
Code:
(defun my-union (x y)
    (cond ((null x) y)
          ((not (member (car x) y))
              (cons (car x) (my-union (cdr x) y)))
          (t
              (my-union (cdr x) y))))

Code:
(defun my-union (x y)
    (append (x (my-recursive-union x y)))
    
(defun my-recursive-union (x y)
    (cond ((null y) nil)
          ((member (car y) x)
              (my-recursive-union x (cdr y)))
          (t
              (cons (car y) (my-recursive-union x (cdr y))))))

Tests:
Union
Code:
(union '(a b c d e) '(a c d c f)) --> (e b a c d c f)

First my-union
Code:
(my-union '(a b c d e) '(a c d c f)) --> (b e a c d c f)

Correct my-union
Code:
(my-union '(a b c d e) '(a c d c f)) --> (a b c d e f)
;;I think this one removes duplicates in the union list
;;compared to union

I am amazed I got an answer that is sort of the reverse of the solution in the book. Feels good!
 
It's a scam,but you can make money. I've worked for Leapforce before which was the same thing for search engines. You get in and then get a set number of tasks. Once in a while they will ship in a test case they rated themselves, and if you miss on it you're banned or get limited without feedback. The real ones remember the fried Guinea Pig test back in the day, that wiped half the testers out. I took a break that month, only to find nobody cool was left in the company chat. There were tons of those companies back in the day.
You can't just mention a "fried guinea pig test" and then not elaborate.
 
I wasn't forced to use it yet, but last week my boss reccommended to me, that I should attend a vibecoding training.
I probably will attend, I'm interested in what kinds of lunacy the cultists spew now. I doubt I'll find any use for it though.
I'm shocked that the term "vibecoding" gets unironically used, and not as an insult. Oh, well, clownworld and all that.
I'm studying CS right now as an undergrad and there have been talks of introducing vibecoding to our intro courses. Yes the professors (who are doing research in AI) were being completely serious and unironically used that term. I'm unsure how much of a debate this is at other universities, but according to a few of my professors there's been a continuous back and forth between professors who have a financial incentive to push AI trying to force it into intro courses, and professors who have common sense and don't trust the students to "use AI responsibly". It's interesting to see the divide. Students who didn't start coding before AI are fine with it to an extent, and then students who did or at least are aware of how retarded vibecoding/AI is have isolated themselves from the former. I'm interested to hear how this has impacted hiring fresh graduates. I've been told by other students that companies they intern for are deciding to not return to my university due to the quality of students, lol.

Sorry if you've already posted about it and I just missed it somehow, but have you attended the training yet and if so, how was it?
 
Oh, yeah. My former university invited some corpodroid from microsoft to have a lecture around a year ago, he spent the whole lecture vibe coding ping in C# (using the C# libraries...), and failing. From what I hear, that particular course is now completely infested, and they even grade homework assignments using AI. A lot of students are completely demotivated and want to quit, even more just gave up on actually learning, and are just vibe coding their way through school. The competency crisis is about to get really bad really soon.

I did not attend the training yet, I think it's in maybe a month. I haven't written it into my calendar, I should.
 
It is a testament to how ingrained that stylistic choice is that one could consider pushing an address onto the stack followed by popping it into the PC register to be "explicit" compared to jumping to the address directly, which is "overly clever".
This is stupid considering that inlining exists. The whole point of structured programming is that gotos eventually spaghettify any codebase that sees even gradual iteration. Also unless you are spamming functions for no reason or have to optimize some hot path down to as little time as possible, the time spent actually acquiring the resource or whatever would dominate the time saved by using gotos instead of functions.
 
I finally finished a project that was going to annoy me, with AI. I'm building a "retro" computer which I wanted to have a small front panel LCD. Found a nice LCD with RP2350 on-board, tried MicroPython, it sucked. Switched to the C SDK and asked the AI "Please make this" . One mistake I made was trying to start with local LLMs. I got Qwen Coder Next to run, seemed ok but the base code kind of sucked. So when I went to paid GLM 5.1 I think i wasted a few bucks getting it to fix stuff. I'm using the RP2350 as a USB Network Interface so I can send HTTP POST to it in order to display images. The AI wasted way too many tokens trying to figure out how to decode PNG in the limited RAM. I finally stopped it and told it "Fine, just accept the raw data" and it finished in a minute or two with that part. Then it took like 10 seconds more to make me a Python script to do the image conversion. Current cost is about $15. It's still not quite working right, But I'm reminded that I, as a human, can debug things without costing me money. Back to the C mines.

Edit: Fixed the last glitch. The LwIP PBUFS were set to too many and too small. Which when sending a POST was likely sending full size packets which broke something.
The Windmill Display is now working properly. Obviously the image conversion could use a bit less dithering.

2026-05-25_11-27.png
Edit2: Turns out the weird artifacts were a byte order problem, black and white are fine as they're just all 0 or all 1 bits. The gray bits, not so much, it's RGB565 but the image converter and display had different ideas of which byte came first. One endian swap later and all is well.
 
Last edited:
Yes the professors (who are doing research in AI) were being completely serious and unironically used that term. I'm unsure how much of a debate this is at other universities, but according to a few of my professors there's been a continuous back and forth between professors who have a financial incentive to push AI trying to force it into intro courses, and professors who have common sense and don't trust the students to "use AI responsibly". It's interesting to see the divide.
Expectation of University attendance shifted their role from teaching deep understanding to providing glorified job training. As such it is not surprising then that such ideas are being proposed as if it is to be exactly that then you might as well have access to all the tools even those that will impair your ability to understand the subject such as AI.
However if it is to be proper University then unironically they should be teaching people how to write code with pen and paper as doing so correctly requires understanding
 
Back
Top Bottom