Code Monkey home page Code Monkey logo

Comments (26)

DennisOSRM avatar DennisOSRM commented on August 27, 2024

Moving to 0.4

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

A first prototype is running here that uses a speedprofile defined by a LUA script. Will be moved to a seperate dev-branch in the near future.

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

cool!

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

I was thinking today to also experiment with a JavaScript library to see what works best.

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

cool. i think js would be easier for a lot of people, since it's so widespread. plus you can use coffeescript :-)

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

what's the performance of running lua vs js?

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

I haven't run any tests yet, but I suspect that both fair well. I am more thinking of usability and maintainability.

@karme Any objections to using JavaScript?

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

i agree usability and maintainability are probably more important that raw speed. but perhaps js offer all three things

from osrm-backend.

karme avatar karme commented on August 27, 2024

Project OSRM [email protected] writes:

I haven't run any tests yet, but I suspect that both fair well. I am
more thinking of usability and maintainability.

@karme Any objections to using JavaScript?

fine with me

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

I must conclude that Googles V8 is a pain after two days of working with it.

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

can you say more? hard to compile, bad performance..?

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

It is hard to integrate into existing code that was not built with V8 in mind. Also, the amount of additional wrapping code around it is not trivial.

On the other hand, it took half an hour and 15 lines of code to get basic functionality with LUA. I will investigate further what the performance of LUA.

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

thanks for explaining.

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

I have an internal branch running that does the node parsing through LUA now. LUA works like a charm and I didn’t notice any substantial speed-down.

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

To give some feeling how parsing of nodes works, here is the LUA code snippet:

bollards_whitelist = { [""] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["no"] = true}
access_whitelist = { ["yes"] = true, ["motorcar"] = true, ["permissive"] = true }
access_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestery"] = true }

function node_function (node)
  local barrier = node.tags:Find("barrier")
  local access = node.tags:Find("access")
  local traffic_signal = node.tags:Find("highway")

  if traffic_signal == "traffic_signals" then
    node.traffic_light = true;
  end

  if access_blacklist[barrier] then
    node.bollard = true;
  end

  if not bollards_whitelist[barrier] then
    node.bollard = true;
  end
  return 1
end

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

nice, thanks for posting!

i have to admit i personally would much prefer javascript, instead of having to learn and remember yet another (similar, yet different) script language.

i believe js could potentially attract more developers to osrm than lua, since so many people know it, and there's a lot more js code out there than lua. for rubyist, the ability to use coffeescript (which converts to js) would also be an option with js.

but in any case i'm excited to see progress on the new tag parsing system!

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

There is some progress to report. Now also ways get parsed through the LUA engine and it looks great. There are only few edges left to tweak to get it fully working. I will push the development branch to the repository later today.

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

sweet

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

Darn! For some reason, it landed in master branch. But anyway, feel free to give it a try.

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

:-)

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

looking forward to trying it

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

I will close this issue now and would like to encourage everyone to file new issue reports when bugs occur. Of course discussion can also continue here.

from osrm-backend.

emiltin avatar emiltin commented on August 27, 2024

do you envision a lua script for each transport mode - bike, car, foot, etc - added to the repo?

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

For the time being seperate profiles for each mode

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

Luabind formula has been submitted to homebrew: Homebrew/legacy-homebrew#14914

from osrm-backend.

DennisOSRM avatar DennisOSRM commented on August 27, 2024

For OS X users: Please note that OSRM builds with clang only and that there is still one issue left.

from osrm-backend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.