const { mock } = require('node:test');
class ToBeMocked {
    constructor() {
        console.log('ToBeMocked is born!');
    }
    aMethod(oneArg) {
 console.log(`ToBeMocked.aMethod(${oneArg})`);
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class BasicPubSub { | |
| constructor() { | |
| this.channel_subs = {}; | |
| } | |
| subscribe(channel, subscriber) { | |
| if (!this.channel_subs[channel]) { | |
| this.channel_subs[channel] = new Set(); | |
| } | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function findInObjByDottedPath(path, obj) { | |
| const pathElements = path.split('.'); | |
| const element = obj[pathElements[0]]; | |
| if (element) { | |
| if (typeof(element) === "object" && !Array.isArray(element)) { | |
| return findInObjByDottedPath( | |
| pathElements.slice(1).join('.'), | |
| element | |
| ); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const __q = []; | |
| class MPromise { | |
| constructor(ctorCallback) { | |
| this.__thens = []; | |
| this.__catches = []; | |
| this.resolve = (val) => { | |
| this.__thens.forEach((thenCb) => thenCb(val)); | |
| }; | |
| this.reject = (rejectReason) => { | 
Two instances of ggml-alpaca-7b-q4.bin running via alpaca - one at (the default) temperature of 0.1 and the other at 0.9 - debate AI's effect on humanity! "They" even get into government regulation!
This was not human-initiated: the initial prompt (to the t=0.9 instance) was only "present a controversial opinion", and the response is the first line in the resulting debate below.
Every iteration after that just prompted with "present a counterargument to the following: '...'" where '...' is the previous response (stripping any repeition of the original prompt, which does happen sometimes).
Each line below is one iteration in that process, entirely unedited.
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | func loadPlugin(path string) (*PluginImpl, error) { | |
| ifaceType := reflect.TypeOf((*Plugin)(nil)).Elem() | |
| pluginLoad, err := plugin.Open(path) | |
| if err != nil { | |
| return nil, err | |
| } | |
| // without stubbing the fields, reflect.ValueOf(...).Elem().FieldByName(...) below will return nil | |
| newPlugin := newPluginImpl() | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | async function scopedRedisClient (scopeCb) { | |
| const scopeClient = new Redis(config.redis.url); | |
| try { | |
| return await scopeCb(scopeClient, PREFIX); | |
| } catch (e) { | |
| console.error(e); | |
| } finally { | |
| scopeClient.disconnect(); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //let s = '.ban ?user @user ?r reason ?dm <dms the member>'; | |
| let s = '!test ?r reason ?dm ?t time ?p' | |
| // split the string by spaces | |
| let sa = s.split(/\s+/); | |
| // create a map to track things, and filter only the "?cmd" tokens | |
| let cmd_tokens = sa.map((token, index) => ({ token, index })) | |
| .filter(({ token }) => token.indexOf('?') === 0); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | async function* tick(cadence = 1000) { | |
| let tickCount = 0; | |
| while (true) { | |
| yield new Promise((res) => | |
| setTimeout(() => res(tickCount++), cadence)); | |
| } | |
| } | |
| for await (const tickCount of tick()) { | |
| console.log(new Date(), tickCount); |