Recent

Author Topic: Artificial intelligence  (Read 3342 times)

jamie

  • Hero Member
  • *****
  • Posts: 6801
Re: Artificial intelligence
« Reply #15 on: January 18, 2025, 04:35:47 pm »
You can take my share of it
Jamie.
The only true wisdom is knowing you know nothing

PascalDragon

  • Hero Member
  • *****
  • Posts: 5858
  • Compiler Developer
Re: Artificial intelligence
« Reply #16 on: January 18, 2025, 04:39:04 pm »
(then again, my early youth Polaroids disappear too, to my chagrain, but at least they lasted 65+ years )

They still exist though, just like record plates and music tapes (all three of which are having a comeback). :)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10799
  • Debugger - SynEdit - and more
    • wiki
Re: Artificial intelligence
« Reply #17 on: January 18, 2025, 04:40:58 pm »
I really got impressed with chat gpt.

I would like to make proposal for client. I have used chat gpt.

It is drafted very nicely and it is given out put excellent.
So did I .... impressed by how it ever got the hype it is...

I mean sure, it's cool what it can do. But it is of very little help to me when it comes to writing code.
-> It can't do any real tasks, such as "Write a complete spell checker for the IDE"
-> It pretends to be able to "Write a quick sort", but its not reliable...

So, when I need a quick sort, the fastest is to either go to a snippet library (and if my source is trusted, I know it will work / I don't currently do that, so can't give you any links). Or write it myself. (Or check for an existing in the RTL/FCL/LCL/...)
Asking an LLM (AI) to do it, will take up more time, if I factor in testing and fixing.




The best response I have yet ever gotten from an LLM was to the question "Please check the code", and then giving it some code, that created an object, did have a try finally block, and released the object in the finally block.
The LLM advised me I should add a try finally block, and returned me the amended code, which was identical to the original.

At least it did something for my health. Laughing is said to be healthy. ;)


Suppose, it can help one to realize whatever the answer to some problem is, when one just can't seem to find it. But then, so can the wall in my room. An old (decades old) wisdom that is still true today: If you can't think of the answer, describe your problem to the wall. It (the process of describing it / not the wall) will help.



As for the original statement, don't believe what people tell you on facebook. Too many people there will further their agendas by spreading lies.

TRon

  • Hero Member
  • *****
  • Posts: 3946
Re: Artificial intelligence
« Reply #18 on: January 19, 2025, 01:17:15 am »
As for the original statement, don't believe what people tell you on facebook. Too many people there will further their agendas by spreading lies.
fwiw: It was a statement from Zuckerberg that went viral. And ofc he has to advertise that message. I wish him good luck with that failure :)
I do not have to remember anything anymore thanks to total-recall.

zeljko

  • Hero Member
  • *****
  • Posts: 1695
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Artificial intelligence
« Reply #19 on: January 19, 2025, 01:46:06 am »
Dorian Grey, Back to the future, etc.

Is that a cousin of Dorian Gray ? :-)

 :D :D :D :D :D :D

LV

  • Full Member
  • ***
  • Posts: 207
Re: Artificial intelligence
« Reply #20 on: January 19, 2025, 09:02:06 am »
(then again, my early youth Polaroids disappear too, to my chagrain, but at least they lasted 65+ years )

They still exist though, just like record plates and music tapes (all three of which are having a comeback). :)

I gave my dad-in-law a vinyl record player for Christmas and he's stoked. :)

Thaddy

  • Hero Member
  • *****
  • Posts: 16520
  • Kallstadt seems a good place to evict Trump to.
Re: Artificial intelligence
« Reply #21 on: January 19, 2025, 12:56:08 pm »
I gave my dad-in-law a vinyl record player for Christmas and he's stoked. :)
Yes,Vinyl is all the rage. Even my daughters want one.
But I am sure they don't want the Trumps back...

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12033
  • FPC developer.
Re: Artificial intelligence
« Reply #22 on: January 19, 2025, 04:53:41 pm »
Well, Vinyl is on topic for AI, since currently consumer level AI hardware seems to be mostly used in practice for filtering audio (background noise, but I assume also gramophone noise and ticking )   :)

MarkMLl

  • Hero Member
  • *****
  • Posts: 8204
Re: Artificial intelligence
« Reply #23 on: January 20, 2025, 09:20:25 am »
This looks interesting

https://github.com/radareorg/r2ai

Quote
Run a language model to entertain you or help answering questions about radare2 or reverse engineering in general. The language model may be local (running without Internet on your host) or remote (e.g if you have an API key). Note that models used by r2ai are pulled from external sources which may behave different or respond unreliable information. That's why there's an ongoing effort into improving the post-finetuning using memgpt-like techniques which can't get better without your help!

I'm not a user of that specific tool, but since its learning curve is notoriously steep I imagine that answers to "how do I start doing this?" questions are useful: provided that they're not polluted by inaccurate suggestions from other untrained LLMs.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

440bx

  • Hero Member
  • *****
  • Posts: 4998
Re: Artificial intelligence
« Reply #24 on: January 20, 2025, 10:34:06 am »
I haven't used radare but, one thing I find surprising is that it doesn't seem that anyone has trained an A.I system to recognize the common patterns found in binaries. Compilers are notorious pattern generators.

I find that a bit surprising because it doesn't take recognizing a large number of patterns to disassemble a binary at _least_ as well as the current version of IDA Pro.  It might be worth noting that Ghidra does look for some specific patterns in its efforts to dis-assemble binaries.

At first sight, this is a task that A.I would seem to be a "shoe-in" for.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8204
Re: Artificial intelligence
« Reply #25 on: January 20, 2025, 11:06:58 am »
I haven't used radare but, one thing I find surprising is that it doesn't seem that anyone has trained an A.I system to recognize the common patterns found in binaries. Compilers are notorious pattern generators.

I find that a bit surprising because it doesn't take recognizing a large number of patterns to disassemble a binary at _least_ as well as the current version of IDA Pro.  It might be worth noting that Ghidra does look for some specific patterns in its efforts to dis-assemble binaries.

At first sight, this is a task that A.I would seem to be a "shoe-in" for.

I've spent the last few days looking (intermittently) at Ghidra, which forcibly diverted me into working out how to use Snap packages etc. (because Ghidra requires a version of Java way in advance of what Debian is shipping).

I've been asked repeatedly for a decompiler since the 1980s, and can report that the one integrated with Ghidra is good... very good in fact, but with a significant limitation in that there is only a single namespace (term used loosely) for the storage of aliases between function parameter names (e.g. argv) and registers (e.g. RDI for the ELF x86-64 ABI). I've asked about this on StackOverflow, and the fact that there isn't a flood of people telling me that I'm "doing it wrong" suggests that it might be an inherent flaw in the architectural foundation, which might be why the NSA open-sourced it.

Apparently Radare2 has a plugin which allows it to use the Ghidra decompiler: I'm just starting to look at that.

Xref to prior discussion of FPC building issues on the cusp between Debian 11 and 12 https://forum.lazarus.freepascal.org/index.php/topic,61001.msg532347.html#msg532347

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Joanna from IRC

  • Hero Member
  • *****
  • Posts: 1317
Re: Artificial intelligence
« Reply #26 on: January 20, 2025, 11:24:59 am »
Quote
As for the original statement, don't believe what people tell you on facebook. Too many people there will further their agendas by spreading lies.
so true for many platforms whose main goal seems to be creating hysteria for profit.
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

440bx

  • Hero Member
  • *****
  • Posts: 4998
Re: Artificial intelligence
« Reply #27 on: January 20, 2025, 11:35:52 am »
I take a look at Ghidra every few months.  I like it and I find it is very capable in some ways.  I've used IDA Pro for years now, so like most people, I gravitate back to what I know best.  Old dog best at old tricks ;) The one thing I don't like at all about Ghidra is that it's Java.  oh well. (I get the impression, you don't seem to care for that either.)

One of the more difficult areas of separating code from data in Windows binaries (and likely other O/Ss too) occurs when the code segment includes GUID constants.  Those are a real pain because some GUIDs produce "reasonable" code which makes it difficult to recognize them as data and, unlike other data, there is no recognizable pattern in GUIDs.

Ghidra solved that problem the "easy" and reasonable way, it has a list of GUIDs and matches sequences against them but, it doesn't seem to be able to recognize GUIDs that are not in its list.  That's a bit of a problem because the list is incomplete (as expected since it is unrealistic to have a complete list of GUIDs.)

Anyway, fun stuff and, one of the few areas where I believe A.I could actually make a valuable contribution (as in face recognition, it's about the presence of recognizable patterns.)
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8204
Re: Artificial intelligence
« Reply #28 on: January 20, 2025, 12:31:46 pm »
I take a look at Ghidra every few months.  I like it and I find it is very capable in some ways.  I've used IDA Pro for years now, so like most people, I gravitate back to what I know best.  Old dog best at old tricks ;) The one thing I don't like at all about Ghidra is that it's Java.  oh well. (I get the impression, you don't seem to care for that either.)

Apparently the decompiler is pure C++, but looking at an example shown in the video announcing its accessibility from Radare suggests that the aliasing problem occurs there as well... and (as I suspected) that it's even worse when annotating stack offsets (the same numeric constant is annotated with the same parameter name in every context it's found).

The bottom line might be that one has to have separate projects to do detailed analyses of distinct functions.

This reminds me of the topological naming problem in FreeCAD: a foundational flaw which requires attention from the original designers, and might merit a complete rewrite. So in the case of Ghidra, the open source community has a tool with a glaring flaw to which members can add new targets etc., while the NSA probably (by now) has a rewritten version using some of the same APIs so they can benefit from community contributions.

I'm not inherently anti-Java, but Debian "stable" is on something like v17 while Ghidra requires something like v21 and doesn't fail gracefully if it's not available. That disparity pushes the capabilities of containerisation such as Docker (which I've used to good effect for e.g. Arduino targets) or paravirtualisation such as UML, but when I tackled Snap I found gaps in the explanations relating to how to actually start a program (snap run), how to get it into a desktop environment's menu structure (I balk at starting something as intensely graphical as Ghidra from a shell, at least until I've got a working project to feed it... and if Debian has a package for snapd it damn well should have the icon somewhere as well) and above all how to give it access to my existing /usr/local/src tree.

I'm currently putting Ghidra and probably also Radare2 onto my #2 system (Debian 11, "old-stable") where I've already got the files for the FPC issue I xrefed to earlier... Ghidra at least being 64-bit only; I'm not making immediate promises of using it to tackle any specific problem. I might also take a very brief look at how Radare2 links to its AI stuff, largely in case it could be applied to the permuted indexing I mentioned last week.

MarkMLl
« Last Edit: January 20, 2025, 03:52:03 pm by MarkMLl »
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018