Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 25 09:45
    jerviscui commented #404
  • Sep 25 09:45
    jerviscui opened #404
  • Jul 07 00:50

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jul 07 00:50
    dependabot[bot] closed #393
  • Jul 07 00:50
    dependabot[bot] commented #393
  • Jul 07 00:50
    dependabot[bot] labeled #403
  • Jul 07 00:50
    dependabot[bot] labeled #403
  • Jul 07 00:50
    dependabot[bot] opened #403
  • Jul 07 00:50

    dependabot[bot] on npm_and_yarn

    Bump moment from 2.24.0 to 2.29… (compare)

  • Jun 19 03:32
    sowbug opened #402
  • Jun 17 01:26
    dependabot[bot] labeled #401
  • Jun 17 01:26
    dependabot[bot] labeled #401
  • Jun 17 01:26
    dependabot[bot] opened #401
  • Jun 17 01:26

    dependabot[bot] on cargo

    Bump smallvec from 0.6.13 to 0.… (compare)

  • Jun 17 01:25
    dependabot[bot] labeled #400
  • Jun 17 01:25
    dependabot[bot] labeled #400
  • Jun 17 01:25

    dependabot[bot] on cargo

    Bump smallvec from 0.6.13 to 0.… (compare)

  • Jun 17 01:25
    dependabot[bot] opened #400
  • Jun 14 23:45
    dependabot[bot] labeled #399
  • Jun 14 23:45
    dependabot[bot] labeled #399
manuel3108
@manuel3108
Maybe its helpful: Have you testet on Wndows? Might be an error there?
Dominik Z.
@dommynik
@aeickhoff Regarding the lock-free variable-length message mpsc queue: Lock-free sounds too good to be true, maybe a spin-lock would be a better solution, or in best case with atomics? Writing into the queue should be fast afaik. Furthermore, maybe variable-length sized messages should be aligned to cache line size to minimize false sharing and other non-cache-friendly side effects. I'd like to support you in this stuff ;)
manuel3108
@manuel3108
I finally got it to work. I deleted my complete dev-environment and reinstalled it starting vom zero. When compiling I am getting some errors, but the application starts. Can you have a look at them? I have copied them here: http://manuel-serret.bplaced.de/log.txt Otherwise I am getting the same car-spawning error as earlier and I am also not able to execute the stuff with rustfmt
Anselm Eickhoff
@aeickhoff
@dommynik thanks for your thoughts! I didn't think about it in too much depth yet, but several points: 1) I thought that just using atomic CAS doesn't count as locks? 2) Atomic CAS are definitely enough to concurrently write into and read from an infinite queue 3) The only thing that gets problematic is allocating a new chunk when space runs out, obviously then everyone has to wait for the allocating thread - maybe spin locking is enough for that, maybe we need a full blown lock for this case (not sure what the timing of the allocation is). Let me know what you think and thank you for your support
@manuel3108 these are all just warnings, which I will fix soon. Probably it would have been enough for you to do cargo clean to purge all dependencies, but ok. Regarding the car spawning, can you run first set RUST_BACKTRACE=1 and then cargo run --release and paste me the stack trace you get when spawning a car?
manuel3108
@manuel3108
@aeickhoff I haven't seen that these were just warnings. I will do it tomorrow
Anselm Eickhoff
@aeickhoff
thank you!
manuel3108
@manuel3108
I have copied the whole console output here: http://manuel-serret.bplaced.de/log.txt In my opinion there are no new information.
Dominik Z.
@dommynik
@aeickhoff You're right, atomics are lock-free solutions, I did not think about that. I've spoken with some phd's in comp.sc., and they all struggle to give me a solution for this problem. Their initial thought was to have multiple queues for each working thread, but this doesn't solve all problems. How big are your messages? Maybe they'd all fit into a single cache-line, then you could just use fixed-sized reservations in the queue?
Anselm Eickhoff
@aeickhoff
@dommynik cool, thank you! Which problems are not solved by multiple queues (I assume one per consumer-producer pair)? My messages vary wildly in size, everything from < 10 bytes to > 1 MB is possible. Typical is < 100 bytes I would say
Dominik Z.
@dommynik
@aeickhoff Performance I guess. I don't know how much overhead there will be when a consumer needs to iterate through all consumer-producer-queue-pairs. In a runtime system, where all actors are processed by N threads, there would be N producers respectively N queues per mailbox - you wouldn't need to lock the queues for inserts, since each thread has exclusive access to its queue. So all in all ... I would say, that the complexity moves from writing into the queue to reading from the queue, but you need to have a lot more queues. While writing this, I see that this trade-off seems quite nice ... no need for atomic operations or locks for mailboxing! I assume that the actor system doesn't need ordering? If yes, than there's a lot more to do :smile:
Anselm Eickhoff
@aeickhoff
@dommynik ordering doesn't matter! (as long as reading one queue doesn't progress much further than the other incoming queues). The nice thing about this would be that the write side would be completely responsible for allocation, the read side for deallocation of queue chunks - leading to no conflict that would require a lock at all! I feel like this is the go-to solution - I don't think that NxN queues for N cores is too much given these benefits.
The only remaining benefit of having a MPSC queue would be that the producers always can already put the message in the correct actor queue and there would be no need for an intermediate thread queue, including the additional copying
My instinct would be to try the NxN queues solution first and see if it is too slow, since it should be much easier to implement
Dominik Z.
@dommynik
@aeickhoff Do you have any docs about the runtime system you have in mind? miss some information about the design of the multi-threaded actor system - do you want multiple working threads with per-thread mailboxes/queues, and the task of the working threads is to read from their mailboxes/queues and forward messages to the corresponding actor? But would that mean that there is a fixed assignment of actors to threads? Or do you want to use an implementation where working threads act as hosts for "green threads" by fetching actors from an actor pool one by one, processing all of its outstanding messages (each actor has its own mailbox(es)) and producing new messages? I see that the current single-threaded implementation (main.rs) works in some kind of waves, where you "do the tick" (producing messages?) in a first wave, and process the messages in a second wave. I'm really interested in your work, it's really fascinating!
Anselm Eickhoff
@aeickhoff
@dommynik I haven't documented my plans for the multi-threaded part yet, unfortunately. For the beginning I just want to mirror how multi-machine networking works - so a fixed assignment of actors to threads. If it turns out to be necessary, a green-thread/job-scheduling system like you describe could be implemented much later
kingoflolz
@kingoflolz
@dommynik a while ago @aeickhoff and I had a discussion about multithreading and other improvements for Kay, here: citybound/citybound#76
Anselm Eickhoff
@aeickhoff
Thanks for the link, but it already sounds kinda outdated...
Idonoghue
@Idonoghue
@aeickhoff Yep, my problem was that I set up my dev environment the day before that nightly update and I must have missed it. Thanks for the help Anselm! It seems that now the car-spawning crash will now occur for me when the road network exceeds a certain size, typically like 3 medium size roads will do it for me. If you want I can open an issue and put my call stack and debug messages in there?
Anselm Eickhoff
@aeickhoff
@ldonoghue yes please
zakerunner
@zakerunner
Trying to compile from source, building the dev environment so I can help more with debugging. Getting an error that may be similar to @Idonoghue 's :smile: failed to run custom build command for glutin v0.9.2

that wasn't supposed to be a smiley. Anyhow, I'm not sure how to tell what version citybound is using at compile, but I installed rustc 1.23.0 nightly (2017-11-03) and rustup 1.7.0 (2017-10-30). not sure if I need to revert somehow to earlier versions.

Also the rustfmt command failed for me: rustfmt --write-mode=overwrite ./game/main.rs ./engine/*/src/lib.rs Not sure if I need to modify that for a Windows command shell interface

Vladimir
@bogdad
@zakerunner the rustc version is specified here https://github.com/citybound/citybound/blob/master/CONTRIBUTING.md#compiling-citybound-from-source for each platform
Ian Paschal
@ianpaschal
for those working with Rust on macOS, any idea why I can’t get started with the hello_world example? I managed to work through a buch of the rust book back when Anselm open sourced the code, but now i can’t even compile the most basic program
I’m getting:
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "main.main0.rust-cgu.o" "main.main1.rust-cgu.o" "-o" "main" "main.crate.allocator.rust-cgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-3bdc66d380ab3ae0.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librand-a9c96b55be5fbf12.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-7d37db020b297d4d.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_system-6020283742edae37.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-cea338bc19530d4f.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-ec9c6c2125b5c0ae.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-b32efaa792018eef.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-010885f4927e31a8.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd_unicode-d8d07f9be800bfd6.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-f4176b2f23d80db2.rlib" "/Users/Ian/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-6e4af26e08893557.rlib" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m"
  = note: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun


error: aborting due to previous error
Simon Paitrault
@Freyskeyd
try xcode-select --install
Ian Paschal
@ianpaschal
hmm I need xcode?
would be nice if they mention that in the rust book. i wonder if it’s because I used to have xcode installed...
Although I’m a bit confused about what the rust compiler is if it’s using xcode
Ian Paschal
@ianpaschal
that has solved my issue, though, thank you
now to see about adding some basic shadows to monet...
Karlo Licudine
@accidentalrebel
Hello everyone. I am happy to find out that the project has seen lots of progress and contributions since the last time I checked on the project.
But it seems to have settled down over the last 2 months.
Is the project in some sort of temporary hiatus? Or has development stopped?
Nathan Broadbent
@ndbroadbent
Hi @accidentalrebel, I just saw this video which answers your question: https://www.patreon.com/posts/how-i-spent-and-16804910
Nathan Broadbent
@ndbroadbent
@aeickhoff This is an awesome project! I had a similar idea a few years ago: https://docs.google.com/document/d/1jE9YBu66gozEkAIEmmPVYVdH1lNYVJbQD8P4i95t9qQ/edit#heading=h.wnh3r58b0b8e
Nathan Broadbent
@ndbroadbent
I've also been thinking about AI, and how this could be used to create some OpenAI Gym environments - https://github.com/openai/gym
Nathan Broadbent
@ndbroadbent
anyway, hope i can contribute something in the future!
inzanez
@inzanez
hi
osldgoth
@osldgoth
Hello all, I could use some help. I've been attempting to compile and run cb. It might have compiled, perhaps not 100%?. Yesterday I needed cygwin1.dll installed and added to the PATH for it to compile. Today
  1. 'npm run watch-browser' fails to compile stdweb v0.4.8 - citybound\game_browser\Cargo.toml: Compilation failed!
    warning: debug builds on the wasm32-unknown-unknown are currently totally broken
  2. 'npm start' compiles however something isn't set right with it: Compiling citybound v0.3.0 (/citybound)
    Finished release [optimized + debuginfo] target(s) in 9.79s
    'RUNNING'
    'target' is not recognized as an internal or external command,
    operable program or batch file.
  3. regardless of the first two problems I can execute citybound.exe and it seems to work, I see "trying to ..." every second or so, then when I go to localhost:1234 in the browser the game crashes 'WHAT HAPPENED:
    index.html should exist as asset', before I report a bug I figured I'd run it by everyone here first.
Rubyjunk
@Rubyjunk
@osldgoth Hello, I know this is really late but you can change the npm start script to 'npm run build-server && echo 'RUNNING' && start ./target/release/citybound' if you want #2 to work on windows
Derek Benson
@dbenson24

npm run build-browser
audited 16656 packages in 4.876s
found 0 vulnerabilities

× C:\GitHub\citybound\game_browser\Cargo.toml: Compilation failed!
warning: debug builds on the wasm32-unknown-unknown are currently totally broken
forcing a release build
Compiling idna v0.1.5
Compiling stdweb v0.4.8
Compiling url v1.7.1
error: Could not compile stdweb.

warning: build failed, waiting for other jobs to finish...
error: build failed
error: build failed

anyone have any suggestions
Reenen
@reenenlaurie
just npm install wasm32-unknown-unknown
then retry
Derek Benson
@dbenson24
@reenenlaurie wasm32-unknown-unknown isn't an npm package
okay nevermind root directory that command did work
thanks
ran it inside game_browser and it was failing