Curv Snappy package

38 views
Skip to first unread message

Ivo Cavalcante

unread,
Aug 9, 2019, 11:37:16 AM8/9/19
to Curv
Hi all,

I'm working on a Snap package for Curv - it's ready, to be honest, just not publicly available - and would like your opinions/help in some points.

1. What do you think about it, should I publish?
2. If "yes", does Curv have an icon I could use?
3. Most important: I need testers, don't know if it'll work on other hardware - I've an laptop with discrete AMD graphics, but using Mesa drivers; need to test on NVIDIA.



Regards,
Ivo

Doug Moen

unread,
Aug 9, 2019, 1:33:01 PM8/9/19
to Curv
This is very cool. Here is my reaction.

The snap package should use source from the latest tagged release, not whatever code is currently in the master branch.

The recipe for building the snap package should be part of the build system. Eg, "make snap" builds the snap package, and the dependencies for "make snap" are in BUILD.md.

The snap package binary file should be downloadable from the github project, in the release section.

I don't have an icon. Maybe we can get suggestions on the curve mailing list.

I can test nvidia and Intel graphics but not AMD. We could ask for testers on the mailing list.

I don't use snap, so what about updates to the snap for subsequent release? There may be some mechanics I don't know yet. And do you want to be responsible for updating the snap for any future release?
--
You received this message because you are subscribed to the Google Groups "Curv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to curv+uns...@googlegroups.com.

Torleif Ceder

unread,
Aug 9, 2019, 1:41:58 PM8/9/19
to Curv
I think the Shrek Doug nut would make a great icon.
Perhaps a version with a little less fidelity, suited for an icon. 
And a colour scheme that stand out in the small format.
The shape capture both the 3d and programmatic character of  Curv.  

Ivo Cavalcante

unread,
Aug 9, 2019, 8:17:46 PM8/9/19
to Curv


On Friday, August 9, 2019 at 2:33:01 PM UTC-3, Doug Moen wrote:
This is very cool. Here is my reaction.

The snap package should use source from the latest tagged release, not whatever code is currently in the master branch.

Agreed. I've done it this way, based it on 0.4 tag.
 

The recipe for building the snap package should be part of the build system. Eg, "make snap" builds the snap package, and the dependencies for "make snap" are in BUILD.md.

Package is based on BUILD.md . Not sure how to integrate it on build system, but I think there's a way to update every new version into Snapcraft. I'll look into it.
 

The snap package binary file should be downloadable from the github project, in the release section.

I believe it can be done, but that's not the usual way Snap packages are used. The "right way" (TM) is having it uploaded to snapcraft.io , so people could install using "snap install curv", for example. 


I don't have an icon. Maybe we can get suggestions on the curve mailing list.

Waiting for it! Not really a designer...    :-)

 
I can test nvidia and Intel graphics but not AMD. We could ask for testers on the mailing list.

I tested Intel too, since my laptop has dual graphics. I had the opportunity to test on an old NVIDIA today, and it worked; need more tests, though. Can't test AMD close drivers, since my board isn't compatible.


I don't use snap, so what about updates to the snap for subsequent release? There may be some mechanics I don't know yet. And do you want to be responsible for updating the snap for any future release?

Not really "want to be", I just thought it'd would be nice having a Snap package. My real intent, to be honest, was having it upstreamed (that means your base code), so it could be integrated on the development process; I just wanted to try it out and, maybe, give a kickstart. If it works - and you're not interested in having it merged - I intent to keep the package updated, since I'm always checking the repository and use Curv quite often. But really, if it works, maybe you should consider having it upstream.


By now, I just have the name "Curv" reserved on Snapcraft store (which I'll gladly hand, if you decide to manage Snapcraft) and uploaded first release. I changed the privacy to "unlisted", which mean that it won't appear on a search, but can still be installed using "sudo snap install curv". Try it, if you want.



Regards,
Ivo
 


On Fri, Aug 9, 2019, at 11:37 AM, Ivo Cavalcante wrote:
Hi all,

I'm working on a Snap package for Curv - it's ready, to be honest, just not publicly available - and would like your opinions/help in some points.

1. What do you think about it, should I publish?
2. If "yes", does Curv have an icon I could use?
3. Most important: I need testers, don't know if it'll work on other hardware - I've an laptop with discrete AMD graphics, but using Mesa drivers; need to test on NVIDIA.



Regards,
Ivo


--
You received this message because you are subscribed to the Google Groups "Curv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cu...@googlegroups.com.

Chris Bruner

unread,
Aug 9, 2019, 8:20:32 PM8/9/19
to cu...@googlegroups.com
+1 for Shrek Doug nut!
--
You received this message because you are subscribed to the Google Groups "Curv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to curv+uns...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/curv/a6919c46-c298-41c2-aef1-a7344ed04368%40googlegroups.com.


Ivo Cavalcante

unread,
Aug 9, 2019, 8:21:31 PM8/9/19
to Curv
I think Shrek Donut is too detailed for such a small picture, like an icon, but the colored Torus would fit well. What do you think?


Ivo

Garreau, Alexandre

unread,
Aug 10, 2019, 10:53:27 AM8/10/19
to Ivo Cavalcante, Curv
Why not the shrek donut as an icon? As full of curvs, highly
mathematic, and pretty trivial to make using curv, it looks for me
a good candidate for representing Curv.

Furthermore, it always have been at the beginning of its README
presentation page.

Maybe it would be more beautiful to colorize it like a rainbow
just like the torsioned torus that displays along in this
aforementioned page.

Maybe it could be captured with the same angle, so it would be
more recognizable, but less easy to distinguish in small sizes (it
is really full of details), or from the top, so it looks like a
circle, so it’s pretty simple, beautiful, and easily recognizable.

An alternative would be to directly use that colored tortioned
torus presented along. Either in the current view angle (it could
be still difficult to recognize in a very small size, but at least
less than the shrek donut), either from the top, so it’s a circle,
just the same as the other figure.

Ivo Cavalcante

unread,
Aug 11, 2019, 12:47:40 PM8/11/19
to Curv
As requested, info from snapped "curv --version" on my machine (dual graphics Intel/AMD):

Curv: 0.4
Compiler: gcc 7.4.0
Kernel: Linux 5.0.0-23-generic x86_64
GPU: Intel Open Source Technology Center, Mesa DRI Intel(R) Ivybridge Mobile
OpenGL: 3.0 Mesa 19.0.2


Curv: 0.4
Compiler: gcc 7.4.0
Kernel: Linux 5.0.0-23-generic x86_64
GPU: X.Org, AMD VERDE (DRM 2.50.0, 5.0.0-23-generic, LLVM 8.0.0)
OpenGL: 4.5 (Compatibility Profile) Mesa 19.0.2


I tested all exemple files, and found most worked fine. Had some problem on the ones listed bellow, but didn't dig into it to see what could be the cause.

./picker/lollipop.curv (compilation error)
./assert.curv (no output, just a green window)
./mesh_only/heart.curv (no output, just a black window)
./mesh_only/klein.curv (no output, just a black window)
./tests/2D_array.curv (no output, just a green window)


Some of these might be by design, have to check the code. Tested on both Intel and AMD, same results.



Ivo

Doug Moen

unread,
Aug 11, 2019, 5:58:11 PM8/11/19
to Curv
Thanks, Ivo. I've updated the Curv repository to indicate that the AMD GPU / Mesa driver combination works for Mesa 19.x and later. (AMD + Mesa 18.x has a bug that affects Curv.)
--
You received this message because you are subscribed to the Google Groups "Curv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to curv+uns...@googlegroups.com.

Ivo Cavalcante

unread,
Aug 14, 2019, 11:38:28 PM8/14/19
to Curv
Hi all,

Curv is now live on Snap store:  https://snapcraft.io/curv

Icon and example images are still temporary, while we agree on something here; I plan on updating images, at least, this weekend.



Doug,

I've discovered how to integrate GitHub and Snapcraft, in order to accomplish auto build. Didn't like it much, though. On weekend I'll try to write some instructions on how to do it (and also, upload manually), so you can do it by yourself, if you want. As I said, I'm available to keep it updated, but I think it's better if released by "the man himself"   :-)



Ivo

Doug Moen

unread,
Aug 15, 2019, 8:03:32 AM8/15/19
to Curv
I still haven't had an opportunity to access my Linux machine, due to travel, so I haven't tested this yet. I'll provide feedback during the weekend. I'm concerned that the sand boxing in snap could break things, but we will see.

On Wed, Aug 14, 2019, at 11:38 PM, Ivo Cavalcante wrote:
Hi all,

Curv is now live on Snap store:  https://snapcraft.io/curv

Icon and example images are still temporary, while we agree on something here; I plan on updating images, at least, this weekend.



Doug,

I've discovered how to integrate GitHub and Snapcraft, in order to accomplish auto build. Didn't like it much, though. On weekend I'll try to write some instructions on how to do it (and also, upload manually), so you can do it by yourself, if you want. As I said, I'm available to keep it updated, but I think it's better if released by "the man himself"   :-)



Ivo

On Friday, August 9, 2019 at 12:37:16 PM UTC-3, Ivo Cavalcante wrote:
Hi all,

I'm working on a Snap package for Curv - it's ready, to be honest, just not publicly available - and would like your opinions/help in some points.

1. What do you think about it, should I publish?
2. If "yes", does Curv have an icon I could use?
3. Most important: I need testers, don't know if it'll work on other hardware - I've an laptop with discrete AMD graphics, but using Mesa drivers; need to test on NVIDIA.



Regards,
Ivo


--
You received this message because you are subscribed to the Google Groups "Curv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to curv+uns...@googlegroups.com.

Doug Moen

unread,
Aug 17, 2019, 3:41:39 PM8/17/19
to Curv
The first thing to note is that by default, snap uses "strict confinement", which means that Curv can't open files or access the GPU. However, there is a "--classic" mode which allows Curv to open files.

The second thing to note is that the version of Curv on the snap store has strict confinement, which cannot be altered:

lux 2767 $ sudo snap install --classic curv
Warning: flag --classic ignored for strictly confined snap curv
curv 0.4 from Ivo Cavalcante installed

With this version of curv, not much works.

Arithmetic works:

$ /snap/bin/curv -x 2+2
4

But you can't open a file, or render something graphically.

$ /snap/bin/curv orbit.curv
ERROR: "orbit.curv": No such file or directory

$ /snap/bin/curv -x cube
3D shape 2×2×2
GLFW error 0x10007: GLX: Failed to create context: GLXBadFBConfig
ABORT: GLFW create window failed

Doug Moen.

Ivo Cavalcante

unread,
Aug 17, 2019, 7:13:05 PM8/17/19
to Curv
Hi Doug,

Thanks for testing. That's strange, could you please issue "snap connections curv" and post the result?

I've gone for strict confinement 'cause thought it was enough. You should have no problems accessing any files on your home dir (I'm not having on my laptop).

As for GPU, it uses the OpenGL slot, which should allow for using it. What's the output of "curv --version" ?


Ivo
To unsubscribe from this group and stop receiving emails from it, send an email to cu...@googlegroups.com.


--
You received this message because you are subscribed to the Google Groups "Curv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cu...@googlegroups.com.

Doug Moen

unread,
Aug 17, 2019, 8:34:07 PM8/17/19
to Curv
$ snap connections curv
Interface       Plug                 Slot             Notes
desktop         curv:desktop         :desktop         -
desktop-legacy  curv:desktop-legacy  :desktop-legacy  -
home            curv:home            :home            -
opengl          curv:opengl          :opengl          -
x11             curv:x11             :x11             -

I just tested accessing files in my home directory, and that works. However, I don't keep any curv source code in my home directory, it's all on a separate ZFS volume. So strict confinement is no good for me.

$ curv --version
Curv: 0.4-209-ga7c07d1-dirty
Compiler: gcc 5.4.0 20160609
Kernel: Linux 4.4.0-137-generic x86_64
GPU: Intel Open Source Technology Center, Mesa DRI Intel(R) Ivybridge Desktop
OpenGL: 3.0 Mesa 18.0.5

$ /snap/bin/curv --version
Curv: 0.4
Compiler: gcc 7.4.0
Kernel: Linux 4.4.0-137-generic x86_64
GPU: Intel Open Source Technology Center, Mesa DRI Intel(R) Ivybridge Desktop
OpenGL: 1.4 (3.0 Mesa 18.0.5)

Note that the snap version of Curv is reporting OpenGL 1.4. For rendering, Curv 0.4 attempts to create an OpenGL context with a version 3.3 core profile, and it is this specific configuration that is failing on my system. `curv --version` also creates an OpenGL context, but it doesn't specify a version, and that is succeeding.

Some more information about GPU access by snap programs. OpenSCAD has a snap module, but they recommend that people do not use it, because of "known display issues". The OpenSCAD snap doesn't work on my machine -- it opens a window, but the window stays black. OpenSCAD also distributes an AppImage, and this is the format that they recommend that people use on Linux machines. The OpenSCAD AppImage works fine on my machine.

Doug Moen.
To unsubscribe from this group and stop receiving emails from it, send an email to curv+uns...@googlegroups.com.

Doug Moen

unread,
Aug 18, 2019, 9:19:50 AM8/18/19
to Curv
I would like to continue this discussion about technical problems with the Snappy package on Github, so that people visiting the Curv github repository can see the discussion.

Reply all
Reply to author
Forward
0 new messages