Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
pentlander
@pentlander
Hi, just curious if there are any example of gluon being used in a "production environment"
Markus Westerlind
@Marwes
@pentlander Not really, gluon-lang.org / https://github.com/gluon-lang/gluon-lang.org is probably the most extensive thing I know of
Aashish Welling
@omegablitz
Hi @Marwes, is there any chance you could update the gluon crates on crates.io? Excited for this change in particular: gluon-lang/gluon#803 :)
Aashish Welling
@omegablitz
@pentlander not really worth much but i've been running gluon in prod on a small (~20-30 daily active users) game server since january now, and it's been working wonderfully
Brendan Zabarauskas
@brendanzab
ooh, what kind of game is it?
Aashish Welling
@omegablitz
a quite obscure one lol: http://www.barbu.co.uk/
i built a game engine using gluon as the scripting language
and implemented barbu on top of it
which is now being used in prod
Brendan Zabarauskas
@brendanzab
very cool :)
Markus Westerlind
@Marwes
cool! Been a bit stuck with both improving inlining and fixing hacks with the formatter. Finally got formatting done however so I will try and do a release tonight
Snarpix
@Snarpix
Great!
jakbyte
@jakbyte
what's with the String and Type files in the root of the repo?
Markus Westerlind
@Marwes
gluon-lang/gluon#827 accidentally added with git add .
Aashish Welling
@omegablitz
i think the top level Cargo.toml is missing the rt-core feature for tokio unless i'm missing something
gluon was having a compilation error until I added the rt-core feature on a local patch at least, because of tokio::spawn
Aashish Welling
@omegablitz
hmm also my gluon type serialization/deserialization seem to have broken after updating. serializing and immediately deserializing gives me a Binding(<i64 as ).std.ops.Shl<i64>>.shlis not defined error. my guess is that something broke with linking against primitive functions
ill try to make a minimal reproduction of it :)
Markus Westerlind
@Marwes
Yeah I noticed that when publishing (among a few other issues...)
Trying to push out a 0.14.1
Haven't seen the serialization issue though so that is likely still there
At least that should be testable
Markus Westerlind
@Marwes
Got 0.14.1 out finally, had way to many issues with the publishing scripts (cargo publish finishes before the crate is available, tried to fix it by searching for the crate and checking that the version were uploaded but unfortunately crates are also available for searching before they are published as well...)
Aashish Welling
@omegablitz
awesome! :)
michael
@iptq
hey is it just me or does documenting gluon_base consume infinite memory and crash
cargo doc -p gluon_base
Markus Westerlind
@Marwes
Tested and I am also seeing it, no idea why yet docs.rs docs for gluon_base is missing because of this :(
stephenfrechette
@stephenfrechette
@Marwes any update on the issue aashish brought up? We currently aren't able to update our game at all due to it :(
Markus Westerlind
@Marwes
I were waiting for a reproduction, probably not to difficult to reproduce on my own though given the description
Aashish Welling
@omegablitz
I have a reproduction locally, I can send it over if that's helpful
I was meaning to take a look myself but hadn't gotten around to it yet
stephenfrechette
@stephenfrechette
Sorry if I appeared nagging, I really just meant if you've found any insight on it
Markus Westerlind
@Marwes
@iptq gluon-lang/gluon#832 Fixes the docs
Aashish Welling
@omegablitz
@Marwes do you have any ideas on why this fails: https://github.com/omegablitz/gluon-bug ? I get a TrailingData error on deserialization, but not sure if I'm doing something wrong.
Trying to serialize/deserialize this: https://pastebin.com/S33kvk3p
Snarpix
@Snarpix
Is it possible to dynamically create record type and value from Rust? When field names are known only at runtime?
Markus Westerlind
@Marwes
You can, the script itself will of course see a static type though
https://github.com/Marwes/gluon_specs/blob/master/src/lib.rs is the only place I have done it and it has a lot of other complexity
So it isn't well documented
Snarpix
@Snarpix
Thanks, I will take a look.
Currently I'm using function arguments, and I hope custom records can release the burden of correctly naming passed arguments.
Snarpix
@Snarpix

I am calling a function with runtime-typed args using call_any and want it to return a runtime-typed tuple.
But I failed to find a type that is both Getable and VmType, to specify as return type for call_any.
gluon_vm::api::ValueRef is almost a match: Getable but no VmType implementation.
Variants is also suitable, but unfortunately I can't get it from call_any.
I see two options:

  1. Implementing call_any myself, so it can return Variants
  2. Try to write a Deserializer for runtime-typed tuple

May be I have missed something?

Snarpix
@Snarpix
My bad. OpaqueValue<RootedThread, Hole>::get_variant will do the thing
Markus Westerlind
@Marwes
:+1:
Markus Westerlind
@Marwes

@omegablitz
@Marwes do you have any ideas on why this fails: https://github.com/omegablitz/gluon-bug ? I get a TrailingData error on deserialization, but not sure if I'm doing something wrong.
Trying to serialize/deserialize this: https://pastebin.com/S33kvk3p

https://github.com/gluon-lang/gluon/pull/834/files

Aashish Welling
@omegablitz
Ah okay, thanks!
inivekin
@inivekin
A bit of a beginner/general question about non-Sync+Send types - feel free to ignore if it bores you: I've been getting into hardware programming and thought it would be interesting to try to make simple gluon bindings to the Kaze library and see if I could a basic version of the clash-prelude haskell modules - but I've only done some basic stuff in gluon and the kaze library uses RefCell all over the place. I can't seem to find a clean way to handle values that aren't Sync + Send to Gluon. Is this where OpaqueValue can come in useful or is that really only useful for generics? Any examples of gluon code that might be enlightening to me for this?
Markus Westerlind
@Marwes
@inivekin !Sync data is something that I want to support but haven't gotten to yet. At the moment everything must be Send + Sync. gluon-lang/gluon#46
inivekin
@inivekin
Ah, good to know. Thanks.
Aashish Welling
@omegablitz
If I try to run an expression on the gluon vm while i have an ActiveThread reference from vm.current_context(), gluon deadlocks. Is this expected behavior?
I may be doing it horribly wrong, but I'm trying to evaluate an expression in between deserializing 2 blobs with the same DeSeed