From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Brad Medeiros Newsgroups: gmane.lisp.guile.devel Subject: How to "sandbox" scripts Date: Thu, 16 Apr 2020 23:27:51 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c0655505a376a699" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="19161"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Apr 17 10:04:11 2020 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPLyt-0004tG-N1 for guile-devel@m.gmane-mx.org; Fri, 17 Apr 2020 10:04:11 +0200 Original-Received: from localhost ([::1]:43516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPLys-0005lL-Md for guile-devel@m.gmane-mx.org; Fri, 17 Apr 2020 04:04:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60175) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPKTu-0004JH-BP for guile-devel@gnu.org; Fri, 17 Apr 2020 02:28:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPKTt-0000m1-9a for guile-devel@gnu.org; Fri, 17 Apr 2020 02:28:06 -0400 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:42961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPKTs-0000lO-WC for guile-devel@gnu.org; Fri, 17 Apr 2020 02:28:05 -0400 Original-Received: by mail-lf1-x12f.google.com with SMTP id j14so863017lfg.9 for ; Thu, 16 Apr 2020 23:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=4wGt+TbM3KbEYAzZiybXyYoXSzRX/eR6oL0Nv+cOgZ0=; b=SoKWmRIl2BNELXflJl8j8Dcbp2T14PUySADoHvmGdKFKnZhDdqqXm8njfZNFAA8V8B WrtvxzShXmH8T9Rfm5IQ7BPUYBbugB+FGdAF/tQxu2IszXtnMtns18aKrxxhUwM15yQi k5qfXiUV2HgKrtikrJIdWRUqO4NPHC3z0y+JCo3bgppvuvZvBk7BkeFcEJNbOLGmCaj/ kjoR5GvpFv84l/v8e30Y2SuGKJZkGYrPYGE324IrqLqKF03L6b9DicqgI/ZcQZJd7BWn aNZIwyLOjYyeU6zOfLRhDwZkYZoJaloFejzzBgPYLTCIh2wrn0paPPZvA45xewIL+CBQ GmxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4wGt+TbM3KbEYAzZiybXyYoXSzRX/eR6oL0Nv+cOgZ0=; b=quvYbaMokdGY54t4otSloclc9kiBYhbAWdoDeXOhxA/OzNWcq8VBt8/K13jO1wAWrA pXyQ4eNVZ9gEqVME7H81nHxO0X4B6whdKGunAlI2qHq5Ku7uhmYfzDsuODEhzzCWliRV 2k4TbAQxU7rkvh5iUD8E3uftpsfIADNpjrAMo6iOkKW4z8O5t3lLSILtJicjNlmKaU+d xpbFYCTFT9GVnAP1OggI9pjF2CNjxfnSS8xFkDrHEnS1gFz9AGY3jWkXMNxbDmbY26q4 wrQnDyNTrxlTmhu0QkgLQExstxTDjOVBGogQZ87MGo4zifv+IiN4M6VPkZKBZbuvsrzS bauw== X-Gm-Message-State: AGi0PuYFaSmNBwxkggnF7cCK1fVOo9p3Xro9CyU/MeLhCfhX8bT7dDjU IlX09zG8hM2fK7/RGPPCRwwkrIE1x7yAFOCWp9ecHpNjupQ= X-Google-Smtp-Source: APiQypIaKmzTF60RSIhK9qZFXdnXV014lbkMw5TmmpjXjsW5KeykvoQ5XI+GgJsdkkBqPE5iLlA+IE0DEsR6F/C1GKw= X-Received: by 2002:ac2:46c4:: with SMTP id p4mr1012493lfo.37.1587104882647; Thu, 16 Apr 2020 23:28:02 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::12f X-Mailman-Approved-At: Fri, 17 Apr 2020 04:03:48 -0400 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20489 Archived-At: --000000000000c0655505a376a699 Content-Type: text/plain; charset="UTF-8" Hi All - I haven't been active on these mailing lists, but I've been reading them for a bit of time now. Nice to actually reach out! I am building a simple game engine and I'm embedding guile in it to do game scripting. One property I want is the ability to write scripts where each defines a function - eg onFrame, onMouseMove, and so on, and then call these. Currently I do this via calling scm_c_primitive_load to actually run the initial evaluation and then I call back into hooks - scm_call_0(scm_c_lookup("onFrame")); So far it has been working great. What I would like to do, is to be able to load multiple scripts that define the same set of functions, and then iterate over them calling each's onFrame. Ideally these should be sandboxed as much as possible. Any ideas of how to do this? --000000000000c0655505a376a699 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi All - I haven't been active on these mailing lists,= but I've been reading them for a bit of time now.=C2=A0 =C2=A0Nice to = actually reach out!

I am building a simple game engine and I'm = embedding guile in it to do game scripting.=C2=A0
One property=C2=A0I wa= nt is the ability to write scripts where each defines a function - eg onFra= me, onMouseMove, and so on, and then call these.

Currently I = do this via calling scm_c_primitive_load to actually run the initial evalua= tion and then I call back into hooks - scm_call_0(scm_c_lookup("onFram= e"));=C2=A0 So far it has been working great.

What I would like to do, is to be able to load multiple scripts that defin= e the same set of functions, and then iterate=C2=A0over them calling each&#= 39;s onFrame.=C2=A0 =C2=A0Ideally these should be sandboxed as much as poss= ible.=C2=A0=C2=A0

Any ideas of how to do this?=C2=A0
--000000000000c0655505a376a699--