@@ -13,20 +13,39 @@ type InitResult =
1313
1414let mutable private state = Uninitialized
1515
16+ let private logPxlClockOnFirstSend =
17+ let mutable firstSend = true
18+ fun () ->
19+ if firstSend then
20+ firstSend <- false
21+ let msg = @"
22+
23+ **************************************************************
24+
25+ +---------+
26+ | | PXL-JAM 2024
27+ | PXL | - github.com/CuminAndPotato/PXL-JAM
28+ | CLOCK | - WIN a PXL-Clock MK1
29+ | | - until 8th of January 2025
30+ +---------+
31+
32+ **************************************************************
33+
34+ "
35+ printfn " %s " msg
36+
1637// This seems like a HACK, but there shouldn't be the requirement of referencing FCS in FSI.
1738let doInit () =
1839 if state <> Uninitialized then
1940 state
2041 else
21-
2242 let fsiAssemblyName = " FSI-ASSEMBLY"
23-
2443 let isInteractive =
2544 // This hack is indeed one (see https://fsharp.github.io/fsharp-compiler-docs/fsi-emit.html)
2645 AppDomain.CurrentDomain.GetAssemblies()
27- |> Array.exists ( fun asm -> (* asm.IsDynamic && * )
28- asm.GetName () .Name.StartsWith ( fsiAssemblyName , StringComparison.Ordinal )
29- )
46+ |> Array.map ( fun asm -> asm.GetName () .Name )
47+ |> Array.exists ( fun asmName -> (* asm.IsDynamic && * )
48+ asmName.StartsWith ( fsiAssemblyName , StringComparison.Ordinal ) )
3049
3150 state <-
3251 try
@@ -51,7 +70,9 @@ let doInit () =
5170 // see #121: It's important to not touch the logDebugMessages
5271 // value when it was already set before this init function was called.
5372 match Fsi.logDebugMessages with
54- | None -> Fsi.enableDebugLogs ()
73+ | None ->
74+ do logPxlClockOnFirstSend ()
75+ Fsi.enableDebugLogs ()
5576 | _ -> ()
5677
5778 let addPrinter ( f : 'a -> string ) =
@@ -80,4 +101,5 @@ let doInit () =
80101
81102 state
82103
83- let init () = doInit () |> ignore
104+ let init () =
105+ doInit () |> ignore
0 commit comments