Page 3 of 3

Re: Loss of momentum?

Posted: Fri Jul 10, 2015 4:15 am
by idle
Fred wrote:I basically use any example I can find to make progress, but yes it's not straight forward. That said, the results are impressive as only one backend rules them all. I will try to find a way to keep inline ASM working, may be trought procedure compiled and linked in a separate way (so the procedure will need to be 100% ASM). I can't wait to see if there is any performance improvement on small code test :)
should be easy enough to do for whole procedures you have to define the function to llvm anyway and
you just add LLVMAddFunctionAttr(*functionPtr,#LLVMExternalLinkage) or whatever the equivalent is in the c++ api
then collect the asm procedures spit them out the old pipeline to handle the preambles and returns, assemble
and make a static lib before verifying the module and running the jit.

so inline asm procedures could have the use of procedurereturn

Code: Select all

Procedure QF(*haystack,len,*needle,lenN)
  !mov rax,[p.p_needle]
  !movzx rax,byte [rax+7] 
  !mov r12, 0x0101010101010101
  !imul r12, rax
  
  !mov r8,[p.p_haystack]
  !mov r9,[p.p_needle]
  
  !whilelen2:
  !cmp rcx, [p.v_len]
  !jge wend2
  ;...
  !jnz whilelen2
  !mov rax,rcx 
  ProcedureReturn 
  !wend2:
  ProcedureReturn -1
EndProcedure   
and an example llvm define functions in pb from the c api

Code: Select all

Procedure DefineFunction(*fn.FunctionProtos,Returntype.s="",bext=0,CallConvention=0,isVarArg=0)
  Protected paramcount,ct,FunctionReturnType,Function 
  
  If *fn\functionPtr  = 0 
  paramcount = ListSize(*fn\args())
  Dim paramType.i(paramcount+1)
  ForEach *fn\args()
    If Not  FindMapElement(types(),*fn\args()\type) 
      ty = LLVMGetTypeByName(llvmModule,*fn\args()\type)
      If ty 
        paramType(ct) = ty
      Else 
        error("undefined type" + *fn\args()\type)
      EndIf 
   Else    
      paramType(ct)=types(*fn\args()\type)\ptr 
   EndIf  
      ct+1
  Next   
  If Returntype <> ""
    *fn\ReturnType = Returntype
  EndIf 
  If paramcount
    FunctionReturnType = LLVMFunctionType(types(*fn\ReturnType)\ptr,@paramType(0),paramcount,isVarArg)
  Else 
    FunctionReturnType = LLVMFunctionType(types(*fn\ReturnType)\ptr,0,0,isVarArg)
   EndIf  
    
  *fn\functionPtr = LLVMAddFunction(llvmModule,*fn\name,FunctionReturnType)
  If bExt
    LLVMAddFunctionAttr(*fn\functionPtr,#LLVMExternalLinkage);
  EndIf   
  If CallConvention
     LLVMAddFunctionAttr(*fn\functionPtr,CallConvention);
  EndIf 
  ProcedureReturn *fn\functionPtr
  
  EndIf 
  
EndProcedure 

Re: Loss of momentum? Of course, not!

Posted: Sat Jul 11, 2015 3:28 pm
by HanPBF
Hello@all,

that are great news!
Releasing SpiderBasic was a big work and proved to be useful ...
...it often benefit in other side. ...
That's what my hope was: JS is really another way of programming things and it is the new "assembler" for the web:
https://github.com/jashkenas/coffeescri ... pile-to-js
(we are at the client's side -> so of course no speed like asm... in its best: half as slow as C)
And remember: JS is not JAVA or HTML with animations -> it's a relative of LISP; read macros for PB? sorry... ;-)
We expect it to be out for a beta in august and final in september.
Thanks a lot for this!
And still: I consider and respect PB team not generally giving any release dates, so if it's 10.2015 or 11.2015 or even 12.2015 -> great, too!

Just having you or Freak comment once a month or so has a calming effect on the herd.
No more is expected but really appreciated: just what main direction they will head to; and if they are in a healthy and financial good condition!!!


Have a great weekend!
Bon week-end!
Bonne fin de semaine!

Re: Loss of momentum?

Posted: Sat Jul 25, 2015 11:22 am
by graph100
That's nice, SpiderBasic is listed in the page you linked :
https://github.com/jashkenas/coffeescri ... o-js#basic

Re: Loss of momentum?

Posted: Sat Jul 25, 2015 3:43 pm
by HanPBF
Yes, JavaScript on its own is a little bit annoying...

http://cube-drone.com/comics/c/relentless-persistence

But, the best framework I know for JS is VanillaJS :wink:

One thing is really good these days: the best Hitchcock thriller is not nearly so exciting like waiting for the news from PB5.4 :)

Re: Loss of momentum?

Posted: Mon Jul 27, 2015 6:26 pm
by DoubleDutch
Can't wait for the new version (beta sometime within the next month or so...) :)

Re: Loss of momentum?

Posted: Thu Jul 30, 2015 4:37 pm
by Julian
Great job today guys, lots of public facing fixes ticked off the list.

Keep up the great work :)

Re: Loss of momentum?

Posted: Tue Aug 04, 2015 7:49 pm
by RichAlgeni
Momentum is no longer lost. It has been found, its butt has been kicked, its name taken, then its butt kicked again!

Thanks Fred, Freak & Crew!

Re: Loss of momentum?

Posted: Wed Aug 05, 2015 11:47 am
by Dude
RichAlgeni wrote:Momentum is no longer lost.
It was never lost in the first place.

Re: Loss of momentum?

Posted: Wed Aug 05, 2015 2:09 pm
by davido
Dude wrote: It was never lost in the first place.
I wholeheartedly agree.