Code Monkey home page Code Monkey logo

piccolo's People

Contributors

anyska avatar cjcole avatar g-plane avatar kyren avatar omnipotententity avatar poga avatar veykril avatar zicklag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

piccolo's Issues

Passing Lua bytecode to the compiler and getting an AST-Like return value

How would I do this? I've skimmed through the compiler code but as its 23:30 of the time of writing this i can't fully look into the entire source to see how Lua gets compiled to bytecode gets compiled to instructions or if it's Lua straight to instructions and skips bytecode entirely.

I've looked through the compiler example and it seems to be exactly what I'm looking for but i don't know if the prototype is a tree-like value that i can walk through with a simple for loop and a match statement.

Memory Corruption when running tests

I just checked out this project and it seems like there's a memory corruption happening when running the tests. I'm not sure you are aware of that, so I'm just letting you know in case.

Critical error detected c0000374
Exception thrown at 0x00007FFC01204D1B (ntdll.dll) in basic-66257f80e6d12447.exe: 0xC0000374: Ein Heap wurde beschädigt (parameters: 0x00007FFC012697B0).

Question: Serialization of entire Lua state

Not proposing this as a feature but just wondering if it would be possible in theory to save and reload the entire Lua state? Given the "stackless vm" design and the "reified stack", it seems like it may be more possible than in other designs so I thought I would ask. I expect that if nothing else, the Rust callbacks that are stored in the state would be unserializable, but curious what other deal breakers there might be?

This project is no longer on hold!

Been going through my open source projects which I've been neglecting and figured I should write something here about where I am with this project.

Unfortunately I'm no longer working on a larger project where I think this might be useful
(for my current needs wasm is a better fit), so I'm not going to update this
project at least in the near term. I still think the core part of this project (safe interaction with a garbage collector via a futures-ish API) was a neat idea, and I'd still like to explore
this in the future when the hopefully the compiler is a bit more ready.

Before I pick this up again though I think that there needs to be additional
support in the Rust compiler for doing this, because while it is possible to use a GC safely via combinators, it is not at all pleasant. What I'd like is for it
to be possible to have a safe GC'd API using async / await or generators, but
AFAICT right now it is not possible. I tried for a while recently to see if I could come up with even a very limited version of the "sequence" API that worked with async / await functions and I couldn't find anything that worked.

You can't auto-generate Collect for closures or generators right now which is certainly a
limitiation, but it isn't actually the biggest problem currently. Right now
there's no way I can find to pass a Context<'gc> with a unique, branded 'gc
lifetime through an async function while having that async function not also be
of the 'gc lifetime. We need the async function to strictly outlive 'gc so
that it can't hold Gc pointers across await points, or we need some other
solution. (Incidentally I can't make this work at all right now, but even if
I could I know that you can't make the lifetimes work out so that the async
function lives for longer than 'gc).

Once I find any way of proceeding that enables generators-like functions instead of combinators, I think I'll pick this back up, but until then I'm not going to update this.

I'll keep thinking about the problem though! If anybody else has any ideas about how to make this work, let me know!

Evaluate Profile-Guided Optimization (PGO)

Hi! Thanks for the project!

Recently I did a lot of PGO benchmarks on different kinds of software - the results are here. I think the same optimization option could be useful to Piccolo too.

I understand that the project is in the early stages of development so it's probably not the right time for asking about such things. But maybe one day this day will come and we will be able to perform PGO testing (and documenting its effects on Piccolo). For the users will be helpful to see information about PGO effects (and other performance tuning techniques if any) to improve Piccolo performance.

If you are going to play with PGO, I recommend starting with cargo-pgo.

next() function

I've started to have a play with luster to see how it might fit into another project.
I was wondering about adding some of the table functions, but notice that the next function isn't implemented yet.

Before I start poking around in Table, do you have thoughts on an approach? Replacing the FxHashMap with something like IndexMap might work (that IndexMap doesn't quite do everything needed as far as I can tell).

Thanks,

Chris

Async callbacks

Hello,

I have just been pointed to this repository, as I'm currently investigating scripting languages accessible from rust that would support builtins that return -> impl Future<Output = TheActualResult> (and thus have all lua functions when accessed from rust that would implicitly return -> impl Future<Output = TheActualResult>) in a way that would be transparent to the scripted language, for the configuration file of a server I'm writing.

Until now, the only language I had found that matched this property was gluon, but going with a brand new scripting language makes me uneasy, as users would have to learn it in addition to understanding how my server works.

So I wonder, is async builtins / callbacks being transparently “async'd” through the lua call stack until the initial rust caller something you are considering for luster?

Cheers, and good luck with this rewrite!
Leo

[BUG] Examples do not compile

Problem

Self descriptive

Versions

Rust: 1.72
Piccolo: Both 0.1.0 and 0.1.1

Reasons

Iterpreter example

Changes in API. No reset method for Thread and more

Compiled example

The trait bounds are not satisfied

Future of this project?

Hi! I'm wondering what the future of this project will be now that Chucklefish has decided to not use Rust for their next title.

question

Hello, I would like to know what you had envisioned for the rust API <-> lua binding. What's the progress on that front and how one could contribute? Thanks.

Luster Naming

I just published a crate named luster, not realizing that there was a Rust program of that name.
I dont mind trying to change my crate if you might still want the name 'luster'.

Just let me know!

Problem with multiple return values and assignments

I've noticed that assignments with functions with multiple return values doesn't work. For example:

function mulret()
    return 1,2,3
end

a,b,c = mulret()
print(a,b,c)

In lua gives:

1       2       3

In Luster:

1       nil     nil

I think the problem is in the handling of assigment statements in the compiler, which seems not to have allowed for multiple returns yet (the function is called with 1 expected return value).

Suggestion: Nested FromLuaMulti

Hi, I recently created a PR on rlua that adds ability to nest MultiValues which makes it very convenient to allow new kinds of parameter unpacking in registered functions. It hasn't been accepted yet, but I propose this addition to piccolo as well.

The PR contains very verbose explanation of these changes as well as use case examples.

I find it weird that from_lua_multi can take any number of arguments without telling the caller how many were consumed (which can be ignored if not needed). I do see that it's only really intended for function arguments and Variadic is just a nicety that comes from it, but given that something like this greatly improved DX on my project I think it could be a useful to others as well.

Implement `__newindex` Metamethod

Hey there! We're considering using piccolo in Jumpy and as I was just browsing and playing around I realized that __newindex isn't implemented yet. We'd probably need that as a way to create proxy types that let us hook into variable assignments.

I might be able to implement it myself, and there's still a chance we don't end up using piccolo or we don't get to testing it out just yet, but I figured I'd open an issue to put it on the radar and see if there was anything I should know if I tried to implement it.

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.