<commit_before>functor
import
   VM
   Module
   Property
export
   Return
define
   Return =
   mvm([ncores(proc {$}
		  {VM.ncores} > 0 = true
	       end
	       keys:[mvm])

	current(proc {$}
		   {VM.current} = 1
		end
		keys:[mvm ident])

	list(proc {$}
		{VM.list} = [1]
	     end
	     keys:[mvm])

	getStream(proc {$}
		     {IsDet {VM.getStream}} = false
		  end
		  keys:[mvm stream])

	getPort(proc {$}
		   P={VM.getPort {VM.current}}
		   S={VM.getStream}
		in
		   {Send P hello}
		   S.1 = hello

		   try
		      {VM.getPort 12345 _}
		      fail
		   catch error(vm(invalidVMIdent) ...) then
		      skip
		   end

		   try
		      {VM.getPort "not a VMIdent" _}
		      fail
		   catch error(kernel(type ...)...) then
		      skip
		   end
		end
		keys:[mvm stream])

	new(proc {$}
	       Master={VM.current}
	       functor F
	       import
		  VM
	       define
		  {Send {VM.getPort Master} {VM.current}}
	       end<commit_msg>Display a VMPort as <Port><commit_after>functor
import
   VM
   Module
   Property
export
   Return
define
   Return =
   mvm([ncores(proc {$}
		  {VM.ncores} > 0 = true
	       end
	       keys:[mvm])

	current(proc {$}
		   {VM.current} = 1
		end
		keys:[mvm ident])

	list(proc {$}
		{VM.list} = [1]
	     end
	     keys:[mvm])

	getStream(proc {$}
		     {IsDet {VM.getStream}} = false
		  end
		  keys:[mvm stream])

	getPort(proc {$}
		   P={VM.getPort {VM.current}}
		   S={VM.getStream}
		in
		   {Send P hello}
		   S.1 = hello

		   {Value.toVirtualString P 1 100} = '<Port>'

		   try
		      {VM.getPort 12345 _}
		      fail
		   catch error(vm(invalidVMIdent) ...) then
		      skip
		   end

		   try
		      {VM.getPort "not a VMIdent" _}
		      fail
		   catch error(kernel(type ...)...) then
		      skip
		   end
		end
		keys:[mvm stream])

	new(proc {$}
	       Master={VM.current}
	       functor F
	       import
		  VM
	       define
		  {Send {VM.getPort Master} {VM.current}}
	       end
{'fraction_non_alphanumeric': 0.13034623217922606, 'fraction_numerical': 0.01120162932790224, 'mean_word_length': 1.6917808219178083, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6404151', 'n_tokens_mistral': 865, 'n_tokens_neox': 689, 'n_words': 164}