• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[#Red] Red language group

Gregg
30-Mar-2013
[6802]
:-)
Kaj
30-Mar-2013
[6803x2]
For performance in the interpreter, better write remainder as a - 
(a / d * d)
However, all these simple number handling functions are better written 
as routines for performance
Gregg
30-Mar-2013
[6805x2]
Sure.Since 100'000 calls still seem instant, I'm OK with it for now. 
:-)
Baby steps.
Kaj
30-Mar-2013
[6807]
It sure is nice to develop in the interpreter and port to Red/System 
with minimal changes
Gregg
30-Mar-2013
[6808x2]
Agreed.
Also looking at what minimal behavior we need in the kernel to build 
on.
Kaj
30-Mar-2013
[6810]
You mean the operating system kernel?
Gregg
30-Mar-2013
[6811]
No, the Red/System kernel, sorry.
Kaj
30-Mar-2013
[6812]
Just checking. It's a relative notion
Gregg
30-Mar-2013
[6813]
Could just say "in Red/System" :-)
Gregg
31-Mar-2013
[6814]
In %boot.red, FOREACH says it only accepts a word, but it also seems 
to take a block of words just fine. Should block! be added to the 
word arg spec?
DocKimbel
1-Apr-2013
[6815x2]
Block!: yes.
Seems I broke something in the commit for the issue #455. All words 
are preset to unset instead of their value.
Gregg
1-Apr-2013
[6817]
value/header: TYPE_UNSET  ? ;-)
DocKimbel
1-Apr-2013
[6818x3]
That shouldn't be a problem because, it's on the symbol creation, 
before it gets a reference to a value...
The issue is the value slots in the global contexts now always return 
TYPE_UNSET...will track it in a few minutes.
It seems the issue is only when using the console.
Gregg
1-Apr-2013
[6821x2]
Interesting. How could that contaminate internals?
That is, I would expect a hard crash of some kind in that case.
DocKimbel
1-Apr-2013
[6823x2]
No idea for now, I'm looking into it...
Ok, got it, I've broken the internal word/load-in API....d'oh!
Gregg
1-Apr-2013
[6825]
Quick find. :-)
DocKimbel
1-Apr-2013
[6826]
Yep, but the fix is a bit longer.
Bo
3-Apr-2013
[6827x4]
Playing with Francois's OpenCV binding.  I get an error on Linux 
ARM when compiling his OpenCV camera test.  The error is:


./opencv-cam-test: symbol lookup error: ./opencv-cam-test: undefined 
symbol: atexit


I've looked through all the code for the OpenCV cam test, the OpenCV 
binding itself, related libraries and Red/System source and I can't 
find "atexit" anywhere.  Am I overlooking it?  Any ideas what code 
this message is coming from?
Sorry, the above error is not when compiling, but when trying to 
execute the compiled code on Arch Linux ARM.
Nevermind.  Windows search is a piece of garbage.  Wrote a Rebol 
search and found it right away in C-library.reds.
Seriously...how hard is it to write a search that actually works? 
 Microsoft has how many billions of dollars?
Kaj
3-Apr-2013
[6831]
Francois includes an old version of my C library binding. Newer versions 
use a different API on ARM to define on-quit
Bo
3-Apr-2013
[6832]
Yes, I had a copy of your newer C library binding.  I compared the 
relevant sections and added in the appropriate parts.  Now I have 
a different problem, possibly due to me not running a gui on my Raspberry 
Pi.  Don't know yet if OpenCV requires a GUI to operate or not.
Kaj
3-Apr-2013
[6833]
It would be better to update it wholesale. Using older versions will 
keep leading to already fixed problems like this. Updating parts 
can lead to inconsistency problems
Bo
3-Apr-2013
[6834x2]
undefined symbol: cvCreateCameraCapture


which is a component of highgui.reds, which I #include in my program.
Thanks for the advice.  I'll have to add in Francois's additions 
into yours.
Kaj
3-Apr-2013
[6836]
Did he change the C library binding?
Bo
3-Apr-2013
[6837]
Yes, he added a couple of items:

        ;added by F. Jouen
        ; is not a number? 
        isNaN: "isNaN" [
                value           [float!]
                return:		[logic!]   
        ]
        ;isinf - test for infinity
        isInf: "isInf" [
                value           [float!]
                return:		[integer!]
        ]
        ;// F. Jouen
Kaj
3-Apr-2013
[6838]
Hm, that's annoying. Working like this will quickly explode into 
extra work
Bo
3-Apr-2013
[6839]
Do you propose using github or something to host the Red/System bindings?
Kaj
3-Apr-2013
[6840]
It's already hosted in Fossil
Bo
3-Apr-2013
[6841]
Is there a how-to for Fossil?  I checked http://red.esperconsultancy.nl/Red-C-library/wiki
but don't see a how-to there.
Kaj
3-Apr-2013
[6842]
http://fossil-scm.org
Bo
3-Apr-2013
[6843]
Thanks.  I'll read it.
Kaj
3-Apr-2013
[6844]
Those two functions are BSD extensions. They can't be relied upon 
to be in all C libraries
Bo
3-Apr-2013
[6845]
So there should be an OS check there, right?
Kaj
3-Apr-2013
[6846]
You'd first have to know which platforms support them
Bo
3-Apr-2013
[6847]
OK.  So I successfully checked out your C-Library using Fossil.  
Thanks for the pointers!
AdrianS
3-Apr-2013
[6848]
Bo, wrt crappy built-in searching, I highly recommend the Everything 
search utility from voidtools. Best file search for Windows. Lightweight 
(no need for service), small, and quick. I've been using this for 
quite a while and I thought that development had unfortunately stalled, 
but, since the new year, it looks like it's being actively worked 
on again. I'm so happy! Yes, it is that nice!

http://www.voidtools.com
Bo
3-Apr-2013
[6849x2]
Kaj, I did a Google search on isNaN and cannot find a list of C libraries 
that don't support it (or that do).  Do you have any ideas on how 
to do this check?
AdrianS: Unfortunately, it won't work for me:

From their FAQ:
1.3 Does Everything search file contents?

No, "Everything" does not search file contents, only file and folder 
names.


I find that I search within file contents at least as much as for 
filenames.  It shouldn't be too hard to write a Rebol-based standalone 
exe that would do this.  I'll add it to my growing list of scripts 
to write.
AdrianS
3-Apr-2013
[6851]
I thought this might be an issue. For that, you should use my second, 
favourite search tool - grepWin, from Stefan's Tools.

http://tools.tortoisesvn.net/grepWin.html

Btw, we should take this to another group.