Re: [fpc-pascal] $modeswitch from command line

2020-02-05 Thread Mr Bee via fpc-pascal
It’s a great info, Jonas. Thank you.
I didn’t know FPC has -M option for $modeswitch. Based on the official 
document¹, the -M option is to select language modes, not language features.
I know changing language mode would reset mode switches. It’s no problem for me 
because I wrote the code and I stick to ObjFPC mode for all the code, no 
exception. But I want to use advanced record feature as well. By setting the 
language mode and language features in the global config, I don’t need to write 
them in every single file.

–Mr Bee
_¹ A Alphabetical listing of command line options



| 
| 
|  | 
A Alphabetical listing of command line options


 |

 |

 |



 

Pada Rabu, 5 Februari 2020 02.30.04 WIB, Jonas Maebe  
menulis:  
 
 On 04/02/2020 10:06, Mattias Gaertner via fpc-pascal wrote:
> As Sven explained a $mode resets all modeswitches.
> What you need is a switch to alter modeswitch of a mode. And
> there is currently no such switch.
> 
> For example a syntax could be:
> -MObjFPC+AdvancedRecords+AnsiStrings-NestedComments

$ cat tt.pp
program x;

{{test }

type
  tr = record
    procedure test;
  end;

  procedure tr.test;
    begin
    end;

begin
  writeln(sizeof(string));
end.

$ fpc -MObjFPC -Madvancedrecords -Mansistrings -Mnestedcomments- tt
Free Pascal Compiler version 3.0.4 [2018/09/30] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Darwin for x86_64
Compiling tt.pp
Assembling (pipe) tt.s
Linking tt
16 lines compiled, 0.1 sec

$ ./tt
8

Setting a different mode resets all modeswitches to the default for that
mode (since that's one of the main points of a mode). Setting a
different modeswitch does not reset anything.


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] $modeswitch from command line

2020-02-04 Thread Mr Bee via fpc-pascal
As mention in the email title, what I meant is {$modeswitch} not {$mode} as 
explain here: https://www.freepascal.org/docs-html/prog/progsu105.html

For example, if I want to use extended record in objfpc mode, then I have to 
define
{$mode objfpc}{$modeswitch advancedrecords}
in every single file that using the feature. I prefer to put it in a config 
file or call it from command line, as default setting, so my code is cleaner 
from such things.

Is it possible?
Thank you.
Regards,

–Mr Bee
 

Pada Selasa, 4 Februari 2020 13.42.10 WIB, Sven Barth via fpc-pascal 
 menulis:  
 
 Am 03.02.2020 um 23:19 schrieb Mr Bee via fpc-pascal:
> Hi all,
>
> Is there a way to enable a mode switches from fpc command line?
>

Yes, using -M, however these are discarded as soon as a $Mode 
directive is read (just like any $Mode directive resets any $Modeswitch 
directive).

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] $modeswitch from command line

2020-02-03 Thread Mr Bee via fpc-pascal
Hi all,
Is there a way to enable a mode switches from fpc command line?
Thank you.
Regards,
~Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Custom operator

2020-02-01 Thread Mr Bee via fpc-pascal
Of course precedence of the operator also must be informed by the operator 
author to the compiler in some ways. Operator has different purpose and 
workflow from function/method. If not, then everything can be just a method, no 
operator needed.
However, if this is not practically possible in FPC, it’s all right then.
Thank you.

–Mr Bee
 

Pada Minggu, 2 Februari 2020 08.32.23 WIB, Sven Barth via fpc-pascal 
 menulis:  
 
 Mr Bee via fpc-pascal  schrieb am So., 2. 
Feb. 2020, 02:11:

Hi all,
Besides overloading available operators, could we make our own custom 
operator(s) in FPC?
For example, I want to use ∑ to sum array values? Also other Unicode characters 
such as ≥, ≤, ±, ≠, etc as custom operators? I think such feature is important 
in this unicode era.
Is it possible?

No, it is not (okay, technically, in theory it would be possible, but 
definitely not desired). The compiler would need to know such operators so that 
it can determine the precedence. You can just as well use methods/functions for 
that with the added benefit that they can be named in a way that explains their 
purpose. 
Regards, Sven 

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Custom operator

2020-02-01 Thread Mr Bee via fpc-pascal
Hi all,
Besides overloading available operators, could we make our own custom 
operator(s) in FPC?
For example, I want to use ∑ to sum array values? Also other Unicode characters 
such as ≥, ≤, ±, ≠, etc as custom operators? I think such feature is important 
in this unicode era.
Is it possible?
Thank you.
Regards,
–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] FPC-based http/s server

2018-12-10 Thread Mr Bee via fpc-pascal
Hi all,
Is there any open source, maintained and updated HTTP server using FPC out 
there? I need a lightweight HTTP server written in FPC that supports 
Linux/Unix, F/CGI app, and HTTPS. It'd be better if it doesn't need external or 
third-party units such as Indy or Synapse, but only pure FPC standard units 
such as fpHTTP* and fpWeb* units.
Google only gave me some old (back to early 2000) and abandoned projects 
written in Delphi mixed with inline assembler and Windows' API, also don't 
support HTTPS.
Thank you.
Regards,
–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to get ANSI code command return value?

2018-12-02 Thread Mr Bee via fpc-pascal
Pada tanggal Min, 2 Des 2018 pukul 15.59 Sven Barth <
pascaldra...@googlemail.com> menulis:

>
> Um... The CRT unit is a raw Pascal solution?! Anyway, you can use that
> unit to see how the CRT unit did it.
>

Nope, I don't think so. CRT unit is Turbo Pascal's legacy unit. There are
some serious caveats with CRT unit, as explained here:
https://www.freepascal.org/docs-html/rtl/crt/index.html

The Windows console does not support ANSI codes. So you'll need to use an
> abstraction API like the CRT unit anyway.
>

Windows now supports ANSI codes emulation, as explained here:
https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences

Regards,

–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] How to get ANSI code command return value?

2018-12-01 Thread Mr Bee via fpc-pascal
Hi all,
I'm playing around with ANSI code (ESC sequence) on the console. Sending an 
escape command is trivial such as changing text's color and background. 
However, getting a response isn't as easy as I thought. Here's a simple test 
program:
program ANSItest;
var  s: string;begin  // send ESC command  write('Cursor position: ');  
write(#27'[6n');  read(s);  // read ESC result  write('Received string: ');  
writeln(s);end.
The program sends [6n command to query current cursor position and would 
return [;R string. As the result is sent back to standard 
input, I think using the standard read() procedure would be enough. 
Unfortunately, that's not the case. Here are the problems:
1. read() procedure keeps waiting until the user presses return/enter key while 
I hope it could automatically stop reading as the input buffer gets empty. Is 
there a way to make read() doesn't wait for return/enter key?
2. read() procedure strangely doesn't read the response given by the console 
(into s variable) although it's clearly printed on the screen. It's proven by 
the last writeln(s) line that produces nothing or an empty text. What's wrong 
with it?
3. The return value of an ESC command query is printed on the console. I don't 
want this. I want to send the ESC command silently, fortunately the standard 
write() procedure is able to do just that. I also want to get the response 
value silently. Is there a way to temporarily redirect standard input into a 
variable?
Requirements:
– I want to avoid CRT unit as much as possible. I prefer raw pascal solution.– 
The solution works across platforms, at least on Mac, Linux, and Windows.
Is it possible using standard Pascal routines?
Thank you.
Regards,
–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TJSCanvasRenderingContext2D's ellipse method is missing

2018-10-15 Thread Mr Bee via fpc-pascal
This mail should be sent to pas2js list. Please ignore it.
My mistake, I didn't re-check the address. I apologize.
Thank you.
Regards,
–Mr Bee
 

Pada Senin, 15 Oktober 2018 21.37.06 WIB, Mr Bee via fpc-pascal 
 menulis:  
 
 Hi,
I'm now using pas2js v1.0.2 but I can't find `ellipse` method in 
TJSCanvasRenderingContext2D class. Is there a way to draw ellipse on a canvas 
using this version of pas2js?
Thank you.
Regards,

–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] TJSCanvasRenderingContext2D's ellipse method is missing

2018-10-15 Thread Mr Bee via fpc-pascal
Hi,
I'm now using pas2js v1.0.2 but I can't find `ellipse` method in 
TJSCanvasRenderingContext2D class. Is there a way to draw ellipse on a canvas 
using this version of pas2js?
Thank you.
Regards,

–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] -gw3 produces garbages

2018-05-25 Thread Mr Bee via fpc-pascal
Hi all,
The `-gw3` with `godwarfcpp` flag for lldb produces garbages for string type or 
any dynamic array types. While `-gw2` only works on string but still failed on 
any dynamic array types.
Is there a way or configuration so we can debug string and dynamic array with 
lldb conveniently?
I'm using fpc 3.0.2 with lldb 360.1.70 on macos 10.11.6 (el-capitan).
Thank you.

–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] working with lldb

2018-05-05 Thread Mr Bee via fpc-pascal
Nothing fancy actually. I just want to watch some string variables while 
debugging, but LLDB just gives me like some kind of array with garbage values. 
Not useful at all.
I'm using FPC v.3.0.2 with VS Code and LLDB (as VS Code plugin) on Mac.

–Mr Bee
 

Pada Sabtu, 5 Mei 2018 17.25.58 WIB, Ingemar Ragnemalm 
 menulis:  
 
 
Den 2018-05-05 kl. 12:00, skrev Mr Bee :
> Hi,
> Is there a way to make LLDB able to read and display Pascal's string 
> correctly? At least, ansi string. I'm now using this option '-glpsw3 
> -godwarfcpp'. Did I miss some options or something?
> Thank you.

In my experience, AnsiStrings will print with no problems. For example, 
they print nicely with a command like "fr v" as well as "p". Short 
strings are worse, they display as arrays or separate characters.

So what are you doing with them that goes wrong?

/Ingemar

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] working with lldb

2018-05-05 Thread Mr Bee via fpc-pascal
Hi,
Is there a way to make LLDB able to read and display Pascal's string correctly? 
At least, ansi string. I'm now using this option '-glpsw3 -godwarfcpp'. Did I 
miss some options or something?
Thank you.

Regards,
–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-05 Thread Mr Bee via fpc-pascal
2018-04-04 16:58 GMT+07:00 Michael Van Canneyt :

>
>> Do you mean this:
>> http://wiki.lazarus.freepascal.org/File:Lazarus-icons-lpr-
>> proposal-bpsoftware.png
>> ?
>>
>
> Yes. For me, this is the direction to go in.


But it's Lazarus logo. I think we should have a distinguished logo between
the compiler and the IDE.

Eh, and the fact that you are almost forced to use it if you want to
> program for the Mac these days ?
> Just like Microsoft pushes everyone to C#.
>

Actually, nobody pushes anybody to use anything. As a first party solution,
of course it would be advertised as the best tool for the platform. Being
advertised doesn't mean it's pushed to everyone because in reality you can
use whatever tool you want as long it supports the platform.


> I think the innate properties of these programming languages have nothing
> to do with
> it. It's just a vendor lock-in strategy.


Lock-in strategy is just a term in business, but it never really locks
anybody into anything. You won't be punished if you don't use Swift on
Apple's platform or C# on Microsoft's platform. You're still free to use
anything on any platforms. But usually you'll get many benefits and
advantages if you use first party solution that sometimes can't be provided
by third party solutions. Some might see it as being locked, some others
might see it as a service.


> The question is: do you need 'cute' in order to attract young, capable,
> people?
> I doubt that.


I was talking about the mascot, not the logo. And I think it's good to have
a cute mascot. Why everything has to be formal and serious? :)

And this kind of statement is why I don't take branding or marketing
> seriously.
> On one hand "..then branding is quite important" and on the other hand
> "don't take it too literally".
> That simply does not compute for me.


Because you mix the whole things up. Branding is important but it doesn't
need to represent the company/product literally. A brand is like our name.
Everybody is known by the name, but the name doesn't necessarily represent
the image of the person literally. Mr White doesn't have to be a man in all
white color, for example. Yet everyone would still call him Mr White.
Everybody knows apple is a fruit, yet everybody knows a bitten Apple fruit
logo represents a company that produces computers and smartphones with no
apple fruits involved whatsoever.

-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-04 Thread Mr Bee via fpc-pascal
2018-04-03 14:21 GMT+07:00 Michael Van Canneyt :

>
> I meant the icon it uses for the IDE.


Do you mean this:
http://wiki.lazarus.freepascal.org/File:Lazarus-icons-lpr-proposal-bpsoftware.png
?


> A lot thinner :)
>

Let's see what I can do.


> And here I will stop: as said, branding is not a subject I am particularly
>
fond of or interested in. I am more interested in the contents of the box
> than in the packaging...


Well… if we want Pascal to be known again –as modern programming language,
not the old 70's Pascal– then branding is quite important. Especially to
young generation. See what Apple has been achiving with Swift within only 4
years. It goes from nothing to the top 10 of most known programming
languages of the world today, despite all of its flaws and immaturity. Sure
it's also helped by the power of Apple's brand (and marketting), it's still
a good achievement nevertheless.


> If we're looking for 'My little pony' kind of people, then we should
> definitely aim for cute :)
>
> But this is not exactly the kind of people I think we should attract.
>

Well, I'm exactly aiming at young people, the next generation of Pascal
developers. I've been seeing FPC's core devs team doesn't change much since
the first time I found FPC almost 20 years ago. I mean no offense, but I'm
not hoping to see this same team again for the next 20 years. I hope we're
starting to see new and younger people joining this great open source
project that we love. These young people is our hope to keep Pascal alive
in the future.

A cheetah is not cute. It's a wild animal which will have no compunction
> about slashing your throat or ripping your intestines out if you get it
> cornered.
>

It's just a logo. It's a brand, not a 100% exact representation of the
product/company. Don't take it too literally. Python is also a wild and
dangerous animal, but Python language and the users are very far from that.
:)

I get this often too, but now I show them pas2js.
>

I meant Pascal for server side web app, similar to Python or PHP or
whatever.

But unfortunately, I don't believe a flashy/cute/whatever logo will change
> this...


Of course, a new logo isn't a silver bullet. It won't make Pascal famous
overnight. This new logo surely wouldn't help much if we don't follow it
with promotions and good contents. But at least, we have a new, fresh,
attractive, and modern face to begin with. Hopefully this new face would
bring new spirit to the community to do more. I've read somewhere in the
list/forum, some people even suggested to change Pascal name to break the
relation and association to the old Pascal. Should we?

You know what, almost every time I talk about Pascal to young developers,
they think the old and stupid Brian Kernighan's article "Why Pascal is Not
My Favorite Programming Language" still applied. It's the reason why
RemObject use a new name for its Pascal-based compiler.

I am curious :)
>

Thank you, but I can't promise you anything yet. I'm doing this in my spare
time, mostly on the weekend. We're in no rush, just consider this as a mind
project.

I really do appreciate you taking the time to do this. It's not because I
> think differently about what the result should be that I don't appreciate
> the effort you put in this, so thank you for that !


You're welcome. I fully understand it. It's alright. In fact, we need your
opinion, also from other FPC core devs as well. We need to know what you
guys want with the logo in particular and the project in general. This new
logo proposal means nothing without core devs' approval. I'm just a happy
user and big supporter of FPC who haven't contribute anything useful to the
project.

-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-02 Thread Mr Bee via fpc-pascal
2018-04-02 16:36 GMT+07:00 Michael Van Canneyt :


> Please look at the lazarus logo/icon. It has no whiskers.
>

I opened lazarus.freepascal.org and I found it's using a paw as its logo.
Did I miss something? Sorry… I haven't been following Lazarus news for
quite a while, so I don't know the current logo.


> It looks much more like a cheetah, not like a kitten.
> So you can do something about it: remove the whiskers.
>

But cheetah do have whiskers. Other people complained the old logo weren't
really look like a cheetah's face.


> As an exercise I have done the job for you. See here:
> http://www.freepascal.org/~michael/pascal_logo2.png
>

Perhaps I should make the whiskers a bit less visible? Thinner perhaps?


> It's of course better to improve the original, I am not an artist.
> (I even would get rid of more elements, but let's start with this)
>

I'm not a professional artist either, but I love art and I do drawings for
a hobby.


> If we're talking branding anyway (a subject I loathe), then a logo should
> represent the company/product group, whatever.
> So, the FPC logo should exhale maturity, strength, prowess,
> self-confidence.
>

Modern logo doesn't necessarily have to represent the WHOLE values of a
company/product, because a company/product should be dynamic that
could/should change over time. So is the logo. Take a look at most modern
logo of big companies today, i.e. Microsoft, Google, Apple, etc. For
example, I can't see any of Apple's values (both the company and the
products) got represented on a bitten gray apple fruit. It looks dull, at
least to me. But the Apple brand image is so powerful and what people think
about Apple is far from dull. Or… what values can we see from a G shaped
with four bright colors of Google's logo? It looks like a letter toy. Or
Linux logo, Swift logo, Kotlin logo, etc.

Hardly things one associates with a kitten.
>

I don't think it looks like a kitten, especially the updated one. But of
course it looks like a cat, because cheetah is a cat.


> FPC is an open-source project dating back to the days the word "open
> source" did not exist. So maturity is important.
>

How do we put "maturity" onto a cheetah's face? Cheetah is known as the
fastest animal on land. That's what the most recognizable value of a
cheetah logo. And that's what people should think about (Free) Pascal: it's
FAST. By making the logo looks more modern, it also brings modernity value.
So, the new logo should represent something that's fast and modern. And
cheetah is also cute as a mascot. And cuteness is attracting young people.
:)

Using marketing/branding talk:
> Given that I think your version looks like a kitten, you will understand
> that for the reasons explained above, I would not want to be "associated"
> with the logo as you proposed it now.


I understand. But I'm not fully agree with you either. The main reason I'm
proposing new logo for Free Pascal –or even Pascal language in general– is
I want to bring Pascal to the young people. I want these kids know that
Pascal today is as modern, fast, and dynamic as other well-known
programming languages. I hate it when I told them I'm writing a software
using Pascal and they look at me like I'm a dinosaur. Some of them even
asking me, "how do you make a web app using Turbo Pascal?" :D

In fact, I'm currently designing of another Pascal logo that's more
abstract, simpler, friendlier, and more colorful. It's still based on
cheetah's face though. I'll present it as second alternative, once I'm done
with it. :)

-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-02 Thread Mr Bee via fpc-pascal
The proposed logo is updated.

What's new:
- it has eye balls.
- more rounded face.
- more rounded ears.
- more visible whiskers.

Cheetah is a member of cat big family. So, of course it will look like a
cat or kitten. Nothing I can do about it.

Are there more suggestions? Thank you.


2018-03-31 21:24 GMT+07:00 Michael Van Canneyt :

>
>
> On Sat, 31 Mar 2018, Vojtěch Čihák wrote:
>
> Hi,
>>
>> cheetahs have usually more rounded head and rounded ears. And whiskers
>> should be curved.
>> http://news.stlpublicradio.org/post/cheetah-populations-keep
>> -falling-scientists-demand-better-protection#stream/0
>> Just my 50 cents.
>>
>
> And as you can see, the whiskers are barely visible, and not black...
>
> Michael.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>



-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-03-31 Thread Mr Bee via fpc-pascal
2018-03-30 16:19 GMT+07:00 Ingemar Ragnemalm :

>
> The logo is very good, and well connected to the tradtion set by the
> animated gif. The alternative would be to use a frame of the animation, or
> similar sideways cheetah, but scaled up so it can have different
> resolutions. But the head is more compact, which speaks in its favor.
>

Thank you.


> I am not sure how bit the *need* is but it doesn't hurt to have an
> official still image logo.


If we want the young generation to know Pascal with a new paradigm, a
modern programming language paradigm, I think this branding effort is quite
important. There are so many people still think that Pascal today is still
the old 70's Pascal. I even found many universities, at least in my
country, that still teach Pascal using Turbo Pascal. When I introduced them
to new and modern Pascal, the FPC/Lazarus (or Delphi), they were amazed at
how modern Pascal is!

-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-03-31 Thread Mr Bee via fpc-pascal
2018-03-30 15:21 GMT+07:00 Michael Van Canneyt :

>
> I would get rid of the whiskers.
>
>
What's wrong with the whiskers? 

-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Proposal for new Free Pascal logo

2018-03-29 Thread Mr Bee via fpc-pascal
Hi,
These days, most modern programming languages have its own logo. The logo 
becomes a "brand", a unique visual identity for the language. It also acts as a 
"trademark", a recognizable image for the language. It also helps the community 
to have a single visual identity to distinguish them from other programming 
communities. I've seen it with many other communities, such as Swift, Python, 
Kotlin, etc.
Unfortunately, I don't see Pascal language –especially Free Pascal– to have a 
such logo. Yes, I know the FPC's official site got a running cheetah (a .gif 
file) named as logo. But, I don't think an animated picture is appropriate to 
be used as a logo. A logo should be simple, unique, recognizable and 
"iconizable" image.
So, I propose a new logo for Free Pascal. It's a simple cheetah's head. The 
proposed logo in various sizes (for icon) can be looked at here: 
https://pak.lebah.web.id/fpc/ I also attach the logo as a .png file, in case 
someone can't open my website.
If this proposal is accepted, perhaps it's time to rework the official FPC's 
website, using the new logo. It's time to make Pascal looks more modern, 
because it looks pretty old today. I also think the Lazarus' logo can be made 
better, but that's another discussion for another time.
What do you think?
Thank you.
Regards,
–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] CRT unit and Windows' terminal

2017-10-16 Thread Mr Bee via fpc-pascal
2017-10-16 19:03 GMT+07:00 James Richters :

>
>
> I’m curious how the CRT unit handles the Extended ASCII codes on Mac and
> Linux…  All versions should be the same for cross platform compatibility.
>

I don't know the underlayer library being used by CRT unit on Mac and
Linux. Perhaps because CRT unit both on Mac and Linux had supported unicode
since the beginning? CMIIW.


-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] CRT unit and Windows' terminal

2017-10-15 Thread Mr Bee via fpc-pascal
2017-10-16 3:14 GMT+07:00 James Richters :

>
> Whether CRT is using Extended ASCII or Unicode, as far as I can figure
> out, it's impossible to display box characters with the CRT unit at all.
>

Long story short: CRT unit doesn't work at all on Windows, but it works
with unicode on Mac/Linux.


-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] JavaScript versions of pascal RTL functions (FormatFloat, DateToStr etc)

2017-10-15 Thread Mr Bee via fpc-pascal
2017-10-15 17:25 GMT+07:00 Michael Van Canneyt :

>
> Hello,
>
> If you want the latest preview and demos to play with:
>
> https://www.freepascal.org/~michael/pas2js-demo-0.8.28.zip
>
> The component developer is doing fantastic work with the visual
> components, and it starts to look really good.


Thank you, Michael. But I think there are some units missing. CMIIW.


-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] JavaScript versions of pascal RTL functions (FormatFloat, DateToStr etc)

2017-10-14 Thread Mr Bee via fpc-pascal
Wow… that's really a great news, Michael! Thank you. I can't wait for it to
be released officially. :)


2017-10-14 5:22 GMT+07:00 Michael Van Canneyt :

>
>
> On Fri, 13 Oct 2017, Luiz Americo Pereira Camara wrote:
>
> Hi,
>>
>> I'm developing an app were the client is written in Javascript + HTML and
>> the backend in pascal (fpc)
>>
>> I'd like to use my pascal knowledge of RTL functions, mostly utils
>> (FormatFloat, DateToStr etc) in the client app
>>
>> Do you know any implementation of such functions, with similar signatures,
>> in JavaScript?
>>
>
> In december, you will be able to use pascal for your client app, using
> pas2js.
> I have ported already sysutils, classes, dateutils, strutils, contnrs and
> DB
> units. If you want, I can send you the Javascript versions of these files
> now.
>
> Michael.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] CRT unit and Windows' terminal

2017-10-14 Thread Mr Bee via fpc-pascal
2017-10-14 14:12 GMT+07:00 :

>
> Thanks for that lengthy description of the problem, much better than OP's
> just describing output as rubbish, or something similar.


> since char is a single byte type a large value will just get truncated. If
> you turn on range checking it should return a compiler time error. You
> could check that.
>

But I don't use char() nor #xxx to output the box chars. No casting, no
truncation, no nothing, because I also suspect that could be problematic. I
just write the unicode char directly into the string, you know… a normal
string.

-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] CRT unit and Windows' terminal

2017-10-12 Thread Mr Bee via fpc-pascal
Hi,

I want to create console app that's using box drawing characters from
unicode. Before CRT unit is used, it's all fine and my program could draw
table beautifully. But once I put CRT unit, those characters became
garbages. But strangely, it's only happen on Windows' terminal (win10). I
tried the same exact program in Mac and Linux, using each CRT unit, and
they all run fine. I need CRT unit to make my console program more
interactive (i.e. cursor positioning, keyboard handling, text coloring,
etc).

So, what's wrong with CRT unit on Windows? Can anybody explain the strange
behaviour and how to solve the problem?

Thank you.

-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] compiler option for $J directive

2017-10-10 Thread Mr Bee via fpc-pascal
2017-10-10 16:21 GMT+07:00 Sven Barth via fpc-pascal <
fpc-pascal@lists.freepascal.org>:

> They were used mainly back at TP times to have procedure local static
> variables (cause that is how they behave as inside procedures).
>
Can we make the {$J-} as default in fpc and objfpc mode for the next major
release?


-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] compiler option for $J directive

2017-10-10 Thread Mr Bee via fpc-pascal
2017-10-10 13:28 GMT+07:00 Marco van de Voort :

>
> Since it is already largely uploaded, no. We are only waiting on some
> targets.
>

I thought such a minor fix that don't break any codes could be included.


-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] compiler option for $J directive

2017-10-10 Thread Mr Bee via fpc-pascal
2017-10-08 23:17 GMT+07:00 Marcos Douglas B. Santos :

>
> Most developers are using single .inc file that contains all
> directives for the whole project.
>

Well, I don't like such approach. I prefer using my own shell script that I
can configure for many purposes and conditions such as build release, build
debug, build test, build deploy, etc. which each has different compiler
setting with custom before/after action.

-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] compiler option for $J directive

2017-10-10 Thread Mr Bee via fpc-pascal
Thank you, both to Leledumbo and Sven. Will this patch be available in the next 
FPC v.3.0.4 release?

–Mr Bee
 

Pada Selasa, 10 Oktober 2017 04.44.44 WIB, Sven Barth via fpc-pascal 
 menulis:  
 
 
Am 08.10.2017 22:24 schrieb "leledumbo via fpc-pascal" 
:
>
> > There is my old feature request about it
> > https://bugs.freepascal.org/view.php?id=30344 :) You can monitor it.
>
> No one seems to care to implement it, so if you badly need it:  sj.patch
> 
> Apply in compiler directory (please checkout r37430 at least), I only svn
> diff there, not in the top level directory (I have modifications to certain
> packages).
>

Applied in r37437. Thank you for the patch.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] compiler option for $J directive

2017-10-07 Thread Mr Bee via fpc-pascal
Hi,
Is there any FPC command line option for writable constanst directive {$J} or 
{$WRITEABLECONST} ? 
Since I knew this directive, I always set it to {$J-} (because {$J+} is 
ridiculous). However, sometimes I forget to put it in to my source code. So, 
I'd like to put it in to a batch script that calls fpc with all the required 
compiler settings for all my programs. Unfortunately, I haven't found compiler 
option for this directive.
Any help is appreciated. Thank you.
Regards,
–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Bls: named parameter

2017-05-30 Thread Mr Bee via fpc-pascal
Hi, Sven… 
This is what I'm thinking… 
// function declarationfunction f(i: integer = 0; s: string = ''; d: 
double);begin // fill code hereend;// method callingf(s := 'text', 0.1); // 
supply the s and d paramf(0.2);  // only supply the required d param// supply 
all the params without proper order is fine,// as long as the parameter name is 
givenf(d := 0.3, i := 3, s := 'text')// supply param with similar variable name 
is fine,// because the compiler knows what each meanss := 'another text';d := 
0.4;m(s := s, d := d);
 
Well, it's all inspired from Swift, but I think it suits Pascal as well. 
As you said the code is already there in FPC compiler, is it possible to 
support such syntax in next release? At least some of them. Can we have this 
named parameter feature in a particular switch mode, say {$MODESWITCH 
NAMEDPARAMETERS} or something, so it doesn't bother anyone who don't want this 
feature.
Thank you.
Regards,
–Mr Bee
 

Pada Sabtu, 27 Mei 2017 21:18, Sven Barth via fpc-pascal 
<fpc-pascal@lists.freepascal.org> menulis:
 

 2017-05-27 16:12 GMT+02:00 Michael Van Canneyt <mich...@freepascal.org>:
>
>
> On Sat, 27 May 2017, Sven Barth via fpc-pascal wrote:
>
>> 2017-05-27 9:54 GMT+02:00 Michael Van Canneyt <mich...@freepascal.org>:
>>>
>>>
>>>
>>> On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote:
>>>
>>>> Hi,
>>>>
>>>> As Pascal mostly well known as a safe, easy to read, and elegant
>>>> language,
>>>> don't you think Pascal needs named parameter? I mean for ALL kind of
>>>> parameters, not just for Variants. When you have a function with many
>>>> parameters having default values, you know that named parameter is
>>>> desirable. For example:
>>>>
>>>> function f(p1: string = ''; p2: integer = 0; p3: boolean = false);
>>>>
>>>> But you only need to supply the third parameter, you still must supply
>>>> the
>>>> first and second ones with appropriate default values, like this:
>>>>
>>>> f('', 0, true);
>>>>
>>>> while with named parameter, you can do this:
>>>>
>>>> f(p3 := true);
>>>>
>>>> I believe it would raise Pascal's code readability. I know it has been
>>>> discussed before. I know somehow the parser had been able to read such
>>>> syntax. So, why don't we have the option to enable it for people who
>>>> want
>>>> it? Kinda a syntax switch mode.
>>>>
>>>> What do you think? :)
>>>
>>>
>>>
>>>
>>> Opinions on what constitutes readable code clearly differ :)
>>>
>>> But as far as I know, the parser is not able to read this syntax ?
>>
>>
>> The parser supports it for dispatch calls on variants (both methods
>> and properties). You even wrote that in your own article about Word
>> automation: https://www.freepascal.org/~michael/articles/word/word.pdf
>> ;)
>
>
> Yes, in Delphi. But I didn't know FPC also supports it ?

Yes, it does. I didn't find a testcase for it right away, but the
compiler definitely contains code for this.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

   ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] named parameter

2017-05-27 Thread Mr Bee via fpc-pascal
Hi,

As Pascal mostly well known as a safe, easy to read, and elegant language,
don't you think Pascal needs named parameter? I mean for ALL kind of
parameters, not just for Variants. When you have a function with many
parameters having default values, you know that named parameter is
desirable. For example:

function f(p1: string = ''; p2: integer = 0; p3: boolean = false);

But you only need to supply the third parameter, you still must supply the
first and second ones with appropriate default values, like this:

f('', 0, true);

while with named parameter, you can do this:

f(p3 := true);

I believe it would raise Pascal's code readability. I know it has been
discussed before. I know somehow the parser had been able to read such
syntax. So, why don't we have the option to enable it for people who want
it? Kinda a syntax switch mode.

What do you think? :)

-- 

Regards,


–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Bls: Bls: WebAssembly Target

2017-04-13 Thread Mr Bee via fpc-pascal
Pada Kamis, 13 April 2017 13:22, Michael Van Canneyt  
menulis:




> Seriously? Where can we try or test this? This is really a great news! It 
> reminds me of Morfik. :)
Morfik has been, since day 1, the inspiration for this.

I knew it! ^_^


> Hope the development will continue.
It is. The compiler is progressing well. Language is pretty much complete ona 
D7 level. Currently work is done on implementing RTTI.

O, c'mon Michael… please release it. Even if it isn't fully ready, as beta or 
preview or whatever. We'd like to try it out! I can't wait to test it. :)
Regards,
–Mr Bee
   ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Bls: WebAssembly Target

2017-04-12 Thread Mr Bee via fpc-pascal




Pada Sabtu, 18 Maret 2017 0:54, Michael Van Canneyt  
menulis:


You'll design a web app in the lazarus IDE (or Delphi IDE, for that matter).
The app will be compiled to Javascript.


Current thinking is that that there will be 2 "modes":
- "Free" Mode, where the CSS will determine the actual runtime look.
  The IDE will just create the DOM structure.
- "Exact" mode, where the app will look in the browser as it looks in the IDE.
  the necessary CSS will be generated for this.


 In both modes of course the IDE and object inspector will be used to create
event handlers and whatnot in Pascal…


But this is all still under heavy development.


Seriously? Where can we try or test this? This is really a great news! It 
reminds me of Morfik. :)
Hope the development will continue.
Regards,

–Mr Bee

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] parameter list declaration

2017-03-31 Thread Mr Bee via fpc-pascal
Hi all,
I'm looking for official reference for function/procedure parameter list 
declaration in Pascal. I found this: 
http://www.freepascal.org/docs-html/ref/refse91.html but I think it's not 
really clear, especially for newbie. For example, when exactly we need to 
use/put ; (semicolon) instead of , (comma) in parameter list. Compare that to 
official document from Delphi here: 
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Parameters_(Delphi) which I 
think a bit more clear.
Well, of course I know that matter quite well. I'm just looking for official 
reference from FPC so it can be referred in an article or book.
Thank you.
Regards,
–Mr Bee
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal