Profile

Cover photo
Gustav Hartvigsson
Works at The Corp. State of District 17
Lives in Strömstad
388 followers|758,709 views
AboutPostsPhotos

Stream

Gustav Hartvigsson

Shared publicly  - 
1
Add a comment...

Gustav Hartvigsson

Shared publicly  - 
 
I think that USB needs to be replaced.
It's VID and PID situation is not great.

I propose that USB controllers instead of providing VIDs and PIDs they provide strings.

Say a usb device is connected to a computer, the device contacts the computer with a "hello"
To which the computer response with "what sort of device are you?"
"HID/Printer/Audio equipment/misc/Raw serial device/..."
And depending on what the USB device response with the computer can ask "what is your vendor name?"
To which the USB device returns a null-terminated string.
Then the computer asks "what is your product name?"
To which the usb device gives it's product name.

So on and so forth, untill a serial stream is established.

This would be very slow to set up, compared to what we have now, but it would solve a lot of problems with USB that prevents new innovations onto the market. But create other problems too I suppose. 
1
Add a comment...

Gustav Hartvigsson

Shared publicly  - 
1
Add a comment...
 
How the balls do you store an EcmaScript function (object) in a C structure in Duktape pragmatically?

I need to have the ability to store callbacks in a list (in C) when calling, and doing this from EcmaStript.

Say I have a C Function
"duk_ret_t em_callback_store (duk_context * ctx)"
the Ecmascript signature is "callback_store (name, callback)"

Say I have a global Map with functions associated too, and it is initialised.
(map_add (void * key, void * value) and map_get (void * key) are the ones we are going to use).

how do I implement em_callback_store? and how do I then do the callbacks from C?
3
James Edwards's profile photoGustav Hartvigsson's profile photoChris McClelland's profile photoMartti Kühne's profile photo
7 comments
 
+Gustav Hartvigsson Sorry for the goof.
I've had brighter moments.

Reading up on this "Duktape" thing, that is a huge collection of functions in a single file.
You'll probably want to use the syntax stack duktape comes with, like the duk_push_*() family of functions, further duk_compile_*​() and duk_eval_*​() might be of interest too.

Or just cast to void(​*)(void) and watch it burn...
Add a comment...

Gustav Hartvigsson

Shared publicly  - 
 
 
+Carlos Soriano Sánchez explains some of Gnome Files changes, and why those happened.
https://csorianognome.wordpress.com/2015/04/30/nautilus-communicating-changes

---
And because I'm the first I blame GNOME for lack of communication, considering that is mostly a UI & for everyone project, so communication and feedback is important (the A to Z!), I hope for more blog-posts and from more people. And better mechanisms in general to improve feedback!

#GNOME   #Design   #GnomeFiles   
13 comments on original post
1
Add a comment...
Have him in circles
388 people
Sophie Karlsson's profile photo
Sveriges Radio's profile photo
Knigel Holmes's profile photo
Mustapher Nasir's profile photo
Jonh Bananen's profile photo
luke jones's profile photo
EOLE Home Standing's profile photo
Alexandr Volodin's profile photo
Филипп С ярославки's profile photo

Gustav Hartvigsson

Shared publicly  - 
1
Add a comment...

Gustav Hartvigsson

Shared publicly  - 
 
Well...
This is going to become one of my favourite foods.
Yum.

nettle soup
1
Add a comment...

Gustav Hartvigsson

Shared publicly  - 
 
since I am in the "home stretch" with SSTS, I thought I would look into Duktape again, I think I got most of it, but callbacks seems to not be a thing in Duktape.

I want to have the ability to store callbacks from Ecmastript in a C structure... Seems to be harder then it seems...

there is no duk_get_object...
1
Add a comment...

Gustav Hartvigsson

Shared publicly  - 
 
"If anyone asks, i was not here and I was definitely not logged in as root on that computer over there"
*run like hell out of the server room*
1
Add a comment...

Gustav Hartvigsson

Shared publicly  - 
1
Add a comment...
People
Have him in circles
388 people
Sophie Karlsson's profile photo
Sveriges Radio's profile photo
Knigel Holmes's profile photo
Mustapher Nasir's profile photo
Jonh Bananen's profile photo
luke jones's profile photo
EOLE Home Standing's profile photo
Alexandr Volodin's profile photo
Филипп С ярославки's profile photo
Work
Employment
  • The Corp. State of District 17
    General, present
Basic Information
Gender
Male
Apps with Google+ Sign-in
Story
Tagline
Meew, mother fucker, meew!
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Strömstad
Previously
Tibro