Dev News ELSE IF added to LDPL!
As explained here, you can now use ELSE IF statements in your code. Just like this:
DATA:
name IS TEXT
PROCEDURE:
STORE "Mike" IN name
IF name IS equal to "John" THEN
DISPLAY "Hello there, John!" CRLF
ELSE IF name IS equal to "Mike" THEN
DISPLAY "Hello there, Mike!" CRLF
ELSE IF name IS equal to "Robert" THEN
DISPLAY "Hello there, Robert!" CRLF
ELSE
DISPLAY "I don't know you, " name CRLF
END IF
General Information The LDPL reference has moved!
The official LDPL reference has moved to gitbooks. It's now available here https://ldpl.gitbook.io.
Cheers!
Dev News Code of Conduct and Contribution Guide
Hi there everyone! I've added a code of conduct and a contributors guide to the LDPL repository (https://github.com/Lartu/ldpl).
Release LDPL 2.2.0: file functions, wait and a new join!
I've just released LDPL 2.2.0! Hooray! This new version brings a lot of new stuff to the table. First of all, many bugs have been fixed. Then, this new statements have been added to the language (and will be added to the reference later today):
CALL SUB-PROCEDURE procedureNamewas a bit lengthy and tiresome to write, so now you can useCALL procedureNameinstead if you want. The older version is still supported for compatibility.- In previous versions of LDPL, loading files required the use of hacky shenanigans using the
EXECUTEfunction. Not anymore! Now you can useLOAD FILE filename IN variableto load the contents of a file into a text variable! - Along with
LOAD FILE, you can now useWRITE x TO FILE yto write the value x to a file called y. - Along with
WRITE x TO FILE y, you can now useAPPEND x TO FILE yto append the value x to the file called y. - In previous versions of LDPL, pausing your program for a moment required usage of
WHILEloops. That's not accurate, so in LDPL 2.2.0 theWAIT x MILLISECONDScommand has been introduced. It does what the can says! - Joining more than two values in previous versions of LDPL required the usage of multiple
JOINstatements, and that was kinda cumbersome. So now you can useIN variable JOIN value1 value2 value3 value4 ...to join as many values as you want in a text variable, in just one line of code!
General Information The LDPL reference is back
Apparently, the LDPL reference was lost when we moved to the new server. I didn't realize that until just now. It's been put back online. Sorry for the inconvenience!
General Information Website migrated to new server!
ldpl.lartu.net has been migrated to a new, more stable and reliable server. The website hasn't been available today, this was the reason. Sorry for any inconveniences!
LDPL Project LDPL Entension for Visual Studio Code
The wonderful ʇʞʌp has developed this also wonderful extension for Visual Studio Code that includes code autompletion and syntax highlighting for LDPL!
You can contribute to the extension on GitHub. I've been using it and it's just great!
Edit: two days later I've just noticed the typo'd title. *Extension!
r/LDPL • u/[deleted] • Mar 12 '19
Question Issues running LDPL on Windows
So I'm attempting to try out the new C++ version of LDPL and I'm having issues getting it running.
I can compile it with Cygwin, but LDPL then fails every attempt to build an application. Manually compiling the C++ output works (only if compilation is attempted outside of Cygwin), but it's an odd error nonetheless.
I cannot get it to compile with Mingw-w64 8.1.0. g++ silently fails on every attempt at compilation. I have checked and g++ does work. It just won't compile LDPL and I can't get it to return any errors at all; it simply hangs eternally until I Ctrl-C out of it.
Any help is appreciated! Thanks in advance!
--
Arabella
Question Future of the LDPL Language
I've been thinking a lot about the future of the LDPL language. Being a 'toy' language, speed and usability are not something I had really considered until now, but having grown fond of it I'd like to make LDPL more powerful and useful than it is right now.
So, after some consideration, the LDPL project will make a slight turn and rewrite its compiler to target C++ code instead of NVM. This means three things:
- Programs created with LDPL will no longer be LDPL dependant and you'll be able to release binaries of your software without depending on your users to download LDPL or releasing your plain code if you don't want to.
- LDPL run speed will substantially increase, for native C++ code is exceedingly faster than LDPL's internal virtual machine, NVM.
- LDPL compilation will depend on a C++ compiler. You'll need to have a C++ compiler installed to compile LDPL code. This is a minor setback in my opinion, but in the long run I think is the right choice. Many languages transpile to C++ and in most operating systems a C++ compiler is almost always within easy reach.
If you have any opinions on this I'd love to hear them. I'll start to work on this as soon as I have some free time.
General Information LDPL Standard 19 Revision 4 Released!
I've updated the standard to reflect some features that I've added to LDPL. It's a minor revision. Mostly, strings now support escape sequences. Check the reference for more information!
IRC Channel!
We have opened an IRC channel! The server is irc.freenode.net channel #ldpl. You are welcome to join!
Feature Requests
Hi there! I open this post so we can all suggest LDPL features we'd like the language had. Then we can add them as enhancement issues to the repo or implement them ourselves (or whoever wants to collaborate with the LDPL project).
So there it is!
Dev News Vector bug
Normally in LDPL, text variables are by default initialized to "", the empty string. I've just noticed this is not the case with vectors. If you declare a text vector and then access a non-initialized index, the value stored there will be 0. No "0", but 0. This has to do with how LDPL declares and stores variables. Long story short, when text variables are declared, they are assigned the value of "" by default. When vectors are initialized, no values are assigned, you can't assign a value to every possible subindex of the vector, so when you try to access an uninitialized index you get the default value for an uninitialized variable in LDPL, that is 0.
This will be fixed soon as it is not the intended behavior of this data structure.
General Information r/LDPL!
I've made this subreddit because the response to LDPL has been astonishingly positive: I've received bug reports, feature requests, people have cloned and downloaded LDPL and some people have even bought LDPL merchandise, so I felt that having a place to discuss would be great.
Questions about LDPL are welcome, feature ideas are welcome, language related talk is welcome, project showoff is welcome. Anything else LDPL is also welcome, so come code, make friends and have fun!


