00:04
j_mcnally has quit [Ping timeout: 260 seconds]
00:04
e_dub has joined #opal
02:22
j_mcnally has joined #opal
02:52
ryanstout has joined #opal
03:03
ryanstout has quit [Quit: ryanstout]
03:57
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
07:32
stnly has quit [Ping timeout: 246 seconds]
07:33
stnly has joined #opal
08:16
elia has joined #opal
09:50
wmnnd has joined #opal
09:59
dbackeus has joined #opal
09:59
<
dbackeus >
hi, I'm absolutely new to opal and fiddling about with it
10:00
<
dbackeus >
it seems I'm in a bit of an unusual position as Opal appears to take for given that you're using it from a ruby project
10:00
<
dbackeus >
but I'm trying to use it in a Meteor project using opal to compile ruby files into javascript
10:00
<
dbackeus >
I've got it working, but I have no clue how to work with packages
10:00
<
dbackeus >
would be nice even to get opals stdlib working to begin with
10:01
<
dbackeus >
then move on to opal-browser if possible
10:01
<
dbackeus >
the opal docs just talk about compiling corelib into js but what about stdlib?
10:08
<
elia >
dbackeus, but I'm interested in your ideal setup for this situation, maybe we can make it happen
10:10
<
dbackeus >
haha, my ideal is to write javascript apps with ruby I guess, might be too early for me to describe details since I'm still in the process of figuring out the limitations of opal etc
10:10
<
elia >
Personally though, even in node-webkit projects, I set up a rake task to build stuff statically
10:11
<
elia >
dbackeus, well, you can also include opal-parser.js and use it right in the browser with <sctipt type="text/ruby">
10:11
<
elia >
let me fetch a blog post I wrote
10:13
<
adambeynon >
I saw a blog post about using meteor + opal a while back
10:13
<
elia >
adambeynon, topic change: do you mind sharing your angularjs adapter?
10:14
<
dbackeus >
cool stuff
10:14
<
dbackeus >
I'll mess about some more, good to know there are people to talk to :)
10:15
<
adambeynon >
elia: sure, its not very stable though
10:15
<
elia >
dbackeus, +1, give feedback anytime, especially on usability and docs (PRs are also well accepted)
10:15
<
adambeynon >
Im back in the "I hate angular" camp now though after it
10:15
<
adambeynon >
I find their setup really awkward to deal with
10:15
<
adambeynon >
$and $I $hate $their $variable $naming
10:16
<
elia >
adambeynon, my gut always told me not to trust angular
10:19
<
adambeynon >
the basics of angular I like, dom attributes for bindings etc, its just all the other crap I dont like. I copied their dom bindings idea, and thats what I use now in my opal apps
10:19
<
adambeynon >
(finding link)
10:20
<
adambeynon >
but yeah, Ill post the code I've done so far
10:21
<
adambeynon >
it works to a degree, but involves a lot of hacky to get ruby objects as controllers
10:22
<
elia >
adambeynon, sounds like fun, should be enough tho for my mean purposes :P
10:24
* elia
is going to have lunch
10:34
<
adambeynon >
elia: Im struggling to get any form of require_tree() working with opal
10:34
<
adambeynon >
(that works nicely with sprockets)
10:38
meh` has joined #opal
10:48
wmnnd has quit [Ping timeout: 260 seconds]
10:53
<
dbackeus >
you can set properties with [:something] = "something"
10:53
<
dbackeus >
but when I try that I get Object w has no method '$[]='
10:54
<
dbackeus >
actually even getting properties appears broken
10:54
<
dbackeus >
when trying to puts window["location"] I just get "w"
10:55
<
dbackeus >
generated code looks ok:
10:55
<
dbackeus >
window = self.$Native("window");
10:55
<
dbackeus >
self.$puts(window['$[]']("location"));
10:58
<
dbackeus >
oh, turns out I missed that I'm supposed to use backticks for the argument to Native(), never mind
11:21
<
dbackeus >
what's the opal equivalent of a basic javascript object?
11:22
<
dbackeus >
if I do {} in opal I get a hash object
11:29
<
elia >
adambeynon, what's the issue you're encountering?
11:31
<
elia >
dbackeus, Hash.new.to_n gives you the corresponding literal object
11:32
<
dbackeus >
right, thanks
11:32
<
elia >
dbackeus, of course all keys become strings
11:32
<
dbackeus >
makes sense
11:50
wmnnd has joined #opal
11:51
dbackeus has quit [Ping timeout: 246 seconds]
12:01
dbackeus has joined #opal
12:29
<
dbackeus >
can make new instances of native objects?
12:29
<
dbackeus >
was trying to do
12:29
<
dbackeus >
Collection = Native("Meteor.Collection")
12:29
<
dbackeus >
Posts = Collection.new("posts")
12:29
<
dbackeus >
but there is no .new method on the native object
12:33
<
meh` >
dbackeus, Native(`new Meteor.Collection`)
12:37
<
dbackeus >
thanks, this seems to be the proper way of thinking about it:
12:38
<
meh` >
dbackeus, you can do class bridging like jquery does
12:38
<
meh` >
I mean, opal-jquery
12:38
<
meh` >
ask elia about it
12:39
<
elia >
dbackeus, ask me anything (no, not really) :)
12:41
<
dbackeus >
elia, do you have an example of this class bridging I can look at?
12:41
<
elia >
dbackeus, yes, opal-jquery itself is a pretty good example
12:46
<
dbackeus >
so a bridged class is an opal class that inherits from a javascript class?
12:47
<
meh` >
dbackeus, yes
12:47
<
meh` >
basically at least
12:47
<
meh` >
it does some magical things to make it work
12:48
<
dbackeus >
magic I don't mind
12:49
<
adambeynon >
volt made it into this week's Ruby Weekly..
13:06
davispuh has joined #opal
13:15
<
dbackeus >
don't really understand about bridged classes
13:16
<
dbackeus >
found a bridged classes spec in the opal source but don't know where to find the implementation
13:16
<
dbackeus >
from the spec it looked like the original javascript class needs to be defined in an opal style, ie methods should be prefixed by $ etc
13:17
<
dbackeus >
elia, and advice on the above?
13:31
elia has quit [Quit: Computer has gone to sleep.]
13:31
elia has joined #opal
13:33
<
elia >
dbackeus, let me see
13:33
<
elia >
dbackeus, you need to explicitly and selectively expose native methods
13:34
<
elia >
class Collection < `Meteor.Collection`
13:34
<
elia >
alias_native :ruby_side_name, :js_side_name
13:36
<
elia >
dbackeus, you may also want to override self.new to pass arguments to the original constructor
13:37
<
elia >
first thing it does is calling allocate which calls the js-side constructor
13:38
e_dub has quit [Quit: ZZZzzz…]
13:54
elia has quit [Quit: Computer has gone to sleep.]
13:54
elia has joined #opal
13:56
elia has quit [Client Quit]
14:02
elia has joined #opal
14:34
e_dub has joined #opal
14:58
fkchang has joined #opal
15:03
DrShoggoth has joined #opal
15:11
<
dbackeus >
I just need it to compile to "this." but neither self nor @ seem to work
15:15
<
elia >
dbackeus, will give a look at it this evening (in some hours)
15:16
<
dbackeus >
basically just call the method passed in with "this" set to the router itself
15:29
wmnnd has quit [Ping timeout: 260 seconds]
15:34
StephenA1 has joined #opal
15:37
StephenA1 has quit [Client Quit]
15:48
elia has quit [Quit: Computer has gone to sleep.]
15:49
dbackeus has quit [Ping timeout: 246 seconds]
15:51
dbackeus has joined #opal
16:06
dbackeus has quit [Ping timeout: 246 seconds]
16:06
elia has joined #opal
16:07
elia has quit [Client Quit]
16:10
j_mcnally has joined #opal
16:11
elia has joined #opal
16:17
elia has quit [Quit: Computer has gone to sleep.]
16:17
elia has joined #opal
16:30
elia has quit [Quit: Computer has gone to sleep.]
18:01
DrShoggoth has quit [Quit: Leaving]
18:15
DrShoggoth has joined #opal
18:58
elia has joined #opal
19:06
Thijsc has joined #opal
19:06
Thijsc has quit [Client Quit]
19:06
Thijsc has joined #opal
19:45
Thijsc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:02
e_dub has quit [Quit: ZZZzzz…]
20:23
elia has quit [Quit: Computer has gone to sleep.]
20:23
adambeynon has quit [Ping timeout: 260 seconds]
20:24
dbackeus has joined #opal
20:24
adambeynon has joined #opal
21:06
GitHub175 has joined #opal
21:06
<
GitHub175 >
opal/master d34f42f Elia Schito: Merge pull request #595 from opal/elia/runtime-naming...
21:06
GitHub175 has left #opal [#opal]
21:08
travis-ci has joined #opal
21:08
<
travis-ci >
[travis-ci] opal/opal#1979 (master - d34f42f : Elia Schito): The build passed.
21:08
travis-ci has left #opal [#opal]
21:16
dbackeus has quit [Ping timeout: 246 seconds]
21:50
wmnnd has joined #opal
21:51
DrShoggoth has quit [Quit: Leaving]
22:13
elia has joined #opal
22:20
meh` has quit [Quit: I don't want to live on this planet anymore.]
22:24
elia has quit [Quit: Computer has gone to sleep.]
22:58
wmnnd has quit [Ping timeout: 258 seconds]
23:10
davispuh has quit [Ping timeout: 245 seconds]
23:34
fkchang has quit [Ping timeout: 246 seconds]