PowerBasic - will it recover or is the Air out?

Started by Theo Gottwald, December 06, 2012, 09:40:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Eros Olmi

#120
http://llvm.org/

IS DOWN  ;)

Yes I checked it in the past at the beginning of thinBasic adventure but it was a too complex way for me.

In any case do not forget (I'm joking) a nice compiler called ... http://www.freebasic.net/
It has almost all a Basic compiler would need to have (no 64bit support though)

thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB
  •  

Charles Pegge


I have just added an LLVM-friendly layer (an aspirational layer :) ). It is not the easiest thing to work with because it does not knpw about stacks, unlike JVM or CIL. Temporary variables have to be used instead.

Thanks Theo, I have your message.


Charles Pegge

Dual 32/64 bit compiling

Attached binaries (some virus checkers may not like them)


'Program Name Form2.bas
'#Compile Exe
'#Include "Win32api.inc"  'Equates, declares, types translated from Windows.h

%HWND_DESKTOP 0
%MK_LBUTTON   1
% Filename "t.exe"

'include "..\..\inc\RTL32.inc"
include "..\..\inc\RTL64.inc"
include "..\..\inc\minwin.inc"

'BOOL TextOut(
'  _In_  HDC hdc,
'  _In_  int nXStart,
'  _In_  int nYStart,
'  _In_  LPCTSTR lpString,
'  _In_  int cchString
');



macro trim(s)
ltrim(s)
end macro

macro lowrd(a)
a and 0xffff
end macro

macro hiwrd(a)
a >> 16 and 0xffff
end macro

macro codeptr(c)
@c
end macro

macro varptr(v)
@v
end macro

type tagMSG
  sys   hwnd
  int   message
  sys   wParam
  sys   lParam
  dword time
  POINT pt
end type

type TEXTMETRIC
  LONG  tmHeight;
  LONG  tmAscent;
  LONG  tmDescent;
  LONG  tmInternalLeading;
  LONG  tmExternalLeading;
  LONG  tmAveCharWidth;
  LONG  tmMaxCharWidth;
  LONG  tmWeight;
  LONG  tmOverhang;
  LONG  tmDigitizedAspectX;
  LONG  tmDigitizedAspectY;
  TCHAR tmFirstChar;
  TCHAR tmLastChar;
  TCHAR tmDefaultChar;
  TCHAR tmBreakChar;
  BYTE  tmItalic;
  BYTE  tmUnderlined;
  BYTE  tmStruckOut;
  BYTE  tmPitchAndFamily;
  BYTE  tmCharSet;
end type

'#recordof textmetric

Type WndEventArgs
  wParam  As sys
  lParam  As sys
  hWnd    As sys
  hInst   As sys
  wWidth  As sys
  wHeight As sys
  wX      As sys
  wY      As sys
  wCharHt As sys
  xPos    As sys
  yPos    As sys
  szText[128] as Asciiz '*128
End Type


Function fnWndProc_OnCreate(wea As WndEventArgs) As sys
  Local tm As TEXTMETRIC
  Local hDC As sys

  hDC=GetDC(wea.hWnd)
  Call GetTextMetrics(hDC,@tm)
  wea.wCharHt=tm.tmHeight
  'MsgBox("wea.wCharHt=" & Trim$(Str$(tm.tmHeight))) 'If using Console Compiler remark this
  'Print "wea.wCharHt=" & trim$(str$(tm.tmHeight))  'line out and use Print instead!
  Call ReleaseDC(wea.hWnd,hDC)
  'fnWndProc_OnCreate=0
  return 0
End Function


Function fnWndProc_OnMouseMove(wea As WndEventArgs) As sys
  wea.wX=LoWrd(wea.lParam) : wea.wY=HiWrd(wea.lParam)
  Call InvalidateRect(wea.hWnd,ByVal %NULL,%TRUE)
  'fnWndProc_OnMouseMove=0
  return 0
End Function


Function fnWndProc_OnSize(wea As WndEventArgs) As sys
  wea.wWidth=LoWrd(wea.lParam) : wea.wHeight=HiWrd(wea.lParam)
  Call InvalidateRect(wea.hWnd,ByVal %NULL,%TRUE)
 
  'fnWndProc_OnSize=0
  return 0
End Function


Function fnWndProc_OnChar(wea As WndEventArgs) As sys
  'wea.szText=wea.szText+Chr$(wea.wParam)
  wea.szText+=Chr$(wea.wParam and 0xff)
  Call InvalidateRect(wea.hWnd,ByVal %NULL,%TRUE)

  'fnWndProc_OnChar=0
  return 0
End Function


Function fnWndProc_OnLButtonDown(wea As WndEventArgs) As sys
  If wea.wParam=%MK_LBUTTON Then
     wea.xPos=LoWrd(wea.lParam) : wea.yPos=HiWrd(wea.lParam)
     Call InvalidateRect(wea.hWnd,ByVal 0,%TRUE)
  End If

  'fnWndProc_OnLButtonDown=0
  return 0
End Function


Function fnWndProc_OnPaint(wea As WndEventArgs) As sys
  Local szLine[48] As Asciiz '*48
  Local ps As PAINTSTRUCT
  Local hDC As sys
  hDC=BeginPaint(wea.hWnd,@ps)
  'szLine="MouseX="+Trim$(Str$(wea.wX)) & "  MouseY="+Trim$(Str$(wea.wY))
  szLine="MouseX="+Str$(wea.wX) & "  MouseY="+Str$(wea.wY)
  TextOut (hDC,0,0,strptr(szLine),Len(szLine))
  szLine="wea.wWidth="+Trim$(Str$(wea.wWidth)) & " wea.wHeight=" + Trim$(Str$(wea.wHeight))
  TextOut (hDC,0,16, strptr(szLine),Len(szLine))
  TextOut (hDC,0,32,strptr(wea.szText),Len(wea.szText))
  If wea.xPos<>0 And wea.yPos<>0 Then
     szLine="WM_LBUTTONDOWN At (" & Trim$(Str$(wea.xPos)) & "," & Trim$(Str$(wea.yPos)) & ")"
     TextOut (hDC,wea.xPos,wea.yPos,strptr(szLine),Len(szLine))
     wea.xPos=0 : wea.yPos=0
  End If
  EndPaint(wea.hWnd,@ps)

  'fnWndProc_OnPaint=0
  return 0
End Function


Function WndProc(ByVal hWnd As sys,ByVal wMsg As sys,ByVal wParam As sys,ByVal lParam As sys) As sys, callback
  Static wea As WndEventArgs

  Select Case As sys wMsg
    Case %WM_CREATE
      wea.hWnd=hWnd : wea.lParam=lParam : wea.wParam=wParam
      return fnWndProc_OnCreate(wea)
      'WndProc=fnWndProc_OnCreate(wea)
      'Exit Function
    Case %WM_MOUSEMOVE
      wea.hWnd=hWnd : wea.lParam=lParam : wea.wParam=wParam
      return fnWndProc_OnMouseMove(wea)
      'WndProc=fnWndProc_OnMouseMove(wea)
      'Exit Function
    Case %WM_SIZE
      wea.hWnd=hWnd : wea.lParam=lParam : wea.wParam=wParam
      return fnWndProc_OnSize(wea)
      'WndProc=fnWndProc_OnSize(wea)
      'Exit Function
    Case %WM_CHAR
      wea.hWnd=hWnd : wea.lParam=lParam : wea.wParam=wParam
      return fnWndProc_OnChar(wea)
      'WndProc=fnWndProc_OnChar(wea)
      'Exit Function
    Case %WM_LBUTTONDOWN
      wea.hWnd=hWnd : wea.lParam=lParam : wea.wParam=wParam
      return fnWndProc_OnLButtonDown(wea)
      'WndProc=fnWndProc_OnLButtonDown(wea)
      'Exit Function
    Case %WM_PAINT
      wea.hWnd=hWnd : wea.lParam=lParam : wea.wParam=wParam
      return fnWndProc_OnPaint(wea)
      'WndProc=fnWndProc_OnPaint(wea)
      'Exit Function
    Case %WM_DESTROY
      Call PostQuitMessage(0)
      return 0
      'WndProc=0
      'Exit Function
  End Select

  return DefWindowProc(hWnd,wMsg,wParam,lParam)
  'WndProc=DefWindowProc(hWnd,wMsg,wParam,lParam)
End Function


Function WinMain(ByVal hIns As sys, ByVal hPrevIns As sys, lpCmdLine as asciiz, ByVal iShow As sys) As sys
  Local szClassName[6] As Asciiz '*6
  Local wc As WndClassEx
  Local hMainWnd As sys
  Local Msg As tagMsg

  szClassName="Form1"
  wc.cbSize=SizeOf(wc)                               : wc.style=0
  wc.lpfnWndProc=CodePtr(WndProc)                    : wc.cbClsExtra=0
  wc.cbWndExtra=0                                    : wc.hInstance=hIns
  wc.hIcon=LoadIcon(%NULL,ByVal %IDI_APPLICATION)    : wc.hCursor=LoadCursor(%NULL,ByVal %IDC_ARROW)
  wc.hbrBackground=GetStockObject(%WHITE_BRUSH)      : wc.lpszMenuName=%NULL
  wc.lpszClassName=VarPtr(szClassName)               : wc.hIconSm=LoadIcon(%NULL,ByVal %IDI_APPLICATION)
  Call RegisterClassEx(@wc)
  hMainWnd=CreateWindowEx(0,szClassName,"Form1",%WS_OVERLAPPEDWINDOW,
  200,100,325,300,
  %HWND_DESKTOP,0,hIns,ByVal 0)
  Call ShowWindow(hMainWnd,iShow)

  While GetMessage(@Msg,%NULL,0,0)
    Call TranslateMessage(@Msg)
    Call DispatchMessage(@Msg)
  Wend
  return msg.wParam
  'WinMain=msg.wParam
End Function

char *c
@c=GetCommandline()
h=GetModuleHandle()
WinMain(h,0,c,SW_SHOWNORMAL)

' « Last Edit: September 12, 2007, 06:16:57 AM by Theo Gottwald »
'21:39 16/12/2012 cp

Christopher Boss

Definitely an over reaction here. PowerBasic is still in business and Bob set plans in motion just in this case. Not sure what the web site problems are, but I haven't had a problem accessing it at all for the last couple of days, but I am in the US. Much of the problems appear to be for those accessing the web site from outside the US so maybe the problem is with DNS servers adjusting with the server location change.

It is also the time of year here in the US when many companies shut down for a week or so or run with minimal staff. Not a big deal.

Give PowerBasic a little time before every one starts crying the "sky is falling" (from a well known childrens story).

For me, things are running as usual and not in panic mode.
  •  

Frederick J. Harris

I'm just a couple hundred miles north of Chris (one US state up) and the PB site has been up for me for several days without problems.
  •  

José Roca

Because the downs have happened while you were sleeping, but the Europeans were awake.
  •  

Theo Gottwald

#126
BED TIME !
17-12-12- 07.32 MEZ we are down again.

Maybe PowerBasic has a (electrical) Power failer?  ;D

Its not that we are not willing to give PB all chances they deserve.
As said we are looking for a Plan B, that is if Power fails.

PS: Soon is the 21. some people expect a power failure around that date ...

Chris Holbrook

Quote from: Christopher Boss on December 17, 2012, 01:56:59 AM
Definitely an over reaction here... Not a big deal.

Give PowerBasic a little time before every one starts crying the "sky is falling"...For me, things are running as usual and not in panic mode.
Chris, for you things may be great, but for people outside of your time zones things are not great. 

We all hope it will end happily, but the lack of effective communication by the company means that we are not entirely confident in that outcome.

Perhaps the PowerBASIC transition team lacks the rudimentary business skills to understand the importance for a supplier to manage their customer's expectations of service.  Do we really need to spell it out?




  •  

Theo Gottwald

#128
Quote from: Chris Holbrook on December 17, 2012, 08:25:14 AM
Perhaps the PowerBASIC transition team lacks the rudimentary business skills to understand the importance for a supplier to manage their customer's expectations of service.  Do we really need to spell it out?

Chris. I know you. I know that your personal bussines behavior is far from that, what we experience here.

Yet there is nothing wrong in checking for plan B.
Just talking with Charles about an PB-compatible x64 Compiler.
If i had to bet today who is faster out with something like that ...

Patrice Terrier

#129
QuoteBecause the downs have happened while you were sleeping, but the Europeans were awake.
What a bad signal for the rest of the world living outside of the US.

Christmas time or vacancy is not an excuse, especially for a company that has worldwide ambitions.

But perhaps we are just the victims of the "vapor staff" syndrom, that turns us all into the dark  :)

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com
  •  

Steve Hutchesson

Sad to say its stone dead here in OZ. Its been up and down over the last week or so so I guess they want the site to stay up but I have not heard any detail of why its suddenly turned unreliable.

Theo Gottwald

Steve, you are one ofthe very few persons, which I believe that could maintain the PB Compiler Code.
Talk to them, if i would hear that you are in the Boat my trust would go 1000% upwards.

Charles Pegge

#132
Quote
PS: Soon is the 21. some people expect a power failure around that date ...

For your seasonal entertainment, I am posting the choicest 2012 youtubes on the thinBasic open forum over the next few days. But nothing scary or depressing from the Survivalist genre.

http://www.thinbasic.com/community/showthread.php?11959-New-Galactic-Year-21-Dec-2012&p=87693#post87693

Steve Hutchesson

Theo,

I am flattered but it would not work, it would end up looking like MASM. Have no fear, there is some genuine talent in the dev team so as long as they get over this server problem, we will see more things over time.

Stan Duraham

QuoteChris Boss; Definitely an over reaction here.

I'm with CB on this.
They made some changes and took the rest of the year off.
Definitely the right thing for Vivian to do.

Moving the server didn't work out so well.

They'll be facing some tough decisions in the new year; Win64, Win8, ...

It doesn't hurt to consider plan B ... unless plan B is to write a new compiler.


  •