yaP - yet another Portablizer
Re: yaP - yet another Portablizer
Thanks for the snippet. Things got complicated enough to exceed my knowledge so I think I will concentrate on other things, at least for a while.
Btw, I don't get this unicode thing - if it is actually that important why there's no widespread implementation in these "new" BASIC languages? I can't believe everyone has English OS who uses these applications.
Btw, I don't get this unicode thing - if it is actually that important why there's no widespread implementation in these "new" BASIC languages? I can't believe everyone has English OS who uses these applications.
Re: yaP - yet another Portablizer
I, for one, never use localized Windows; local keyboard, yes, but the OS and interface is always en-US...
Re: yaP - yet another Portablizer
tproli,
The thing you have to realize is.. well, these are 'Basic' programming languages hehe. They are retaining compatibility with a language as old as DOS* (and still maintaining support for it!), which itself never had unicode support. And most of the Basic variants out there support Linux, which uses a nice backwards-compatible UTF-8 standard (char* operations work fine with utf-8). Some people choose to deal with ANSI code pages and the like, but thats just cumbersome, problematic and impossible in some places.
Since you do work with web pages, I'm sure you must be aware that the most common format for web page content is the 'UTF-8' charset. UTF-8 is the probably the easiest unicode format to work with as far as older code and programming languages go - the string type is still 'char' (not wide char), and regular ASCII takes up the same space as always. Things look different with unicode chars (2-4 bytes), but it is still processed by the same old character string routines (well, up to a point).
Also, from what I've gleaned from the web, it *appears* that the Mac uses UTF-8 encoding in their O/S too, which means Windows is the only 'weird' language when it comes to Unicode support. If they had simply adopted UTF-8, there would be no need to do all this wide-string heavywork, but alas Windows history was made (a long 10+ years ago).
This wide-string issue is probably the thing that pisses people off the most who do cross-platform development. (including those who are working on these cross-platform languages)
Anyway.. it'd be nice to ignore it, but its still there. It'd be great to handle things as UTF-8 all over (which you probably can if you are working with any non-Windows O/S), but Windows.. well, she's a bitch!
*edit: not as old as DOS - much much older than DOS :O
The thing you have to realize is.. well, these are 'Basic' programming languages hehe. They are retaining compatibility with a language as old as DOS* (and still maintaining support for it!), which itself never had unicode support. And most of the Basic variants out there support Linux, which uses a nice backwards-compatible UTF-8 standard (char* operations work fine with utf-8). Some people choose to deal with ANSI code pages and the like, but thats just cumbersome, problematic and impossible in some places.
Since you do work with web pages, I'm sure you must be aware that the most common format for web page content is the 'UTF-8' charset. UTF-8 is the probably the easiest unicode format to work with as far as older code and programming languages go - the string type is still 'char' (not wide char), and regular ASCII takes up the same space as always. Things look different with unicode chars (2-4 bytes), but it is still processed by the same old character string routines (well, up to a point).
Also, from what I've gleaned from the web, it *appears* that the Mac uses UTF-8 encoding in their O/S too, which means Windows is the only 'weird' language when it comes to Unicode support. If they had simply adopted UTF-8, there would be no need to do all this wide-string heavywork, but alas Windows history was made (a long 10+ years ago).
This wide-string issue is probably the thing that pisses people off the most who do cross-platform development. (including those who are working on these cross-platform languages)
Anyway.. it'd be nice to ignore it, but its still there. It'd be great to handle things as UTF-8 all over (which you probably can if you are working with any non-Windows O/S), but Windows.. well, she's a bitch!
*edit: not as old as DOS - much much older than DOS :O
Re: yaP - yet another Portablizer
In the light of the issues raised here, maybe the dev gurus here at TPFC will find this interesting...
http://www.swi-prolog.org/
http://www.swi-prolog.org/
Re: yaP - yet another Portablizer
Midas, I don't believe Prolog compiles to native executable..
In the meantime, I've put up two other FreeBASIC examples on PasteBin just to see if it tickles anyones fancy:
Registry Query Empty Key Example
RunWait Example
and the two prior examples:
Get Executable Filename
ShellExWait Example
All the code I've put up is pretty much just ports of stuff I've developed in C/C++. It's actually not that painful to port functions between the two..
In the meantime, I've put up two other FreeBASIC examples on PasteBin just to see if it tickles anyones fancy:
Registry Query Empty Key Example
RunWait Example
and the two prior examples:
Get Executable Filename
ShellExWait Example
All the code I've put up is pretty much just ports of stuff I've developed in C/C++. It's actually not that painful to port functions between the two..
Re: yaP - yet another Portablizer
So sorry, my knowledge is rather faint about this; I read this to mean it did:Ascend4nt wrote:Midas, I don't believe Prolog compiles to native executable...
SWI-Prolog author wrote:Portable to many platforms, including almost all Unix/Linux platforms, Windows (NT/2000/XP/Vista, including 64-bit editions), MacOS X (using X11 for graphics) and many more. Both 32-bits and 64-bits hardware is supported. Sources are plain C99, configured automatically using GNU autoconf (configure, make, make install).
Re: yaP - yet another Portablizer
The C99 sources they are talking about - at least my interpreation of it - is what's used to build the Prolog environment (portably) on other systems.
However, I was wrong about compilation.. there is 'GNU Prolog' compiler.
But y'know.. looking briefly over the language, it doesn't look like it interacts at a low level like we need with portablizers.. at least not without some addons or plugins? Meh, either way I can't really give in to learning the syntax of another language right now though.. I'm juggling 4 or so at the moment, with C++ at the top of my heap.
I'd be curious to see someone who has learned prolog (or is willing to) to give a nice example of what it is really capable of though. I nominate Midas
However, I was wrong about compilation.. there is 'GNU Prolog' compiler.
But y'know.. looking briefly over the language, it doesn't look like it interacts at a low level like we need with portablizers.. at least not without some addons or plugins? Meh, either way I can't really give in to learning the syntax of another language right now though.. I'm juggling 4 or so at the moment, with C++ at the top of my heap.
I'd be curious to see someone who has learned prolog (or is willing to) to give a nice example of what it is really capable of though. I nominate Midas
Re: yaP - yet another Portablizer
I'm somewhat handicapped in this department, as my persistent lack of programing skills demonstrates. So, I'm not making any promises, but I'll look into it.Ascend4nt wrote:I'd be curious to see someone who has learned prolog (or is willing to) to give a nice example of what it is really capable of though. I nominate Midas
EDIT: After some summary research, SWI-Prolog seems ill suited for the end being discussed here, mostly on account of some inconvenient dependencies...
+ Creating a Windows console application from SWI-Prolog (http://www.swi-prolog.org/FAQ/WinExe.html):
+ Making an executable for XPCE/SWI-Prolog applications in MS-Windows (http://www.swi-prolog.org/FAQ/PceWinExe.html):The command below creates myapp.exe from load.pl and makes the program start at main/0To run, myapp.exe requires libpl.dll...Code: Select all
plcon -o myapp.exe -c load.pl --goal=main
The following DLLs seem to be a requirement for GUI apps: libpl.dll, pthreadVC.dll, pl2xpce.dll...
+ For more info, start at http://www.swi-prolog.org/FAQ/MakeExecutable.html
On a related note, I found this intriguing (but hey! I'm out of my depth here):
http://www.oxygenbasic.org/ author wrote:Basic in the QBasic genre, Oxygen can read sufficient C syntax to deal with most C headers directly, eliminating the need to translate them into Basic. [...] The compiler can also generate conventional 32/64 bit executables and dynamic link libraries.
Re: yaP - yet another Portablizer
I gave Purebasic a try (commercial ) and it's pretty neat.
I was able to move yaP to PB in a few hours and added a new feature too (admin rights check). Of course it was easy because the program logic was not changed since the last BCX rewrite. The final size is 32 KB (uncompressed).
I won't share it until I get my licence... or find another free tool that fits (what I doubt)
I was able to move yaP to PB in a few hours and added a new feature too (admin rights check). Of course it was easy because the program logic was not changed since the last BCX rewrite. The final size is 32 KB (uncompressed).
I won't share it until I get my licence... or find another free tool that fits (what I doubt)
Re: yaP - yet another Portablizer
Those who are using "regedit /s" in their batch files to import and merge reg files, try using "reg import" and "reg export" to disable the UAC prompt. I will change it in all the example yaP setups.
(add /y to REG EXPORT to overwrite existing .reg file)
(add /y to REG EXPORT to overwrite existing .reg file)
Re: yaP - yet another Portablizer
I did... thanks for the tip.
Re: yaP - yet another Portablizer
Have you thought about using Powershell?
Re: yaP - yet another Portablizer
Can it produce small exe sizes?
Currently I'm happy with its current state (PureBasic, not released yet), many bugs were fixed and there are some important new features added (macros, environment variables, java/.net/adminrights check) while filesize is only 40 KB. But I'm not against of rewriting as a free programming language would be better to use.
Currently I'm happy with its current state (PureBasic, not released yet), many bugs were fixed and there are some important new features added (macros, environment variables, java/.net/adminrights check) while filesize is only 40 KB. But I'm not against of rewriting as a free programming language would be better to use.
Re: yaP - yet another Portablizer
No, it's like (loosely said) VBScript/Batch scripting.
Re: yaP - yet another Portablizer
I was curious about Powershell myself for all of, hmm, 10 minutes.. hehe.guinness wrote:Have you thought about using Powershell?
The extraordinary effort it takes just to run a .ps1 file is absurd. You need to change the execution policy (otherwise you get errors like "File C:\scripts\test.ps1 cannot be loaded because the execution of scripts is disabled on this system"). Then you need to either create a shortcut or have a batch file or other executable run the script, because double-clicking it opens up notepad. The path to the powershell script also has to be a full path, otherwise it doesn't recognize the file.
Also, other scripting files like .vbs (VBScript), .js (JScript) and .wsh (Windows Scripting Host) will *possibly* run on Windows, but there's no guarantee. They can be disabled easily, and for security they are in certain environments.
So basically the only 'sure thing' when it comes to Windows are native executables. Even batch file execution can be disabled, though that's pretty unusual in my experience..
tproli, if you're getting up to 40K, Visual C++ Express is calling your name..