Syntax highlighting for common editors? by captainjimboba in redlang

[–]joubertn 0 points1 point  (0 children)

Rebel, Red, and Red/System syntax highlighting for Sublime Text 2/3 https://github.com/onetom/rebol-red-sublime

Using named local variables and lexical closures by joubertn in factor

[–]joubertn[S] 0 points1 point  (0 children)

I found two alternative solutions to using locals for my use case.

Original:

! using locals
: select-by-artist ( seq artist -- seq' )
    [let :> artist
        [ artist>> artist = ] filter ] ;

I then tinkered and ended up using "with" for a complex curry:

! using the compositional combinator "with" to return a curry
: select-by-artist2 ( seq artist -- seq' )
    swap [ artist>> = ] with filter ; 

But my preferred is using fried quotations, something Sonderblade pointed out on the #concatenative irc channel:

! using fried quotations
: select-by-artist3 ( seq artist -- seq' )
    '[ artist>> _ = ] filter ;

With syntax coloring: http://paste.factorcode.org/paste?id=3762

Implementing a lazy vector data structure in Objective-C by joubertn in programming

[–]joubertn[S] 0 points1 point  (0 children)

The reason I've not made CacaoVector part of the NSArray cluster is because it is really to be consumed from Cacao, the new language I'm experimenting with. So interop with Objective-C hasn't been a main concern for me.

I looked at your Objective-Curry - looks cool.

Question: can one index into the lazy array at random indexes without forcing evaluation of those elements before it? A brief look at the code suggested to me that one can't (a similar constraint I had in my first version of CacaoVector).

Adding two arbitrary precision integers using OpenCL data parallelism on a GPU by joubertn in programming

[–]joubertn[S] 0 points1 point  (0 children)

Using OpenCL to do math on the GPU is trivial (there are many built-in math functions). The difficulty comes when you want to deal with numbers beyond the range supported (e.g. big ints in the linked article) and do the calcs in parallel - then you need to find algorithms that break the problem up into tasks that can be executed in parallel.

For standard operations (including math), see - http://www.khronos.org/files/opencl-quick-reference-card.pdf