Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/29/21 in all areas

  1. Stano

    FB3.0 SQL

    Or Five methods converting rows to columns.txt
  2. hsauro

    Skia versus VCL for plotting points

    @angusj I finally got round to looking more seriously Image32, and it's working well so far. In fact, I think I use this instead of GDI+ in the future. Plus as you mentioned earlier it's cross-platform.
  3. SudokuHelper is an application that acts like an electronic Sudoku grid. It supports 9x9, 12x12, and 16x16 Sudokus, both in the classic and Gosu variant, where cells can be marked to only accept even numbers. The application neither creates Sudokus itself nor provides a solver for them; it is just a more convenient way to solve a Sudoku from a magazine or other external source than doing it on paper, using pencil and eraser. The application's main features are: Invalid cell values are marked in red. Candidate values can be added and removed from a cell. Setting a cell's value will automatically remove candidates no longer possible in other cells. All actions can be undone, the undo stack is only limited by available memory. Named marks can be set for the current undo stack state and one can later restore the stack to such a named mark. The complete Sudoku can be saved to file, including the undo stack, and later loaded again from such a file. The project can be found on GitHub: https://github.com/PeterBelow/SudokuHelper The code is a good example (IMO) of how to uncouple the UI from the "buisness" code using interfaces, in a kind of MVC design. It is free (public domain) without restrictions.
  4. futuron

    Delphi on Windows 11 on MacBook Pro 16 (2021)

    Hi Lars, not sure why you are having problems. I think I have the same setup and mine works like a charm. Compilation speed is totally absurd. My previous dev environment was on a late 2014 Macbook Pro (16GB mem, and additional Nvidia graphics). My new Laptop with an M1 Max processor (32GB mem) is a beast compared to my old laptop (and a beast to any other Windows laptop in our building - lol). Not really fair because having six years in-between, but compared to my home-game computer this this is fast! Real fast! Back to your problem, maybe telling about my setup, and the following order of getting to that setup helps: MacBook Pro 16 (M1 Max processor): macOS Monterey (version 12.0.1) installed Xcode 13 (v13.1) and inside of that I created a few signing certificates (apple development, and apple distribution certificate) Parallels Desktop Version 17.1.0 (51516) Inside Parallels: Installed "Windows 11 Pro Insider Preview" installed (thus ARM version) inside (Build 2250.rs_prerelease.211112-1650) I left everything to standard/automatic (such as CPU&Memory is set to "automatic" on my machine) graphics set to "best for external displays" as I typically run Windows/Delphi on a bit larger external display Inside Startup and Shutdown (options) I changed "on VM shutdown" to "close window" so I don't manually have to close the VM after I shut down windows Coming from VMWare I set several sharing and applications settings such that they mostly matched what I was used to Then booted Windows inside Parallels. Installed Delphi 11 Applied the November Patch Coped PAserver22.0.pkg from "C:\Program Files (x86)\Embarcadero\Studio\22.0\PAServer" to a shared folder inside Parallels so I can access it from my Mac Back to the Mac: Ran "PAserver22.0.pkg" to install PAserver Then ran the just installed PAserver-22.0 app (when I run PAserver it tells me that the version is 13.0.12.1) inside the window, pressed enter (thus not using a password), and then pressed "i" to retrieve the IP address needed in Delphi Back to Windows Started Delphi Inside Tools/Options: Connection profile manager, added host, called it MacOS, gave it the IP address found within PAserver. I didn't touch the port number or the password. The connection should then work properly Once the connection is OK then proceeded to SDK manager and installed SDK manager: added the macOS 64-bit (MacOSX 12.0) SDK, telling overwrite existing files SDK manager: also added macOS ARM 64-bit (MacOSX 12.0) SDK SDK manager: iOS device 64-bit (iPhoneOS 15.) SDK SDK's for android 32 and 64 bit along with windows 10 SDK were already installed with Delphi After that I installed all my regular components The above following-order 100% works, at least for me. So far I've compiled 32-bit windows, 64-bit windows, MacOS 64-bit, MacOS ARM!, and iOS apps without any problems. I can also package both Mac apps and iOS apps for Apple's stores! Probably today I'll try compiling for Android. And for who wonders... compilation speeds are totally nuts from my point of view. This thing is real fast. I will be saving time not having to wait as much for compiling, and packaging apps. Not even mentioning waiting for starting MS office apps (build for ARM) on the Mac-side, or running any other program on the Mac side. I ran Pixelmator the other day, did a "super ML resolution" on an image and I was floored on how fast that went. Sick! This was one of the best investments I've made for our company. Hope this helps
  5. Mutex has nothing to do with VCL so you can use it for FMX as well
  6. Attila Kovacs

    Delphi on Windows 11 on MacBook Pro 16 (2021)

    I did something similar the other day, installed Win11 into a HyperV container + Delphi 11 Trial with Android SDK, connected my phone via WLAN debug to the system, added a button to the form, F9 and voila, app is running on the phone. Brilliant. It's just slow AF as I'm on my old notebook 😉
  7. vfbb

    Skia versus VCL for plotting points

    Hello. I adapted your test with Skia4Delphi to directly access the pixels instead of painting the pixel. The result was 45 ms on win64. procedure TfrmMain.Button3Click(Sender: TObject); procedure DrawMandelbrotPixmap(APixmap: ISkPixmap; X, Y, au, bu: Double; X2, Y2: Integer); var c1, c2, z1, z2, tmp: Double; i, j, Count, rgb: Integer; hue, saturation, value: Double; begin c2 := bu; for i := 10 to X2 - 1 do begin c1 := au; for j := 0 to Y2 - 1 do begin z1 := 0; z2 := 0; Count := 0; // count is deep of iteration of the mandelbrot set // if |z| >=2 then z is not a member of a mandelset while (((z1 * z1 + z2 * z2 < 4) and (Count <= 50))) do begin tmp := z1; z1 := z1 * z1 - z2 * z2 + c1; z2 := 2 * tmp * z2 + c2; Inc(Count); end; // The color depends on the number of iterations hue := count / 50; saturation := 0.6; value := 0.5; PCardinal(APixmap.PixelAddr[i, j])^ := HSLtoRGB(hue, saturation, value); c1 := c1 + X; end; c2 := c2 + Y; end; end; var au, ao: Double; dX, dY, bo, bu: Double; LWidth: Integer; LHeight: Integer; LTimer: TStopwatch; LBitmap: TBitmap; LSurface: ISkSurface; begin LTimer := TStopwatch.StartNew; LWidth := Image1.Width; LHeight := Image1.Height; LSurface := TSkSurface.MakeRaster(LWidth, LHeight); LBitmap := TBitmap.Create(LWidth, LHeight); try ao := 1; au := -2; bo := 1.5; bu := -1.5; // direct scaling cause of speed dX := (ao - au) / (LWidth); dY := (bo - bu) / (LHeight); DrawMandelbrotPixmap(LSurface.PeekPixels, dX, dY, au, bu, LWidth, LHeight); LBitmap.SkiaDraw( procedure (const ACanvas: ISkCanvas) begin ACanvas.DrawImage(LSurface.MakeImageSnapshot, 0, 0); end); Image1.Picture.Assign(LBitmap); finally LBitmap.Free; end; Showmessage(LTimer.Elapsed.TotalMilliseconds.ToString+' ms'); end; However, your benchmark isn't accurate, you're basically changing pixel by pixel, it's not a good way to measure drawing library performance. Also, tasks that change an image pixel by pixel almost always perform better by creating a shader to run on the GPU. This is another advantage of Skia4Delphi, as it allows you to create shaders at runtime through the Skia Shader Language (based on GLSL). Even now I'm preparing a VCL sample of an animated shader, see the performance: 27.11.2021_01.05.45_REC.mp4 27.11.2021_01.05.45_REC.mp4
  8. Yes: https://github.com/DelphiWorlds/Kastri/tree/master/Demos/AssetDelivery
  9. corneliusdavid

    Cannot build iOS 15.1 apps

    This has been fixed in today's patch ... https://blogs.embarcadero.com/rad-studio-11-alexandria-november-patch-available/ Now, I can resume iOS development--and will remember not to upgrade quite so quickly in the future!
  10. Anders Melander

    brc32.exe no longer available in D11?

    The omission of brc32.exe is probably an installer bug Use brcc32.exe instead or better yet, use the MS resource compiler rc.exe
×