Discussion:
How to get started in guile & programming generally
(too old to reply)
Joshua Branson
2018-08-25 17:16:25 UTC
Permalink
Hello,

I'm a recent college grad, and I'm trying to get into programming. I
figured I'd learn a little bit of C, so that I can play with guile and
C.

I suppose that I'm a visual learner, and that probably helped me learn
how to make websites. Is there a programming resource for
userspace/kernel software as good as w3schools.com?

Thanks,

Joshua
Amirouche Boubekki
2018-08-25 19:01:19 UTC
Permalink
Post by Joshua Branson
Hello,
Hello and welcome Joshua
Post by Joshua Branson
I'm a recent college grad, and I'm trying to get into programming. I
figured I'd learn a little bit of C, so that I can play with guile and
C.
You can play with Guile without much C knowledge and I dare to say that
you
need little of C with things like guile-bytestructures or nyacc's
ffi-helper
to use the full power of GNU Guile.

And to add to that, the trend in the VM is to reduce the count of C
lines of code.
Post by Joshua Branson
I suppose that I'm a visual learner,
You can try [0][1]

[0] https://libfive.com/studio/
[1] https://dthompson.us/projects/chickadee.html
Post by Joshua Branson
and that probably helped me learn
how to make websites.
Well, then I would recommend you look at cuirass project just over the
rainbow in guix land [2][3]

[2] https://git.savannah.gnu.org/cgit/guix/guix-cuirass.git/
[3] http://berlin.guixsd.org/

I have projects of my own but they are not easy to get started.

Have look at this project https://github.com/a-guile-mind/azul.scm it's
project of mine
it's small, it implements a minimal terminal based editor.
Post by Joshua Branson
Is there a programming resource for
userspace/kernel software
what do you mean by kernel software?
Post by Joshua Branson
as good as w3schools.com?
You might not be aware that w3schools has a bad reputation of being
"loosy". That said I find it
convenient as quick and dirty reference. I recommend to check mozilla
developer network aka. mdn
when it comes to web stuff.


What do you want to make?
Post by Joshua Branson
Thanks,
Joshua
--
Amirouche ~ amz3 ~ http://www.hyperdev.fr
Pierre Neidhardt
2018-08-25 20:10:12 UTC
Permalink
Post by Amirouche Boubekki
[0] https://libfive.com/studio/
Wow, this looks awesome!
Is there a Guix package for the studio? :)
--
Pierre Neidhardt
https://ambrevar.xyz/
Matt Wette
2018-08-25 20:35:08 UTC
Permalink
Post by Pierre Neidhardt
Post by Amirouche Boubekki
[0] https://libfive.com/studio/
Wow, this looks awesome!
Is there a Guix package for the studio? :)
yea that looks really awesome -- thanks for the pointer
Ludovic Courtès
2018-08-27 12:39:20 UTC
Permalink
Post by Pierre Neidhardt
Post by Amirouche Boubekki
[0] https://libfive.com/studio/
Wow, this looks awesome!
Is there a Guix package for the studio? :)
To get started:

guix environment --ad-hoc libfive -- Studio

:-)

Really great package, indeed!

Ludo’.
Thompson, David
2018-08-27 13:15:08 UTC
Permalink
Post by Ludovic Courtès
Post by Pierre Neidhardt
Post by Amirouche Boubekki
[0] https://libfive.com/studio/
Wow, this looks awesome!
Is there a Guix package for the studio? :)
guix environment --ad-hoc libfive -- Studio
:-)
Really great package, indeed!
Agreed! I tried it out last weekend and it was a lot of fun once you
figured out a few of the basic primitives. And thanks to Guix I
didn't have to compile it myself! ;)

- Dave
Joshua Branson
2018-08-26 18:16:22 UTC
Permalink
You can play with Guile without much C knowledge and I dare to say that you
need little of C with things like guile-bytestructures or nyacc's ffi-helper
to use the full power of GNU Guile.
Can you elaborate on guile-bytestructures and nyacc's ffi-helper? Is
that a recommended/portable way to use guile to call C functions?
And to add to that, the trend in the VM is to reduce the count of C lines of code.
Post by Joshua Branson
I suppose that I'm a visual learner,
You can try [0][1]
[0] https://libfive.com/studio/
[1] https://dthompson.us/projects/chickadee.html
I've heard about chickadee! I've tried to install it before, but I
haven't been successful yet. Perhaps I'll have to try again.
Post by Joshua Branson
and that probably helped me learn
how to make websites.
Well, then I would recommend you look at cuirass project just over the rainbow in guix land [2][3]
[2] https://git.savannah.gnu.org/cgit/guix/guix-cuirass.git/
[3] http://berlin.guixsd.org/
Hmmm. That would be pretty cool to play with. I suppose I could try.
I have projects of my own but they are not easy to get started.
Have look at this project https://github.com/a-guile-mind/azul.scm it's project of mine
it's small, it implements a minimal terminal based editor.
That's cool!
Post by Joshua Branson
Is there a programming resource for
userspace/kernel software
what do you mean by kernel software?
My short term goal right now is to be able to write GNU/Hurd translators
in guile. My long term goal is to be a GNU/Hurd developer.
Post by Joshua Branson
as good as w3schools.com?
You might not be aware that w3schools has a bad reputation of being "loosy". That said I find it
convenient as quick and dirty reference. I recommend to check mozilla developer network aka. mdn
when it comes to web stuff.
What do you mean by "loosy?"
What do you want to make?
It would be cool to help work on an official GNU distro, using a kernel
that is NOT linux. Linux is cool and good, but I'm not a fan of its monolithic nature.
Post by Joshua Branson
Thanks,
Joshua
Pierre Neidhardt
2018-08-26 19:12:05 UTC
Permalink
Post by Joshua Branson
I've heard about chickadee! I've tried to install it before, but I
haven't been successful yet. Perhaps I'll have to try again.
What's the issue? Please post a backtrace.
I can chickadee flawlessly here, maybe I can help.

And by the way, chickadee is an awesome piece of software: it is such a
refreshing video game programming experience.
--
Pierre Neidhardt
https://ambrevar.xyz/
Thompson, David
2018-08-27 13:30:42 UTC
Permalink
Post by Pierre Neidhardt
Post by Joshua Branson
I've heard about chickadee! I've tried to install it before, but I
haven't been successful yet. Perhaps I'll have to try again.
What's the issue? Please post a backtrace.
I can chickadee flawlessly here, maybe I can help.
I can also try to help. I should make a new release with all the
latest code, maybe the experience will be better since some things
were tweaked that were causing problems on certain computers. (There's
API breakage, though, be warned!)
Post by Pierre Neidhardt
And by the way, chickadee is an awesome piece of software: it is such a
refreshing video game programming experience.
That's good to hear! BTW, I am currently working on a small game
engine built on top of Chickadee. My intent with Chickadee was to
give people all of the building blocks to make games with Guile, but
without strapping them to an opinionated engine. So, Starling is going
to be one of those opinionated engines! The core abstractions are
inspired by Godot and Python's Cocos2D which I used many years ago;
it's 2D only for the time being; it uses GOOPS heavily (this may or
may not sound good to you!); and it has a built-in developer mode that
provides a REPL server, game loop error debugger, and live asset
reloading (for images, sounds, all that non-code stuff). Stay tuned!

- Dave
Arne Babenhauserheide
2018-08-27 20:42:15 UTC
Permalink
Post by Thompson, David
without strapping them to an opinionated engine. So, Starling is going
to be one of those opinionated engines! The core abstractions are
inspired by Godot and Python's Cocos2D which I used many years ago;
it's 2D only for the time being; it uses GOOPS heavily (this may or
may not sound good to you!); and it has a built-in developer mode that
provides a REPL server, game loop error debugger, and live asset
reloading (for images, sounds, all that non-code stuff). Stay tuned!
Woah — I’m hooked!

- Arne
Joshua Branson
2018-08-29 21:21:11 UTC
Permalink
Post by Thompson, David
Post by Pierre Neidhardt
Post by Joshua Branson
I've heard about chickadee! I've tried to install it before, but I
haven't been successful yet. Perhaps I'll have to try again.
What's the issue? Please post a backtrace.
I can chickadee flawlessly here, maybe I can help.
I can also try to help. I should make a new release with all the
latest code, maybe the experience will be better since some things
were tweaked that were causing problems on certain computers. (There's
API breakage, though, be warned!)
Post by Pierre Neidhardt
And by the way, chickadee is an awesome piece of software: it is such a
refreshing video game programming experience.
That's good to hear! BTW, I am currently working on a small game
engine built on top of Chickadee. My intent with Chickadee was to
give people all of the building blocks to make games with Guile, but
without strapping them to an opinionated engine. So, Starling is going
to be one of those opinionated engines! The core abstractions are
inspired by Godot and Python's Cocos2D which I used many years ago;
it's 2D only for the time being; it uses GOOPS heavily (this may or
may not sound good to you!); and it has a built-in developer mode that
provides a REPL server, game loop error debugger, and live asset
reloading (for images, sounds, all that non-code stuff). Stay tuned!
+1
Post by Thompson, David
- Dave
Joshua Branson
2018-08-29 21:20:17 UTC
Permalink
Post by Pierre Neidhardt
Post by Joshua Branson
I've heard about chickadee! I've tried to install it before, but I
haven't been successful yet. Perhaps I'll have to try again.
What's the issue? Please post a backtrace.
I can chickadee flawlessly here, maybe I can help.
Well, I don't have guix installed at the moment. I've tried to install
guix as the main OS several times and I keep failing. I suppose I
shouldn't blame myself too much. I mean, I did try to get it to work.

I've also tried installing guix on my Parabola machine. Also I never
seem to be able to get it to work well either. Anyway, I've installed
guile now. I just downloaded chickadee 2.0 tarball. I got this error:

configure: error: required guile module not found: (gl)

I looked, and unfortunately parabola doesn't seem to have guile-gl
packaged. :( I could probably go do an internet search and figure out
how to install a guile module, but it's not on the highest of my list of
priorities now. I'll get to it someday soon.

I'm sorry if this email has a defeatist attitude. :(
Post by Pierre Neidhardt
And by the way, chickadee is an awesome piece of software: it is such a
refreshing video game programming experience.
Amirouche Boubekki
2018-08-29 21:27:03 UTC
Permalink
Using guix on my Ubuntu I successfully installed chickadee master.

Try to install guix again and report the error you have please :]
Post by Joshua Branson
Post by Pierre Neidhardt
Post by Joshua Branson
I've heard about chickadee! I've tried to install it before, but I
haven't been successful yet. Perhaps I'll have to try again.
What's the issue? Please post a backtrace.
I can chickadee flawlessly here, maybe I can help.
Well, I don't have guix installed at the moment. I've tried to install
guix as the main OS several times and I keep failing. I suppose I
shouldn't blame myself too much. I mean, I did try to get it to work.
I've also tried installing guix on my Parabola machine. Also I never
seem to be able to get it to work well either. Anyway, I've installed
configure: error: required guile module not found: (gl)
I looked, and unfortunately parabola doesn't seem to have guile-gl
packaged. :( I could probably go do an internet search and figure out
how to install a guile module, but it's not on the highest of my list of
priorities now. I'll get to it someday soon.
I'm sorry if this email has a defeatist attitude. :(
Post by Pierre Neidhardt
And by the way, chickadee is an awesome piece of software: it is such a
refreshing video game programming experience.
Joshua Branson
2018-08-30 13:11:26 UTC
Permalink
Post by Amirouche Boubekki
Using guix on my Ubuntu I successfully installed chickadee master.
Try to install guix again and report the error you have please :]
I will eventually. Today I won't have any time to do that (or I'd
rather go be social this morning than to try to install guix again). I
guess my main issue is that I always try to install it from source, and
it seems to take 4+ hours in compile. I would try the binary
installation method, but I'm worried that is not as well tested. And
won't work as well...
Amirouche Boubekki
2018-08-30 15:45:54 UTC
Permalink
Post by Joshua Branson
Post by Amirouche Boubekki
Using guix on my Ubuntu I successfully installed chickadee master.
Try to install guix again and report the error you have please :]
I will eventually. Today I won't have any time to do that (or I'd
rather go be social this morning than to try to install guix again). I
guess my main issue is that I always try to install it from source, and
it seems to take 4+ hours in compile. I would try the binary
installation method, but I'm worried that is not as well tested. And
won't work as well...
Use the binary install and verify the signature. It Works.
Joshua Branson
2018-09-03 20:53:39 UTC
Permalink
Post by Amirouche Boubekki
Using guix on my Ubuntu I successfully installed chickadee master.
Try to install guix again and report the error you have please :]
Thanks for the encouragement! I successfully install guix via the
binary installation method. I'm sure chickadee will install without any
problems. If it doesn't, I'll let you know.
Joshua Branson
2018-10-19 17:02:08 UTC
Permalink
Post by Joshua Branson
Post by Amirouche Boubekki
Using guix on my Ubuntu I successfully installed chickadee master.
Try to install guix again and report the error you have please :]
Thanks for the encouragement! I successfully install guix via the
binary installation method. I'm sure chickadee will install without any
problems. If it doesn't, I'll let you know.
Ok, so weird issues. I've got chickadee installed via guile, but
running the example game isn't working so well.

guix package -I chickadee

[***@dobby guile]$ guix package -I chickadee
guile-chickadee 0.2.0 out /gnu/store/zzyjhz348rp189gk94p0myk1wiakvmrv-guile-chickadee-0.2.0

[***@dobby guile]$ guix package -I chickadee
guile-chickadee 0.2.0 out /gnu/store/zzyjhz348rp189gk94p0myk1wiakvmrv-guile-chickadee-0.2.0
[***@dobby guile]$ cat chickadee.scm
#!/usr/bin/guile \
-e main -s
!#

(use-modules (chickadee)
(chickadee math vector)
(chickadee render sprite)
(chickadee render texture))

(define sprite #f)

(define (load)
(set! sprite (load-image "images/logo.png")))

(define (draw alpha)
(draw-sprite sprite (vec2 256.0 176.0)))

(add-hook! load-hook load)
(add-hook! draw-hook draw)

(run-game)


[***@dobby guile]$ ./chickadee.scm
guile: warning: failed to install locale
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/joshua/programming/guile/./chickadee.scm
;;; WARNING: compilation of /home/joshua/programming/guile/./chickadee.scm failed:
;;; no code for module (chickadee)
Backtrace:
9 (primitive-load "/home/joshua/programming/guile/./chick?")
In ice-9/eval.scm:
721:20 8 (primitive-eval (use-modules (chickadee) (chickadee ?) ?))
In ice-9/psyntax.scm:
1235:36 7 (expand-top-sequence ((use-modules (chickadee) (# ?) ?)) ?)
1182:24 6 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
285:10 5 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?)
In ice-9/boot-9.scm:
3377:20 4 (process-use-modules _)
222:17 3 (map1 (((chickadee)) ((chickadee math vector)) ((# ?)) ?))
3378:31 2 (_ ((chickadee)))
2803:6 1 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ ?)
In unknown file:
0 (scm-error misc-error #f "~A ~S" ("no code for modu?" ?) ?)

ERROR: In procedure scm-error:
no code for module (chickadee)

Arne Babenhauserheide
2018-08-30 19:09:28 UTC
Permalink
This post might be inappropriate. Click to display it.
Jan Nieuwenhuizen
2018-08-31 11:32:35 UTC
Permalink
Post by Pierre Neidhardt
And by the way, chickadee is an awesome piece of software: it is such a
refreshing video game programming experience.
I've been looking at chickadee and wondering if how to use that for a
learn to program experience for childrden.

Do you know of real simple hello-world style "games" made with
chickadee, say just the bird moving from left to right, respond to arrow
press or space bar?

janneke
--
Jan Nieuwenhuizen <***@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
Thompson, David
2018-08-31 15:04:39 UTC
Permalink
Hi Jan,
Post by Jan Nieuwenhuizen
Post by Pierre Neidhardt
And by the way, chickadee is an awesome piece of software: it is such a
refreshing video game programming experience.
I've been looking at chickadee and wondering if how to use that for a
learn to program experience for childrden.
Do you know of real simple hello-world style "games" made with
chickadee, say just the bird moving from left to right, respond to arrow
press or space bar?
I don't know of anyone that has done that. It's not hard to do, but I
think using something higher level built on Chickadee would be more
appropriate for teaching children. Chickadee is high-level in a sense
because it abstracts away complicated OpenGL things and provides
useful utilities, but low-level in another sense that it leaves it up
to the user to assemble all the pieces. "Batteries not included", if
you will. I'm working on a project called Starling, which is a small
object-oriented game engine that has the batteries included. I'll
share more when I'm ready for a 0.1 release.

- Dave
Jan Nieuwenhuizen
2018-08-31 16:49:07 UTC
Permalink
Thompson, David writes:

Hi David,
Post by Thompson, David
Post by Jan Nieuwenhuizen
Do you know of real simple hello-world style "games" made with
chickadee, say just the bird moving from left to right, respond to arrow
press or space bar?
I don't know of anyone that has done that. It's not hard to do, but I
think using something higher level built on Chickadee would be more
appropriate for teaching children. Chickadee is high-level in a sense
because it abstracts away complicated OpenGL things and provides
useful utilities, but low-level in another sense that it leaves it up
to the user to assemble all the pieces. "Batteries not included", if
you will. I'm working on a project called Starling, which is a small
object-oriented game engine that has the batteries included. I'll
share more when I'm ready for a 0.1 release.
Awesome! A couple of years ago I found `Laby' and my daughters liked it
a lot. I contributed a Guile mode.

They lost interest and I'm looking for something new; chickadee looks
just so grand. Esp. because I'm hoping it could be used as an
introductory thing, but grow into a real-world game.

Greetings,
janneke
--
Jan Nieuwenhuizen <***@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
Ludovic Courtès
2018-08-31 23:04:23 UTC
Permalink
Hello,
Post by Jan Nieuwenhuizen
Hi David,
Post by Thompson, David
Post by Jan Nieuwenhuizen
Do you know of real simple hello-world style "games" made with
chickadee, say just the bird moving from left to right, respond to arrow
press or space bar?
I don't know of anyone that has done that. It's not hard to do, but I
think using something higher level built on Chickadee would be more
appropriate for teaching children. Chickadee is high-level in a sense
because it abstracts away complicated OpenGL things and provides
useful utilities, but low-level in another sense that it leaves it up
to the user to assemble all the pieces. "Batteries not included", if
you will. I'm working on a project called Starling, which is a small
object-oriented game engine that has the batteries included. I'll
share more when I'm ready for a 0.1 release.
Awesome! A couple of years ago I found `Laby' and my daughters liked it
a lot. I contributed a Guile mode.
They lost interest and I'm looking for something new; chickadee looks
just so grand. Esp. because I'm hoping it could be used as an
introductory thing, but grow into a real-world game.
I found that Sly was nice to show things to my children, though it was
still too involved for them to understand everything (libfive Studio is
of course a different beast but it’s easier to understand, I think.)

Ludo’.
Amirouche Boubekki
2018-08-31 17:45:28 UTC
Permalink
Post by Jan Nieuwenhuizen
Post by Pierre Neidhardt
And by the way, chickadee is an awesome piece of software: it is such a
refreshing video game programming experience.
I've been looking at chickadee and wondering if how to use that for a
learn to program experience for childrden.
Do you know of real simple hello-world style "games" made with
chickadee, say just the bird moving from left to right, respond to arrow
press or space bar?
That looks like a very good and useful project for an intermediate
guile developer.
Post by Jan Nieuwenhuizen
--
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
Amirouche Boubekki
2018-08-27 18:46:10 UTC
Permalink
Post by Joshua Branson
You can play with Guile without much C knowledge and I dare to say that you
need little of C with things like guile-bytestructures or nyacc's ffi-helper
to use the full power of GNU Guile.
Can you elaborate on guile-bytestructures and nyacc's ffi-helper?
To get started, with guile foreign function interface [0]. You can
dynamically
load shared libraries .so files and access its content as pointers. You
can
convert pointers to scheme procedures or bytevectors. Playing with
function pointers
as procedures is very easy and is demonstrated in the manual page in
dynamic ffi [0].

[0] https://www.gnu.org/software/guile/manual/html_node/Dynamic-FFI.html

Playing with bytevectors ie. memory region ie. struct ie. arrays is
another story.
That's where guile-bytestructures comes in. With guile-bytestructures
you can
describe the layout of a memory region aka. a struct and they access
that struct
from guile. guile-bytestructures supports struct, arrays, function
pointers, unions
and packing!

Basically guile-bytestructures allows to represent and manipulate C
struct in Scheme.

A good live example of using guile-bytestructures is
https://gitlab.com/guile-git/guile-git

Here is another more recent example (ie. that SHOULD have learned from
previous mistake)
use of guile-bytestructures. It's not packaged in guix yet. It's way
more simpler that
guile-git bindings because it only has to deal with structures and there
is not memory
management or other weird stuff to do. Look into guile-sqlite for a
simple use of ffi.
Or gnunet-guile2
https://gnunet.org/git/gnunet-guile2.git/tree/gnunet.scm or guile-gdbm.

nyacc ffi-helper is built on top of a C parser written in guile and
guile-bytestrucutres.

The process to build a binding library in guile (and in most languages)
is to take the C
header file with .h extension associated with the shared library and go
through everything
that is defined in that file and code in Scheme the glue that is
required to access and
manipulate them. This is OK task for simple libraries like function-only
libraries that
manipulates basic data types like string, integers. But for more
complicated libraries
it's rather painful and more importantly it's a task that is very
repetitive.

That's why nyacc ffi-helper was created. nyacc ffi helper will read
header files and write
a guile scheme module glue code that will help in the process of
creating bindings. I imagine
that in some cases you only need that glue code to have _good_ Guile
bindings.

Beware that I did not try recently nyacc ffi-helper. The maintainer of
nyacc did several
demos of getting it working. I believe it requires more love and use.
That's why I write
about it.

If you show enough interest I might create a self contained example use
of
guile-bytestructures (and nyacc ffi helper).
Post by Joshua Branson
Is that a recommended/portable way to use guile to call C functions?
guile-bytestructures is reported to be portable across scheme
implementation,
but I only used it on GNU/Linux with Guile.

Yes, I recommend the use of guile-bytestructures when it makes sens ie.
when
you have to deal with C structures.

It's not in Guile stdlib because I don't know why. Most recent bindings
make use of it.
Post by Joshua Branson
Post by Joshua Branson
Is there a programming resource for
userspace/kernel software
what do you mean by kernel software?
My short term goal right now is to be able to write GNU/Hurd
translators
in guile. My long term goal is to be a GNU/Hurd developer.
Sorry, I don't know what is a GNU/Hurd translators.
Post by Joshua Branson
Post by Joshua Branson
as good as w3schools.com?
You might not be aware that w3schools has a bad reputation of being
"loosy". That said I find it
convenient as quick and dirty reference. I recommend to check mozilla
developer network aka. mdn
when it comes to web stuff.
What do you mean by "loosy?"
Sorry, I just repeated what I read elsewhere. What I should have said is
that w3cshools is not the
only source of information regarding web. But say, for instance, its
xpath tutorials are nice. Nowdays
I use MDN more often than w3cschools.
Post by Joshua Branson
What do you want to make?
It would be cool to help work on an official GNU distro, using a kernel
that is NOT linux. Linux is cool and good, but I'm not a fan of its monolithic nature.
Monolitihc has its advantages whatever you think monolith means. See for
instance,
this convo and article https://news.ycombinator.com/item?id=17499137

I can not stop you from looking into Hurd, but I can not help you. Maybe
try
hurd mailing list or guix-help.


See you around!
John Cowan
2018-08-27 19:08:41 UTC
Permalink
Post by Amirouche Boubekki
Sorry, I don't know what is a GNU/Hurd translators.
It's the Hurd equivalent of a FUSE file system <
https://en.wikipedia.org/wiki/Filesystem_in_Userspace>, except that you can
mount a filesystem on any directory that you own, without any kind of root
privilege required.
--
John Cowan http://vrici.lojban.org/~cowan ***@ccil.org
My confusion is rapidly waxing
For XML Schema's too taxing:
I'd use DTDs / If they had local trees --
I think I best switch to RELAX NG.
Joshua Branson
2018-08-29 21:33:14 UTC
Permalink
Thanks for taking the time to write me a informational response. I
really appreciate it.
Post by Amirouche Boubekki
Sorry, I don't know what is a GNU/Hurd translators.
A GNU/Hurd translator is a userspace process, that runs on the GNU/Hurd,
but implements usual kernel functionality.

https://www.gnu.org/software/hurd/hurd/translator.html

So there is an ext2fs translator running on the Hurd. It runs as a
userspace process. There are really trivial translators that you could
create. One is the hello translator.

https://www.gnu.org/software/hurd/hurd/translator/hello.html

The basic example is here:

#+BEGIN_SRC sh
$ touch hello
$ cat hello
$ settrans -a /hurd/hello hello
$ cat hello
hello
$ settrans -g ./hello
$ cat hello
Hello World!
#+END_SRC

Basically, you are telling the kernel, that anytime someone wants to
look at the hello ~/hello, they need to call the /hurd/hello program
first. Regardless of the "~/hello"'s content, users will see "Hello World!"


It gets really interesting when you start telling these processes to
transform the underlying data. They currently have a translator that
translates an xml file into a directory tree. Imagine searching an html
file with the "find" tool. Wouldn't that be something different?
Post by Amirouche Boubekki
Post by Joshua Branson
Post by Joshua Branson
as good as w3schools.com?
You might not be aware that w3schools has a bad reputation of being "loosy". That said I find it
convenient as quick and dirty reference. I recommend to check mozilla developer network aka. mdn
when it comes to web stuff.
What do you mean by "loosy?"
Sorry, I just repeated what I read elsewhere. What I should have said is that w3cshools is not the
only source of information regarding web. But say, for instance, its xpath tutorials are nice. Nowdays
I use MDN more often than w3cschools.
I've heard the same thing. w3schools is like a really dumbed down
version of MDN. I guess I just need to learn how to learn better.
Post by Amirouche Boubekki
Post by Joshua Branson
What do you want to make?
It would be cool to help work on an official GNU distro, using a kernel
that is NOT linux. Linux is cool and good, but I'm not a fan of its monolithic nature.
Monolitihc has its advantages whatever you think monolith means. See for instance,
this convo and article https://news.ycombinator.com/item?id=17499137
I can not stop you from looking into Hurd, but I can not help you. Maybe try
hurd mailing list or guix-help.
That's a good idea. I did actually post there as well. I just had a
goal this week to ask some smart people for advice. There are a lot of
smart people on this mailing list. :)
Post by Amirouche Boubekki
See you around!
Arne Babenhauserheide
2018-08-30 21:42:51 UTC
Permalink
Post by Joshua Branson
It gets really interesting when you start telling these processes to
transform the underlying data. They currently have a translator that
translates an xml file into a directory tree. Imagine searching an html
file with the "find" tool. Wouldn't that be something different?
Or imagine installing a packages from remote servers with shell globbing:

pkg --install /http://ftp.gnu.org/packages/*/*.deb

Last time I used the Hurd, some variant of this actually worked.

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
t***@tuxteam.de
2018-08-31 08:07:14 UTC
Permalink
Post by Arne Babenhauserheide
Post by Joshua Branson
It gets really interesting when you start telling these processes to
transform the underlying data. They currently have a translator that
translates an xml file into a directory tree. Imagine searching an html
file with the "find" tool. Wouldn't that be something different?
pkg --install /http://ftp.gnu.org/packages/*/*.deb
Last time I used the Hurd, some variant of this actually worked.
Like this (note: my comments interspersed, prefixed with ###)

### note the option '-s' -- I don't want to clobber my box!

***@trotzki:~$ apt-get -s install '*php*'
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php-horde-timeobjects' for glob '*php*'
Note, selecting 'libphp-jpgraph-examples' for glob '*php*'
Note, selecting 'php-exif' for glob '*php*'
Note, selecting 'php-symfony-form' for glob '*php*'
Note, selecting 'php5-mapscript' for glob '*php*'
Note, selecting 'php-letodms-core' for glob '*php*'

### many, many, MANY lines elided -- roughly 250

Note, selecting 'php-tideways' instead of 'php7.0-tideways'
Note, selecting 'php-xdebug' instead of 'php7.0-xdebug'

### this, of course, isn't bound to end well:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php-apcu : Conflicts: php-yac but 2.0.1+0.9.2-1 is to be installed
php-horde-groupware : Conflicts: horde-bundle
Breaks: php-horde-webmail but 5.2.17-1 is to be installed
php-horde-webmail : Conflicts: horde-bundle
Breaks: php-horde-groupware but 5.2.17-1 is to be installed
php-nrk-predis : Conflicts: libphp-predis
php-sabre-http : Breaks: php-sabre-dav (< 1.9) but 1.8.12-3 is to be installed
php-yac : Conflicts: php-apcu but 5.1.8+4.0.11-1 is to be installed
Conflicts: php-user-cache
python-phply : Conflicts: python3-phply but 1.0.0-1 is to be installed
python3-phply : Conflicts: python-phply but 1.0.0-1 is to be installed
E: Unable to correct problems, you have held broken packages.

What's my point?

- Debian has some headstart: it's absolutely worth learning
from them
- Perhaps other distros also know how to play this trick
- Selecting packages by name via some string matching may have
ummm... strange consequences ;-D

Don't get me wrong: I do think Guix goes into the absolutely right
direction, as opposed to the current cloudy container craze.

Cheers
- -- tomás
Joshua Branson
2018-08-31 14:44:31 UTC
Permalink
Post by t***@tuxteam.de
Post by Arne Babenhauserheide
Post by Joshua Branson
It gets really interesting when you start telling these processes to
transform the underlying data. They currently have a translator that
translates an xml file into a directory tree. Imagine searching an html
file with the "find" tool. Wouldn't that be something different?
pkg --install /http://ftp.gnu.org/packages/*/*.deb
Last time I used the Hurd, some variant of this actually worked.
Like this (note: my comments interspersed, prefixed with ###)
### note the option '-s' -- I don't want to clobber my box!
I didn't know that debian support installing all "php" packages like that!
Post by t***@tuxteam.de
What's my point?
- Debian has some headstart: it's absolutely worth learning
from them
What things can guix do like debian does?
Post by t***@tuxteam.de
- Perhaps other distros also know how to play this trick
- Selecting packages by name via some string matching may have
ummm... strange consequences ;-D
Don't get me wrong: I do think Guix goes into the absolutely right
direction, as opposed to the current cloudy container craze.
Cheers
-- tomás
Arne Babenhauserheide
2018-09-01 10:00:12 UTC
Permalink
Post by t***@tuxteam.de
Post by Arne Babenhauserheide
Post by Joshua Branson
It gets really interesting when you start telling these processes to
transform the underlying data. They currently have a translator that
translates an xml file into a directory tree. Imagine searching an html
file with the "find" tool. Wouldn't that be something different?
pkg --install /http://ftp.gnu.org/packages/*/*.deb
Last time I used the Hurd, some variant of this actually worked.
- Selecting packages by name via some string matching may have
ummm... strange consequences ;-D
This as statement on its own is true, but does not invalidate the
usecase: When something is not in a package repository, I typically need
to first locate, then download and verify, and then install the
package. With a transparent http translator, the locate and download
step are no longer needed, and verification can be done transparently
(since the signature is *next to* the file to install).

There are a lot of things which would get much easier this way. They
would not become magic, but many unnecessary complications would
disappear. The equivalent of ceremony in code, but on the sysadmin
level.

And it would simplify the code: Why does mplayer/mpv need a mode to play
from a URL? If we could simply play from a server via the filesystem,
the tools we use could be simplified a lot.

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
t***@tuxteam.de
2018-09-01 10:49:50 UTC
Permalink
Post by Arne Babenhauserheide
Post by t***@tuxteam.de
Post by Arne Babenhauserheide
Post by Joshua Branson
It gets really interesting when you start telling these processes to
transform the underlying data. They currently have a translator that
translates an xml file into a directory tree. Imagine searching an html
file with the "find" tool. Wouldn't that be something different?
pkg --install /http://ftp.gnu.org/packages/*/*.deb
Last time I used the Hurd, some variant of this actually worked.
- Selecting packages by name via some string matching may have
ummm... strange consequences ;-D
This as statement on its own is true, but does not invalidate the
usecase [...]
Definitely. I was just thinking aloud about whether a regexp (or
glob pattern) match on package name makes sense as a selector...
for the install phase.

And as an illustration there was the confusion of my installer
stemming from the attempt to install everything *php*. Given a
sufficiently rich repository, you're bound to overwhelm pretty
much any dependency-tracking package manager.

For the search phase, though, matching package names on regexp
(or glob) is invaluable, I use it everyday. I think this is because
package names talk more to people than to computers.
Post by Arne Babenhauserheide
When something is not in a package repository, I typically need
to first locate, then download and verify, and then install the
package. With a transparent http translator, the locate and download
step are no longer needed, and verification can be done transparently
(since the signature is *next to* the file to install).
There are a lot of things which would get much easier this way. They
would not become magic, but many unnecessary complications would
disappear. The equivalent of ceremony in code, but on the sysadmin
level.
And it would simplify the code: Why does mplayer/mpv need a mode to play
from a URL? If we could simply play from a server via the filesystem,
the tools we use could be simplified a lot.
This is another kettle of fish: it does sound attractive, but I fear
it'll take another couple of years to get our tiny brains there.

The basic idea sounds good, but the devil is, as they say...

(And yes, I'd love to see The Hurd gaining more traction!)

Cheers
- -- tomás
Arne Babenhauserheide
2018-09-02 23:09:06 UTC
Permalink
Post by t***@tuxteam.de
Post by Arne Babenhauserheide
And it would simplify the code: Why does mplayer/mpv need a mode to play
from a URL? If we could simply play from a server via the filesystem,
the tools we use could be simplified a lot.
This is another kettle of fish: it does sound attractive, but I fear
it'll take another couple of years to get our tiny brains there.
The basic idea sounds good, but the devil is, as they say...
That’s true — but here it is more in having some people do the two large
complex tasks which currently block adoption (usb + audio).

The Hurd already provides a translator to get transparent filesystem
access to files from remote hosts. It’s sometimes aggravating to see how
close we are — and have been for years. But it needs a few dedicated
people to bridge that gap.

Best wishes,
Arne
Joshua Branson
2018-08-31 14:42:23 UTC
Permalink
Post by Arne Babenhauserheide
Post by Joshua Branson
It gets really interesting when you start telling these processes to
transform the underlying data. They currently have a translator that
translates an xml file into a directory tree. Imagine searching an html
file with the "find" tool. Wouldn't that be something different?
pkg --install /http://ftp.gnu.org/packages/*/*.deb
Last time I used the Hurd, some variant of this actually worked.
Isn't that super cool?
Post by Arne Babenhauserheide
Best wishes,
Arne
Arne Babenhauserheide
2018-08-27 20:54:15 UTC
Permalink
Post by Joshua Branson
Post by Amirouche Boubekki
Post by Joshua Branson
Is there a programming resource for
userspace/kernel software
what do you mean by kernel software?
My short term goal right now is to be able to write GNU/Hurd translators
in guile. My long term goal is to be a GNU/Hurd developer.
That’s cool! Several years ago I worked on the Pythong bindings for
translators (though I did not get as far as I’d have liked) and it’s
great to see paths converge again!

The common lisp bindings had some pretty nifty tools, so you might find
inspiration there. You can make a lot of difference with relatively
little effort.

One aspect in which where developing Guile is much more enjoyable than
programming in Python is that once you get used to using the info
documentation (i.e. via Emacs) you can work without googling, and a
full-text search in structured, relevant information beats a Google
search — even if Google leads you to Stackoverflow.

(for all those unfamiliar with the Hurd: Here’s a writeup about the
technical advantages of the Hurd:
https://www.draketo.de/light/english/free-software/some-technical-advantages-of-the-hurd )

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
Joshua Branson
2018-08-29 21:35:29 UTC
Permalink
Post by Joshua Branson
Post by Amirouche Boubekki
Post by Joshua Branson
Is there a programming resource for
userspace/kernel software
what do you mean by kernel software?
My short term goal right now is to be able to write GNU/Hurd translators
in guile. My long term goal is to be a GNU/Hurd developer.
That’s cool! Several years ago I worked on the Pythong bindings for
translators (though I did not get as far as I’d have liked) and it’s
great to see paths converge again!
The common lisp bindings had some pretty nifty tools, so you might find
inspiration there. You can make a lot of difference with relatively
little effort.
Can you elaborate? Do you mean I can make a lot of difference by
writing translators in python or lisp? Or do you mean I can make a lot
of difference...how exactly? haha
One aspect in which where developing Guile is much more enjoyable than
programming in Python is that once you get used to using the info
documentation (i.e. via Emacs) you can work without googling, and a
full-text search in structured, relevant information beats a Google
search — even if Google leads you to Stackoverflow.
Yeah. I like pressing "i" in info documentation. Also helm-info-guile
is a nice command.
(for all those unfamiliar with the Hurd: Here’s a writeup about the
https://www.draketo.de/light/english/free-software/some-technical-advantages-of-the-hurd )
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
Arne Babenhauserheide
2018-08-30 20:19:41 UTC
Permalink
Post by Joshua Branson
Post by Arne Babenhauserheide
The common lisp bindings had some pretty nifty tools, so you might find
inspiration there. You can make a lot of difference with relatively
little effort.
Can you elaborate? Do you mean I can make a lot of difference by
writing translators in python or lisp? Or do you mean I can make a lot
of difference...how exactly? haha
I mean you can make a lot of difference by writing translators, in the
language you choose.
Post by Joshua Branson
Yeah. I like pressing "i" in info documentation. Also helm-info-guile
is a nice command.
Yes, info is pretty awesome. I did not try helm-info-guile yet. Is it as
good as helm-rifle?

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
Joshua Branson
2018-08-31 14:41:46 UTC
Permalink
Post by Arne Babenhauserheide
Post by Joshua Branson
Post by Arne Babenhauserheide
The common lisp bindings had some pretty nifty tools, so you might find
inspiration there. You can make a lot of difference with relatively
little effort.
Can you elaborate? Do you mean I can make a lot of difference by
writing translators in python or lisp? Or do you mean I can make a lot
of difference...how exactly? haha
I mean you can make a lot of difference by writing translators, in the
language you choose.
Oh really? I was under the impression that only translators written in
C are helpful at this point. I thought that writing translators written
in other languages was too brittle.
Post by Arne Babenhauserheide
Post by Joshua Branson
Yeah. I like pressing "i" in info documentation. Also helm-info-guile
is a nice command.
Yes, info is pretty awesome. I did not try helm-info-guile yet. Is it as
good as helm-rifle?
Best wishes,
Arne
Arne Babenhauserheide
2018-09-01 10:01:19 UTC
Permalink
Post by Joshua Branson
Post by Arne Babenhauserheide
Post by Joshua Branson
Post by Arne Babenhauserheide
The common lisp bindings had some pretty nifty tools, so you might find
inspiration there. You can make a lot of difference with relatively
little effort.
Can you elaborate? Do you mean I can make a lot of difference by
writing translators in python or lisp? Or do you mean I can make a lot
of difference...how exactly? haha
I mean you can make a lot of difference by writing translators, in the
language you choose.
Oh really? I was under the impression that only translators written in
C are helpful at this point. I thought that writing translators written
in other languages was too brittle.
That just depends on the quality of the bindings you create. Though I’m
not fully up to date: My information is ~7 years old.

Best wishes,
Arne
Joshua Branson
2018-09-01 16:26:28 UTC
Permalink
Post by Joshua Branson
Post by Arne Babenhauserheide
Post by Joshua Branson
Post by Arne Babenhauserheide
The common lisp bindings had some pretty nifty tools, so you might find
inspiration there. You can make a lot of difference with relatively
little effort.
Can you elaborate? Do you mean I can make a lot of difference by
writing translators in python or lisp? Or do you mean I can make a lot
of difference...how exactly? haha
I mean you can make a lot of difference by writing translators, in the
language you choose.
Oh really? I was under the impression that only translators written in
C are helpful at this point. I thought that writing translators written
in other languages was too brittle.
That just depends on the quality of the bindings you create. Though I’m
not fully up to date: My information is ~7 years old.
Oh ok. I hadn't thought about creating bindings for other languages.
The Hurd wiki mentions that in an ideal world, one would create a way to
write translators in a high level language, but not use the current Hurd
C bindings. If you do that, then the translators can be written in
more flexible ways.
Best wishes,
Arne
Loading...