Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
My $0.02 on the above pic are...

I'd have lines only between the main groups but no separating lines in the same group.

I'd put a little more white  space between main groups.  It would make the window a little bit taller but, I think it would look less cluttered (actually, I should say not as dense... I don't think it's cluttered).

ETA:

added the comment in parentheses.

2
I am getting somewhere.... At least I think.

"Number(2nd)" will unfold, if selected. Outside the "all" tab, it will be always unfolded.

Despite the space being less, it still shows a lot....
I am reflecting if
- Enum,...: can/should be folded (only "all" tab). That is, if "Name/Letter" is selected, then the number settings are collapsed
  - Alternatively, on the "all" tab, enum does *not* show "signed-ness" at all (only number base) / or at least folds that line
  - The number setting for enums, previously an the "all" tab, where merged with the normal number settings. That could be restored...
- "Address" needs to be on the all page... Or could be folded, until the checkbox is checked.
- All Signedness could alternatively (on the "all" tab) be made a dropdown, at the end of the number-base line.


Yes, the horizontal lines are a bit heavy. Probably going to test them as dotted.


But first of all, I have to fix the entire handling of the display formats (which I broke, as I changed some settings).


Btw, the "digits" count (a minimum digit count), will if set (e.g. to 1) stop hex numbers from displaying leading zeros.

Hex and bin, will have the ability of spacing between bytes/words/dwords. (instead of separator)
3
General / Re: Free AI to use in local
« Last post by gidesa on March 29, 2024, 10:14:48 pm »
Thanks @Thaddy.
What I want really is :
   Some opensource ( Free engine ) that I can download and install ( generally small executable ), when executing it download some templates and install them, after that I can use it offline ( no internet connection ). And have a possibility to feed this IA.
      [-----------------]                       [---------------------------------------]   
      [ AI .exe engine] <---------------[Download DB template & go offline]
      [-----------------]                       [---------------------------------------]
       ^            ^
       |             |
       |             |
       |             |
       |             | (user1) ... (user2)   ( will use AI in office without internet 
       |
       |(user0 feed AI with adequate information concerning the office business).

The documents, informations feeded by user0 can't go online.
The final thing is the possiblity for me to exploite this AI with FPC/lazarus program (Ex: program feeding AI and exploiting AI is writing FPC/LAZARUS).

Thanks you.

Hello, there is koboldcpp:  https://github.com/LostRuins/koboldcpp.
This is an AI  server, written in C++, for Windows and Linux. It needs a LLM (large language model) to load, in various formats as GGUF.
So you need only two files, in your local machine: koboldcpp executable (maybe with a config file), and the LLM.
Note that a GPU card with a large memory is a must, if you want good speed in responses.
You can connect with browser to the internal web server.
But, more useful in your case, you can connect with a simple web service, at localhost:5001/v1 , that use the OpenAI protocol plus some extensions.
Here: https://github.com/landgraf-dev/openai-delphi a package for FPC with examples.
Don't mind to OpenAI name, you can connect to Koboldcpp only changing IP and port in the examples.
In picture an example of Koboldcpp console with web service Json.

 

4
Beginners / Re: Program loop "runaway" while waiting on keyboard inputs
« Last post by Thaddy on March 29, 2024, 09:34:48 pm »
yes, but there is no reason to let his loop run asynchronously. i am more worried about his keyboard handling and the expensive formatting calls inside an already tight loop
5
Other / Re: A "leisure" question on Wirthian languages.
« Last post by EventHorizon on March 29, 2024, 09:29:50 pm »
32 bit binaries under Linux64 can run provided you have installed multiarch, which on a modern Debian family is as easy as:
Code: Bash  [Select][+][-]
  1. sudo dpkg --add-architecture i386
  2. sudo apt-get update
This works too for most Debian derivatives, like Ubuntu.

read this carefully:
On older versions of the Debian family - before Jessie or ubuntu 12 - you can install it like so:
Code: Bash  [Select][+][-]
  1. sudo apt-get install multiarch-support
The latter is deprecated, hence my first solution will not work but this one does.
warning: do not do that last one on modern Debians, because it does not know the package multiarch-support! It does not need it and you can easily screw up if you try to install it through dpkg with a stray multiarch-support deb file you found somewhere...!!
Don't try to be smart...

For non-debian derived distributions I have no clue (out of principle, except puppy-linux)

Oh, forgot, you can check if multiarch is already installed like so:
Code: Bash  [Select][+][-]
  1. dpkg --print-foreign-architectures
If the output shows i386 you are fine.
I am not sure what is the state of affairs in Void -in that regard.
6
Beginners / Re: Program loop "runaway" while waiting on keyboard inputs
« Last post by alpine on March 29, 2024, 09:29:28 pm »
That's what I'm doing.  Actually I had everything in the OnKeyPress event code but decided that would make that particular chunk of code very unwieldy as I add functionality.  That's why I took the approach of OnKeyPress doing nothing more than putting the keystrokes into a buffer for the other functions to pick up and do things with as needed.
Unwieldy? Use separate procedures (methods) to make it structural and clean.

There's nothing you can do but go along with how the GUI works. The main loop is the Application main loop (aka GUI loop) and I wouldn't mess with it unless I'm porting the LCL to a new platform (and I'll probably never do so).
 
Buffer the keystrokes into, call a method to check if it matches what you want or it is something that you can discard, encode it in an enum or some data structure and clear the buffer as advised. Then call another method to process what you have received and if there is a loop in it, put Application.ProcessMesages inside to keep the GUI somewhat 'alive'.

Another way would be spawning a separate worker thread to process it, but that is a way more advanced - it also must be sync'ed with the GUI thread. 
7
Other / Re: A "leisure" question on Wirthian languages.
« Last post by EventHorizon on March 29, 2024, 09:28:35 pm »
It would be nice thought for native 64bit support (in Linux).

It would be nice to win the lottery too, but it probably ain't going to happen :)
World Peace, would be even better
8
Beginners / Re: Program loop "runaway" while waiting on keyboard inputs
« Last post by Thaddy on March 29, 2024, 09:25:57 pm »
override application.afterconstruction. call inherited first then add your loop. place appication.processmessages first in the loop and add the case else and call it there too. application.afterconstruction is called after all forms etc are constructed and initialized and able to respond to messages.
9
Beginners / Re: Program loop "runaway" while waiting on keyboard inputs
« Last post by new2thisagain395 on March 29, 2024, 09:08:06 pm »
You do not clear - to my chagrine i might add because out thinking the system unit with your own implementation is asking for trouble, it is nonsense - the keyboard buffer when a T is detected, so the if condition is always true. and that makes that the loop never reaches application.processmessages or the application gets not enough time to process the other application events. If I was your CPU I would also need a fan....
The if part also has some quite expensive operations which worsens things even more.
A shortcut solution would be to add an else to the case block and call there application processmessages too. But clearing the buffer is the most important bit. It remains bad coding.

You're right.  I added code to clear the buffer but no change. 
Code: [Select]
    while true do
     begin
          if (KbdBuffer = 'T') then
          begin
               KbdPasswdMode:= false;
               KbdStringMode:= false;
               MmiAddStr('');
               DateTimeToString (DateString,'dd-mmm-yyyy ',Date);
               DateTimeToString (TimeString,'hh:mm ',Time);
               MmiAddStr(DateString + TimeString);
               MmiAddStr('');
               case Access of
                    0: MenuIndex := 0;
                    1: MenuIndex := 1;
                    2: MenuIndex := 2;
               end;

               MmiAddStr('');
               MmiAddStr(MNU_PROMPT + MenuStruct[MenuIndex]);


          end

          else MmiAddStr('.');

          KbdBuffer:= '';
          sleep(1);
          Application.ProcessMessages;
     end;                                       

Ah ha!  Fixed it.  Moved the calling function to OnActivate.  Now it's working.  Thanks for all the help.
10
Beginners / Re: Program loop "runaway" while waiting on keyboard inputs
« Last post by new2thisagain395 on March 29, 2024, 09:00:56 pm »
I'm working on a small application that has a main program loop, ...

If you want to analyze keystroke sequences, put them in a buffer and do the processing/detecting at the end of the OnKeyPress. When you find the sequence you're waiting for, then you can process it and if it is a lengthy processing, then you can call Application.ProcessMessages inside just not to 'freeze' the GUI part.

That's what I'm doing, well sort of.  Actually I had everything in the OnKeyPress event code but decided that would make that particular chunk of code very unwieldy as I add functionality.  That's why I took the approach of OnKeyPress doing nothing more than putting the keystrokes into a buffer for the other functions to pick up and do things with as needed.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018