[dev-servo] Question on pluggable JavaScript engine & potential deployment to GraalVM

2019-03-22 Thread elias vasylenko
I see in the design notes here [1] that it is listed as a "long-term,
low-priority goal" to support different JavaScript engines. But I also
notice that it's been a long time since the document was updated, and I
don't see any discussion elsewhere about it.

Is this still on the radar?

I don't know how many people here are familiar with Graal [2], but
specifically I'm interested in the possibility of deploying Servo to
GraalVM (or the JVM). There are two parts to this:

- Sulong is an LLVM bitcode interpreter for Graal, I'm not sure how mature
it is.
- GraalJS is an ECMAScript interpreter for Graal, which is pretty mature.

One of the interesting things about Graal is the zero-cost interop between
languages. The same JIT operates on both JS and LLVM bitcode and is able to
optimise across language boundaries. But the efficacy of this would
presumably be dependent upon how the abstraction of the JavaScript engine
in Servo were realised.

Well, just some food for thought, I ask only out of curiosity.

Thanks for any insight!

[1] https://github.com/servo/servo/wiki/Design#javascript-and-dom-bindings
[2] https://github.com/graalvm
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


[dev-servo] Creating New DOM Interfaces for Nodes

2019-03-22 Thread Chris Benfante
Hi all!
My group is working on implementing ConstantSourceNode (#21803
) and we have a few questions
on getting started.
It appears that our first step is creating the DOM Interface, but our
written instructions mention forking from the servo/media repository rather
than the main project because it takes a long time to build. However, we
don't see any files or code related to DOM interfaces for nodes, though I
did find them in the main project. The servo doc also seems to support
this:
https://doc.servo.org/script/dom/#adding-a-new-dom-interface

So, which fork should we create the DOM interface on? Also, which source
files should we reference most for this interface? The *node.rs files seem
like the best bet, but each have considerable variation in implementation.

Thanks!
Chris B.
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Creating New DOM Interfaces for Nodes

2019-03-22 Thread Josh Bowman-Matthews
You are correct; for the initial steps that involve creating the new DOM 
node you will need to modify servo/servo. However, you will also need to 
modify servo/media in order to process the missing message. You are 
correct that using existing WebAudio node implementations as models for 
this work is a good choice; oscillatornode.rs and OscillatorNode.webidl 
is a relatively straightforward implementation that you could follow.


Cheers,
Josh

On 3/22/19 11:14 AM, Chris Benfante wrote:

Hi all!
My group is working on implementing ConstantSourceNode (#21803
) and we have a few questions
on getting started.
It appears that our first step is creating the DOM Interface, but our
written instructions mention forking from the servo/media repository rather
than the main project because it takes a long time to build. However, we
don't see any files or code related to DOM interfaces for nodes, though I
did find them in the main project. The servo doc also seems to support
this:
https://doc.servo.org/script/dom/#adding-a-new-dom-interface

So, which fork should we create the DOM interface on? Also, which source
files should we reference most for this interface? The *node.rs files seem
like the best bet, but each have considerable variation in implementation.

Thanks!
Chris B.



___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] println!("Hello from NCSU");

2019-03-22 Thread Balaji Janakarajan Hari
Hi Josh

1. We are trying to implement the functionality and have a few q's. The
setValueCurveAtTime

talks
about Automation event, which I assume that the term
*UserAutomationEvent *refers
to in the issue  but could you
please help us understand what *UserAutomationEvent exactly* does and where
the *setValueCurveAtTime *fn would be called?

2. Is there a similar implementation done previously that we could use as
reference as well?

3. It does refer
that
I would need to call *setValueAtTime *and I assume this is implemented

as I see here and can you also let us know where the  *setValueAtTime*  is
defined?

4. The fn does two commands as per the teams understanding,
During the time interval, it sets array of values
After the time, startTime+duration, a constant value would be set until
another automationEvent starts.

So could you please help us in figuring out where would this value be
passed and where/how the fn knows that another automationEvent would start?


Sincerely
Balaji Janakarajan Hari
Graduate Student - IMSE Program
NC State University

linkedin.com/in/jhbalaji


On Fri, Mar 8, 2019 at 10:39 PM Josh Bowman-Matthews 
wrote:

> Welcome to Servo! Please ask questions if any parts of the project are
> unclear!
>
> Cheers,
> Josh
>
> On 3/7/19 9:43 PM, Balaji Janakarajan Hari wrote:
> > Hello All,
> > We are a team of NCSU students from CSC 517
> >  class and
> > excited to work on Mozilla OSS project. We would be working on WebAudio
> > Automation Implementation
> > <
> https://github.com/servo/servo/wiki/Implement-missing-WebAudio-automation-student-project#implement-support-for-missing-webaudio-automation
> >
> > .
> > I (bjan...@ncsu.edu) am graduate student in Systems Engineering,
> Srivatsan (
> > snara...@ncsu.edu) is a graduate student in CS and Akhilesh (
> > avenk...@ncsu.edu) is a graduate student in ECE. We all are new to OSS
> > contributions and Rust but eager to learn and pick them as needed. We are
> > looking forward for your support.
> >
> > Thank you!
> >
> > Sincerely
> > Balaji Janakarajan Hari
> > Graduate Student - IMSE Program
> > NC State University
> >
> > linkedin.com/in/jhbalaji
> >
>
> ___
> dev-servo mailing list
> dev-servo@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
>
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] println!("Hello from NCSU");

2019-03-22 Thread Josh Bowman-Matthews

On 3/22/19 5:58 PM, Balaji Janakarajan Hari wrote:

Hi Josh

1. We are trying to implement the functionality and have a few q's. The
setValueCurveAtTime

talks
about Automation event, which I assume that the term
*UserAutomationEvent *refers
to in the issue  but could you
please help us understand what *UserAutomationEvent exactly* does and where
the *setValueCurveAtTime *fn would be called?


The names I refer to in the issue are types that can be found in the 
actual codebase: 
https://github.com/servo/media/blob/9d9f557fc7bfa78075b83edd822557548c9d4344/audio/src/param.rs#L259-L280


https://github.com/web-platform-tests/wpt/blob/master/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurveAtTime.html 
is an example of test code that uses setValueCurveAtTime. 
https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/setValueCurveAtTime 
contains an example of working code that uses the API.



2. Is there a similar implementation done previously that we could use as
reference as well?


The existing automation events like SetValueAtTime and RampToValueAtTime 
could be useful references.



3. It does refer
that
I would need to call *setValueAtTime *and I assume this is implemented

as I see here and can you also let us know where the  *setValueAtTime*  is
defined?


If I understand the question, I believe you are looking for 
https://github.com/servo/servo/issues/22897 which defines the DOM API 
that websites can make use of.



4. The fn does two commands as per the teams understanding,
During the time interval, it sets array of values
After the time, startTime+duration, a constant value would be set until
another automationEvent starts.



So could you please help us in figuring out where would this value be
passed and where/how the fn knows that another automationEvent would start?


The processing for automation events happens in this code: 
https://github.com/servo/media/blob/9d9f557fc7bfa78075b83edd822557548c9d4344/audio/src/param.rs#L357-L416


The code that decides which event to process lives here: 
https://github.com/servo/media/blob/9d9f557fc7bfa78075b83edd822557548c9d4344/audio/src/param.rs#L113-L166


Does that help?

Cheers,
Josh
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] CSC 517 OSS Project

2019-03-22 Thread Niveditha Shankar
Hello
Just wanted to make sure that we are working with the correct part of the code,
To convert the  BluetoothAdapter from enum to trait, are we right in
assuming that we will be working with the following, Line 93-106 in
https://github.com/servo/devices/blob/master/src/bluetooth.rs.

Could you brief us more on this - "Modify Servo's integration to use
this new trait"

And also, is there any other similar implementation for this
conversion that we can refer to?


Thank you

Niveditha Shankar

On Fri, Mar 8, 2019 at 10:39 PM Josh Bowman-Matthews
 wrote:
>
> Welcome! One nice property about this project is that it's more or less
> standalone, so there isn't much preparation necessary beyond
> understanding the Rust language concepts that you will be relying upon.
>
> Cheers,
> Josh
>
> On 3/7/19 8:41 PM, Niveditha Shankar wrote:
> > Hello,
> >
> > I am Niveditha Shankar doing my masters at NC State. As a part of the
> > CSC 517 OSS project, I have been assigned 'Refactor Bluetooth Support
> > Student Project'. I am working with Sruthi Kannan and Shanmukha Jaya
> > Harsha Alluri for the same.
> > Just wanted to introduce the team.
> > Is there anything we should look into before we start the project?
> >
> >
> > Niveditha Shankar
> >
>
> ___
> dev-servo mailing list
> dev-servo@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo