[HN Gopher] Lazarus IDE 3.0 Released
___________________________________________________________________
Lazarus IDE 3.0 Released
Author : TheCipster
Score : 137 points
Date : 2023-12-22 09:28 UTC (2 days ago)
(HTM) web link (forum.lazarus.freepascal.org)
(TXT) w3m dump (forum.lazarus.freepascal.org)
| 0x000042 wrote:
| Amazing! I love Lazarus and FPC. I don't use it every day but it
| is excellent to make small standalone tools in.
| m4rc3lv wrote:
| I love it because I have good memories on Delphi back in the
| nineties.
| xyzelement wrote:
| I recently used freepascal's turbo pascal + dos style ide as a
| retro way to do the advent of code 2023.
|
| It was a blast from the past for sure. Is this / Lazarus just a
| retro thing or do they have practical utility in 2023 also ?
| pjmlp wrote:
| Do get a job in 2023 coding in Object Pascal, probably not.
|
| To code some FOSS stuff, enjoy a fast compiler toolchain and
| RAD experience for GUI applications, worth a try.
| badsectoracula wrote:
| Technically the only reason FPC's textmode IDE is "retro" is
| because everyone is using Lazarus instead :-P so it doesn't get
| much development. It is useful when you want a more lightweight
| FPC development environment or to develop in a platform without
| Lazarus support yet (i think Haiku was like that though from a
| quick search it looks like Lazarus can run on Haiku now with
| the Qt backend[0]).
|
| There are a bunch of programs using Lazarus though, e.g. AFAIK
| the 64bit version of Total Commander is made using it.
|
| Personally i'm making a bunch of stuff using it, like a 3D game
| engine[1] (well, actually more than one[2][3], but that is
| retro :-P), various utilities (e.g. some time ago i wrote a
| utility to repeat a texture on a spline so i can use it to draw
| patterns on textures[4]) and experiments (e.g. a lightmapping
| experiment[5] i wrote last year). Though as i like retro stuff,
| some of my projects are of that nature (e.g. aside from the
| second engine mentioned above, i wrote a quick and dirty Quake
| map editor[6] and a dungeon/map editor[7] for a homebrew game i
| was making for the OG Xbox using the opensource nxdk SDK - the
| game was made in C though, only the tools are in Free Pascal
| and Lazarus).
|
| EDIT: forgot to mention, in a previous gamedev job i used
| Lazarus to write a tool for extracting savegame data for an
| external QA company, a tool that analyzed resource/asset usage
| for the engine and could point out exactly where it was loaded
| with full backtrace (i used Lazarus' "SynEdit" control to show
| the C++ source code for that with syntax highlighting and move
| to the exact line) and a tool that analyzed memory use and
| found untraced memory (the engine had its own memory allocator
| but not all memory went through that, especially from some
| middleware, so i wrote a tool that hooked VirtualAlloc and
| traced its callers - a hacky solution but worked :-P).
|
| [0] https://i.imgur.com/Rl8ISmQ.png
|
| [1] https://www.youtube.com/watch?v=SQ1-r9aE0QA
|
| [2] https://www.youtube.com/watch?v=m5IAIhWcco0
|
| [3] https://i.imgur.com/3f64T9M.png
|
| [4] https://i.imgur.com/hfXWYAe.png
|
| [5] https://i.imgur.com/ahO15LO.png
|
| [6] https://i.imgur.com/7MSH98p.png
|
| [7] https://www.youtube.com/watch?v=u1Mf8ujCu5g
| anta40 wrote:
| Lazarus isn't retro. It's an open source, Delphi-compatible
| IDE. If you are a big Delphi fan and would like to port your
| apps to non-Windows OSes, try Lazarus.
| squarefoot wrote:
| > Lazarus just a retro thing or do they have practical utility
| in 2023 also ?
|
| Surely it's not a retro thing. As for being useful in 2023 for
| landing a job, well, most head hunters won't even know what you
| mean if you mention it in your resume, however if you're lucky
| enough to find a place where they don't dictate what you're
| forced to use but rather ask "we have a problem, can you solve
| it? You have _carte blanche wrt tools_ ", chances are that by
| using Lazarus you can be extremely productive in short time.
| Pet_Ant wrote:
| Glad to see that RISC-V is supported as a target:
|
| https://wiki.freepascal.org/Platform_list#Supported_targets_...
| marcodiego wrote:
| Lazarus license make it so much better than Delphi that I can't
| find a reason to justify using codegear's solution nowadays other
| than legacy code. It is not that their alternative isn't good, on
| the contrary. The problem is that they simply can't win against
| the competition: they can't win over MS tools for windows, they
| can't win over Apple's tools on MacOS, they can't win against
| FLOSS tools for Linux.
|
| For everything else where Delphi may look like a good option...
| Well, for that there is Lazarus.
| badsectoracula wrote:
| IMO there are two main reasons nowadays to check codegear's
| IDEs: you either have some huge Delphi codebase that you can't
| move anywhere else or you want C++ support with a full RAD IDE
| (i do not think there is anything as RAD-y as C++ Builder).
| QtCreator is a workable alternative though.
|
| Well, there is a third reason, you want to have some company to
| blame (and ask help from) when things break :-P
| satvikpendem wrote:
| I keep hearing about Pascal and Delphi, especially on HN, what is
| it and why is it special or talked about so much? I understand
| it's an older programming language but not why it's so loved. Any
| recommendations on how to learn it and is Lazarus a good option
| for the IDE or does VSCode suffice?
| kristopolous wrote:
| It's not hard to learn. It was often taught as a "first
| language" the place that I guess Python occupies today.
| Essentially a more sophisticated BASIC
| smallnix wrote:
| Yes, it was the programming language I was taught in school.
| So there is some nostalgia at play, for me at least.
| cstross wrote:
| _Essentially a more sophisticated BASIC_
|
| Absolutely wrong.
|
| PASCAL was invented by Professor Niklaus Wirth at ETH Zurich
| specifically for teaching structured programming, circa 1970
| (year of first release). It's a descendant of ALGOL (1960),
| which was pretty much the first structured programming
| language and introduced functions that could be recursively
| invoked -- ALGOL is the ancestor of C and PL/I as well as
| Pascal and relatives (Modula-2, Oberon, etc) and is hugely
| important.
|
| BASIC came out of Dartmouth College in the US in the mid-
| sixties and the emphasis was on interactive invocation: early
| BASIC was almost completely non-structured (GOTO for flow of
| control, minimal subroutines, IF statements with no ELSE).
|
| While both Pascal and BASIC were intended as teaching
| languages, they took radically different views of _what_ to
| teach. And Python is different again: Python has the virtue
| of a simple and consistent core syntax, but wasn 't designed
| for teaching -- it was designed for scripting, and was
| developed in the early 1990s for computers with 2-3 orders of
| magnitude more resources than early BASIC and Pascal.
|
| Object Pascal/Delphi (Delphi was Borland's proprietary
| implementation with RAD for Windows) is an outgrowth of
| Borland's Turbo Pascal from the early 1980s, which in turn
| took Wirth's Pascal and added some essentials that had been
| missing -- notably dynamically allocated strings, modules,
| and finally object encapsulation -- that made it much more
| suitable for writing serious code: for a while Turbo Pascal
| was a viable competitor for C on MS-DOS.
|
| But Pascal is in no way related to BASIC.
| tonyg wrote:
| (Algol 60 was also an important influence on Scheme! So is
| Scheme a lisp or an algol? Yes.)
| kristopolous wrote:
| It's not wrong.
|
| I stand by exactly what I said.
|
| In practice, it was taught as an introduction to
| programming.
|
| For a decade or two, children learned Basic and
| highschool/JC aged kids learned Pascal.
|
| Of course they aren't the same thing. It'd be like saying
| kids ride tricycles and then bicycles and clapping back
| about penny farthings, velocipedes and dandy horses while
| tricycles started as a wheelchair device.
|
| Give me a break. The point was Pascal is accessible and
| easy to learn.
|
| I've met both Kurtz and Wirth and I'm sure they wouldn't
| have a problem with this.
| baq wrote:
| Java is also a more sophisticated basic and is commonly
| taught as an introductory language.
|
| I'd much rather be taught Pascal than Java. Probably 20 year
| old me would feel differently, but the 20 year old me was a
| much worse software engineer (actually, he was just a self
| taught programmer kid.)
| kristopolous wrote:
| right. "First Language" is a moving target and it is not
| something a language wants to have because you get a bunch
| of really crappy code in that language and it ruins the
| language's reputation.
|
| After the rise of the web in the early 2000s it moved
| around a bit. Java, PHP, Ruby, Javascript, even Flash
| sometimes, but now it's generally Python and it's so far
| bucked the trend and managed to remain respectable. Pascal
| and BASIC had a grip on that slot probably since the late
| 1970s through maybe early 2000s. Before that it was
| Fortran.
|
| I did y2k stuff 25 years ago, there's a lot of shit fortran
| out there.
| badsectoracula wrote:
| I've written a lot of Object Pascal (meaning the Delphi dialect
| of Pascal, not the older Apple dialect) over the years and... i
| don't think there is anything special about it :-P. It has a
| bunch of neat features (and a bunch of not so neat pitfalls)
| but really IMO the three main reasons to use it is that:
|
| 1. It has decent backwards compatibility (code i wrote even 20
| years ago compiles either out of the box or with very minimal
| change - e.g. if you used strings as byte buffers or if you
| relied on some esoteric RTTI implementation details you may
| need to change some things but the changes are quick and
| trivial).
|
| 2. Lazarus is a fast and responsive IDE with RAD functionality
| for making GUIs (and other stuff, e.g. i haven't used it myself
| much but you can do things like configure visually via the IDE
| how a webapp will respond to various URLs) and FCL and LCL
| provide a rich frameworks for desktop applications.
|
| 3. The compiler is relatively fast. Delphi's compiler (at least
| the classic one) is much faster but compared to -e.g.- current
| C++ compilers, FPC is much faster (it takes less than a minute
| to compile Lazarus itself and AFAIK the codebase is more than a
| million lines of code - there is 2 million lines of code in the
| repo but you don't compile everything).
| sixthDot wrote:
| But linking is slow, plus also only possible using ld.bfd.
| This causes problems here as I default to gold... For now;
| each time you start using or close lazarus you have to remind
| to change ld target.
|
| Otherwise compilation is indeed fast because it uses a system
| of cache (just like delphi *.dcu system) plus it has modules.
| On top of that we can add... context-free grammar that's fast
| to parse, no _insane_ preprocessing (but still some, $ifdef
| and co).
| badsectoracula wrote:
| There are preprocessor macros though you need to explicitly
| enable them and they don't support parameters (there are
| workarounds but in practice they're not really needed).
| FWIW i never had to use them so far, the most i needed from
| the preprocessor was DEFINE/IFDEF/ENDIF/etc.
| nurettin wrote:
| Delphi and Lazarus are a continuation of the beloved gui-first
| idiom where you are greeted by an IDE capable of running code
| at design-time. That means you can add an sql connection
| component, create a query, connect it to a data source, connect
| the data source to a grid and fill it right there while
| designing your form to see how the result will look like when
| you run it.
|
| The second reason to use it is: it builds for many targets and
| runs without garbage collection.
|
| Lazarus needs to recompile and restart itself in order to use
| packages, but other than that, it's pretty stable and fast.
| VSCode can be used to edit Pascal code, but it is pretty
| irrelevant.
| regularfry wrote:
| It's funny how that sort of immediacy is what people like
| about lisps, but to my knowledge there is nothing like the
| RAD interface Lazarus and Delphi have in the open source lisp
| world.
| deathtrader666 wrote:
| Would be cool to have a Lisp backend with a Pascal GUI
| Barrin92 wrote:
| > there is nothing like the RAD interface Lazarus and
| Delphi have in the open source lisp world.
|
| The key phrase there is 'open source' I believe, because
| tools like Lazarus come out of a pretty distinct Borland /
| Windows culture of making bespoke usually paid graphical
| development tools. Lisps have a lot of their roots in the
| academic and Unix culture with a lot of folks seemingly
| allergic to GUIs to this day. There's an interesting
| interview with Carmack from a year or two ago talking about
| this.
| narag wrote:
| The nicest thing is the IDE, so using VSCode you're missing the
| point.
|
| https://www.youtube.com/watch?v=MvFCgc_YvAs
|
| (watch at 2x speed for an idea how fast I worked at the time
| :=))
|
| I won't describe features that are no longer unique. Most other
| IDEs have catched up, but twenty years ago, Delphi was much
| better than anything else. VB had a similar style, but the
| Object Pascal language was more powerful. Also you were able to
| program IDE plugins.
|
| The work that FPC and Lazarus teams have done is incredible.
| Borland was a big SV company. These are voluntary programmers
| and have outdone Delphi.
|
| Edit, with one more thing: you could program Delphi components
| (and you can program Lazarus components) using the same Object
| Pascal language used for the applications. Components can be
| graphical UI controls (special buttons, edit boxes, calendar
| pickers, etc.) or non-visible database, communication,
| processes, really any kind of objects, that can also interact
| with the IDE.
| MobiusHorizons wrote:
| For many people it was the first language they learned, which I
| think explains most of it. But the tooling was also very fast
| from a latency perspective, even on the slow hardware of the
| time, which tends to make for magical memorable experiences.
| spamatica wrote:
| And also incredibly small.
|
| Turbo Pascal 2.0 had an IDE with compiler and debugger in a
| binary less than 60kb (if the info I found googling is true).
| Of course nowhere near the capabilities of modern
| environments but state of the art at the time.
| askvictor wrote:
| Programming in Delphi was fun and easy. It's probably because
| things were overall simpler then, but we seem to hold on to the
| idea that it was the tool. And maybe it was, I haven't tried
| Delphi in a while.
| badsectoracula wrote:
| This wont be part of a Lazarus release any time soon (ok, it
| might be in 4.0 but i don't know when 4.0 will happen) as it is
| only on trunk, but recently i was fixing bugs for the Gtk1
| backend. The neat bit is that Gtk1 is very small and while it
| isn't preinstalled anywhere nowadays (except Slackware) you can
| carry the .so as they are around 5-6MB or so. However it also
| supports static linking and after some quick hacking i made
| Lazarus to statically link against Gtk1 but dynamically link
| against X11, etc, thus making binaries that can run in pretty
| much every distro (assuming of course what Gtk1 provides is
| enough). The neat bit is that the static binary is only around
| 1.5MB larger than the equivalent binary linked dynamically with
| Gtk2.
|
| Here is a little mesh viewer test for some docview-like API i
| wrote recently (not part of Lazarus itself, this is part of a
| package i use with common code across my Lazarus apps) that was
| statically compiled with Gtk1 on Slackware running on a Debian
| which has no Gtk1 libraries at all[0]. Also a bonus screenshot[1]
| with another mesh viewer (this is a different project[2])
| compiled twice, once with the Gtk1 backend and once with the Qt6
| backend with the exact same code (just changed the target
| "widgetset" from the project settings).
|
| [0] https://i.imgur.com/Y4jvQMk.png
|
| [1] https://i.imgur.com/NE2LB3U.png
|
| [2] http://runtimeterror.com/tech/jtf/
| elwell wrote:
| Meta: This old forum design makes me nostalgic.
| nesarkvechnep wrote:
| "FreeBSD/Linux". No wonder people think FreeBSD is a Linux
| distro.
___________________________________________________________________
(page generated 2023-12-24 23:00 UTC)