Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Bug in string concatenation?
« Last post by Thaddy on Today at 11:57:47 am »
It did not occur to you that concatinating shortstrings beyond 255 is silly? or another word starting with S... >:D
2
Other / Re: Interesting article about AI
« Last post by Joanna from IRC on Today at 11:56:25 am »
Quote
You must, otherwise you wouldn't be making unsupported, implicit and explicit, statements about OOP being better than pure procedural programming.
440bx I’m not sure what you mean by this. I’ve offered you the opportunity to tell everyone how you would build a house or make a cake without using objects . I was genuinely interested in how it would be done. Because you are the one claiming that it’s possible to do anything without using objects.  %)

Quote
The reason you should do it is to learn and to validate (or in this case falsify) your unfounded beliefs.
440bx it almost seems as though you are asking for help to transform your project into an oop program. I can’t even start to advise you on this without understanding what it does. Yes of course it would be a good learning experience to redo your program with oop but unfortunately it doesn’t take priority over my own project. I still would like to help if you’re serious. Are you able to tell me what the program does and what sorts of data it has?

Quote
A program to make a cake ???  when I make a cake I follow a recipe.  Likely even A.I can do that (which is a different thing than coming up with a recipe for a new, original cake.)
Well that’s presumptuous..A recipe is a cheat sheet for someone who already knows how to cook. What if the person making the cake is a child who doesn’t know how to read and has no knowledge of how to cook?

Quote
it seems that some people, you among them, have conveniently forgotten that very complex software has been written decades before OOP was even a hallucination in someone's mind.
I once was a non oop programmer just like you before I discovered objects. Even if oop programming techniques were created later, the world has always been full of objects.The  characteristics of objects and their relationships  to each other and their behavior predate computing.

Quote
A.I is having the impact it's having because it promotes intellectual laziness while satisfying the addiction for increased productivity whether perceived or real.
I agree with you on that :)

Quote
I see some commonality between A.I and OOP.  Maybe A.I is just OOP++
I doubt it. Oop doesn’t work well with copy paste programmers it’s too complicated.
3
General / Re: lazarus 4.0 RC1 error
« Last post by rvk on Today at 10:55:54 am »
Did you pass those parameters yourself?

Can you right click that line and copy the complete text?
Is it larger than what we see in your image?

See
https://forum.lazarus.freepascal.org/index.php?topic=59620.0
4
Other / Re: Online tutor using remote desktop
« Last post by marcov on Today at 10:21:25 am »
We provide remote support for our Lazarus/Delphi programs. Usually we use tightvnc, but usually in combination with the customer's choice of VPN software to get access to their network. (the clients are mostly corporations)

We also have done a lot of demonstrations and training using skype and desktop sharing. (but then the software runs on our side). Quite often that then changes into a tightvnc sessions to run our their end.

Once customer had a preference of using teamviewer and a mobile connection (their IT was centralized and it was hard to get anything else set up in a finite time)

The advantage of teamviewer is that you don't need anything changed in the customers (or your) network.
5
General / Re: Bug in string concatenation?
« Last post by tetrastes on Today at 10:05:41 am »
But here, instead of AnsiString(CP_NONE), we get AnsiString(CP_UTF8). It seems that the RawByteString type simply doesn't work properly.

https://www.freepascal.org/docs-html/current/rtl/system/utf8encode.html:
Quote
The resulting string has code page CP_UTF8.
And this is clearly seen:
Code: Pascal  [Select][+][-]
  1. function UTF8Encode(const s : WideString) : RawByteString;
  2.   var
  3.     i : SizeInt;
  4.     hs : UTF8String;
  5.   begin
  6.     result:='';
  7.     if s='' then
  8.       exit;
  9.     SetLength(hs,length(s)*3);
  10.     i:=UnicodeToUtf8(pchar(hs),length(hs)+1,PWideChar(s),length(s));
  11.     if i>0 then
  12.       begin
  13.         SetLength(hs,i-1);
  14.         result:=hs;
  15.       end;
  16.   end;

I think that https://www.freepascal.org/docs-html/current/rtl/system/rawbytestring.html is very unclear and may be even improper:
Quote
RawByteString is a single-byte character string which does not have any codepage associated with it.
. . .
the codepage of the destination is simply set to the codepage of the rawbytestring
%)

Quote
It's beyond my understanding why String <=> WideString conversion happens in some situations, but not in others:

It's useful to look at asm code to understand difference
Code: ASM  [Select][+][-]
  1. # [14] S := #$FF;
  2.    movw   $65281,U_$P$PROGRAM_$$_S(%rip)
  3. # [16] U := S;                               // there is exist type conversion
  4.    leaq   U_$P$PROGRAM_$$_S(%rip),%rax
  5.    leaq   U_$P$PROGRAM_$$_U(%rip),%rcx
  6.    movq   %rax,%rdx
  7.    call   fpc_shortstr_to_unicodestr
  8.  
  9. . . .
  10.  
  11. # [26] U := ShortString(#$FF);               // there is NO type conversion
  12.    leaq   U_$P$PROGRAM_$$_U(%rip),%rcx
  13.    leaq   .Ld2(%rip),%rdx
  14.    call   fpc_unicodestr_assign     ; here is simple assigning of constant, the same as U := #$FF;
  15.                 ; because ShortString(#$FF) is ordinary constant and fpc converts it to UnicodeString constant at compile time
  16. . . .
  17.  
  18. .section .rodata.n_.Ld2,"d"
  19.    .balign 8
  20. .Ld2$strlab:
  21.    .short   1200,2
  22.    .long   0
  23.    .quad   -1,1
  24. .Ld2:
  25.    .short   255,0
6
Other / Re: Online tutor using remote desktop
« Last post by Handoko on Today at 09:32:46 am »
I need to use remote desktop because I cannot reproduce some IDE related issues they told me. By using remote desktop, I can watch how they perform the tasks so I can understand where they did it wrong.

I ever set up Team Viewer just for testing purpose, haven't used it seriously. But I recently heard that Team View no longer offers free version, the trial version has too many limitations. RustDesk seems a good choice.

Thank you for the comments and suggestions.
7
Other / Re: had a question and found answer
« Last post by MarkMLl on Today at 09:14:59 am »
In response to the Original Post - this is the reason why developers keep journals. It provides a way to problem solve in a lateral way, especially when written in a conversation-style form (a monologue for example).

I keep occasional journals for some of my longer-running projects, and yes it takes effort, practice and time, but consider this fact: programming is not exclusively limited to typing in code ;)

p.s. Do a search for "why you should keep a developer journal"

An engineer was, traditionally, expected to keep a notebook: usually hardbacked, and often with squared paper for ease of neat sketching.

This had sufficient recognition that it was acceptable in court cases, and my understanding is that so far there is no recognised software equivalent. Obviously there's things like Jupyter Notebook, but the problem is that it's difficult if not impossible to produce an adequate audit trail of when things were done... this is obviously something that a blockchain could help with but could we please not go there.

In terms of software, my code is very heavy on the comments. And I regularly update colleagues by email as to what I'm doing, particularly if they respond it provides a modicum of traceability.

MarkMLl
8
General / lazarus 4.0 RC1 error
« Last post by fcu on Today at 08:38:21 am »
Hi
ii've installed lazarus 4.0 RC1 64bits on windows 10 pro 64bits
now the problem is whenever i create a new project i got this error message while compiling

9
Other / Re: Interesting article about AI
« Last post by LV on Today at 07:59:18 am »
@TRon, I understand your concern. However, there is no reason to suspect all scientific groups working in this area of dishonesty or a willingness to profit at any cost.

@440bx, artificial intelligence is a broad concept that encompasses more than neural networks. Indeed, explainability and interpretability are the most important requirements for critical decision-support systems.

My friends believe that computers are evil. They are dealing with a son who is addicted to gaming, playing all night, and missing college classes.
10
Other / Re: Interesting article about AI
« Last post by TRon on Today at 07:38:31 am »
A.I does not seem to have any guard rails of any kind.  That is not a good thing.
Which is probably the reason why experts systems seem to be fading. To develop, setup and maintain a serious expert system there is need to invest in knowledge and time.

On the surface current AI models seem capable of delivering something similar without such hassle. Everyone able to follow some simple instructions is able to setup a model and shapes it any which way it wants to (and in case reading is too difficult there are also GUI's with nice buttons that do click-clack and play an animation when you press them which are able to achieve the same).

Although perhaps similar on the surface nothing could be further apart regarding their inner workings though both can be manipulated by human intervention (though in case of an expert system at least it is possible to implement a mechanism to prevent that from happening or at least be able to point a/the finger).

If one has read f.e. the european legislation regarding (open)AI then the direction of that path is already known and in the end no-one is actually accountable for anything let alone that it is possible to reconstruct how something got to a certain point (which is actually the opposite of what an expert system tries to accomplish).

As someone in this forum once wrote: it is truly exciting to be alive in this day and age :sarcasm:  :D
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018