From owner-freebsd-questions@freebsd.org Mon Mar 23 23:24:42 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 860E92730A4 for ; Mon, 23 Mar 2020 23:24:42 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48mVpK3mWgz3JXY for ; Mon, 23 Mar 2020 23:24:41 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-il1-x133.google.com with SMTP id f16so5657560ilj.9 for ; Mon, 23 Mar 2020 16:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wlP6iZaVwpq6lQfeCWM6g95TEZj0k6k+k3lbUHFQ7tY=; b=UfFI4RyDGJOIeJlU50r+SrX/gIZOZIdKfhDBF0H26ejRBvj7QbkBRKagXhn+ElLaeD QQuGL8jM67o00d8lQQMdvhGsBDd0/8hH7YUlgjL7rM9nhcnHdychVK1kez9evW9aOmR8 LwFJY2O0CZQbxqYmoaN8PxlIkyEQyqeYQXXDNcoS76wfo8jowiAU10KYjTciCNAElhSV fjTZNrJA/TB02Z0rsOjyAQzZ6Jl3gXaRgqvJAoCJBP0hV3/kDvZhFdr+0FpGq1/PLO7E OXL8Y31Gz5W5XsKL9gu7hU4j+o8vU2TtE9BATG5f/6YCRFxU5XqNcz60BwGKndu08+Xr SYhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wlP6iZaVwpq6lQfeCWM6g95TEZj0k6k+k3lbUHFQ7tY=; b=lExjvEcCwrL/X0oT3SAvlPbfsPSIEdKQD3crP6sOYsl/CHG+bJwnTdMBi60UYUNBt7 4/+JVi4+F/Zf3s0K8tXXzw3IrWP6xyIBYpMYiiEAIWajVDd68ZTArp1jYObrrsPRiw8h EF3iim860yK+hymnLP9AD2CDr1/TF7Fg+192Q4jJXcK3vcL37OwZMb7sskm7AYFJcedg ct0HIdhuONiuNkH2Y3L0G9yhzI4qrjJLth6SRklPUvQLMxEtQ1QbC9RXaxJQ06dymIEy PEx/AuZQSiWP++mGUXTmbmQzPAolFRvJ6Qk7hzxmSpxL6ssCvc20VwnOzdKEcwqSh7Vm 1Ing== X-Gm-Message-State: ANhLgQ3A+iiurb8UIj1b0aTRDLygmjAU5vuSB3AjMT1J2EOYOxoXR0Yp kOrseNvu3yxzr5axwwn8DRcnUU7gM9sLyVDCvxQ= X-Google-Smtp-Source: ADFU+vumDyb6v6KcKZj4bSafyAx5Zgb3zqw6rrqosxFsvulYYSDV9d5TjB6SNOOVDfY8YpCYlwTlayJorOqTucvSLqc= X-Received: by 2002:a92:8fdd:: with SMTP id r90mr23505701ilk.29.1585005880413; Mon, 23 Mar 2020 16:24:40 -0700 (PDT) MIME-Version: 1.0 References: <20200321044044.3p3jjdzedd3nkkuq@sea-ll-10936> <6742b7b7-67fc-a8d1-c7d4-c259f3c41f3c@nomadlogic.org> <20200323201527.yeae67icceifel6d@sea-ll-10936> <20200323222055.d785bbabbeb613661d30ca80@sohara.org> <75a140b8-b1bb-6f0f-8c82-f1919b94d599@nomadlogic.org> In-Reply-To: <75a140b8-b1bb-6f0f-8c82-f1919b94d599@nomadlogic.org> From: Aryeh Friedman Date: Mon, 23 Mar 2020 19:24:29 -0400 Message-ID: Subject: Re: NodeJS on FreeBSD To: Pete Wright Cc: "Steve O'Hara-Smith" , FreeBSD Mailing List X-Rspamd-Queue-Id: 48mVpK3mWgz3JXY X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=UfFI4RyD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::133 as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[3.3.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(0.00)[ip: (-8.49), ipnet: 2607:f8b0::/32(-0.41), asn: 15169(-0.52), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 23:24:42 -0000 On Mon, Mar 23, 2020 at 6:31 PM Pete Wright wrote: > > > On 3/23/20 3:20 PM, Steve O'Hara-Smith wrote: > > On Mon, 23 Mar 2020 17:55:23 -0400 > > Aryeh Friedman wrote: > > > >> IMO JS is not even fully Turing complete! > > It's as Turing complete as any language (limited by resources). > > There's even a PC emulator that can boot Linux written in JavaScript > which > > is a pretty good demonstration of completeness. > > > not to extend this bikeshed any more but don't forget netbsd's did > something similar in 2012 or so :) > > https://blog.netbsd.org/tnf/entry/kernel_drivers_compiled_to_javascript > Find me a UTM that randomly turns on without human intervention after HALT'ed and then explain to me why it qualifies as a UTM. Just because it can run a tape through and if the tape's instruction complete in a finite of time (or infinite amount of time depending on the instructions) it stops that tape does not make it a UTM that can be used to the answer the halting problem (it has to stay halted for the question to even be meaningful). In JS terms here is a statement that makes the halting problem meaningless at best and impossible to even ask about decidablity on: function func() { setTimeout(func,Math.random()*10000000); // do the rest of the program we are attempting to decide on HALT } Due to how JS VM's work the program (aka the tape we are asking the halting problem of) will pause for a random amount of time (which may or may not be long enough to allow the rest of the program to complete if it is finite runtime). The tape *DOES NOT* know it has been paused and/or run multiple times. Therefor the entire question of does it HALT or not can not be answered by looking at the tape alone without knowing stuff that only an oracle (the machine running the tape) could answer. Thus JS is not Turing complete. QED. Disclaimer: Just because I am forced to use this monstrosity in browser apps does not mean it is not monstrosity -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org