From 8ff53967fac0ba5c8cee1a248a38e8e0ad1b72ee Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 9 Feb 2024 11:45:18 +0100 Subject: Remove OCaml build --- 2023/ocaml/day2/_build/default/.dune/configurator | 2 -- .../day2/_build/default/.dune/configurator.v2 | 1 - .../bin/.main.eobjs/byte/dune__exe__Main.cmi | Bin 205 -> 0 bytes .../bin/.main.eobjs/byte/dune__exe__Main.cmti | Bin 2368 -> 0 bytes .../bin/.main.eobjs/native/dune__exe__Main.cmx | Bin 552 -> 0 bytes .../bin/.main.eobjs/native/dune__exe__Main.o | Bin 15200 -> 0 bytes .../day2/_build/default/bin/.merlin-conf/exe-main | Bin 620 -> 0 bytes 2023/ocaml/day2/_build/default/bin/main.exe | Bin 2254592 -> 0 bytes 2023/ocaml/day2/_build/default/bin/main.ml | 39 --------------------- 2023/ocaml/day2/_build/default/bin/main.mli | 1 - .../_build/default/lib/.day2.objs/byte/day2.cmi | Bin 111 -> 0 bytes .../_build/default/lib/.day2.objs/byte/day2.cmo | Bin 1724 -> 0 bytes .../_build/default/lib/.day2.objs/byte/day2.cmt | Bin 2113 -> 0 bytes .../_build/default/lib/.day2.objs/native/day2.cmx | Bin 95 -> 0 bytes .../_build/default/lib/.day2.objs/native/day2.o | Bin 1608 -> 0 bytes .../day2/_build/default/lib/.merlin-conf/lib-day2 | Bin 564 -> 0 bytes 2023/ocaml/day2/_build/default/lib/day2.a | Bin 1910 -> 0 bytes 2023/ocaml/day2/_build/default/lib/day2.cmxa | Bin 102 -> 0 bytes 2023/ocaml/day2/_build/default/lib/day2.ml-gen | 1 - 19 files changed, 44 deletions(-) delete mode 100644 2023/ocaml/day2/_build/default/.dune/configurator delete mode 100644 2023/ocaml/day2/_build/default/.dune/configurator.v2 delete mode 100644 2023/ocaml/day2/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmi delete mode 100644 2023/ocaml/day2/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmti delete mode 100644 2023/ocaml/day2/_build/default/bin/.main.eobjs/native/dune__exe__Main.cmx delete mode 100644 2023/ocaml/day2/_build/default/bin/.main.eobjs/native/dune__exe__Main.o delete mode 100644 2023/ocaml/day2/_build/default/bin/.merlin-conf/exe-main delete mode 100755 2023/ocaml/day2/_build/default/bin/main.exe delete mode 100644 2023/ocaml/day2/_build/default/bin/main.ml delete mode 100644 2023/ocaml/day2/_build/default/bin/main.mli delete mode 100644 2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmi delete mode 100644 2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmo delete mode 100644 2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmt delete mode 100644 2023/ocaml/day2/_build/default/lib/.day2.objs/native/day2.cmx delete mode 100644 2023/ocaml/day2/_build/default/lib/.day2.objs/native/day2.o delete mode 100644 2023/ocaml/day2/_build/default/lib/.merlin-conf/lib-day2 delete mode 100644 2023/ocaml/day2/_build/default/lib/day2.a delete mode 100644 2023/ocaml/day2/_build/default/lib/day2.cmxa delete mode 100644 2023/ocaml/day2/_build/default/lib/day2.ml-gen (limited to '2023/ocaml/day2/_build/default') diff --git a/2023/ocaml/day2/_build/default/.dune/configurator b/2023/ocaml/day2/_build/default/.dune/configurator deleted file mode 100644 index 2df6f9a..0000000 --- a/2023/ocaml/day2/_build/default/.dune/configurator +++ /dev/null @@ -1,2 +0,0 @@ -(ocamlc /home/santo/.opam/default/bin/ocamlc.opt) -(ocaml_config_vars (afl_instrument false) (architecture amd64) (asm as) (asm_cfi_supported true) (ast_impl_magic_number Caml1999M033) (ast_intf_magic_number Caml1999N033) (bytecomp_c_compiler "gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 ") (bytecomp_c_libraries " -lm -lpthread") (c_compiler gcc) (ccomp_type cc) (cma_magic_number Caml1999A033) (cmi_magic_number Caml1999I033) (cmo_magic_number Caml1999O033) (cmt_magic_number Caml1999T033) (cmx_magic_number Caml1999Y033) (cmxa_magic_number Caml1999Z033) (cmxs_magic_number Caml1999D033) (compression_supported false) (default_executable_name a.out) (default_safe_string true) (exec_magic_number Caml1999X033) (ext_asm .s) (ext_dll .so) (ext_exe "") (ext_lib .a) (ext_obj .o) (flambda false) (flat_float_array true) (function_sections true) (host x86_64-pc-linux-gnu) (int_size 63) (linear_magic_number Caml1999L033) (model default) (naked_pointers false) (native_c_compiler "gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 ") (native_c_libraries " -lm -lpthread") (native_compiler true) (native_dynlink true) (native_pack_linker "ld -r -o ") (ocamlc_cflags "-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ") (ocamlc_cppflags " -D_FILE_OFFSET_BITS=64 ") (ocamlopt_cflags "-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ") (ocamlopt_cppflags " -D_FILE_OFFSET_BITS=64 ") (os_type Unix) (safe_string true) (standard_library /home/santo/.opam/default/lib/ocaml) (standard_library_default /home/santo/.opam/default/lib/ocaml) (supports_shared_libraries true) (system linux) (systhread_supported true) (target x86_64-pc-linux-gnu) (version 5.1.0) (windows_unicode false) (with_frame_pointers false) (word_size 64)) diff --git a/2023/ocaml/day2/_build/default/.dune/configurator.v2 b/2023/ocaml/day2/_build/default/.dune/configurator.v2 deleted file mode 100644 index 3edd1f2..0000000 --- a/2023/ocaml/day2/_build/default/.dune/configurator.v2 +++ /dev/null @@ -1 +0,0 @@ -((6:ocamlc40:/home/santo/.opam/default/bin/ocamlc.opt)(17:ocaml_config_vars((14:afl_instrument5:false)(12:architecture5:amd64)(3:asm2:as)(17:asm_cfi_supported4:true)(21:ast_impl_magic_number12:Caml1999M033)(21:ast_intf_magic_number12:Caml1999N033)(19:bytecomp_c_compiler77:gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 )(20:bytecomp_c_libraries15: -lm -lpthread)(10:c_compiler3:gcc)(10:ccomp_type2:cc)(16:cma_magic_number12:Caml1999A033)(16:cmi_magic_number12:Caml1999I033)(16:cmo_magic_number12:Caml1999O033)(16:cmt_magic_number12:Caml1999T033)(16:cmx_magic_number12:Caml1999Y033)(17:cmxa_magic_number12:Caml1999Z033)(17:cmxs_magic_number12:Caml1999D033)(21:compression_supported5:false)(23:default_executable_name5:a.out)(19:default_safe_string4:true)(17:exec_magic_number12:Caml1999X033)(7:ext_asm2:.s)(7:ext_dll3:.so)(7:ext_exe0:)(7:ext_lib2:.a)(7:ext_obj2:.o)(7:flambda5:false)(16:flat_float_array4:true)(17:function_sections4:true)(4:host19:x86_64-pc-linux-gnu)(8:int_size2:63)(19:linear_magic_number12:Caml1999L033)(5:model7:default)(14:naked_pointers5:false)(17:native_c_compiler77:gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 )(18:native_c_libraries15: -lm -lpthread)(15:native_compiler4:true)(14:native_dynlink4:true)(18:native_pack_linker9:ld -r -o )(13:ocamlc_cflags48:-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC )(15:ocamlc_cppflags24: -D_FILE_OFFSET_BITS=64 )(15:ocamlopt_cflags48:-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC )(17:ocamlopt_cppflags24: -D_FILE_OFFSET_BITS=64 )(7:os_type4:Unix)(11:safe_string4:true)(16:standard_library35:/home/santo/.opam/default/lib/ocaml)(24:standard_library_default35:/home/santo/.opam/default/lib/ocaml)(25:supports_shared_libraries4:true)(6:system5:linux)(19:systhread_supported4:true)(6:target19:x86_64-pc-linux-gnu)(7:version5:5.1.0)(15:windows_unicode5:false)(19:with_frame_pointers5:false)(9:word_size2:64)))) \ No newline at end of file diff --git a/2023/ocaml/day2/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmi b/2023/ocaml/day2/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmi deleted file mode 100644 index 1886df9..0000000 Binary files a/2023/ocaml/day2/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmi and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmti b/2023/ocaml/day2/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmti deleted file mode 100644 index 87d60ff..0000000 Binary files a/2023/ocaml/day2/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmti and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/bin/.main.eobjs/native/dune__exe__Main.cmx b/2023/ocaml/day2/_build/default/bin/.main.eobjs/native/dune__exe__Main.cmx deleted file mode 100644 index fdc4cf6..0000000 Binary files a/2023/ocaml/day2/_build/default/bin/.main.eobjs/native/dune__exe__Main.cmx and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/bin/.main.eobjs/native/dune__exe__Main.o b/2023/ocaml/day2/_build/default/bin/.main.eobjs/native/dune__exe__Main.o deleted file mode 100644 index 7bbc169..0000000 Binary files a/2023/ocaml/day2/_build/default/bin/.main.eobjs/native/dune__exe__Main.o and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/bin/.merlin-conf/exe-main b/2023/ocaml/day2/_build/default/bin/.merlin-conf/exe-main deleted file mode 100644 index 647fe64..0000000 Binary files a/2023/ocaml/day2/_build/default/bin/.merlin-conf/exe-main and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/bin/main.exe b/2023/ocaml/day2/_build/default/bin/main.exe deleted file mode 100755 index 1b3c926..0000000 Binary files a/2023/ocaml/day2/_build/default/bin/main.exe and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/bin/main.ml b/2023/ocaml/day2/_build/default/bin/main.ml deleted file mode 100644 index 6dba854..0000000 --- a/2023/ocaml/day2/_build/default/bin/main.ml +++ /dev/null @@ -1,39 +0,0 @@ -let input_file = "input.txt" - -let read_file f = - let ic = open_in f in - try - let lines = really_input_string ic (in_channel_length ic) in - let lines = String.trim lines in - close_in ic ; - lines - with e -> - close_in_noerr ic; - raise e - -let rec parse ?(result=0) body = - match body with - | [] -> result - | x :: tail -> - let plays = String.split_on_char ':' x - |> List.rev - |> List.hd - |> String.split_on_char ';' - |> List.map (String.split_on_char ',') - |> List.map (List.map @@ String.trim) - |> List.map (List.map (fun x -> (List.hd (String.split_on_char ' ' x) |> int_of_string, String.get (List.nth (String.split_on_char ' ' x) 1 ) 0))) - in - - - let points = List.map (List.map (fun (p,c) -> if (c = 'r' && p > 12) || (c = 'g' && p > 13) || (c = 'b' && p > 14) then 0 else 1)) plays in - let add = if List.length (List.filter (fun x -> List.length x > 0) @@ List.map (List.filter (fun x -> x = 0)) points) = 0 then - String.split_on_char ':' x |> List.hd |> String.split_on_char ' ' |> List.rev |> List.hd |> int_of_string - else - 0 in - - parse tail ~result:(result+add) - - -let () = - let result = parse (String.split_on_char '\n' (read_file input_file)) in - Printf.printf "%d" result diff --git a/2023/ocaml/day2/_build/default/bin/main.mli b/2023/ocaml/day2/_build/default/bin/main.mli deleted file mode 100644 index 335ae1f..0000000 --- a/2023/ocaml/day2/_build/default/bin/main.mli +++ /dev/null @@ -1 +0,0 @@ -(* Auto-generated by Dune *) \ No newline at end of file diff --git a/2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmi b/2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmi deleted file mode 100644 index 7806bc1..0000000 Binary files a/2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmi and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmo b/2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmo deleted file mode 100644 index 72a7297..0000000 Binary files a/2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmo and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmt b/2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmt deleted file mode 100644 index ead5d30..0000000 Binary files a/2023/ocaml/day2/_build/default/lib/.day2.objs/byte/day2.cmt and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/lib/.day2.objs/native/day2.cmx b/2023/ocaml/day2/_build/default/lib/.day2.objs/native/day2.cmx deleted file mode 100644 index 23b029c..0000000 Binary files a/2023/ocaml/day2/_build/default/lib/.day2.objs/native/day2.cmx and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/lib/.day2.objs/native/day2.o b/2023/ocaml/day2/_build/default/lib/.day2.objs/native/day2.o deleted file mode 100644 index 59dab7d..0000000 Binary files a/2023/ocaml/day2/_build/default/lib/.day2.objs/native/day2.o and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/lib/.merlin-conf/lib-day2 b/2023/ocaml/day2/_build/default/lib/.merlin-conf/lib-day2 deleted file mode 100644 index df37a97..0000000 Binary files a/2023/ocaml/day2/_build/default/lib/.merlin-conf/lib-day2 and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/lib/day2.a b/2023/ocaml/day2/_build/default/lib/day2.a deleted file mode 100644 index b7e4559..0000000 Binary files a/2023/ocaml/day2/_build/default/lib/day2.a and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/lib/day2.cmxa b/2023/ocaml/day2/_build/default/lib/day2.cmxa deleted file mode 100644 index b2af724..0000000 Binary files a/2023/ocaml/day2/_build/default/lib/day2.cmxa and /dev/null differ diff --git a/2023/ocaml/day2/_build/default/lib/day2.ml-gen b/2023/ocaml/day2/_build/default/lib/day2.ml-gen deleted file mode 100644 index 71d4a7c..0000000 --- a/2023/ocaml/day2/_build/default/lib/day2.ml-gen +++ /dev/null @@ -1 +0,0 @@ -(* generated by dune *) -- cgit v1.2.3-18-g5258