I mean if in theory you were to inline that function variables code into the
function it would need to generate a new function (I guess the name also, so
the entire thing) because the function being passed in could change on per-call
basis (like a normal generic function)
quot;trunk" location so that it doesn't overwrite existing stable compiler releases.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> On Nov 3, 2021, at 8:17 PM, Bart via fpc-pascal
> wrote:
>
> Maybe use SomeString.Split([LineEnding'], ...)?
> Split has an overload that takes an array of string as first paramter.
Thanks, I guess I need to use a different way to work on all platforms.
Regards,
iased way then.
I really like the text rendering part. I've been picking away at that problem
recently and it's pretty difficult to do correctly.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.
t possible.
===
type
TSomeFunc = function: boolean;
procedure DoThis(func: TSomeFunc);
begin
if func then
;
end;
function MyFunc: boolean; inline;
begin
end;
begin
DoThis(MyFunc);
end;
Regards,
Ryan Joseph
___
fpc-pascal maillist -
tically possible through constant propagation.
I understand simple constant propagation cases but how does this apply to
inlining entire functions? I think C++ can do this with closures so it's
something worth looking in to for the future.
Regards,
Ryan Joseph
__
* 2; { MultBy2 is inlined here }
end;
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
n layer (frame buffer) which updates only
when controls request it and update only that portion of the window.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
with -vt and check where the
> compiler is getting its configuration file from.
Thanks, I see -Sc now but I've always taken for granted it was always there.
What confused me is that it's a command line option instead of a mode switch
like other language features.
Regards
That would make sense it would fail then. Let me try
downloading the correct version and I'll report back.
If Lazarus installed the compiler also maybe I just need to update my paths so
"fpc" points to the version in Lazarus...
Thanks.
Reg
Box2D which was C++ only.
https://github.com/thealchemistguild/Box2DC
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
an installer so I don't know how
else to set it up.
PS C:\Users\Ryan Joseph\Desktop\Developer\pascal-language-server>
C:\lazarus\lazbuild.exe pasls.lpi
SetupCompilerFilename: The compiler path
"$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe" =>
"C:\lazarus\$Lazarusdir\fpc\3.2.0\b
ke my idea of default properties for records so
we can implement smart pointers? I got a good chunk of that done months ago but
never heard anything about it...
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
seconds to read a 600MB file from one process to another, which is insanely
slow.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
has no affect.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
it could come from.
How could I test this further? I think something is wrong but I don't know
where to look. I'm on macOS btw.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bi
to basically redo the entire thing
also).
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
);
the address changes every time the program reloads (as expected) so how do you
use a constant memory address which would map to this?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/
is a possibility for using "as" operator also though
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> On Jan 16, 2022, at 9:21 AM, Ryan Joseph wrote:
>
> There is a possibility for using "as" operator also though
oops I mean "is" operator. Not sure if these are technically different from
ClassType = ClassType though...
t know why I forgot that. :P
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
acedObject: writeln('TInterfacedObject');
TAggregatedObject: writeln('TAggregatedObject');
otherwise
writeln('OTHER: ',o.ClassName);
end;
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal
> On Jan 16, 2022, at 8:18 PM, Ryan Joseph wrote:
>
> https://gitlab.com/genericptr/free-pascal/-/commits/case_label_classref
I just realized too late that the way I implemented this may be not the best
idea. If the class type had an ordinal representation then you could use a
no
he class if it didn't exist in the list. It's an
incomplete code snippet but if the class was another type it would be captured
there of course.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.f
> On Jan 16, 2022, at 9:01 PM, Ryan Joseph wrote:
>
> case PtrUInt(o.ClassType) of
>4500656856: writeln('TObject');
> end;
I may have spoken too soon and without thinking the through clearly (it's
getting late here!). For this to work we would need a unique ID in the
us what this type actually is also, maybe a dispatch table which wraps
the existing types or is it something totally new?
type
TMyAction = reference to procedure;
procedure DoThis(action: TMyAction);
begin
action();
end;
Regards,
Ryan Joseph
_
ror: Incompatible type for arg no. 1: Got
"", expected
""
// normal
DoThis(@MyAction);
end;
begin
end.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
ns "reference to procedure" is not compatible with "is nested"?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
es at all or does it use a totally different
mechanism to call those?
type
TMyAction = reference to procedure;
procedure MyAction;
begin
end;
procedure Test;
begin
DoThis(@MyAction);
end;
Regards,
Ryan Joseph
__
this
object is not clear to me so I'll wait for Sven to answer on that.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
on body? I guess that makes sense on how it can "capture" these
different types of functions.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
function reference to a nested function variable is hard as well.
>
I'm getting lost with the terms now I think. If your function takes a function
reference parameter and you assign it a nested function pointer, this is
difficult? I believe this was Michaels request in that code snip
> On Feb 12, 2022, at 11:40 PM, Jonas Maebe via fpc-pascal
> wrote:
>
> I wouldn't consider this to be working by design, but rather because of
> implementation limitations.
I agree and it should be fixed probably.
Regards,
GetBit (from the last link) in the RTL?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
t flag APIs where all the flags are OR'd together into an LongWord?
A type helper would be great because clearly this stuff is hard to remember.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.f
s := KMOD_LCTRL + KMOD_RCTRL;
writeln('TestBit: ', flags.TestBit(KMOD_LCTRL));
writeln('TestFlag: ', TestFlag(flags, KMOD_LCTRL));
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
h:
var
n: TFoobarNested;
begin
f := n;
THAT would be hard? I've never passed around nested function vars before so I
don't really know the limitations of this. The important thing is the primary
use case works.
Regards,
Ryan Joseph
___
fpc-pa
> On Feb 16, 2022, at 12:18 AM, Thomas Kurz via fpc-pascal
> wrote:
>
> What release are anonymous functions planed for? FPC 3.4.0?
They aren't even in trunk yet. Could be months or years.
Regards,
Ryan Joseph
___
fpc-pas
the runtime
cost to use these.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> On Feb 1, 2022, at 9:22 PM, Ryan Joseph wrote:
>
>
> If anyone understands SDL I figured out how to get around this missing main
> linker error and program runs but then crashes. I've reported to SDL at
> https://discourse.libsdl.org/t/crash-in-uitextfield/34711 (along
undef would
have been smart also.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
ut to your main
function. I had old code from 2016 which appears to do this but for some reason
now I'm getting this linker error.
My only guess is that the linker can't find the SDL main function in the
framework, even though everything else links properly.
Reg
t for main executable
(maybe you meant: _SDL_main)
Why is this?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> On Feb 1, 2022, at 9:34 AM, Ryan Joseph wrote:
>
> My only guess is that the linker can't find the SDL main function in the
> framework, even though everything else links properly.
If anyone understands SDL I figured out how to get around this missing main
linker error and
look kind of like this:
for case monster as TZenChan in monsters do
TZenChan(monster).Dothis;
That syntax is not so nice but I like they're trying to help us manage class
introspection using existing language constructs.
Regards,
Ryan Joseph
(monster).DoThat;
otherwise
monster.DoSomething;
end;
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
ould clutter up the system but I'll make a merge
request if you want.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
org/FPC_git#Update
Sorry I'm not following. Before starting this branch I did a pull from the
main branch so I'm up to date.
What other steps do I need to do? If I do a "git pull --rebase" on the feature
branch does that even do anything?
.') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
A pull didn't help but I think I basically broke that branch and maybe I need
to delete it and start over?
Regards,
Ryan Joseph
___
fpc-pasca
> On Jan 19, 2022, at 8:14 PM, Ryan Joseph wrote:
>
> Ok I got this almost done (mirroring is great I didn't know I could do that)
> and did the rebase which shows the linear history now.
>
> First a question, do I need to do the "rebase main" again before
> On Jan 20, 2022, at 9:11 AM, Ryan Joseph wrote:
>
> The problem was my remote for the branch got lost after rebasing but I think
> I fixed it by re-pulling.
>
> It looks like some unrelated commits are included in my merge request but
> maybe that happened because I r
> On Jan 20, 2022, at 8:10 PM, Ryan Joseph wrote:
>
> I just check at https://gitlab.com/freepascal.org/fpc/source/-/merge_requests
> and I don't see my merge request appeared. If it were GitHub I would expect
> to see it there. What did I do wrong?
So what I did was created
do a pull-rebase from main and then
make my pull request?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> On Jan 19, 2022, at 4:19 PM, Ryan Joseph wrote:
>
> Still not following this. Do you need me to do a pull-rebase from main and
> then make my pull request?
I used git at work everyday but I'm still a newbie in many ways. Reading this
now but I'm confused because it seems too
at compile time.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
I have this macro:
{$define TCallback := TCallback2}
which gives a long list of these errors.
warning: Expanding of macros exceeds a depth of 16.
What does this warning mean and how can I resolve it?
Regards,
Ryan Joseph
___
fpc-pascal
1101 - 1156 of 1156 matches
Mail list logo