Thread #108264010
File: maxresdefault.jpg (130.9 KB)
130.9 KB JPG
What are you working on, /g/?
Previous: >>108226774
122 RepliesView Thread
>>
File: 88141e942698872f2d0af625e76e65b4.jpg (930.8 KB)
930.8 KB JPG
>>108264010
A heterogeneous embedded system
>>
>write 1 line of code to flip pin in any other system
now the fags will tell me that they are not actively trying to kill linux when this is the official example of how to flip a pin#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2023 Kent Gibson <warthog618@gmail.com>
"""Minimal example of toggling a single line."""
import gpiod
import time
from gpiod.line import Direction, Value
def toggle_value(value):
if value == Value.INACTIVE:
return Value.ACTIVE
return Value.INACTIVE
def toggle_line_value(chip_path, line_offset):
value_str = {Value.ACTIVE: "Active", Value.INACTIVE: "Inactive"}
value = Value.ACTIVE
with gpiod.request_lines(
chip_path,
consumer="toggle-line-value",
config={
line_offset: gpiod.LineSettings(
direction=Direction.OUTPUT, output_value=value
)
},
) as request:
while True:
print("{}={}".format(line_offset, value_str[value]))
time.sleep(1)
value = toggle_value(value)
request.set_value(line_offset, value)
if __name__ == "__main__":
try:
toggle_line_value("/dev/gpiochip0",5)
except OSError as ex:
print(ex, "\nCustomise the example configuration to suit your situation")
>>
>>
File: c9684de3af1e5bcfa40f79b96e6c4a68.jpg (110.2 KB)
110.2 KB JPG
speeding up video loading for my youtube client
>>
>>
>>
>>108264098
>get prototype on my board
>firmware made by some 3rd party that I need to work on
>faggot electronic team didn't wire SWO pin and the firmware uses it for logging
it's such a simple thing, why do they always make it a issue.
>yeah there is also uart tx pin test point where you can solder a wire if you need it
hey thanks fags
>>
Trying to use ESP-IDF for a project, and it seems all the actually useful functions are "deprecated" or "private" so you have to #include "esp_private/..." or write registers directly. I don't know why they're so intent on making you do things "their" way, but it makes life hard if their APIs don't fit your project.
>>
>>
>>
>>108264362
>I personally prefer to read the datasheet and make my own firmware
ain't no client got time / money for that shit.
with esp the datasheets are hard to find and you likely are doing wireless so you have to use their firmware blobs.
Though mostly espressif basics APIs are stable so no idea what >>108264316 is doing
>>
>>108264362
If only, but Espressif's chip documentation is pretty bad and you need their blobs for networking as >>108264397 says.
>>108264397
>Though mostly espressif basics APIs are stable so no idea what 108264316 (You) is doing
Trying to control an unsupported display through one of the I2S cores.
The display vendor's code uses Arduino so I wanted to use ESP-IDF instead, and I'm learning the functions for controlling pin muxing yourself are all deprecated or private. Also enabling and resetting peripheral controllers is limited to private functions only (periph_module_reset, periph_module_enable). What's the point of restricting that?
>>
>>
>>108264522
Thanks, I mostly just want to vent.
I also saw a few third-party projects online that say I2S0 does not support 8-bit output, only I2S1 does, but for the life of me I can't find that in the TRM or datasheet, so who knows. Guess I'll find out.
>>
>>
>>
So, apparently my arduino microcontroller has something called "fuses" that change some of the operating parameters of the MCU. How do I set them, and once I do can I then change them later or are they then permanently fused?
>>
>>108264781
How you set them depends on the specific MCU, and they're almost certainly these which are permanent.
https://en.wikipedia.org/wiki/EFuse
>>
>>
>>
>>
File: 1768854276865547.jpg (92.9 KB)
92.9 KB JPG
>>108264010
How do I learn C/C++? I want to become smart like this guy https://www.youtube.com/@dr-Jonas-Birch/videos
>>
>>
>>
>>108265741
start with bjarne's latest book Programming Principles and Practice in C++ the C++23 edition
it has a reputation of being a bit dry., although it's apparently a bit more streamlined than previous editions, but he made the language and he actually knows how to use it
whatever you do don't do what I did early on which was use a mix of old resources and "university recommended" learning materials before /dpt/ steered me towards some better intermediate level resources
books from before 2011 are from before C++ took the first steps to actually being a worthwhile language and before it fixed the first wave of serious issues with the language and standard library
god help you if you use books from before 98 when it wasn't standardized at all
after that make some shitty GUI applications in Qt or some other framework to get a feel for organizing real projects,, maybe use that time to practice using some baby mode versions of low level features like abstractions over multiple threads before you dip your toes into the real fun stuff like low level multithreading or graphics programming
the isocpp website has some interesting featured blogs that cover topics from beginner to cutting edge
you'll pick up C from working with C++ long enough
learning C first will generally fuck up good C++ habits whereas generally learning C++ will give you over time let you learn to respect and understand C programming habits from having to work with C libraries a lot
the ones that are still popular even in C++ are usually very intentional and well designed so you're getting exposed more to the cream of the crop (as long as you avoid the windows API) and what influence C will have on your habits at that point will be good as opposed to really lazy shitty beginner C++ written by a C programmer
>>
File: linkedlist-nodes.png (896.5 KB)
896.5 KB PNG
thanks for the anon posting random leet codes. good picks. fun stuff.
>>
File: 1519381991012.png (210 KB)
210 KB PNG
>>108265741
I see sloppa thumnails, I click "do not recommend channel", simple as.
>>
>>
File: linkedlist.png (2.3 MB)
2.3 MB PNG
>>108266273
>a visual representation of a a linked list but with anime girls
>>
File: 2026-03-01 02-48-59_2.mp4 (3.6 MB)
3.6 MB MP4
>>108264098
It's working. Now I have separate channels for communication. Basic logging gets a buffer where it skips logs if probe can't catch up(also uses defmt "compression"), and perf data is just plain text with blocking on full so I can transmit larger chunks of statistics without any loss. It also no longer clutters stdout while doing so.
>>
>>
>>
>>
>>
>>
>>
>>
File: Screenshot From 2026-02-28 20-37-24.png (167.5 KB)
167.5 KB PNG
>>108264010
>What are you working on, /g/?
https://github.com/orlfman/FFmpeg-Converter-GTK
Got avt-av1, x265, x264, and now vp9 codec tabs working.
>>
>>
>>
>>
>>
>>
File: 1618954816048.png (528.4 KB)
528.4 KB PNG
>>108267378
It's amazing how black you sound.
>>
>>
>>
>>
>>
File: 1770509795002317.png (591 KB)
591 KB PNG
>>108267476
>t.
>>
>>
>>
>>
>>
>>108267508
Like this: >>108267408
>>
>>
>>
>>
>>
File: Screenshot.png (166.2 KB)
166.2 KB PNG
>>108267352
quality profiles for quick settings. like, imageboard for this pakistani basket weaving forum
>>
>>
>>
File: Screenshot From 2026-02-28 21-29-35.png (294 KB)
294 KB PNG
>>108267659
Debug. For you can see what actually happened, why something error, etc. You can click the search icon near the trash icon (trash clears the console window) to search the output and such. it also shows the full ffmpeg command that was sent.
You can't actually run anything from it, its all read only output.
>>
File: Screenshot From 2026-02-28 21-30-15.png (173.3 KB)
173.3 KB PNG
>>108267678
And a little tour guide, The information tab shows basic information about both the input file, and the successful converted output file. To compare them.
>>
File: Screenshot From 2026-02-28 21-32-21.png (195 KB)
195 KB PNG
>>108267688
One thing I am really happy about getting done and working is the "Color Correction" settings. Can really mess around and alter RGB and such. Very easily.
>>
File: Screenshot From 2026-02-28 21-35-44.png (617.5 KB)
617.5 KB PNG
>>108267702
and the trim tab. can scrub, trim out segments, encode them or do a pure copy. the re-encode is connected to the selected codec tabs. so whatever you set in those tabs, the re-encode will use. and obviously general settings too. so you can re-encode, scale the video and all that stuff at the same time. and you can automatically conat all the segments or split them all into individual files.
>>
>>
>>
>>
>>
File: 1000_F_281266672_wgowMkqvVtk0xmLJ52LlnxmSiIWavRuh.jpg (508.5 KB)
508.5 KB JPG
>>108266306
doubly linked list
>>
>>
>>
File: e334a4dc-a66b-410e-85fc-7ed231ad39b5.jpg (91.2 KB)
91.2 KB JPG
>>108264010
Last programming language to be ever written —an unholy Bret Victor (visualise all the things!) mixture of Unison/Kind/Idris for semantics (functional-but-with-effects and the actual syntax is a Merkle tree over AST, all else is projection), Hazel/Lamdu/Luna for editing (niggerfaggot LLMs and humans can't write incorrect code anymore), Glamourous Toolkit for moldable development environments (your domain is your code, your code is your documentation) and Smalltalk/Erlang/Clojure for interactive development experience (fuck you, I'm gonna REPL into production to fix a bug and not break anything).
Very early in the PoC phases, but those little funky visualisation are already defined in the language itself and evaluate dynamically. Eventually, all syntax will end up being defined in the language itself (turtles all way down until you reach core), so you can dynamically scale your view of the language from hardcore bit twiddling to some low code high-level BPM workflow engine view in one language according to your current needs and not get "muh graphical programming" cancer. I guess I could've called it SCAlable LAnguage if that weren't taken something nowhere near as scalable :V
And no, won't be calling it Niggerfaggot no matter how much you insist.
>>
>>
>>
File: Screenshot From 2026-03-01 15-07-11.png (719.3 KB)
719.3 KB PNG
>>108272689
>>108268154
I am enhancing the Trim tab to support interactive cropping. Will be released in the next github push when its fully ready. So far, looking really good.
>>
File: coal.png (736.9 KB)
736.9 KB PNG
>>108264010
Why do people still program by hand? Is there a coal enthsiast group too that mines by hand?
>>
File: Screenshot From 2026-03-01 15-39-49.png (1.1 MB)
1.1 MB PNG
>>108272803
Doing a lot of testing.
I added a safety check that disabled the auto crop option in the general tab if crop only or crop and trim is selected in the crop & trim tab. to prevent conflicts.
>>
File: pepito.png (190 KB)
190 KB PNG
>>108266306
>>108271108
This is the correct way to teach coding to kids.
>>
File: terminal_tumor.png (27.2 KB)
27.2 KB PNG
>>108272812
>>
>>
File: Screenshot From 2026-03-01 16-43-36.jpg (2.2 MB)
2.2 MB JPG
>>108272998
per segment cropping working quite well
>>
>>
>>
>>108273545
https://leetcode.com/problems/minimum-swaps-to-arrange-a-binary-grid/
No this is not a bit manipulation problem. It's implementing an efficient sorting algorithm from scratch.
>>
>>
>>
File: 1767088105735235.png (513 KB)
513 KB PNG
>>108273530
>>108273552
just realized that I got asked late last year to implement a modified bubble sort algorithm in an OA
of course I couldn't do it, because why the fuck wouldn't you just use .sort() instead
seriously fuck these cocksuckers
>>
>>
>>108273641
I agree Go sucks - not having any form of simd as part of the language in the compiler makes it a bit of meme but an 18x slow down is insane. I can do better with 100 lines of code just with a garbage hand rolled parser I whipped up in 30mins that goes through the input character by character running on 1 thread (parses the same input into a slice of float32's in like 2s). These people at google are paid hundreds of thousands a year to work on the language and they could just copy paste an existing library that's not dogshit slow but rewritten in Go.
>>
File: compilers_are_garbage_stack.png (441 KB)
441 KB PNG
>>108272812
Because compilers - specially crafted software for exactly that purpose - still fuck up the simplest of optimizations, and that's without the hallucinations that plague LLMs. And unless you - yes, you personally - find out a way to build sub-atomic transistors Moore's Law has run its course and can no longer be used to paper over software incompetence.
>>
>>108273724
Also, now that I'm going over the code again:
>vpxor
>vzeroupper
You just know that those lazy fuckers are not even tracking *what* they're writing into their YMM registers. The moment the function emits ANY AVX instructions at all they go
>we have to clean up the upper YMM registers
>because muh split register file
>>
>>
>>
Grew up in a third world shithole to a standard wagecuck family. Always used to cope about how rich elites have assistants, maids, and normie minions doing all their busywork so they can just focus on whatever pet projects they actually want to do.
Unironically, thanks to local LLMs, I feel like I finally have that. I just focus on the fun parts of my stack and offload all the boilerplate formatting and tedious shit to the models. Absolute game changer. If self-hosted local models ever actually reach Opus tier reasoning, it is officially over for code monkeys.
>>
File: 42.png (13.7 KB)
13.7 KB PNG
>>108274831
... you could have done that from the very beginning. Nothing ever stopped you from reading the sources of random projects to understand how they work.
>and I'm still waiting for that LLM that could've disabled both the gradient and the glitter effects for my maps
>>
File: sui2_sea.png (16.5 KB)
16.5 KB PNG
>>108274847
... oh, my bad, how silly of me. Of course my project was original enough that an LLM couldn't copy it from somewhere else. Oh well.
>>
File: P2keNqD.png (680.4 KB)
680.4 KB PNG
>>108274831
With Opus 4.6 it's already getting rather over, thougheverbeit. I'm relatively okay at programming, I just have this retarded executive dysfunction shit. And it makes it hard for me to actually get into developing shit, even if I have skills to do this. Enter Opus 4.6, and with it I can actually write like 4-6 things at once and they all fucking work. And at 1/110 of the prompt/guardrail/workflow effort I had to invest into previous opposi, which was already helpful at fleshing out various shit, but not really at writing good enough shit for you. It was already joever for pajeet-tier programmers, but it's starting to get fucked for actually competent one - you will still need some, until clankers actually learn to think for us, but give it a few weeks for the C-letter retards to realise they can do the same amount of work with 1/4x amount of programmers an it's gonna be a pandemonium. Which is partyl why I'm speedrunning mutliple projects, so that I at least end up getting something out of this retardation, before I get recycled into Swoylent Green.
>>
>>
>>
>>
>>
>>
>What are you working on, /g/?
My nextjs imageboard + media tracker. Yesterday I tried setting up a full blown PWA but failed because nextjs 16 uses turbopack and the current implementations work better on webpack.
>>
File: 1751088635617090.png (253.6 KB)
253.6 KB PNG
I give up
>hey claude, here's my code
>here's a screenshot of what the app should look like
>do your best
ill come back in an hour
>>
File: PicoCalc_1.jpg (409.6 KB)
409.6 KB JPG
>>108264010
I got this little fellow recently.
It has a bunch of I/O ports to the pico board
Want to use as a babby's first mini cyber Deck and add some external sensors.
>>
>>
>>
>>
File: 1741246511701186.png (141.6 KB)
141.6 KB PNG
I know /gedg/ would be more appropriate but the thread is dead.
I'd appreciate if you guys could check >>>/wsr/1558690 I'm missing two videos from Pikuma's 3D Computer Graphics Programming course and can't find them anywhere.
>>
>>
>>
>>108276911
Do you want to carry function pointers *for every single object*? Do you *actually need that degree of individuality*?
In C++ this concept is implemented via vtables, which are static and created once per class. Not class object. Class.
>>
>>
File: 1743461023502326.png (55.4 KB)
55.4 KB PNG
>finish today's leetcode daily problem
>it's a bubble sort algorithm
>this is my first exposure to it
>it's slow as shit (n^2)
>every submission takes a few ms even with a low datasize of 200
>there's no way to make it faster
what's the point of learning useless garbage like this?
>>