Re: [Lazarus] Promoting Lazarus: A Case Study Video

2015-02-17 Thread Nikolay Nikolov

On 02/16/2015 11:29 AM, Giuliano Colla wrote:

Il 16/02/2015 04:47, Den ha scritto:

It also plays for me, Ubuntu 14.10 64bit, Chrome.



Thanks to all for the feedback.
Given other's experience, I tested with Linux-FC14 and it works for me 
too.
It must be a CentOs 6 specific issue. Most likely a decoder is 
missing, because it isn't strictly Open Source. RH is very accurate in 
providing only purely OS software. Sometimes it's a nuisance.

I'll investigate.
It's not because of open source-ness, but due to patents. The H.264 
codec is heavily patented in the United States and other countries and 
requires an expensive license fee to use:


http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Patent_licensing

Free browsers such as Firefox only provide H.264 playback capability, if 
the underlying OS has the codec installed. So, it only works in Windows 
and Android, because Microsoft and Google have paid the license fees for 
distributing the codec with the OS.


If you want to support free operating systems, it's better to also 
provide WebM or Ogg/Theora versions of the video:


http://en.wikipedia.org/wiki/WebM
http://en.wikipedia.org/wiki/Theora

Unfortunately, there are some very popular devices (e.g. the iPhone and 
the iPad) that *only* support H.264 and that don't allow you to install 
other codecs, so if you want the best compatibility, you need two 
versions for every video - one H.264 and one WebM or Ogg/Theora :(


Nikolay
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] free Pascal versions

2014-03-03 Thread Nikolay Nikolov

On 03/03/2014 03:21 PM, Malcolm Buckingham wrote:
I've not tried it  but this looks like it might be what you are 
looking for
http://math.ubbcluj.ro/~sberinde/wingraph/ 
http://math.ubbcluj.ro/%7Esberinde/wingraph/



Or ptcgraph, which is included in FPC and runs on linux as well as windows.

Nikolay
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Need Windows CE OS Image

2014-01-18 Thread Nikolay Nikolov

On 01/18/2014 08:53 AM, sanmiolade wrote:

I am trying to test run my WINCE Apps

I need a Emulator and Windows CE 5.0 or 6.0 OS Images

Kindly send it to me the MSDN sites is all crap.

Here's the Windows Mobile 6 SDK, which contains emulator images:

http://www.microsoft.com/en-us/download/details.aspx?id=6135

and here's version 6.5:

http://www.microsoft.com/en-us/download/details.aspx?id=17284

Nikolay

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Graeme would love this, or not, I think

2013-10-11 Thread Nikolay Nikolov

On 10/11/2013 10:18 PM, vfclists . wrote:

You couldn't make this up. Is it a joke or not?

Department of Basic Education bans Free and Open Source Software in SA 
Schools and mandates programming an ancient, moribund language in 
contradiction of government's own policy http://twitter.com/share



http://dkeats.com/index.php?module=blogaction=viewsinglepostid=gen21Srv8Nme0_40332_1381256759userid=7050120123


E:

Python, PHP, Java, Javascript... any 21st Century language would be 
better than Delphi. Any. Any at all.


I just don't know what to say...

Nikolay
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why development remains constant for msdos?

2013-09-25 Thread Nikolay Nikolov

On 09/25/2013 11:26 AM, Michael Schnell wrote:

On 09/24/2013 10:58 AM, Nikolay Nikolov wrote:


When you try to create a thread, your program terminates and writes a 
message that threading is not supported.


While this absolutely does make sense, one could think about 
alternatives.


AFAIK, (at least for some archs) there is a variant of the pthread 
(=POSIX thread) library, that internally does user-land 
multithreading. IIRC, the original POSIX definition was done with 
exactly this in mind and, regarding Linux, the original Linux 
implementations (aka Linux Threads)  was not fully compatible with 
POSIX. Only some years ago, the Linux changed it's way of Kernel-based 
thread handling to the POSIX compatible NPTL implementation.


Thus it should be possible to link fpc projects to a user-land thread 
enabled version of pthreadlib and allow for working with TThread in DOS.


I've actually thought about implementing some sort of multithreading for 
DOS for a long time. The problems are the following:


1) DOS functions are not reetrant and are thus not safe to call from 
different threads. There's an undocumented InDOS flag that indicates 
whether a DOS function is safe to call:


http://stanislavs.org/helppc/int_21-34.html

But the RTL currently doesn't check it before every call and normally 
it's only used when writing TSRs.


2) In DPMI protected mode applications (such as go32v2), you cannot 
modify the return address from within an interrupt handler, which means 
you cannot implement your task scheduler as a timer interrupt handler, 
because you won't be able to switch to a different context from there. 
Doing this would require modifications to the DPMI host (cwsdpmi.exe) 
and will not work if another DPMI host is active (such as when running 
in a windows dos prompt, etc.)


3) Even if you solve 2), DPMI requires that all code and data touched 
from an interrupt handler to be locked, so that it cannot be swapped 
out. This is a tedious and error prone task to do from a high level 
language such as pascal. You should ensure that your entire scheduler's 
code and data are locked. An alternative option is to switch to a DPMI 
host, that doesn't support swapping (i.e. cwsdpr0.exe), but then you 
lose the virtual memory support (and thus the ability to run on machines 
that don't have enough memory).


2) and 3) do not apply to 16-bit MS-DOS.

Another option is to implement cooperative multitasking, which would 
require each thread to call periodically an yield function. This solves 
1), 2) and 3), but threaded code written for other OSes will require 
modifications to run under DOS. However, that's still better than not 
running at all.


Nikolay

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why development remains constant for msdos?

2013-09-25 Thread Nikolay Nikolov

On 25.9.2013 г. 14:01 ч., Michael Schnell wrote:
More than 15 Years ago I on DOS did do the first tests for my 
preemptive multitasking library (in C), that that finally works (up 
til now) in an 68K product. :-)


Real mode or DPMI? IMHO, real mode is doable, DPMI - not so much (at 
least not without using a certain DPMI host with special modifications).


Nikolay

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why development remains constant for msdos?

2013-09-25 Thread Nikolay Nikolov

On 25.9.2013 г. 14:14 ч., Michael Schnell wrote:

On 09/25/2013 01:00 PM, Nikolay Nikolov wrote:


Real mode or DPMI? IMHO, real mode is doable, DPMI - not so much (at 
least not without using a certain DPMI host with special modifications).


Did DPMI even exist at this time ?

15 years ago is 1998, so yes. Maybe it was even earlier?


IIRC it was a native 8088 chip - http://en.wikipedia.org/wiki/Intel_8088
Real mode it is, then. DPMI requires 286+ and the DOS extender that FPC 
uses is 386+. Borland Pascal 7 had a 16-bit (286+) DPMI dos extender. We 
can implement that as well, as soon as the i8086 large memory model is 
finished. The Open Watcom linker we're using already supports the 
DOS/16M extender binary format I think.


Nikolay

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why development remains constant for msdos?

2013-09-24 Thread Nikolay Nikolov

On 24.9.2013 г. 10:42, Michael Schnell wrote:

On 09/22/2013 10:40 PM, wkitt...@windstream.net wrote:
yes, there are still quitet many DOS systems out there... there's 
even freeDOS and similar FOSS(?) DOS projects... some of them are 
even 32bit and can use all available memory like other OSes of today ;)



How does fpc for DOS handle TThread ?

Just curious...


When you try to create a thread, your program terminates and writes a 
message that threading is not supported. Things like threadvar work in 
the sense that they compile and work, but since you don't have threads, 
they behave just like regular vars. Underneath they still generate the 
extra bloat needed for threadvars (e.g. calls to FPC_THREADVAR_RELOCATE, 
which are probably stubs and do nothing in the rtl)


Nikolay

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why development remains constant for msdos?

2013-09-24 Thread Nikolay Nikolov

On 09/24/2013 12:17 PM, Sven Barth wrote:

Am 24.09.2013 10:58, schrieb Nikolay Nikolov:

On 24.9.2013 г. 10:42, Michael Schnell wrote:


How does fpc for DOS handle TThread ?

Just curious...


When you try to create a thread, your program terminates and writes a 
message that threading is not supported. Things like threadvar work 
in the sense that they compile and work, but since you don't have 
threads, they behave just like regular vars. Underneath they still 
generate the extra bloat needed for threadvars (e.g. calls to 
FPC_THREADVAR_RELOCATE, which are probably stubs and do nothing in 
the rtl)
Maybe we should adjust the compiler that it treats threadvars really 
like normal vars if the target does not support threading...


Yes, that's a good idea and in fact I was planning to do it, since it'll 
save precious space in the i8086 small and tiny memory models (and 
perhaps the embedded targets also), but I still haven't done it, due to 
other things with higher priority.


Nikolay

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why development remains constant for msdos?

2013-09-23 Thread Nikolay Nikolov

On 22.9.2013 г. 14:59 ч., Florian Klämpfl wrote:

Am 22.09.2013 13:46, schrieb Junior:

Why development remains constant for msdos?

Because somebody wants to do so. No more, no less.
As the person working on the i8086-msdos port, here's the story how it 
all started: I wanted to learn how FPC code generators work by porting 
it to a new architecture, but I didn't have any computer in my home with 
a CPU that isn't supported already (well, except for 6502 :) ). So 
porting to a new architecture would require buying some exotic hardware 
from eBay (say, an Itanium or SPARC64) that'll likely be already 
obsolete in a few years anyway. And one day it occurred to me that I 
could try an i8086 port. It seemed perfect to me for the following reasons:


1) while, you may consider 16-bit x86 dead, it never really died in the 
sense that every modern x86 processor (including 64-bit ones) supports 
it in real mode. In fact, unless you have an UEFI system, 16-bit code is 
always executed at some point during the boot process, because that's 
how the BIOS boots the system - it loads the first sector from the hard 
disk at address h:7C00h and jumps to it in 16-bit real mode. In 
fact, modern machines are able to boot DOS and it works without issues. 
If it didn't, boot loaders of modern operating systems wouldn't work 
either. So, in 5 years, everybody will have a machine that is able to 
execute i8086 code (and thus, able to test and maintain the port), but 
that may not be the case for e.g. Itanium or SPARC64. Also, there are 
plenty of virtual machines available, where you can install DOS and test 
it. There's also DOSBox. In fact, you can run the FPC testsuite for 
i8086-msdos on any 32-bit or 64-bit linux _or_ windows via DOSBox.
2) I didn't need to learn an entirely new instruction set and OS API, 
since I'm already familiar with them, so I could focus only on the 
compiler itself.
3) There isn't a 16-bit x86 pascal compiler that is free/open source. 
Borland Pascal is proprietary and while you can download old versions 
for free from the Embarcadero museum site, the latest version available 
gratis is 5.5. You can't legally use 7.0, unless you bought it back then 
and even if you did, you don't have the sources to the compiler, so you 
can't fix bugs in it and improve it.
4) Since x86 compatibility goes all the way back to 16-bit, if FPC would 
support it could claim to be the first compiler which supports the full 
x86 range going all the way from 16-bit up to 64-bit. It's something 
unique and cool :)
OpenWatcom may be the only other compiler that is able to do it, since 
they haven't dropped 16-bit support and are supposedly working on 
64-bit, but their 64-bit port is still not ready AFAIK. And of course 
GCC and LLVM are extremely unlikely to do such a crazy thing as a 16-bit 
port. :)


It all started semi-seriously, I just wanted to see how difficult it 
would be to do the port, but I soon reached the point of no return, 
where I had almost got it working and I just had to keep working on it 
in order to get that next feature going, etc. And also, I'm having a lot 
of fun, while working on it. I also bought some vintage 16-bit machines 
from eBay for the extra fun and motivation :)


As for people still using DOS, there's still a community of people using 
it for fun or for nostalgia reasons. Check out:


http://www.bttr-software.de/forum/forum.php

There's also the FreeDOS project, which was already mentioned by another 
poster: http://www.freedos.org/


Also note that DOS has always been supported by FPC via the go32v2 dos 
extender (ok, it might have been go32v1 when fpc was started), but it 
has always been 32-bit and thus requiring at least a 386. Only the 
16-bit DOS support is new.


Nikolay

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Why development remains constant for msdos?

2013-09-23 Thread Nikolay Nikolov

On 09/23/2013 10:14 PM, Kostas Michalopoulos wrote:
On Mon, Sep 23, 2013 at 4:47 PM, Nikolay Nikolov nick...@gmail.com 
mailto:nick...@gmail.com wrote:


OpenWatcom may be the only other compiler that is able to do it,
since they haven't dropped 16-bit support and are supposedly
working on 64-bit, but their 64-bit port is still not ready AFAIK.


FWIW, there is an OpenWatcom fork which is under more active 
development than the main one and has 64bit support there: 
http://sourceforge.net/projects/openwatcom/. I haven't tried the 64bit 
support myself though.


Interesting. I didn't know about it. From the features list:

DOS version of tools now support long file names (LFN) if appropriate 
LFN driver is loaded by DOS


Maybe we could use their linker for our go32v2 hosted crosscompiler to 
i8086.


Nikolay
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Power Off/Restart a PC

2011-04-07 Thread Nikolay Nikolov

On 04/07/2011 04:08 PM, Fábio Henrique de Souza wrote:

Hi all,

How to power off and restart a computer with Lazarus?
(cross-platform or Windows and Linux)


For Windows, use the ExitWindowsEx function:

 http://msdn.microsoft.com/en-us/library/aa376868%28v=vs.85%29.aspx
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Is it possible to create a loop

2010-10-04 Thread Nikolay Nikolov

 On 10/03/2010 09:01 PM, Bizugo wrote:

 Is possible to create a loop using a code like this one:

for var J: integer = X to Y do {...}

No, but if you're using Lazarus and want to save typing, you can write:

for I := 1 to 10 do

and then press Ctrl+Shift+C and it will automatically add I: Integer to 
your local variable list, so you can write it just as fast, and most 
importantly, without the need to move the cursor back to the variable list.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IOI: Lazarus and Free Pascal

2009-08-23 Thread Nikolay Nikolov
Saw that it was posted in latest news on the free pascal site. :) Just 
noticed a small typo - his name should be Henadzi - with a 'z'.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IOI: Lazarus and Free Pascal

2009-08-16 Thread Nikolay Nikolov

On 08/16/2009 08:12 PM, Den Jean wrote:

Hi,

International Olympiad in Informatics
allows only c++ and free pascal.

Provided editors : ... lazarus ...

http://www.ioi2009.org/index.jsp;jsessionid=F84941DF0A0EE4138BC2E44BA6DBE5EB?ln=2id=361

   

I was on the Host Technical Committee:

http://www.ioi2009.org/index.jsp?id=408ln=2

where I helped with the Pascal support (install  configuration of fpc 
and lazarus on the contest linux distro, etc.). I also did a Pascal to C 
translation of one of the authors' solutions of one of the hardest tasks 
in order to help determine the time limits for the task, so that it is 
possible to score 100 points on the task with Pascal. Surprisingly, the 
Pascal program ran exactly as fast as the C program (the difference was 
really really minimal and it was slightly slower on some tests, but 
slightly faster on others).


And here's the kicker: the winner - Henadzi Karatkevich (who is only 
14-years old!!!) from Belarus used Pascal to solve the tasks!


http://news.slashdot.org/story/09/08/15/1523255/14-Year-Old-Wins-International-Programming-Contest?from=rss 




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus