News for hackers. Stuff that matters.
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by lovelearning on Sunday December 27, 2015 @12:56PM (#10798164)
All the GPGPU projects on the Pi seem to be centered around low level assembly language for the Videocore. Are there any technical reasons why there are no higher level C/C++ abstractions?
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by david-given on Sunday December 27, 2015 @02:58PM (#10798546)
Shader units --- e.g. the VideoCore's QPUs, which this project is targeting --- are very very weird. Compiling C into them basically isn't possible. They don't really do memory accesses, for example.

The VideoCore's own processor, commonly referred to as the VPU or just the VC4, is a perfectly normal architecture with its own vector unit and DSP addons. C can compile into that perfectly easily, and the real-time OS that runs on it alongside Linux is written in it, but there aren't any adequate open source C compilers yet.

More info on the QPU here:

https://github.com/hermanhermitage/videocoreiv-qpu

Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by SeanDav on Sunday December 27, 2015 @03:01PM (#10798560)
Disclaimer: I know nothing about the issues, but would using C with inline assembly gain anything?
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by belleandsebasti on Sunday December 27, 2015 @05:05PM (#10798926)
No. Inline assembly is a static construct targeting the same compute unit as the C code during compile-time.

What is needed is "runtime inline assembly" which assembles inline assembly for a different target architecture at runtime.

This is essentially what shader programs are and you don't need special syntax to support it. Just store your shader program in a char* and bundle an assembler/compiler with your host program.

Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by sklogic on Sunday December 27, 2015 @02:03PM (#10798358)
Although VC4 is capable enough to run simple GLSL shaders, it is not possible to compile a generic C (or OpenCL) code efficiently.
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by infamouscow on Sunday December 27, 2015 @01:11PM (#10798210)
I think C/C++ programmers are more pragmatic than the typical Python/Ruby programmer in that their highest priority is the program works (typically performance is important). If the code is nice that's just a bonus.
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by ianamartin on Sunday December 27, 2015 @05:05PM (#10798925)
I probably shouldn't bother replying to this. But I am curious about what leads a person to paint with such broad strokes.

I've intentionally chosen a job that is mostly Python. Because while I am aware that it has some flaws or trade offs or whatever you want to call them, it's a language that -- first and foremost -- allows me to write programs that work.

The fact that I find the language aesthetically pleasing is a bonus. When I run into situations where Python isn't good enough, then I drop down into C and do things there.

I'm new enough at being a developer that I'm willing to understand that there are things I may be missing out on coming from a self-taught background that started with SQL and then moved to C# and eventually Python, and then sometimes C when needed.

I'm also open to the idea that a person's language of choice indicates something about their personality characteristics in the same way that you can guess a little about a person based on which instrument they play in an orchestra or a band.

But is there really anything you can say about what I'm reading in your comment as 'rigor' based on that?

Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by belleandsebasti on Sunday December 27, 2015 @05:08PM (#10798932)
The same could be said for Python/Ruby programmers.

Pragmatism and nice code are not at odds with each other. Quite the opposite, they are often in agreement with each other.

Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by mastazi on Monday December 28, 2015 @01:45AM (#10800204)
In the requirements it says Python 2.7, does it mean 2.7.x (hence no python 3 support) or "2.7 or newer" (hence with python 3 support)?
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by aexaey on Tuesday December 29, 2015 @04:56PM (#10809352)
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by mastazi on Wednesday December 30, 2015 @04:30AM (#10811416)
Oh that's very cool, thanks for the clarification!
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by superfunc on Sunday December 27, 2015 @01:06PM (#10798194)
Cool project. Small rant; can we please stop titling our libraries with the language extension as a portion?
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by jondlove on Sunday December 27, 2015 @02:25PM (#10798419)
I like it (for otherwise generic names); it quickly shows which language the library is for, reduces name collisions, and makes Googling easier.
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by superfunc on Sunday December 27, 2015 @02:28PM (#10798424)
That's fair, but I feel like most languages have searchable package repositories, and I'd be searching in one of those, eliminating the need for such naming.
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by icebraining on Sunday December 27, 2015 @04:58PM (#10798914)
Package repositories are useful to download the libraries; not so much if you're looking for discussions regarding them.
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by nikolay on Monday December 28, 2015 @12:48PM (#10802289)
I can hande the "py" prefix or suffix (hopefully lower-cased though), but the dash is too much!
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by jMyles on Sunday December 27, 2015 @02:03PM (#10798356)
How come?
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by frankling_ on Sunday December 27, 2015 @01:48PM (#10798303)
Who's "we"?
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by superfunc on Sunday December 27, 2015 @02:18PM (#10798397)
I tend to see it a lot in python, go and rust as of late.
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by pekk on Sunday December 27, 2015 @02:31PM (#10798441)
It is largely because the package namespace is polluted, so the name you want is never available.
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by wolfgke on Sunday December 27, 2015 @01:51PM (#10798316)
The Hacker News Community?
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi by belleandsebasti on Sunday December 27, 2015 @05:10PM (#10798939)
This is part of Python culture.

That's like me saying "can we stop choosing HN usernames that contain programming references?"