Approvals: 0/1
[00:57:13] <moura_> Hi, I'm trying to send a Bearer token to my api but unsuccess =( can someone help me?
[01:15:02] <sparekh> hey all a quick question, I am setting the host on my HttpClient to be a remote host, when vertx is doing a GET call it is appending a domain to that host, is this expected behavior?
[01:16:20] <sparekh> i.e. .setDefaultHost(https://www.google.com)…SEVERE: java.net.UnknownHostException: failed to resolve 'http://www.google.com/.abc.net'. Exceeded max queries per resolve 3
[13:06:22] <aesteve> hi temporalfox I have a Ceylon + IntelliJ question. Do you know how to configure a proxy for module resolution (within Idea + Ceylon plugin ?)
[13:06:33] <aesteve> currently trying to port the todobackend example to Ceylon
[13:06:41] <aesteve> but struggling at the very first step :\
[13:14:29] <aesteve> for now I used the .ceylon/config approach but it's “per project”
[13:27:33] <temporalfox> aesteve I think best place to get an reply is the ceylon gitter
[13:27:38] <temporalfox> I haven't used much ceylon in intellij
[13:28:01] <aesteve> ok thanks
[21:48:25] <aesteve> hi temporalfox I'm still working on Ceylon's todobackend implementation
[21:48:40] <temporalfox> how is it going ?
[21:48:47] <temporalfox> so you are going to make the todobackend in all languages ?
[21:48:50] <aesteve> do you have an idea on how to deal with HttpMethod ? like HttpMethod.PUT
[21:49:05] <aesteve> yes that's a pretty nice exercise actually :)
[21:50:20] <aesteve> you start with the basics, then add method references, then deal with JSON, then try to generify the approach to manage different TodoService implementations (JDBC, Mongo etc.)
[21:50:27] <temporalfox> there is a ceylon enum no ?
[21:50:42] <aesteve> it's not “the expression problem” but it's a good starting point
[21:50:47] <aesteve> I can't find one
[21:51:36] <aesteve> there's io.vertx.core.ceylon.http.HttpMethod
[21:51:51] <aesteve> but I can't find “put” or “PUT” within
[21:52:09] <aesteve> shared object put extends HttpMethod(“PUT”) {}
[21:52:15] <aesteve> it should be there :P
[21:52:43] <temporalfox> it is in lower case
[21:52:44] <temporalfox> yes
[21:52:48] <temporalfox> because this is ceylon convention
[21:52:54] <temporalfox> I did not like it that much but well
[21:52:56] <aesteve> shared abstract class HttpMethod(shared String name) of options | get | head | post | put | delete | trace | connect | patch | other {
[21:52:57] <temporalfox> we had a debate
[21:53:06] <temporalfox> with Ceylon guys
[21:53:12] <temporalfox> and I did not want to waste energy there
[21:53:34] <aesteve> ooooooooh the import was wrong
[21:53:45] <aesteve> should have looked at the class definition before
[21:54:07] <aesteve> it's directly on io.vertx.core.ceylon.http { put }
[21:54:47] <aesteve> but HttpHeaders seems missing if I'm not mistaking
[21:57:10] <temporalfox> that's a non vertx gen enum
[21:57:16] <temporalfox> you don't have it either in javascript
[21:57:46] <aesteve> ok
[21:58:09] <aesteve> so io.vertx.core.http.HttHeaders.contentType.string
[21:59:11] <aesteve> router_.route(“/todos/*”).handler(bodyHandler.create());
[21:59:23] <aesteve> and this doesn't compile, which is kinda weird to me
[22:00:44] <temporalfox> what does return bodyHandler.create() ?
[22:03:13] <aesteve> https://thepb.in/p/3lh7jwEPYOwh1
[22:03:35] <temporalfox> what does not work so ?
[22:05:12] <aesteve> mmh sounds like a bug in IntelliJ
[22:05:27] <aesteve> I tried ceylon compile to copy/paste the error
[22:05:33] <aesteve> and it's not there
[22:07:18] <temporalfox> ok
[22:07:26] <aesteve> but IntelliJ says : argument must be assignable to parameter requestHandler of handler in Route CorsHandler is not assignable to Anything(RoutingContext)
[22:07:27] <temporalfox> yes intellij might have errors that you should repot
[22:07:29] <temporalfox> report
[22:10:08] <aesteve> wish I could reproduce it within a simpler example :P
[22:10:18] <aesteve> in order to file the report
[22:11:28] <temporalfox> yes that's often a problem
[22:12:18] <aesteve> actually
[22:12:21] <aesteve> nvm
[22:12:32] <aesteve> source/todobackend/routing/TodoRouter.ceylon:42: error: argument must be assignable to parameter 'requestHandler' of 'handler' in 'Route': 'CorsHandler' is not assignable to 'Anything(RoutingContext)'
[22:12:32] <aesteve> router_.route(“/todos/*”).handler(cors);
[22:12:44] <aesteve> IntelliJ was right
[22:12:51] <aesteve> want me to push the project to Github ?
[22:17:21] <temporalfox> yes - report it to Ceylon tracker
[22:18:01] <aesteve> https://github.com/aesteve/vertx-ceylon-todobackend
[22:19:11] <aesteve> I can report it but are you sure it's not an obvious mistake ? that's maybe the 10th line of Ceylon I'm writing :\
[22:20:44] <temporalfox> the best is to go to Ceylon mailing list I think
[22:20:49] <temporalfox> at the moment I'm quite busy
[22:22:36] <aesteve> yeah sure
[22:23:01] <aesteve> or on the gitter maybe ?
[22:24:20] <temporalfox> gitter would work too
[22:24:43] <temporalfox> so which lang is your favorite ?
[22:25:24] <aesteve> very hard question
[22:25:40] <aesteve> can't tell for ceylon since I haven't done anything yet
[22:26:55] <aesteve> I kinda hate some Scala's part but love some of its ideas, still not sure how to use companion objects properly for instance
[22:27:15] <aesteve> I like Kotlin but can't get used to having no method reference
[22:27:50] <aesteve> I think I'll love Ceylon's type algebra even though I still have no idea how I'll use it :P
[22:28:48] <temporalfox> it's very nice yes
[22:29:16] <temporalfox> it can be convenient for collection of heterogeneous types
[22:29:21] <temporalfox> List<String|Integer>
[22:29:37] <aesteve> definitely
[22:30:42] <aesteve> I created a very thin layer over JPA the other day, and found myself writing “some type that is bot restrictable and fetchable” or “something that's summable” or “something that's either a String or a Number”
[22:30:54] <aesteve> that's why I wanted to give Ceylon and Scala a try
[22:31:12] <aesteve> (I started with Scala not for type alebra bu I had the book on my desk)
[22:34:51] <aesteve> cors.handle
[22:34:58] <aesteve> that's the answer
[22:35:07] <aesteve> bodyHandler.create().handle
[22:35:17] <aesteve> the method reference, makes sense
[22:47:01] <temporalfox> ah yes
[22:47:04] <temporalfox> I see what you mean
[22:47:05] <temporalfox> indeed
[22:47:10] <temporalfox> ceylon is a bit like javascript here
[22:47:48] <aesteve> last question, how do you deal with future creation
[22:47:55] <aesteve> there are examples on how to handle results
[22:48:03] <aesteve> (very elegant actually)
[22:48:18] <aesteve> but what'd be the Future.suceededFuture() equivalent ?
[22:54:07] <temporalfox> it exists I think
[22:54:19] <temporalfox> i've developed a ceylon.promise in ceylon
[22:54:29] <temporalfox> but never really integrated it with vertx/ceylon
[22:54:40] <aesteve> yes, that must be the same thing as the httpmethod
[22:54:47] <aesteve> it exists but I just can't find it
[22:55:52] <aesteve> found it !
[22:55:52] <aesteve> SucceededResult([])
[22:56:50] <temporalfox>
[22:56:56] <temporalfox> you'll get used to it
[23:07:30] <aesteve> mmh but SucceededResult<T> isn't acceptable by Callable<Anything, T|Throwable>
[23:08:03] <temporalfox> adapt it with a lambda
[23:08:08] <temporalfox> ah
[23:08:13] <temporalfox> yes adapt it
[23:08:18] <temporalfox> with a switch case
[23:08:34] <aesteve> yeah but if you're defining a service “the vertx way”
[23:08:52] <aesteve> void list(Handler<AsyncResult<List<String»> handler)
[23:09:08] <aesteve> handler.handle(Future.succeededFuture([]));
[23:09:47] <aesteve> in Ceylon I tried to write : list(Callable<Anything, [Throwable|List<String>]>)
[23:10:05] <aesteve> handler.handle(SucceededFuture([]));
[23:10:42] <aesteve> (in fact I read the code of executeBlocking)
[23:12:17] <aesteve> error in this case is : SucceededResult<String> is not assignable to Throwable | String
[23:12:21] <aesteve> which makes perfect sense
[23:20:58] *** ChanServ sets mode: +o temporalfox
[23:21:22] <temporalfox> computer crashed
[23:21:37] <aesteve> ah
[23:22:14] <aesteve> the question is basically : how to implement an asynchronous contract in a synchronous way
[23:23:24] <aesteve> contract is : void list(Callable<Anything, [String|Throwable] handler) void list(Handler<AsyncResult<String» handler) [23:24:37] <temporalfox> hum… [23:24:48] <aesteve> handler.handle(SucceededResult(“”)); doesn't compile cause SucceededResult is not assignable to [String|Throwable]
[23:24:56] <temporalfox> Handler<AsyncResult» in Ceylon is T|Throwable
[23:25:41] <aesteve> where do you think I could find such an example ?
[23:26:38] <temporalfox> let me re-read
[23:27:10] <temporalfox> ah
[23:27:14] <temporalfox> you should do
[23:27:17] <temporalfox> handler.handle(“”);
[23:27:20] <temporalfox> no ?
[23:27:26] <temporalfox> well
[23:27:35] <temporalfox> handler(“”)
[23:27:37] <temporalfox> it's a function
[23:27:45] <temporalfox> (in ceylon function)
[23:28:27] <aesteve> since handler is a Callable
[23:28:38] <aesteve> ah ok
[23:28:47] <aesteve> so no SucceededFuture
[23:28:50] <temporalfox> no
[23:28:57] <aesteve> yes ok, makes sense
[23:29:05] <temporalfox> Handler<AsyncResult» is a ceylon function
[23:29:11] <temporalfox> like Handler
[23:29:58] <aesteve> yeah sure
[23:30:10] <aesteve> I'm trying to write it with jdbc now
[23:30:25] <aesteve> to make sure my async contract fits both the synchronous and asynchronous operation
[23:35:22] <temporalfox> going to bed aesteve
[23:36:38] <aesteve> good night !!
[23:36:42] <aesteve> thanks for the help