[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: asm.jpg (93 KB, 827x1180)
93 KB JPG
Why can't AI do Assembly?
>>
Not enough training data on the internet.
>>
File: 812124.png (43 KB, 690x940)
43 KB PNG
I asked Gemini to write a simple bit of assembly for the Game Boy.
>Register <c> contains four 2-bit bitfields. Write a subroutine that increments each bitfield, clamping to avoid overflow. The result should be left in the <a> register.
In a real-world scenario, this kind of code might be used when fading the screen to black. This can be done efficiently using only six instructions:
ld a, c
rrca
and a, c
cpl
and a, %01_01_01_01
add a, c


The AI's solution can be seen in pic related. I haven't fully checked it for correctness, but it's clearly much less efficient. On the bright side, it's much better than what I was getting a couple of years ago. The syntax is correct, and it's not making up instructions that don't exist. It even noticed that the additions can be done in parallel-- something that a lot of real programmers miss. Not bad for such an obscure use-case, but it's still far away from being any good.
>>
>>108826423
i guess it is too verbose and too much jumping back and forth in the code
>>
>>108827193
The problem is that in these systems (and in assembly in general), verbosity is not just "code too long" "hard to read" or even "hard to maintain". It's directly impacting performance in potentially crippling ways. Do it enough and you end up with "might as well not work at all".
>>
>>108826900
bad prompt. go away.
>>
>>108826423
Because most of them have been trained on the answers from 'reddit' and 'stack overflow'.
>>
File: xlqmorlbbjkf1.png (2.78 MB, 1200x1569)
2.78 MB PNG
>>
It made me a basic text editor in terminal so i guess it can does basic shit in assembly.

Now i'm wondering if i could write the text editor in assembly and interop with flutter but i wonder if it's worth it ?

Could we make the equivalent of Qt in assembly?
>>
>>108827385
>Could we make the equivalent of Qt in assembly?
Yes of course. It's not the same obviously but consider the existence of rolercoaster tycoon.
There is also that OS that's entirely assembly including the GUI and all. Kolibri and/or menuet I think.
>>
>>108826423
>Why can't AI do Assembly?
because for that, the "AI" would have to really compile

and for that, you would need the "AI" to be actually able to follow logic rules. Something which is unable to do and will continue to be unable to do as long as it is based on the Transformer architecture or similar.
>>
>>108827552

Nice i'll ask later a good model to code it and see how far it goes.
If we can have a nice GUI in C that could be nice,i already asked for the equivalent of Flutter in C but it couldn't make it work as intended,looked like pixel shit in the x11 window but idk how to properly prompt those things unfortunaly.

Thanks for your answer and info,i appreciate :).
>>
>>108827687
First off, assembly is not compiled, it is assembled. Second, there is a lot of scaffolding around AI tools now that indeed perform assembly or compilation or other kinds of executions in sandboxes, and uses this as feedback to the llm.
>>
>>108826438
You don't know what a luddite is
>>
>>108826423
About three years ago I began to learn x86 assembly language. My only complaint is the longer development time. Things like OP's most make me feel more smug. No regrets. :)

p.s. That book cover looks like it has a povray fractal. :)
>>
>>108828601
x86_64 is kinda hellish but also I prefer it a million times over C programming even for semi-complex programs, especially with a decent macro assembler. I find that my programs have far fewer bugs, and the bugs I do have tend to be logic bugs instead of 'incidental' bugs like memory issues.
>>
>>108826423
Because there's no AI model trained on it.
What people are calling "AI" right now are "Large Language Models" which are specifically trained on "Natural Language."

High-level programming languages are structured languages based on natural languages. Assembly language is not based on natural language at all. Assembly language is just binary machine instructions converted into text and numbers along with maybe some macros and simple meta convenience features.
>>
>>108828927
Not true at all. LLMs are trained on text, including raw bytes, and they are specifically very very extensively trained on source code of all languages with no distinction (via github and other sources).
>>
>>108826428
There's more data for it than for any other language, since all of them compile to it.
>>
>>108828432
not the anon but I know exactly what that anon meant when he called you a luddite so idk what youre talking about
>>
>>108829221
The intermediary artifact from compilation (which is often straight machine code, not asm, and even when asm, can be in 30 different dialects, let alone targeting various isa's) is not generally publicly available because it's only used temporarily and locally.
>>
>>108826428
but it can do lambda calculus

https://victortaelin.github.io/lambench/
>>
>>108829010
You seemed to miss the point about how higher level programming languages are based on natural languages, while assembly language is not.

So LLMs can do some assembly because some of those token strings are in there, but they are bad at it because asm is so radically different compared to the natural languages. It's why image generators and protein predictors take special training and why claude can operate on a huge codebase but not a midi file.
>>
>>108830051
Not sure if retarded or merely pretending.jpg
>>
>>108826423
Invalid programs compile. It just can't lean onto fuzzing the compiler.
>>
>>108827385
>Could we make the equivalent of Qt in assembly?
Pretty what compiling Qt does at one step.
>>
>>108827376
Ai is also often hamfistedly trained to be be pro-Israel, when grok is asked to translate "Do you support Israel", it will often give a long declerative statement in favour of Israel
>>
>>108829228
a luddite wouldn't be prompting at all.
saying that anon is a luddite because his prompting is bad obviously shows a failure to understand that.
whether you can still figure out what he actually meant to say or not doesn't that.
>>
>>108828432
Luddite is a new calling out to discredit anyone who opposes AI technology the same way Jewish antisemitism or CIA terrorist invented.
>>
>>108827376
>walmart
>homedepo
do americans really?
>>
>>108826438
>>108833115
>>108828432
>>108829228
>>108831069
everyone know that libtards are pretending posers.
>>
>>108826423
AI can't even do C preprocessor
>>
>>108830191
You clearly do not understand even the basics of machine learning and so resort to lazy insults.
>>
>>108830191
he's correct. assembly has a very limited set of tokens (instructions, registers, ...), it's very repetitive and there is not enough information about the data (what is in the eax register now?)
>>
>>108833380
I have a PhD in deep learning specialized in dialogue systems from the MILA.
>>
>>108834911
>I have a PhD in deep learning specialized in dialogue systems from the MILA.
The Meme Imageboard of Loser Anons?
>>
>>108834924
It's really interesting that you thought you could pretend to know more about ML than even one rando in this thread, when you don't even recognize the name of the most prominent deep learning lab on the planet.
>>
>>108834952
>you don't even recognize the name of the most prominent deep learning lab on the planet.
funny how you are so autistic that you confuse a joke with a statement of ignorance.
>>
>>108835018
>I-I was just p-pretending to be retarded!
Every single fucking time
>>
>>108835123
>If I tell you I worked at NASA and you make a play on words making fun of my claim, it means you don't know NASA
I seriously doubt a sub 80 IQ retard like you actually did anything in life
>>
>>108835234
>n-n-no I-I-I was r-really pretending to be r-r-retarded pls belieb me ;_;
>>
>>108835247
>If I tell you I worked at NASA and you make a play on words making fun of my claim, it means you don't know NASA
I seriously doubt a sub 80 IQ retard like you actually did anything in life
>>
>>108835256
>if I repeat it enough times it makes me seem less retarded r-right?
>>
Girls please calm down this is getting jeated
>>
>>108826423
Nocoder here. If AI gets good enough couldn't it code entire programs directly in assembly and be much more efficient as a result?
>>
>>108827376
>reddit and wikipedia account for 66% of where the AI gets its facts from
2/3 that's why it's all liberal talking points
>>
>>108835456
It wouldn't need to, it could write directly in machine code and be even more efficient than assembly. Contrary to the usual nocoder belief, assembly doesn't actually map anywhere near 1:1 to machine code (though obviously it's far closer to C).
Also you could in principle fine-tune or train from scratch an llm to "be the compiler" by using a natural language intent description as input, and using the output of a good optimizing compiler as the target for the llm to match.

The problem is that the whole point of deep learning is to approximate a function in the monte carlo sense, not in the las vegas sense. So no matter how much you train a model, it will only ever asymptotically approach perfection.
>>
>>108835456
It's already happening
>https://github.com/isene/chasm
>>
/g/ is dead
>>
>>108830051
Do you think low level embedded jobs are safer from ai than fullstack jobs longterm? What about devops/linux admin? I know basically all of STEM is in danger in the long term.
>>
>>108835456
>If AI gets good enough couldn't it code entire programs directly in assembly and be much more efficient as a result?
GayEye will never produce asm as fine and intuitive as a thoughtful human dev.
>>
>>108839098
I think the overall risk to programming jobs from AI is massively overblown. It's changing the nature of the practice, but there's as much demand for software as ever. Knowing how to write assembly isn't so much useful for the skill in itself, but because you need to know how a computer works in order to do it competently.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.