[Lazarus] TTimer simple issue
When building a simple TTimer demo I cannot seem to get it working Any idea what the problem could be if you paste this code into your form with a memo? var TimeSpent: integer; procedure TForm2.Button1Click(Sender: TObject); var i, answer: integer; begin Timer1.enabled := false; TimeSpent := 0; Timer1.Enabled := true; Timer1.interval := 1; for i := 0 to 9 do begin answer := i * answer; end; memo1.lines.add('time spent: ' + inttostr(timespent)); end; procedure TForm2.Timer1Timer(Sender: TObject); begin inc(TimeSpent); end; It says time spent: 0 Whereas the time should be a lot. Regards, Lars -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Do I understand how OnIdle works?
On 2020-07-27 05:05, frans via lazarus wrote: Hi, I wonder about the use of OnIdle procedure and the Done variable. I thougth that this routine keeps running over and over again in idle state as long as Done=False. But the value of Done doesn't make a difference, the OnIdle procedure keeps repeating itself even when Done=True. Can anyone explain this to me? Good question, hopefully someone else will answer as I don't know. There might be some sample code that tells you with SimpleIPC somewhere out there as that help documentation in the IDE might be using it.. in the lazarus code itself if you can find it. BTW what are you using OnIdle for if you want to tell me? I'm trying to find more uses for it. Maybe search the related lazarus code for OnIdle to see if it's using it. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus on Raspberry Pi
On 2020-08-22 06:04, John via lazarus wrote: Hi All, I haven't been active on this list for a long time, but I have been still been using FPC/Lazarus - many thanks to all who who have been making all the improvements. I recently dipped my toe into Raspberry Pi, and successfully built FPC (3.0.4) / Laz (2.0.8) using the instructions here: https://wiki.lazarus.freepascal.org/Build_current_FPC_and_Lazarus_for_Raspbian I have just upgraded my installation using the previously built FPC (3.0.4) to build FPC 3.2.0 / Laz 2.0.10 (rather than go through the process of getting the bootstrap compiler again as per the instructions) I presume this is legitimate - it certainly worked - and if so, would it be worth my writing this up on the wiki ? Yes, any titles like "For version such and such" on the wiki with instructions would be useful, as I have been meaning to install these on my Pi's recently and haven't found much a few months back. Thanks -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Why is there no announcement of Lazarus event
On 2017-09-08 07:03, Marc Weustink via Lazarus wrote: Which event are you referring to? Marc The resurrection, second, or third coming of the hero Lazarus? Not fully familiar with the Bible character... but if Lazarus is here, I will need to see him. Just wondering? Or is it still coming? Regards, Graeme -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] The new kid is growing up fast
On 2017-08-15 14:16, Graeme Geldenhuys via Lazarus wrote: On 2017-08-15 12:35, Michael Schnell via Lazarus wrote: How to compare it against Lazarus ? No idea - I've only been watching the CrossVCL videos as milestones get reached. I've never tried CrossVCL personally, and don't use Delphi personally either (since 2006). Didn't you pull delphi out recently for some work you said? Anyway, I'd like to know more technical details of how CrossVCL actually works... compared to how lazarus works. Lazarus compiles native apps for each platform, whereas CrossVCL? May make the same mistakes as Kylix? Or not. If anyone wants, this could be changed to Fpc-Other post, sorry if it's not on topic for Lazarus discussions. It could be related in that the architecture behind crossvcl could be studied for research and ideas could be used between it, but.. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] The new kid is growing up fast
On 2017-08-15 06:19, Graeme Geldenhuys via Lazarus wrote: Hi guys, Just wanted to show you guys something. The new kid on the block is growing up very fast CrossVCL. https://www.youtube.com/watch?v=_lr_BQlXvkk I believe the programmer is the ex-FMX (FireMonkey) developer that was let go by Embarcadero, and he is hitting back with a vengeance. The CrossVCL project has grown from nothing to something in an extremely short time. Coming from a toolkit designer myself, that is very impressive to see. Regards, Graeme Is there some technical info page "how it works"? Does it require WINE or anything obscure, which makes installing apps difficult for the end user? It says Win API, so as soon as I heard that I thought "WINE" but I have no idea :-) -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Display multiple images
On 2017-07-27 03:22, Alexey via Lazarus wrote: Old from me, 2008 year, Delphi only http://atviewer.sourceforge.net/atimagemap.htm Alex That looks really neat ! Were there reasons you decided to not port to lazarus (too difficult).. As I could start a project attempting to convert it to Lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Congrats to the FPC/Lazarus projects - job well done!
On 2017-07-24 09:42, Graeme Geldenhuys via Lazarus wrote: On 2017-07-24 03:39, Lars via Lazarus wrote: Wirth's law applies, if you know it... As computers get faster, software gets more bloated and computers cannot keep up with the software bloat. Indeed, and it doesn't only seem to apply to Windows software. Linux and FreeBSD software are affected too. Just last week I tried FreeBSD's "native GUI desktop environment" called Lumina, which includes a file manager application. By pure chance I ran htop and noticed the Lumina file manager uses 500MB RAM. Is it because of QT 5 ? It says on the internets that Lumina uses QT 5 Or, in Lazarus terms: To keep on topic ;-) do lazarus QT apps act much more slow or use up much more memory. I'm always interested in the actual culprit of the issue - it could even be a memory leak that just needs fixing! -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Congrats to the FPC/Lazarus projects - job well done!
On 2017-07-12 19:11, Graeme Geldenhuys via Lazarus wrote: Hi Guys, This is just to give everybody that works on FPC or Lazarus a pat on the back. Seriously, you guys are doing an *excellent* job. Even though I am sometimes a bit hard on you guys. Having moved back to Delphi (I'm using XE at the moment) for a contracting job, I got to the realization how bad Delphi has become. Compared to Lazarus IDE, Delphi IDE is a joke!! Except that firemonkey has wa more complete of a component palette set for macOS cocoa... [rant on] My issues with Delphi IDE in the last two weeks: [...] - Delphi IDE is so SLOW to start up, and I'm running a beefy Intel i7 with 32GB RAM. Agree, Delphi is very slow to load, and use, even on a modern 64 bit laptop Wirth's law applies, if you know it... As computers get faster, software gets more bloated and computers cannot keep up with the software bloat. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Write array of byte data to TImage
Is there any way to write array of bytes to a TImage? LoadFromStream doesn't appear to work, as it does not contain, AFAIK the bitmap header information that would be stored in a file... i.e. is there any way to write raw array data to a bitmap or TImage. Sorry, I haven't worked with images much... I assume the problem could be that load from stream must accept properly formed bitmap file, whereas I may be trying to just write the byte array itself that is not a properly formed bitmap/jpeg/png file with header information or image information. RawImage.Data (PByte) is read only and cannot be written to AFAICT. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools On Event insert? detect
Mattias, I'm still having issues figuring out exactly what Donald Z.'s code does and how to use it, but is there even a way to "hook" the ide event insertion currently? i.e. if you throw a Button on a form and double click it, I want to hook into that, and insert code immediately after the event has been inserted into the ide text edit window.. If this feature is currently not implemented I can work on a patch today that does it, however I don't want to work on a patch if this feature already exists and I just can't find it. Something like: OnAfterEventInsert codetools/lazintf trigger - User adds button 1 to form - user double clicks button 1 - code is inserted inbetween begin/end automatically I think the templates may help this but is there really a hook like this in code tools where you can hook into the events inserted into the IDE when a user double clicks a button/widget or double clicks the event in the object inspector? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools On Event insert? detect
[...] I want to intercept [...] and add SomeCode(); between the begin/end of the event, i.e. on button 1 click. Does codetools provide some way to do it? Found this discussions about it too: http://lists.lazarus.freepascal.org/pipermail/lazarus/2014-March/086457.html http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-RFC-Code-tools-Feature-td4036425.html That's interesting that Michael V. C. wanted logging at begin/end of code snippets in procedures, because that's exactly what powtils had to do but it looks kind of ugly at the source level to have IFDEF DEBUG at the end and begin of each procedure, but that's how I did it.. But, this requirement that I need has nothing to do with that, it's for something else.. but still interesting! -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools On Event insert? detect
On 2017-05-26 04:44, Mattias Gaertner via Lazarus wrote: On Wed, 24 May 2017 13:43:10 -0500 Lars via Lazarus <lazarus@lists.lazarus-ide.org> wrote: [...] I want to intercept/detect this, and add SomeCode(); between the begin/end of the event, i.e. on button 1 click. Does codetools provide some way to do it? Donald Ziesig added templates to alter the inserted code snippets. Please update svn, compile the IDE with -dEnableCodeCompleteTemplates and restart it. Read the header notes in lazarus/components/codetools/codecompletiontemplater.pas Default templates are defined in components/codetools/codecompletiontemplates.xml You can choose your own template file in Tools / Options / Codetools / Code creation / Template file. Thanks, I will try. Is it a special Define because it is a new untested feature waiting for approval? If so I could be a tester -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Codetools OnBeforeCompile/After events
On 2017-05-26 01:24, Ondrej Pokorny via Lazarus wrote: On 26.05.2017 8:21, Lars via Lazarus wrote: Does something like OnBeforeCompile/OnAfterCompile exist in codetools? Yes, they exists. "OnAfterCompile": LazarusIDE.AddHandlerOnProjectBuildingFinished(@MyEvent); LazarusIDE.AddHandlerOnLazarusBuildingFinished(@MyEvent); Ondrej -- Ahh, maybe I am looking at codetools when I should be looking at lazideintf.pp instead. As that's where those are located.. For some reason I thought it would be part of code tools for writing plugins to the ide. Thanks. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Codetools OnBeforeCompile/After events
Does something like OnBeforeCompile/OnAfterCompile exist in codetools? If not, would it be acceptable as a new code tool, or any criticisms if it is a bad idea? (I can work on a unit that does it, or would it be better to add it to one of the existing codetools units?) AFAIR delphi had something like it, but its been a while since I worked with delphi ide tools. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Vulkan Library for FreePascal/Lazarus
On 2017-04-13 11:34, Michalis Kamburelis via Lazarus wrote: @James, would you mind removing the "Public Service Announcement" from https://github.com/james-mcjohnson/VulkanLibraryForFreePascal/blob/master/LICENSE.md ? Don't get me wrong, I understand that you want to promote your faith and I respect that. Having this in README files, and Pascal sources, is absolutely OK. But I'm not a lawyer, and I'm unsure how it affects the legal text of the license. Having just an "unmodified MIT license" would feel safer for me. Plus, it recommends using GoLang, not fpc, in the faith.. Be Baptized: "Go Not fpc. Just my opinion -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Vulkan Library for FreePascal/Lazarus
On 2017-04-12 23:32, James.mcjohnson via Lazarus wrote: This is both an announcement and request for help for an open source FreePascal project which strives to provide: You may want to also post this to the FPC mailing list rather than just the Lazarus list, as, vulkan can probably be used outside of the Lazarus IDE and just with plain fpc programs! -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Quick Video: A Web Application
On 2017-04-19 10:21, Graeme Geldenhuys via Lazarus wrote: On 2017-04-19 15:58, Michael Schnell via Lazarus wrote: Lazarus would b able to seamlessly create such programs (even more up to date, versatile and fast: using WebAssembly compiled from Pascal instead of hand crafted Java Script). I believe that is what Michael van Canneyt is working on. I am also working on something like this for chromium embedded Offline Apps (with callbacks that can call native fpc code using html5/js widgets as the GUI), but, as I have many programs on the go, and many ideas, and not sure if it will be open source... I don't want to blow the whistle early. FastCGI would be a good mechanism for events, since it keeps a exe/elf open all the time rather than forking a new one for each event. But fastcgi doesn't run on that many servers. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Quick Video: A Web Application
Sorry, didn't watch the video yet, but, wasn't Morfik something similar? Or that was mostly offline apps? Then there was also the intraweb for delphi, but AFAIR the Indy authors. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Online Package Manager
On 2016-10-04 07:35, Graeme Geldenhuys via Lazarus wrote: On 2016-10-04 13:11, Balázs Székely via Lazarus wrote: I decided to implement the online package manager(opkman) or at least give it a try. Not to deter from all your efforts, but I think there is already a brilliant solution called "Delphinus". It is an open-source replacement to the ridiculous one included with newer Delphi versions as standard. All that would be required is to port that code to work with Lazarus IDE (instead of Delphi IDE - or possible work with both IDE's). So, what's the benefit of Delphinus: * there is _no_ central repository! * You can publish new project without notifying the Delphinus author * It hooks into the Github API, so everything is automated. * You can have a console app or IDE add-on to install packages. Cool! Is github okay with this idea though as they are really not a download system like sourceforge or google code... They are more for source revision and not so much for final release downloads, although, this needs to be clarified as you can indeed just make a tag to release.. But as soon as you start distributing binaries on github, it sort of violates their policy. But, I suppose pacakages are not binaries like a final exe release of a program to be shipped. And lazarus/fpc is fairly uncommon and not very popular so github is likely not going to notice a bandwidth increase on their servers anyway. I think github is against becoming a download website to reduce their costs and focus on being a source revision system, not a distribution system like sourceforge. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Online Package Manager
On 2016-10-04 07:11, Balázs Székely via Lazarus wrote: Hi, I decided to implement the online package manager(opkman) or at least give it a try. The first stable(alpha) version is ready and it works like this: the packages are zipped and stored in a webserver(repository) along with a json file. I chose zip to minimize server load. The json file contains all the necessary info about the packages. Once installed into the IDE, the opkman downloads, then serialize the json file into a package list. The list is displayed in a tree. On request the packages can be downloaded or/and installed. For now the repository is read-only, it contains only eight, well known(I guess?) packages. The nature/type of the eight package is irrelevant for now, since we are only testing the functionality of the opkman. Few notes: ... Please test! Suggestions are welcome. With online package managers there is the problem of centrally locating all packages at a single URL or repository, correct? So which url will be used? Sourceforge, freepascal.org... And then you could have mirrors if the main url is down. Whatever happened to the freepascal package download system at the command line? was that ever implemented? sorry I am not up to date on it.. One advantage of a central package system is that it encourages people to upload their packages, such as like torry.net. Whereas if each guy has his own website and then his website goes down or he quits programming, that package on his site gets lost and people must use archive.org or brute force techniques to find it online... Github is in a way a central package system but not really as it is not a download tool for binary/releases as much as it's more of a source only package system. Torry.net is really interesting and is the main reason I never used Visual C++ studio because visual C++ never had anything like torry, other than codeproject. Torry never had a way to connect delphi directly to it, like a rubygems or the once discussed fpc package manager tool at the command line.. whatever happened to that idea? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] TPicture width questions (duplicate ways)
On 2017-03-10 11:01, Kostas Michalopoulos via Lazarus wrote: You can check yourself easily: Ctrl+Click on the p.Width to go to the definition of the property, then Ctrl+Click on the GetWidth getter, Ctrl+Shift+Down arrow to see the code for the getter and see that it simply gets FGraphic's property. You can check the current sources but that does not mean it will stay that way, or that the current sources do not have a bug in them... the documentation would tell you how it is supposed to act, and, the source is one particular implementation, which could not match up with what the doc says, in that case it is buggy ;-) But thanks very much for explaining it: indeed I figured any call to .jpeg.someproperty would immediately automagically do the work for you So what is FGraphic? Ctrl+Home to move at the top of the source code (you'd be in picture.inc) and search for "FGraphic :=" to see where it is assigned (the source code style in that file seems to put a space before := in assignments). You can see that it is used in a bunch of places, so you can see where those uses are. ForceType is the first one and if you search for that one, you'll find that it is used wherever a type-specific property (p.Jpeg, p.Bitmap, etc) is used - presumably to convert the underlying graphic to the requested type. So the FGraphic object is actually an instance of the TBitmap, TPortableNetworkGraphic, TJpegImage, etc (depending what you loaded and/or accessed last). This is very useful - I thought maybe it would be in a wiki or docs somewhere.. It may be... So what p.Width gives you is the FGraphic's width or 0 if there is no FGraphic loaded (because a picture may have nothing loaded until you either load it directly or try to access any of the Bitmap, Jpeg, PNG, etc properties). So if you already have a picture loaded from a PNG file, p.Width, p.Graphic.Width and p.PNG.Width will give you the same number. If your picture doesn't have a graphic (e.g. it is a newly constructed object) then p.Width gives you 0, p.Graphic.Width will crash your program (FGraphic is nil) and p.PNG.Width will give you zero (because accessing the PNG property will call the ForceType function which will create a TPortableNetworkGraphic object that by default is undefined and gives you zero width). Question for the readers: what happens to the image if you load a PNG file with alpha values using TPicture's LoadFromFile, access the TPicture.Jpeg.Width property and then save the picture as a PNG file using TPicture's SaveToFile? Is the alpha component preserved? Do you get jpeg artifacts? Why? Bonus question: why is R := Rect(0, 0, p.Jpeg.Width, p.PNG.Height) worse than R := Rect(0, 0, p.Jpeg.Width, p.PNG.Height)? Why is R := Rect(0, 0, p.Width, p.Height) better than either of them? You can find the answers to those (and many more) using Ctrl+Click, Ctrl+Shift+Up/Down Arrow, Search and back and forward buttons (helps to have a mouse with those). Considering how big and complex LCL is, it helps to be able to navigate and familiarize yourself with its source code :-). IMO the docs should always describe the theory of an object/procedure, and therefore if any time the source code is buggy, the docs are the official sources to what a function does.. :-) Thanks much for documenting it in this mailing list ! Some of your comments, IMO should be uploaded to wiki/docs somewhere But I'm unfamiliar with how the docs updating process works -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] TPicture width questions (duplicate ways)
On 2017-03-09 10:48, José Mejuto via Lazarus wrote: AFAIK: TPicture.Width is the TGraphic container size. TPicture.jpeg.Width is the width declared in the jpeg image. TPicture.Bitmap.Width is the width of the bitmap in pixels. Mostly the 3 will have the same value but extracted from different sources. If I start off using a bitmap, and all of a sudden start using jpeg, will it automagically work or does one have to initiate the jpeg in some way? Example: you start off working with a classic BMP, but then 60 lines of code later you want to work with it as a jpeg. Do you just magically start working with a jpeg without any worry, or you have to take some precautions? Likely, this is explained in a article on the wiki somewhere, I don't know :-) -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Animation library
On 2017-03-08 13:08, Graeme Geldenhuys via Lazarus wrote: VM's also give you a lot of piece-of-mind. If your real hardware fails, move the VM to any other system and continue where you left off - hardly any down time. I regularly make backup copies or take snapshots of my VM's too. Snapshots are very handy for experimentation. Except for the fact that VM's suffer from corrupt hard drive file problem. All your files are stored in a file, which is extremely dangerous compared to having files stored as separate files. If one little bit is f**ked in that hard drive disk image file, all your work is lost, unless you can magically hack the file yourself into good shape which is equivalent of trying to make a square become a circle :-) This is the only real thing stopping me from using vm's more often is if I save any work to the VM disk image, it scares me that the disk image could become corrupt. You could back it up daily to GIT I suppose, but that would be a massive file to upload to git... way too big... Maybe on a local git server in your home with a 1000 speed network card instead of 10/100 Speaking of emulators, FreeBSD also includes a Linux Emulator (an actual CentOS 6.6 install I believe), so you can run FreeBSD, Windows and Linux applications without firing up a VM. Pretty neat! OpenBSD also allowed you to run Linux exe's (elfs) AFAIR in some kind of linux jail on the system. Too bad OpenBSD developers are a bunch of criminal twats who stalk and taunt people, along with restricting speech on their mailing lists. To keep this post on topic, I did want Lazarus to run on OpenBSD , not sure if any progress has been made there. I know some efforts were made to get fpc working. But now I could care less. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Animation library
On 2017-03-07 18:40, Graeme Geldenhuys via Lazarus wrote: On 2017-03-07 19:02, Lars via Lazarus wrote: Do you use JWM just for testing, or JWM all the time for all work? I've been using JWM non-stop for the last 4 years! I'll never return to a bloated "desktop environment" again. Things I like about it: * I only activate the global shortcuts I need like Alt+F2, Alt-Tab. Nothing else, so it never conflicts with any application shortcuts. * Menus are a breeze to edit. I even used a 3rd party tool that generated JWM include files from Gnome/KDE menus (but don't do that any more). * My desktop/application menu only contains what I need and use, and items are grouped to what makes more sense to me. * Clicking anywhere on the desktop window brings up the application menu. * Virtual desktops are built-in, as well as dragging apps from one virtual desktop to another * A Win95 like "taskbar" is built-in (optional). The same for the trayicon areas. * A simple theme with rectangular windows (very configurable if you are into that kind of stuff, and you can configure rounded corner windows too). * The ability to restart JWM without having to shut down X11 or any of your applications.eg: to refresh the application menus or other config settings after being edited. * It's fast and very light with RAM usage. * Works perfectly with multiple monitors (I have 3), and I configured the taskbar to the center monitor only. I can send you my config file if you want to see my layout. Regards, Graeme When I finally get around to installing freebsd, if I can remember. What do you do when you need to run a Windows lazarus program? My biggest gripe with bsd/linux is that I'd constantly have to switch back to Windows/MacOSX to do testing as those are the major platforms to sell apps on. So if I switch to BSD I'd likely end up just having to run Windows inside bsd in an emulator anyway. Catch22. You ever run lazarus inside a windows emulator inside bsd? that's likely what I'd end up doing, or compiling for windows inside bsd then testing the app in a windows emulator. I'm not sure what the emulators/virtualbox's are available for bsd. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Animation library
I don't run a desktop environment, but instead a old-school style Window Manager (called JWM - Joe's Window Manager). JWM is extremely light - only uses 8MB of RAM so never interferes with application performance tests. Regards, Graeme Do you use JWM just for testing, or JWM all the time for all work? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] $IF for Linux and FreeBSD platforms?
On 2017-02-16 05:35, Graeme Geldenhuys via Lazarus wrote: On 2017-02-16 11:18, Ondrej Pokorny via Lazarus wrote: Well, you mixed up DEFINED and DECLARED macros. Sorry newbie question regarding these $IF directives: can someone explain why you would use "$IF defined" instead of $IFDEF... Obviously there are likely reasons for using one over the other. Dope!!! Thanks for spotting that. I need more coffee. ;-) Coffee being used as a crutch is bad. Use it for an extra burst, not as an hourly/daily reliance. IMHO Or IMAO A := 'arrogant'; -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Teaching Pascal at College
On Tue, January 17, 2017 2:22 am, Graeme Geldenhuys via Lazarus wrote: > On 2017-01-16 20:18, Lars via Lazarus wrote: > >> GUI's require wrappers. >> > > No they don't. > Sane GUI programming requires wrappers... Insane programmers will program a GUI without a wrapper... ;-) > >> Delphi 5 as an example, is a wrapper around the win32api >> > > Yes, Delphi's VCL is a wrapper around the common Win32 widgets. LCL is a > wrapper around Win32, Qt, Cocoa, Carbon and even fpGUI. But not all GUI > toolkits are designed like than. > > For example, fpGUI is not a wrapper around any existing widgets on any > platform. fpGUI implements its own widgets (gui controls) from scratch and > talks directly to the underlying libraries (XLib & GDI) to notify the > system about the top-level window and receiving OS events. fpGUI is, in every way possible, a wrapper. It wrapps low level x11/win32 calls into a usable frameworks called fpGUI Object orientation is often a wrapper around system calls, fpGUI is object oriented and makes low level calls so someone can use fpGUI as a wrapper around these obnoxious insane low level calls that no one wants to use directly. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Changes to fpWeb...
On Mon, January 16, 2017 1:59 pm, Leonardo M. Ramé via Lazarus wrote: >> Indeed, does he mean javascript pop up messages, but initiated by the >> server? when is the message displayed and why would it be displayed? an >> ajax on the current web page loaded, but initiated by the server? > > I think he is talking about WebSockets. The only framework I'm aware of > implementing it is m0rm0t. What is the exact name of it... couldn't find it: https://www.google.com/search?q=m0rm0t+web+sockets maybe a spelling mistake or slightly different name? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Teaching Pascal at College
On Mon, January 16, 2017 3:19 am, Michael Schnell via Lazarus wrote: > On 15.01.2017 15:30, Martin Vahi via Lazarus wrote: > >> have came to a conclusion that GUI-s are inherently something that >> require "dynamic programming" or the code gets really bloated. >> >> > The nice thing about Lazarus "RAD" paradigm is that this is completely > hidden (in the library) from application programmer. So (s)he only needs to > write the code that is obviously useful for the task at hand. Except when you find a bug in the lcl, and have to dig in to it.. In theory one could never look into the lcl or underlying api's in practice, sometimes there is an issue to be resolved... like when I fired up the macOS laptop and found that moving the mouse crashed the app, and Dmitry helped me figure out why ;-) Had too look into the macOS related lcl code -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Changes to fpWeb...
On Mon, January 16, 2017 12:19 pm, Daniel Gaspary via Lazarus wrote: > On Mon, Jan 16, 2017 at 8:12 AM, Michael Schnell via Lazarus >wrote: > >> Does fpweb / weblaz already support status messages from the server to >> the client (or will it some day) to allow for "Rich Web Applications") ? >> > > I don't work very often with web, but I'm curious... > > > Can you give examples of these messages? And who (nginx, apache..?) > and how they are implemented? > > Thanks. Indeed, does he mean javascript pop up messages, but initiated by the server? when is the message displayed and why would it be displayed? an ajax on the current web page loaded, but initiated by the server? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Semicolon checking
On Sun, January 15, 2017 3:30 pm, VojtÄch Äihák via Lazarus wrote: > Hello, has Lazarus (CodeTools) or FPC some checking for empty commands? I > accidentally did this stupid mistake: > if ... then begin > > end else; > begin > ... > exit; > end; > Yikes! I think you just discovered a bug in the pascal language itself that was not thought of... as when using a text editor it's easy to leave a semi colon laying around by accident some times. I wonder if Oberon solves this issue, or semi-colon-less languages have any advantage. If you remove the begin from a language (Wirth did in his later languages) you get rid of some issues. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] In search of a component for holding a table of strings
On Fri, January 6, 2017 5:40 am, Bart via Lazarus wrote: > Mind you FF is able to copy the table in plaintext format using Tabs > as a separator, which would be easy, but IE (which is the only browser > available to me on the system) cannot do so. > > Obviously my boss does not care, he does not have to use this program, > only the doctors (12 of them) have. And needless to say that the ICT > department has forbidden me to use this program, because "it is not a > commercial progra, and therefore there is no offical support for it, and > unsupported programs cannot be installed on our system". (Note: the ICT > guys all use Chrome as their browser, because "IE sucks") Fortunately my > program is standalone (try that with VB or VC), so I just put it somewhere > on a share, and so far they have not noticed. > If you get into some tricky web browser issues you can also visit the DOM with internet explorer embedded browser control.. (or firefox embedded or chromium embedded). Then you can copy whatever html table you want into whatever format you want... just visit the table via the dom, or visit any of the html web page components and deal with it. But if fast html parser does the job... it's simpler. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Why is SAX so slow?
On Sun, December 25, 2016 4:47 am, Werner Pamler via Lazarus wrote: > Motivated by a user comment on excessive memory consumption of > fpspreadsheet Sorry to not answer your question, but, fpspreadsheet looks very intereresting and first time I really looked.. So it is a spreadsheet without using any MS COM or activex to utilize ms excel? A native spreadsheet for lazarus? Cool! Something I'll probably need some time. Any crashes or major issues, other than slowness being reported in this thread now? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] macOS developer files and bindings to be created
Hi, I noticed some of the macos lazarus implementations are incomplete (for example AVFoundation doesn't seem to exist anywhere) so the question is if I want to create an avfoundation library, where do I start? First I would try to find macos header files/include files, and where are they on my system? (Mac Newbie here!) Would I have to download XCode and they come with it? Or have to find them elsewhere from apple web site? And are there automatic conversion tools or it is all done manually, typing in objectivec1 mode into freepascal and creating pascal bindings all by hand..? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] DoomRL based of FPC now open sourced
On Wed, December 7, 2016 9:55 pm, Anthony Walter via Lazarus wrote: > Lars, > > > DoomRL has nothing to do with Doom, other than borrowing the > theme/setting. It's a rogue-like game or RPG in a Doom setting. > -- True, just thought I would mention, incase anyone had forgotten about these projects years ago.. Someone ended up forking/copying some of my work and other peoples work into GitHub projects: https://github.com/mariuz/quake2fpc http://www.pascalgamedevelopment.com/showthread.php?4090-DoomToFreepascal-2-1-4 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] FPC on Rpi3 executable module sizes
On Sat, December 3, 2016 8:58 am, Ken Kashmarek via Lazarus wrote: > I have solved the problem with modules sizes when compiled under Lazarus > FPC > 3.0.0 on RPi3. > > > First, I am able to perform scripted compile and link operations (ie, not > done via the IDE). Another option is to write your script, and launch it with a tools menu item in the ide. Not integrated compiling, but at least you can compile it from a menu item in the ide. Tools -> Configure External Tools Then at least you don't have to run to the command line window manually, you just click a menu item button or use a keyboard shortcut -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] DoomRL based of FPC now open sourced
There was also the original doom source code released in C, which was converted 100 percent to Delphi, and then I modified it to work with FPC... had some bugs, that were worked out. Not sure what the difference between actual original Doom and DoomRL is There is also Quake for delphi, and quake for fpc which I also worked on and it had some bugs, which AFAIk may have been worked out by someone On Wed, December 7, 2016 6:18 pm, Kostas Michalopoulos via Lazarus wrote: > And cue all the people in Reddit yet again reminiscing about their Turbo > Pascal days. And those are the best comments :-P. > > > Yesterday i wrote a rendering test for light clustering with forward > rendering (https://www.youtube.com/watch?v=MefoEXK1gUw). It has been a > while since i wrote something more advanced than early 2000s stuff in > terms of graphics and when it comes to Lazarus, it has been a while since > i worked on non-tool stuff (although, the math stuff in the demo was from > my tool package :-P). > > I don't see FPC and Lazarus as lacking anything in terms of features or > performance for use in high end games. Well, except perhaps runtime > support for consoles, but that isn't unsolvable (and has already been done > with another low key compiled language - AFAIK Remedy used D for some > parts of their latest game and had to port the language's runtime to > consoles). > > And well, not everyone is interested in consoles anyway :-P. > > > > On Thu, Dec 8, 2016 at 2:36 AM, Graeme Geldenhuys via Lazarus < > lazarus@lists.lazarus-ide.org> wrote: > >> On 2016-12-07 17:44, Anthony Walter via Lazarus wrote: >> >>> DoomRL was written using Free Pascal. >>> >> >> That's just awesome! Thanks for sharing. >> >> >> Regards, >> Graeme >> >> >> -- >> ___ >> Lazarus mailing list >> Lazarus@lists.lazarus-ide.org >> http://lists.lazarus-ide.org/listinfo/lazarus >> >> > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] macOS Sierra save as dialog hangs
On Wed, November 30, 2016 2:31 am, C Western via Lazarus wrote: > May be http://bugs.freepascal.org/view.php?id=29911 > which is supposed to be resolved in the trunk version. > > See also http://bugs.freepascal.org/view.php?id=30533 > > > Colin > Thanks. Just applied the patch to my local copy, instead of downloading entire source tree. Fixes the issue.. on my computer. Wow - fast reply, fast fix! Thanks (power of open source). As for my new Mac Laptop though, not too impressed with the zippiness it does not have compared to all my windows laptops ever owned. This thing is slow! Oh well. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] macOS Sierra save as dialog hangs
Hi, Not sure if this has anything specifically to do with Sierra version of MacOS but that's the only Mac I have to test on.. When I run the latest Lazarus from source forge download section, on Mac Sierra OS version, The IDE loads up and works fine except for when I try to save the project. If I click any of the drop down menu items in the save project as dialog it hangs, with the spinning multicolor cursor and will not stop unless I force the application to quit. In addition, clicking the save button hangs in that dialog if I don't click any of the drop down items. Anyone on Mac had this issue? I ran a disk first aid to make sure my hard drive is not the cause. Then as an experiment I opened a new project (after forcing lazarus to quit then restarting it) and added a save dialog widget to the form. I launched the application without saving it and executed the save dialog. This one does not hang, i.e. in project1. However the lazarus app itself, hangs when save dialog accessed.. Wondering if this is a Sierra issue specifically. Not positive it is because I've seen other Sierra users on the internet able to use lazarus. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] LHelp or help systems that also work on..
On Fri, November 18, 2016 6:16 am, Graeme Geldenhuys via Lazarus wrote: > On 2016-11-18 11:36, Lars via Lazarus wrote: > >> Since I use both Lazarus and Delphi and never just use one or the >> other, is there any help system that works in both delphi and Lazarus? > > Yes, Docview and INF help can be used in both cases. Docview is an fpGui based project? If so that would be interesting and maybe my ticket into finally looking at some fpGui code -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] stale pipe workarounds
Hi while researching help systems I came across the code which uses IPC to communicate and see that people are adding stale pipe work arounds. So this can't be resolved in the ipc code itself and must be in the application? Just wondering why these work arounds are needed and when they occur. The stale pipe code work around is at https://github.com/graemeg/lazarus/blob/upstream/components/chmhelp/packages/help/lhelpcontrol.pas So does anyone who uses IPC have to be aware of this and add the work around to all ipc code in all applications? Or it only happens in certain cases? It just makes me scared that there is this hack/fix needed. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] LHelp or help systems that also work on..
On Sat, November 19, 2016 3:24 pm, Lars wrote: > On Fri, November 18, 2016 5:08 am, Andrew Haines via Lazarus wrote: > >> lhelp uses IPC to communicate so it wouldn't be too bad to write a >> Delphi >> unit to control it. p.s. in addition to my last message, wouldn't SimpleIPC need to be ported to delphi then.. or at least some of it's mechanism. Would be neat if simpleipc was available in delphi so fpc programs could communicate to delphi programs. If only simpleipc was standardized and available in all languages ;-) -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] LHelp or help systems that also work on..
Hi, Since I use both Lazarus and Delphi and never just use one or the other, is there any help system that works in both delphi and Lazarus? i.e. anyone port LHelp to delphi so delphi apps can have a similar help system? Or any other help systems that are portable between Laz and Delphi? I haven't studied much, but my guess is LHelp was specifically built for Lazarus and never considered Delphi, due to the name "L Help" which stands for maybe lazarus help. Assumptions here... -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Fri, November 11, 2016 4:23 pm, Graeme Geldenhuys via Lazarus wrote: > On 2016-11-11 22:46, Lars via Lazarus wrote: > >> Would the current help systems be even capable of looking like that? >> Must >> be just a few div boxes. Really simple, interesting color shades. No >> fancy garbage, just simple boxes of text. > > I don't know how much CSS the HTML component in LHelp supports. But if > you look at the source of that website, they actually use HTML tables Holy batman, they are using tables? Wow.. I was sure it was a Div box based website but they are using classic tables. Interesting. > By using colour like that, you are also limiting your audience - eg: > what about colour blind people? Would be interesting if there was a firefox/chrome plugin that converted a website to be all black and white to help people, or maybe grayscale. But good point. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Fri, November 11, 2016 4:37 am, wkitty42--- via Lazarus wrote: > what's wrong with something like LHelp and using IPC to tell it where to > load the next help from that the user has asked for?? > I'll have to experiment with LHelp, thanks > from these cheap seats i have way over here, it seems like you are over > engineering this... > Anyone who pulls in a 150MB-300MB chromium embedded plugin is likely over engineering (not to mention bloatware). I'm critical of my own original post. Would be much better if there was a chromium lite version that you could embed which was only 2MB or 1MB. One plan I had was to simply port an existing html documentation system that runs on a cgi program on a server, over to offline help, with minimal effort. Chromium embedded seemed the way to go because you can literally trick chromium embedded into being a cgi like device, on the client side, without any web server. Whether LHelp can do that, is something I'd have to research. I have some existing projects where the help system is already in place, on a server, and I don't much feel like writing two sets of help systems one that works offline and one that works online, I'd rather just have one system that works online and offline. So I figured CEF3 or CEF1 would be a way to make already existing online documentation, work offline too. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Fri, November 11, 2016 4:03 am, Graeme Geldenhuys via Lazarus wrote: > On 2016-11-11 01:11, Lars via Lazarus wrote: > >> port alternative to port 80 which may be blocked by firewall. That I >> would want to avoid, as it's just another hassle. > > You can always use any other port >1024 for that. No issues with default firewalls? Last thing I want, is a customer having to futz around with router firewall, windows firewall, etc. > But for help, firing up Chrome of Firefox is just too damn slow, and > eats way to much memory. Also you will have to implement your own search > (which will be slow over HTML files), table of contents and index pages. But isn't that what iota full text search is for, to preindex all the search stuff so no time is spent grepping through html files The issue with Iota I found was that it was written in an old fpc style where some things are not proper code, but compiled at that state of fpc development. iota, if you don't know, is a full text search indexing library for fpc. Discussed briefly on the fpc mailing lists eons ago. > Then what about other useful features like bookmarking a help topic, > inline annotations (user defined notes added to a help topic at runtime). > User defined notes, were not available in chm files were they? I thought chm/hlp file were just dumb, fixed help files with no bells an whistles. i.e. total commander style help. With a chrome embedded browser object, you can use the DOM to manipulate the document. That's basically how chrome plugins work in the browser where you can modify the html page and add widgets to someone else's site, on your client side. If you wanted to add notes to html help you could use the DOM to do it and store those extra notes in a database, or something. I'd be interested in how many people do this: add notes to their help, inline. We know that people add notes at the end of the documentation, like the php manual where people add comments to the bottom of the page. I didn't realize there were help systems were you could inline some notes? > As for communications with a external [dedicated] help viewer. fpGUI's > Docview does that via IPC, Microsoft's WinHelp I think could do it too, > OS/2 VIEW help viewer did lots of 2-way communications with applications. > > Which is an interesting question: why hasn't firefox allowed IPC from external apps. Could be a security vulnerability. Maybe just one of those interesting features that could be, should be, would be, but no one has thought of implementing. If firefox had IPC you could navigate to an anchor from an external exe. Also an interesting question is why hasn't adobe got something like this so that adobe files could be used as help files: scroll to a certain part of the pdf file programmatically using IPC, or maybe using an adobe embedded object. I find pdf files just a little too slow, though, and not as responsive, due to them being like a resource intensive graphic. So I suppose pdf files ruin the zippy feeling of a fast help system. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Fri, November 11, 2016 3:54 am, Graeme Geldenhuys via Lazarus wrote: > On 2016-11-11 00:53, Lars via Lazarus wrote: > >> I do appreciate simple documentation without eye >> candy crap. > > :) Just take a look at Apple's OSX built-in help (not the online > content). It is minimalist and mostly text - with a hint of good > typography. It works! Microsoft Windows 7 does very similar to Apple - > simple and elegant. I've always liked the website delphibasics .co .uk (or whatever the address is). Would the current help systems be even capable of looking like that? Must be just a few div boxes. Really simple, interesting color shades. No fancy garbage, just simple boxes of text. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] WebAssembly
On Fri, November 11, 2016 2:23 am, Michael Schnell via Lazarus wrote: > On 11.11.2016 01:33, Lars via Lazarus wrote: > >> Maybe best to start from scratch. >> > Regarding the Lazarus paradigm "write once, compile and run everywhere", > IMHO not a good idea. The issue is you are working in a sandbox. Lazarus is designed to take control of the computer using all the dangerous things without any sandbox, such as being able to delete and write to pretty much any file you want that has the correct permissions in place. A sandbox is much more specialized to develop for, because you may only be able to access certain directory with limited files So you could modify lazarus to work with this sandbox restriction, but, might be easier to design from scratch. ... I understand the desire to just take existing LCL app and port it to the web browser, but that's a pipe dream, because browsers will be in sandboxes that just don't work like client applications on Ms Windows, BSD/Linux. Another option is just to use a separate widget set and see how that works, such as fpGUI widget. But I guess that means you can't as easily take an existing app and port it. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Wed, November 9, 2016 7:57 am, Marco van de Voort via Lazarus wrote: > The frequent updates that often break interfaces are also an headache. > This is what happened to firefox: xul runner's current state is broken/unknown/scary. I hope the same doesn't happen to chromium. Cef1 has some incompatibilities with cef3 but at least not as bad as the firefox embedded xulrunner state of affairs. > If I would replace lhelp and chm, I wouldn't go that way, but some way > with a local webserver (for searching and the like), and just use whatever > is installed. > A local web server as in running on port 80? The issue I see here is what if someone has apache installed already? The advantage of no web server at all is you have no conflicts with port 80 already running an apache instance. But maybe I misinterpreted what you are saying. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Wed, November 9, 2016 3:10 am, Graeme Geldenhuys via Lazarus wrote: > On 2016-11-09 05:13, Lars via Lazarus wrote: > >> I find the documentation, for example, for >> Total Commander, to just be a little bit too Windows 3.1 looking. >> > > I'll bet you a 6-pack of beer that the documentation was written by the > developer himself. That would explain the lack of typography. :) > > But it's not just say Ghislers writing style or formatting, but the general look of the old help systems from windows 95 era. i.e. any chm/hlp system appears to be win 3.1 looking, or if not win 3.1, then win 95 looking. As much as I really appreciate simple text documentation with minimal html bloat, I'm thinking more of the professional $250 software app or $99 software app that needs to ship a documentation system that will make people feel satisfied for their dollar. An old win 3.1/win95 style hlp/chm system just seems a bit too cheap. But, I'm nit picking. I do appreciate simple documentation without eye candy crap. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Wed, November 9, 2016 3:07 am, Graeme Geldenhuys via Lazarus wrote: > On 2016-11-09 04:43, Lars via Lazarus wrote: > > >> One issue, back in the day, was that you could only use Java >> programming language, right? > > Hence the name "Java Applet" ;-) > > But, could one compile fpc code to javaapplet jvm bytecode? Why no one thought of this idea? And when I say fpc, I mean literally any language not just fpc. We already have tools that convert languages to jvm runnable code, so why not java applets programmed in other languages? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] WebAssembly
On Wed, November 9, 2016 2:38 am, Michael Schnell via Lazarus wrote: > IMHO Silverlight is dying because Java is the winner over C#, due to > Android systems outselling any other OS architecture. > > > Hence WebASM - that seems to be based on Java - might be successful in > pushing the idea of allowing for precompiled byte code embedded in HTML. > If you mean based on java as in it compiles to a virtual machine like thing, actually this was more of a pascal thing, and oberon thing, than Java - java stole the idea from the UCSD-Pascal system, ancient. I wrote about this long ago... And, I could be wrong but I think java also stole from Oberon. i.e. when people credit Java for the idea of JVM, what they really should be crediting is UCSD Pascal, and then Oberon which succeeded it... Oberon is 1990's and maybe late 80's technology, UCSD pascal is ancient. But I'm nit picking. > Regarding fpc/Lazarus, it obviously would be a huge benefit if on top of > fpc's WebAdmin support, the LCL would provide decent support for an > appropriate WidgetType that allows to simply cross-compile a "usual" > Lazarus project to be runnable in a browser. > I'm partial to Marco V.'s post on the lazarus forum I linked.. I think maybe porting lazarus to web assembly might just result in all sorts of kludges. Maybe best to start from scratch. But as I said I'm partial: not fully decided. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Tue, November 8, 2016 3:42 am, Michael Van Canneyt via Lazarus wrote: > I seriously doubt that. It's just something that will exist next to > javascript but in essence will perform the same tasks as javascript. You > can create relatively clean and structured javascript if you want. It just > requires discipline as the language doesn't enforce it. I start off by writing some javascript and I think, hey this isn't so bad. But eventually after about 10 paragraphs of code it starts to get ugly, no matter what I try. That's why there is a book written called "Javascript, the good parts" because it has become such a large mammoth that they needed to write a book about a subset of java that may (or may not) be the good parts. Whether those are the good parts or not, is still up for debate, because I haven't read the book. If I had time.. > > The problem is IMHO not so much the language, but what you do with it. > > Okay but take brainf*ck language as an example. In this case the language is in fact a serious problem. Or take C++. The language just encourages you to do nasty things when you need/want to. In order to write sensible looking C++ code you should... just use a subset of C++, such as C, and avoid most C++ features. But then you call in some library and they are using that feature, so, you have to use it too... the issue with javascript is you pull in a lot of libraries that make use of the features so you have to end up using them indirectly too. Again, I guess I should read the book "Javascript the good parts" if I have time. > > Well, there is interest in a WebAssembly backend for FPC. > Someone is looking at it. > Just as we are working on a transpiler from Pascal to Javascript. > That's good news, and I have no idea how you guys keep up with all this crap that comes out every year. The work required to port fpc to all these systems, whether virtual machines, or real machines, is enormous. What ever happened to LLVM ? much interest? Yet another port to a virtual machine. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Tue, November 8, 2016 9:36 am, Werner Pamler via Lazarus wrote: > Am 08.11.2016 um 15:56 schrieb Martok via Lazarus: > >> Hi, >> >> >> I may have missed this point in the discussion, but would it not make >> more sense to get a native HTML component (either from IPro or the THTML >> port) to the point where it can provide everything needed? ... > +1 Well the reason chromium is in my line of sight, is because other people do the work to maintain the browser for you. Creating your own web browser component is massive amounts of work, whereas chromium is coded by other people. True you have to write wrappers around it, but you also end up with a standard component where there are already plenty of c++ examples to learn from, and you are supported by a massive team over at chromium. Whereas writing your own browser component requires constantly playing "catch up", implementing every feature needed which chromium had 5 years ago. So does IPro or THtml have any large following and existing codebase to work with? I would have to learn about these as I have not used them. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Tue, November 8, 2016 3:19 am, Graeme Geldenhuys via Lazarus wrote: > On 2016-11-08 02:51, Lars via Lazarus wrote: > >> It's sort of like a JVM bytecode, but for the web browser. >> > > That makes you wonder, why not simply go back to Java Applets. One issue, back in the day, was that you could only use Java programming language, right? At that time no one had thought of multi language jvm targetting with different originating languages... all java applets were java programming language coded, afaik... I could be wrong. Another issue with java applets is you had to make sure they were installed correctly, whereas javascript need not install. With webassembly I don't think there is a java system you have to install on the machine. Java applets required first downloading the JVM from Sun, right? It's been so long since I've seen a java craplet (that's the locker room talk name for it) that I cannot remember. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Tue, November 8, 2016 3:49 am, Michael Schnell via Lazarus wrote: > On 08.11.2016 11:42, Michael Van Canneyt via Lazarus wrote: > >> >> I seriously doubt that. It's just something that will exist next to >> javascript but in essence will perform the same tasks as javascript. > ==OFF TOPIC== (so ignore if there is not a very short answer) > > > Any plans for a webassembly support with FPC ? > > There is an old thread about it here: http://forum.lazarus.freepascal.org/index.php/topic,28836.0.html Many skeptics, but many think it is an interesting idea even though skeptical. And what happened to microsoft silverlight? did anyone care? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Mon, November 7, 2016 12:25 pm, vfclists . via Lazarus wrote: > I mean the latest thing now is > WebAssembly which shows how ridiculous the whole business has become. Web assembly, if designed properly, might actually get rid of some problems. Javascript is a large mammoth, or ugly beast. Web assembly may allow one to for example compile freepascal code directly to byte code that runs in the browser, instead of people using ugly obfuscated bloated javascript "hacks". It's sort of like a JVM bytecode, but for the web browser. Or a .net bytecode. I don't fully know what web assembly intends to be, as it's not completed yet fully, but, it may actually get rid of some of the javascript bloated crap out there. Lots of people may in fact ignore webassembly and continue to use javascript. God forbid. > It > is not a fault on Lars end that he sees CEF as the best way to provide > help. It is just the way things are. Not necessarily the best, because of the large dependency.. If CEF (chromium embedded) offered a lite version that was only 2MB to ship with an exe, or 500KB then it may in fact be a good solution for help.. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Sun, November 6, 2016 1:18 pm, Graeme Geldenhuys via Lazarus wrote: > If anybody things installing 300MB just to get some lousy help for a > small 1MB application is acceptable, Maybe CEF needs a lite version. I am guessing that chromium embedded pulls in a lot of unused code that is not needed for most cef embededded browser apps. Would be nice if there was a CEF (chromium embedded) lite which was only, maybe 10MB. Obviously, I'd prefer a 100KB option over even a 10MB option 300MB seems awfully like bloatware to me.. is it really 300MB to ship the latest CEF 3? I haven't checked. Even if it was 110MB that's still too large. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] ctrl-c code completion
On Sun, November 6, 2016 10:05 am, Michael Van Canneyt via Lazarus wrote: > > press ctrl-c to do command-completion If ctrl - c is for copying, how does this not interfere? i.e. ctrl c is for copy and paste, so... how is ctrl-c used for command completion without interfering with clipboard? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Sun, November 6, 2016 4:35 am, vfclists . via Lazarus wrote: > Something which is likely to get > more support is "more better" than a perfect but little used and little > known system. One issue is firefox has a track record of not supporting embedded browser for very long without abandoning it, or changing the api to make it incompatible with old code... so who says this isn't also going to happen with chromium (CEF) at some point... Hopefully chromium will not go down the same path as firefox embedded. I do know, that CEF1 has some features that are incompatible with CEF3 so they've already broken some things... hopefully cef3 stays stable api for a long time and there is no cef4 that comes out which breaks old cef3 code. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
On Sun, November 6, 2016 4:35 am, vfclists . via Lazarus wrote: > On 24 October 2016 at 00:34, Lars via Lazarus > <lazarus@lists.lazarus-ide.org > >> wrote: >> > >> Now that I think about my post about using chromium embedded for a help >> engine, the issue I see is that it's a large dependency .. so for >> small applications that are say 1MB large, and you want to supply a help >> system with it... all of a sudden the 1mb exe has to be shipped with a >> gazillion other files that wouldn't be needed with a more simple format. >> >> >> Still, I think I will try to release a help system for powtils using >> chromium embedded, as an offline experiment with CGI (no web server >> needed). However this will take time, and I almost feel like I posted >> that chromium idea drunk, even though I was not drinking. >> >> On Sat, October 22, 2016 5:24 pm, Graeme Geldenhuys via Lazarus wrote: >> >>> On 2016-10-22 22:36, Mattias Gaertner via Lazarus wrote: >>> >>> >>>> Is this a problem of the CHM producer or the CHM viewer? >>>> >>>> >>> >>> Both. The LaTeX-to-HTML conversion is definitely not great. Michael >>> would agree on this one. Then taking that already bad HTML and >>> converting in to CHM, makes the end result even worse. That doesn't do >>> any justices for Michael's hard work in writing the documentation and >>> having it beautifully presented (like the official PDF versions). >> >> -- >> ___ >> Lazarus mailing list >> Lazarus@lists.lazarus-ide.org >> http://lists.lazarus-ide.org/listinfo/lazarus >> >> > > > I think using CEF is fine as there don't seem to be any other realistic > options. That is the situation as it is. Something which is likely to get > more support is "more better" than a perfect but little used and little > known system. A Lazarus installation currently takes over 1 Gb, so what > difference does another 300Mb make to it when it is something as critical > as help? I was speaking of a help system for any application, not just lazarus alone... i.e. you build a 2mb exe and ship it to your customer (not lazarus.exe but another exe built with lazarus)... So now your elf/exe has to include a huge dependency... Chromium is not just one dll. It would be ideal if it was only one dll, like mysqlite. So if you build a 2-6mb app, now you have to ship yet more files increasing the size further. Maybe not a huge issue with todays high speed internet connections, but it still is another dependency. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Run FPC on Raspberry Pi3 in command line mode
On Fri, October 28, 2016 11:23 pm, Ken Kashmarek via Lazarus wrote: > I have been runing FPC v3 on Windows 7 from a command line window. The > Windows 7 version of the IDE sucks. > By IDE do you mean lazarus, or the freepascal IDE which is different (like turbopascal). There is an FPC mailing list too if you just end up using FPC as a command line program, fpc mailing list is definitely where the questions sho > I found everything for starting the IDE but not for > starting the compiler directly (I will be using my own editor for source > files). To use FPC there is no need to install lazarus, you can just install fpc and run fpc from the command line. Lazarus is geared toward delphi style development, whereas FPC compiler from freepascal.org is more like a gnu c compiler at the command line, or, if you prefer, more like turbo pascal if you prefer to use a bright blue (keeps you up at night) console mode ide. There is no requirement to use the console mode ide, nore is there any requirement to use Lazarus delphi like IDE. freeepascal.org has downloads and a separate mailing list just for fpc. THis is the lazarus delphi like IDE mailing list -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Chromium embedded on freebsd or firefox embedded
On Sat, October 22, 2016 7:25 am, José Mejuto via Lazarus wrote: > > The link that explains almost anything: > > > https://dutherenverseauborddelatable.wordpress.com/2016/03/07/the-gecko-m > onoculture/ > > And the link that shows the embedding problem: > > > http://chrislord.net/index.php/2016/03/08/state-of-embedding-in-gecko/ > Those are some interesting reads. It confirms my gut instinct to choose chromium embedded (CEF) for development, instead of mozilla embedded, as chromium embedded seems more designed for embedding at this stage than the more immature firefox code. I wonder how often chromium embedded breaks their api, or changes the V8 engine so that old stuff no longer works. One thing I'd really like is a single DLL to ship with an application instead of mounds and mounds of files that these embedded solutions require. However I guess that's not going to happen. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Chromium embedded on freebsd or firefox embedded
On Sat, October 22, 2016 4:59 am, José Mejuto via Lazarus wrote: > Hello, > > > Yes XulRunner is being replaced by GeckoSDK, but the main difference is > that XulRunner had an stable API (frozen) and some semi-stable APIs, so > most base functions for embed are stable. This is now longer available in > GeckoSDK where nothing is frozen, API can change from release to > release and the only way to embed it is writing a C code that generates a > plain C interface that must link against a moving target. > I see! You certainly are very knowledgeable about the subject and have done a lot of research on it. Now it makes sense to me more. This api that continually changes, reminds me of MySQL. I wrote web programs only to find out they broke, when mysql changed their API, and then freepascal had to release a newer file that linked to the DLL. It's a nightmare when api continually changes. I can see them (firefox) changing the architecture to support multiprocess though. > I'll try later to find the relevant links I had found in the past about > this topic, found after spending a lot of hours trying to make morend > XulRunners work embedded in Lazarus. > Your knowledge on the subject is significant! Thanks. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Help System with Chromium Embedded component
Now that I think about my post about using chromium embedded for a help engine, the issue I see is that it's a large dependency .. so for small applications that are say 1MB large, and you want to supply a help system with it... all of a sudden the 1mb exe has to be shipped with a gazillion other files that wouldn't be needed with a more simple format. Still, I think I will try to release a help system for powtils using chromium embedded, as an offline experiment with CGI (no web server needed). However this will take time, and I almost feel like I posted that chromium idea drunk, even though I was not drinking. On Sat, October 22, 2016 5:24 pm, Graeme Geldenhuys via Lazarus wrote: > On 2016-10-22 22:36, Mattias Gaertner via Lazarus wrote: > >> Is this a problem of the CHM producer or the CHM viewer? >> > > Both. The LaTeX-to-HTML conversion is definitely not great. Michael > would agree on this one. Then taking that already bad HTML and converting > in to CHM, makes the end result even worse. That doesn't do any justices > for Michael's hard work in writing the documentation and having it > beautifully presented (like the official PDF versions). -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Chromium embedded on freebsd or firefox embedded
On Fri, October 21, 2016 6:04 am, José Mejuto via Lazarus wrote: > > Embeded Firefox is not possible anymore via XulRunner as embedded > support has been dropped by Mozilla. Really? I heard about them changing the architecture to a new embedded architecture and no longer supporting an old architecture in the new code base, but not dropping support entirely for the entire embedded system? Or lazarus is simply not yet supporting the new architecture they came up with? > Firefox embedded does not work properly in Lazarus since Firefox 9 +/- > and it is not possible to make it work unless forking Firefox xulrunner. Isn't there a new xulrunner architecutre they created to replace it.. that's what I remember reading. I will find a link to the page and report back here soon if I find it. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Teaching Pascal at College
On Fri, October 21, 2016 2:11 am, Martin Schreiber via Lazarus wrote: > On Friday 21 October 2016 09:51:38 Lars via Lazarus wrote: > >> >> I'm not so sure event driven programming is a must to become a >> competent programmer, I would have to think about that. > > "Event driven" probably means that there is an event queue with a central > toolkit-main-eventloop which dispatches the events instead a program > specific flow control. > What about a pure win32 API app written in C. Do you essentially reinvent your own event system using callbacks with program flow control? Or the win32 api has an event system in its api itself? Been a while since I did some win32 api programming.. I'm just wondering if pretty much every system out there has some kind of rolled your own event system of some kind. The other common item that pops up everywhere is some kind of messaging system to notify objects, which I guess is what Smalltalk takes credit for. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0?
On Fri, October 21, 2016 1:03 am, Gabor Boros via Lazarus wrote: > Hi All, > > > In the past I used Length, Pos, Delete, for i:=1 to Length(s) do s[i]... > and realized yesterday these practices are wrong. But I do not know what > the right practice. Indeed this is a serious problem these days, unicode.. which is almost a virus. In GoLang they use something called "Runes" to try and solve the problem. Off topic but I wonder if Lazarus/fpc uses something anything similar to golang's rune's approach or looked into it. IMO unicode reaches something like Godel's incompleteness problem. You can never actually prove that a unicode program will work properly nor prove that it won't have bugs, because unicode creates infinite gotchyas and unicode is always evolving to have more characters that you didn't know about before. It makes code inelegant compared to plain english 255 systems like in the 1970's. There is an interesting article/video about it on Sucksless, and even this guy scares me when he talks about unicode even though he is trying to fix the problems: "UTF-8 everywhere? Writing Unicode compliant software that sucks less, Laslo Hunhold" But it of course is not specific to Lazarus. Sorry for slightly off topic. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Teaching Pascal at College
On Fri, October 14, 2016 4:42 am, Mehmet Erol Sanliturk via Lazarus wrote: > On Fri, Oct 14, 2016 at 1:18 AM, Michael Schnell via Lazarus < > lazarus@lists.lazarus-ide.org> wrote: > >> On 13.10.2016 10:20, Graeme Geldenhuys via Lazarus wrote: >> >> >>> +1 >>> That would be the best solution. GUI programming is based on >>> fundamentals than need to be understood first. >>> >> >> -1 !! >> >> >> The OP explained that his main purpose is to introduce more fun in the >> education. That can be done by plunging into programming directly with >> GUI >> development. >> >> This is why RAD had been invented. >> >> >> Of course there are decent drawbacks regarding relying too much on RAD >> and about not really understanding the fundamentals behind it. >> >> But in the end the addressees are non-computer engineers. >> >> >> -Michael >> -- >> ___ >> >> > > > As an engineer , they need to write programs for doing computations not > available in ready-made packages . Therefore , they need to a sufficient > knowledge to write programs . This can be achieved in a good balance of > learning programming itself and GUI application . > > The word engineer is so overloaded, that I hate it, with my guts. What is an engineer? A guy "who makes stuff".. which pretty much describes every single profession. Do software engineers have to buy an APPEGA subscription? are they registered as professional engineers and have to have a degree to prove it? I think the word engineer should be kept for the oil and gas industry, IMO, where buffoons engineer solutions to rape oil out of the ground. I prefer the term programmer... I made the mistake of thinking of myself as a software engineer at one time, but I'm wondering... since engineering requires a membership with an organization like APEGA, are software engineers misusing the engineer term? Now, if you mean "engineer" as in someone who really does hold an APEGA subscription and is using programming languages to control oil and gas industry PLC's (logic controllers) then I can understand using engineer as a title. Honestly, I just hate the word engineer... as to me an engineer is a vague, meaningless term. It essentially means "guy who makes solutions to problems" or "Guy who makes things"... But since engineers have to have an APEGA subscription to be a valid engineer, why are programmers using the term? It's leaked into the industry and profession, which was a big mistake imo. I just prefer the term programmer. Not hacker. Not engineer. I'm a programmer. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Teaching Pascal at College
On Tue, October 18, 2016 9:16 am, Jürgen Hestermann via Lazarus wrote: > Am 2016-10-18 um 16:47 schrieb Michael Schnell via Lazarus: > >> If you start with complex stuff that does not yield immediate success >> (i.e. a working program that does something that might be useful) The >> students will loose interest and run away, unless they are nerds like >> ourselves. > > Yes, therefore start with simple procedural (console) > programs that let them have immediate success with all the elementary > things that a program consists of (variables/types, loops, commands, > etc.). If that is understood you can switch to GUI applications. > > > If you do it the other way round you only delay the date > of frustration but you do not avoid it. > There are two sides to this story, I'm afraid. I'm a fan of the console program teaching method myself but the issue is: console mode programs are irrelevant and useless. Today, MS DOS doesn't exist any more. Even when ms dos existed, console mode programs were boring, and only complete geeks would be interested in creating console mode programs. We're talking about people who have no social lives who create text mode games here... If I was introduced to ComponentPascal (oberon) or delphi as a person learning programming, where there were actual widgets you could create, it just might convince me that programming is of some use. Console mode programs are utterly useless to a newcomer. Wow you created a console mode program that prints and asks questions... Joy Joy! I think that's why I never got interested in Basic, for ms dos... It was on my machine but I just couldn't see how it was of any use. Now on the other hand if Delphi was on a windows 3.1 machine I may have even been interested, as you could just see a person being drawn into wiz bang widgetsets.. that do something useful, unlike a boring console mode program. Saying that, I still am a fan of console mode program teaching as it teaches you about variables, setting values, incrementing, etc. Today, programmers learn to program in PHP because HTML is the widgetset. Often a first programming language a person learns is PHP these days, IMO. And that's sad, as it creates bad habits galore. All because HTML today is literally "the widget set" being used for programming. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Teaching Pascal at College
On Tue, October 18, 2016 7:23 am, Jürgen Hestermann via Lazarus wrote: > Am 2016-10-18 um 12:53 schrieb Mehmet Erol Sanliturk via Lazarus: > >> Order of teaching is not so critical : As you say , write a GUI program >> for events : Say : "Now it is necessary to define what will be done for >> the events ? ... Its way is the following : Write your program parts in >> that way ..." > > IMO the order is extremly important! > If you start with the fundamental informations > (how does the processor work in general, > how are variables stored (stack/heap/etc.), what does the processor do in > loops, etc.) then this information is remembered very well because > everybody can imagine what goes on in general. You can *predict* what will > (should) happen in your program. > Hmmm.. I'm not so sure learning about the internals of the CPU is so good. IMO that is computer science, whereas programming is computing science. I was interested in how computers physically worked, before I became a programmer. One of the worst things a programmer can do is think in CPU cycles because it's a low level detail that has nothing to do with the program as a mathematical construct. For example in mathematics when you write equations on paper do you ever think about how the electronic calculator works, to process these numbers, when you punch the math into your calculator? The last thing a mathematics student knows about, is the internal architechture of the Casio calculator he is using, because he's more focused on the maths... which IMO is good. To now know anything, and be completely ignorant, of the casio calculator and how it processes your equations and additions and subtractions, is a very good thing. On the other hand, someone interested in physics, and computer science (not computing science) will benefit greatly from learning how the cpu works, memory, etc. Every time they said they were offering "computer science" courses, as a child I always wondered... is that how the capacitors, resistors, and cpu chips work? I never once could possibly grasp how programming a computer had anything to do with the computer itself. As programming can be done on paper and never touch a computer, and still be a a program that is understandable even if it doesn't run on any physical system. I've been very skeptical of any programmer who immediately converts his program to assembly instructions. I can see how it is useful for debugging, and creating a compiler on hardware, but it completely ruins the abstract program concept. It's equivalent of someone writing a beautiful mathematics paper, and then converting it to his casio calculator instruction set. A mathematician would never do such a thing as he couldn't care less about the internals of his casio calculator. So I don't understand why so many programmers are obsessed with low level details. I guess I just find abstract la la land a better place to be in, where there is even a potential for a program to be proven correct and never debugged. > > If you just start with clicking you do not know *why* it works > (if it works) nor do you know *why* it does not work (if it does not do > so). They would always need someone at hand with exprience to tell them > how to continue. This can be very frustrating for studends. > > Therefore I would always present at least a rough overview about > procedural programming before starting with objects and events. In the > end, the latter is still processed in a procedural manner which every > programmer should know. > > >> My application was like the following ( as a very simple example ) : >> Pose a problem "Display your name ." >> After this is done : >> "Display your name 10 times ." >> The students were not able to write their programs . Then , solution was >> "You should use a loop ." >> "A loop is defined in the following ways : ... " >> Such an approach is used frequently in Mathematics text books : >> Subject text . >> Problems .. >> Last problems were "Unsolvable" with the above text . >> Solution : >> "Read the next chapter ..." >> Such approaches are "the Art of Teaching" ... >> > > IMO this "approach" has a severe drawback: > The students do not get an overall picture of what > *can* be done and *how* it can be done. > If they do not know about loops how should they > know that they exist? They would need to read *everything* that is > available and hope to find something helpful. That is very frustrating and > can lead to suboptimal solutions because they get tired of reading yet > another chapter and instead use something else (like copying the code in > the editor 10 times). > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Teaching Pascal at College
On Tue, October 18, 2016 4:42 am, Mehmet Erol Sanliturk via Lazarus wrote: > One unfortunate situation is that there is not much Pascal software for > Petri Nets processing , except the following ( which its license is very > ambiguous means not usable ) Hopefully in these situations, you can find a C dll and then just write a wrapper, in Pascal, to link the the DLL code. Any petri related DLL's that you could bind to? Just because the petri code is written in another language, doesn't mean you can then use fpc to link to it and write layers around it? I have no idea of dll's available for petri.. sorry, just offering this idea. In fact 99 percent of programming today is using other people's code that is stored away in dll's. The entire operating system is a bunch of dll's and likely your typical lazarus application only uses 1-10 percent pascal code and 90 percent DLL code in C. > > > Petri Nets are a vast subject now . There are some Petri Nets processing > software but their licenses being copy left are not friendly for > commercial environment . > Ahh, the age old license war which I've been a part of and why I prefer MIT/bsd code... > > Actually , it is not compulsory to use Pascal , but Pascal will supply > the Pascal programming language learners a very good example , Again you could also use a combination here: c dll's linked in. If that works. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Teaching Pascal at College
On Mon, October 17, 2016 3:07 am, Graeme Geldenhuys via Lazarus wrote: > On 2016-10-17 09:52, Michael Schnell via Lazarus wrote: > >> - do I need know how/why the GUI builder creates the code that makes a >> Button visible on a Form and my Event handler be called when a button >> is pressed ? > > Yes > > > (I.e. do I need to be able to write the code myself > >> without the help of the GUI builder ?) > > Yes > > > >> - do I need to know how the startup code works that make the Form >> visible on the screen ? > > Yes > > >> - do I need to know how the Event-Queue and the checksynchronize() >> system works ? > > If you are using queues and Synchronise, then Yes. > > > >> - do I need to know what system, calls the pascal program performs ? >> > > No > > > > The rest of your questions were just flame bait so don't deserve an > answer. > > > If you don't know any of the above, how do you expect to do any > debugging? Yes, debugging is a major part of being a programmer. I can chime in on this flame here. Although debugging is a major part of a lot of programmers life, it SHOULD NOT be. We should be developing applications knowing the entire source code of the application in our minds, without just knowing little tiny bits of the system and "Winging it". Today's bloatware applications are so large no one can understand them which is what attracts me to systems like Oberon by Nik. Wirth, and OpenBSD, and other small systems that are simple enough you can understand them in a month of reading about them (the basics). Also Plan9 from bell labs... and small programming languages, like oberon, are very interesting because they go against today's trends of bloatware like Firefox (as much as I love firefox) and Lisp, or Emacs. The idea that programmers spend much of their efforts debugging, is a bug, not a feature. Debugging itself, is a bug in a programmers life, that should be fixed. I love a small program that I rarely debug that's been running on a server for years without being touched. I dislike so much apps that need "maintenance". -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Teaching Pascal at College
On Mon, October 17, 2016 2:52 am, Michael Schnell via Lazarus wrote: > On 14.10.2016 16:10, Jürgen Hestermann via Lazarus wrote: > >> >> In most cases they never get to the step "find out how it works". >> If it works, nobody wants to invest time anymore to look under the hood. >> So they always operate on the surface and repeat the same >> subobtimal programming over and over again because they don't know how to >> do it better. >> > That is absolutely correct. > > > But the point where the "knowing how it works" is just a matter of > deliberate choice (or the professor, the student or the situation you get > in and need to crawl deeper into the complexity of the matter.- > > > - do I need know how/why the GUI builder creates the code that makes a > Button visible on a Form and my Event handler be called when a button > is pressed ? (I.e. do I need to be able to write the code myself without > the help of the GUI builder ?) > Sometimes knowing the internals and details can be a disadvantage because instead of thinking about the abstract program you are thinking about cpu cycles, bit popping, bit twiddling, low level API calls. Sometimes it's nice to live in La La land of an abstract layer over top so you can focus on the program construct, instead of low level implementation details. I for one, do not like doing pure Win Api calls, even though that can be so much fun for an intellectual exercise. The first time I really realized this was when I downloaded the Sysinternals tools (procmon, taskmon, regmon) now which no longer exist as sysinternals tools and were purchased by microsoft. I was absolutely fascinated that Mark R. and friend, wrote those tools in pure winapi... I was beautiful code. But I was also disappointed that they would waste their time on such low level code when a lot of it could have been easily abstracted with a tool like Delphi, with just some winapi calls directly, and most of the stuff automated with gui widgets already in a vcl. They didn't use c++ and did it in pure c, AFAIR. It was beautiful code, but then I asked my self.. why? why would you waste your time doing pure api calls? Just as intellectual exercize? Sometimes it's nice to live in a fairy land (abstract) over top of all the low level details. Also, Edsgar Dijkstra was also very much against knowing too many details about the CPU or computer hardware, as he though computing was math, not engineering of computers. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Chromium embedded on freebsd or firefox embedded
What is the actual status of chromium embedded and firefox embedded on bsd? Does it only work on Windows and Linux? Seems there is not so much info about CEF in general on freebsd other than this info: https://lists.freebsd.org/pipermail/freebsd-chromium/2014-January/001113.html I so much love the bsd license and want to move my desktop and some of my development over to BSD, but it just seems like bsd is constantly playing catch up to what linux and windows already had years ago. That's my biggest fear about all bsd's. Since I will be doing work with chromium embedded on multiple projects it will be interesting to know what the status of it is on bsd for lazarus? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Run Parameters Dialog
On Wed, September 28, 2016 2:19 pm, Lars wrote: > On Mon, September 26, 2016 11:55 pm, Juha Manninen via Lazarus wrote: > >> On Tue, Sep 27, 2016 at 8:07 AM, Lars via Lazarus >> <lazarus@lists.lazarus-ide.org> wrote: >> >> >>> The designer of Lazarus didn't necessarily need this feature... >>> >>> >> >> Mattias is the designer of Lazarus. :) >> >> :-) Quote: "So, three individuals (Cliff Baeseman, Shane Miller, and Michael A. Hess) began Lazarus in February 1999. Each of these three had tried to get involved with the Megido project before it dissolved. They started their own project, Lazarus, out of frustration with their earlier Megido experience. The next member of the team was Marc Weustink. He got involved with the project in August 1999. Marc was looking for a Linux Delphi (at that time Borland had not developed Kylix). He was also interested in Linux in general, and joined the Lazarus project for that reason. At the time Marc joined, Lazarus was not much more than an empty toolbar and some hardcoded GTK menu items. The editor was still being discussed. Marc is still a core contributor, with the debugger interface as his pet subproject. A year after Marc joined Mattias Gaertner got involved (September 2000). With Mattias as a member of the team the project made a significant move forward. Mattias ported synedit, and coded large parts of the codetools and the designer. With these new additions Lazarus began to look more like it does today. Three years later, Mattias added the package system and has continued to add further IDE features and enhancements. " Quote from: http://wiki.freepascal.org/History -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Run Parameters Dialog
On Mon, September 26, 2016 11:55 pm, Juha Manninen via Lazarus wrote: > On Tue, Sep 27, 2016 at 8:07 AM, Lars via Lazarus > <lazarus@lists.lazarus-ide.org> wrote: > >> The designer of Lazarus didn't necessarily need this feature... >> > > Mattias is the designer of Lazarus. :) > I thought there were more than one designer and it went through several phases of different people coming and going, hence the name Lazarus which was revived from the dead, and instead of just one Jesus like person being revived it was multiple people which makes it Lazaruses rather than Lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Run Parameters Dialog
On Fri, September 23, 2016 12:19 am, Mattias Gaertner wrote: > On Thu, 22 Sep 2016 18:46:49 -0600 > "Lars" <nore...@z505.com> wrote: > > >> Hi in the Run Parameters dialog, it appears as though $macros such as >> $TargetFile() or the current project directory, etc., don't get >> expanded > > Please create a bug report. > > Not sure if it was intended as design. The designer of Lazarus didn't necessarily need this feature... I will create one but it could be as designed -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Launching External Tool Cmd.exe in Windows
On Sat, September 24, 2016 11:06 pm, Cyrax via Lazarus wrote: >> Any idea what workarounds people used before? Surely someone used >> cmd.exe before as an external tool in an older version. I tend to not >> use the latest version from source control. But I can, if I have to! >> > > In Tools->Configure External tools...->Add dialog, input these: > > > Title : Command Prompt > Program Filename : $Env(COMSPEC) > Parameters : '/c "start "Command Prompt" "%COMSPEC%""' > > Genius! Any idea how to launch a console app using this trick? i.e. I develop a console app in lazarus (the $TargetFile()) and want to launch it but leave it open. Cmd /k was what I thought. other option would be to make a ms dos batch file, that launches a command window, and run it. Or like the other poster said, create a launcher program -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Run Parameters Dialog
Hi in the Run Parameters dialog, it appears as though $macros such as $TargetFile() or the current project directory, etc., don't get expanded Is this by design? Would be nice if they were expanded just as in the External Tools. If no one has interest in it now but would find it useful I could work on a patch. Or if by design it is intended to not be that way for some reason let me know. Once again I am trying to launch my app using cmd /k , so that a command line stays open , and can't find a way to do this with the run parameters window unless I manually type in project1.exe instead of $TargetFile() -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Launching External Tool Cmd.exe in Windows
On Thu, September 22, 2016 3:45 pm, Mattias Gaertner wrote: >> Oh, when did you add this, long ago or just recent... which release... >> or is it only on the latest github/svn. Thanks, I did not see this >> option > > Just recently, as in today. > > > Mattias Any idea what workarounds people used before? Surely someone used cmd.exe before as an external tool in an older version. I tend to not use the latest version from source control. But I can, if I have to! -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Launching External Tool Cmd.exe in Windows
On Thu, September 22, 2016 3:08 am, Mattias Gaertner wrote: > > I added two options "Show console" and "Hide window". Enable Show > console and disable Hide window and cmd.exe will be shown in a console > window. > > Mattias Oh, when did you add this, long ago or just recent... which release... or is it only on the latest github/svn. Thanks, I did not see this option -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Launching External Tool Cmd.exe in Windows
On Thu, September 22, 2016 2:38 am, shoKwave wrote: > Hi, > > > I simply tried putting a TProcess and a TButton on a form and used > following code > > procedure TForm1.Button1Click(Sender: TObject); begin > Process1.ApplicationName:='c:\windows\system32\cmd.exe'; > Process1.Execute; > end; > > Works for me on a Win10 32bit machine with FPC 3.0.0 and Lazarus 1.6. > To clarify I meant the external tools in the IDE that allow you to launch a tool from the IDE tools menu... i.e. not actual lazarus coding, but a tool to launch from the IDE. Most text editors have this feature, lazarus has really good access to lots of macros that fill in values. For some reason cmd.exe /k doesn't launch the command line from lazarus external tools in the menu. /k option keeps the command line window open -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Accesing components in FormCreate event
On Thu, September 22, 2016 12:48 am, Mattias Gaertner wrote: >> No, formcreate is the correct event to set up new components. >> > > Yes. Prefer positive attitude of Yes, vs No. Inbetween Qbit state: maybe. > Keep in mind that the LCL tries to create the Handle and layout after > calling FormCreate. So changing properties do not have immediate effects > as in the VCL. For example changing Panel1.Align=alTop will move Panel1 to > top after FormCreate. Maybe these were some of the issues. What if you had three panels, and you set all the alignments up.. then when the form is finally shown it has no idea which alignment you wanted done first? Or does it somehow memorize which alignments were set first. This could be related to the issue I had but cannot remember, for the life of me. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Accessing components in FormCreate event
On Thu, September 22, 2016 12:31 am, I previously wrote: > If I could just find one other person that has been haunted by accessing > components in formcreate, then I'd confirm I am not imagining things i.e. here are some issues others have come across which may be semi related to problems I have experienced, or not: Quote "However sometimes a few special things can cause problems in FormCreate, usually related to the order window handles are created, and for such special cases FormShow can also be abused for initialization. " -- Jens Grusche, (posted on another delphi list) And this: http://stackoverflow.com/questions/3261653/why-would-something-fail-in-formcreate-but-work-fine-in-formshow However these may be issues with formcreate that are not related to the bugs I have come across. I'm trying to remember what exactly was the problem that I had in FormCreate, but can't remember. I do recall having to create a FirstShow hack to do what I needed to do... I don't like using the FormShow event, even with a counter, since it is called multiple times and FormCreate is only called once. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus