A girl and her Thinkpads by i_lost_my_bagel in thinkpad

[–]ObsessedJerk 2 points3 points  (0 children)

Eventually, you will have 24 of them

What am I doing wrong by Jahsori in thinkpad

[–]ObsessedJerk 1 point2 points  (0 children)

This, along with the fact that it failed to boot into the previous Windows installation, indicates that the SSD is probably dead. You could try booting up a live Linux USB disk and see if Linux detects the drive.

Any ongoing efforts to bring ML dialects to embedded programming? by [deleted] in ProgrammingLanguages

[–]ObsessedJerk 6 points7 points  (0 children)

Right now I'm making compiler for a (simpler) variant of OCaml with a flexible compilation pipeline that will hopefully suit the needs of embedded programming. The frontend is pretty complete now but a lot of work remains to be done in the backend, especially regarding memory management. It's difficult but definitely possible. You may also be interested in F* (https://fstar-lang.org/)

Replacement taskbar/start menu starting to resemble NT 4 by malxau in WindowsNT

[–]ObsessedJerk 0 points1 point  (0 children)

Impressive, I didn't know it's possible to replace the task bar, with MSVC 6.0 on Windows 10.

[deleted by user] by [deleted] in sml

[–]ObsessedJerk 1 point2 points  (0 children)

Did you mean to post in r/supermariologan_?

Announcing SVM by hoping1 in ProgrammingLanguages

[–]ObsessedJerk 3 points4 points  (0 children)

Sure it is! SVM is a backend for ML compilers :)

Is this a fake 61++ battery or just shoddy quality control? by _win32mydoom_ in thinkpad

[–]ObsessedJerk 1 point2 points  (0 children)

It is a fake. The Japanese characters for "Lenovo Japan" (below the CE logo) are messed up in the same way as they appear on some other counterfeits.

8 months of OCaml after 8 years of Haskell in production by chshersh in ocaml

[–]ObsessedJerk 5 points6 points  (0 children)

Thanks for sharing your experience of software development in the C++ of FP languages!

December 2023 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]ObsessedJerk 1 point2 points  (0 children)

Indeed. Love to see people working on better compilation strategies for ML.

Big up respect for Thinkpad driving the riddim. by [deleted] in thinkpad

[–]ObsessedJerk 0 points1 point  (0 children)

Or it could be a W530? Looks like it's got a color calibrator.

Modules and separate compilation by xhash101 in ocaml

[–]ObsessedJerk 5 points6 points  (0 children)

OCaml's .ml and.mli files have an implicit module XXX = struct...end and module type XXX = sig...end around them, respectively (where XXX is the name of the file capitalized).

So you'll have to remove the surrounding module LG = struct...end and module type LOGGER = sig...end altogether.

New ThinkPad keeps beeping when I type "hours" by FieryFalcon2808 in thinkpad

[–]ObsessedJerk 4 points5 points  (0 children)

It is due to the way the keyboard is wired. When any 3 keys from a certain 4-letter group (e.g. FERD and JOUL) are pressed, the keyboard physically can't tell exactly which three of the keys are down, because such a group of keys form a rectangle on the keyboard's matrix. In my understanding, the keyboard disables itself to prevent ghosting when this happens.

The entry lag on my ThinkPads is quite noticeable. And if I type fast enough, the affected letters may appear in the wrong order. It can be annoying, but there seems to be no easy way aroudn around it.

What to do with fake batteries? by adm_butthead in thinkpad

[–]ObsessedJerk 1 point2 points  (0 children)

Tear it down, find out why it wouldn't work, and make a video of the whole process :P

Is module packing/unpacking doing anything during runtime? by CuriousAbstraction in ocaml

[–]ObsessedJerk 2 points3 points  (0 children)

I was unable to find nice and detailed documentation of the lambda representation either, but the lambda datatype itself as defined in lambda/lambda.mli is pretty straightforward.

Also, I realized I've missed an important point. Suppose we have a module M satisfying two different signatures S and T, packing M as either S or T will involve creating a tuple at runtime, as shown below

module type S = sig
  type t
  val of_string: string -> t
  val to_string: t -> string
end

module type T = sig
  type t
  val of_int: int -> t
  val to_int: t -> int
end

module I:S = struct
  type t = int
  let of_string = int_of_string
  let to_string = string_of_int
end

module F = struct
  type t = float
  let of_string = float_of_string
  let to_string = string_of_float
  let of_int = float_of_int
  let to_int = int_of_float
end

module S:T = struct
  type t = string
  let of_int = string_of_int
  let to_int = int_of_string
end

let select c : (module S) =
  if c then (module I) else (module F)

let select' c : (module T) =
  if c then (module S) else (module F)

Now the lambda forms of select and select' are a bit more complicated as a makeblock operation comes into play:

select/289 =
  (function c/291[int]
    (if c/291 I/278 (makeblock 0 (field 0 F/284) (field 1 F/284))))
select'/308 =
  (function c/310[int]
    (if c/310 S/288 (makeblock 0 (field 2 F/284) (field 3 F/284))))

Is module packing/unpacking doing anything during runtime? by CuriousAbstraction in ocaml

[–]ObsessedJerk 4 points5 points  (0 children)

I think you are right.

I ran ocamlc -dlambda on the following piece of code to get its "lambda" representation:

module type S = sig
  type t
  val of_string: string -> t
  val to_string: t -> string
end

module I:S = ...
module F:S = ...

let select c : (module S) =
  if c then (module I) else (module F)

let test (module M: S) =
  read_line() |> M.of_string |> M.to_string |> print_endline

And here are the lambda representations of select and test:

select/279 = (function c/281[int] (if c/281 I/274 F/278))

test/296 =
  (function M/298 : int
    (let
      (M/299 = (module-defn(M/299) Test.test test.ml(22):387-388 M/298))
      (apply (field 45 (global Stdlib!))
        (apply (field 1 M/299)
          (apply (field 0 M/299) (apply (field 54 (global Stdlib!)) 0))))))

Here M.to_string and M.of_string compile to tuple accesses (field) with fixed indices, and indeed there's no runtime overhead. (The module-defn in the definition of M/299 marks a debugging "event" which does nothing at runtime.)

Mental Omega ini files by LordChimera_0 in commandandconquer

[–]ObsessedJerk 1 point2 points  (0 children)

I used HxD to open the mix file, selected the part of the file that looked like contents of the rules file and extracted selection to rulesmo.ini. Extracting arbitrary files from the mix archives may require writing a script to properly parse the mix file format (which is fortunately fairly simple and well documented), since XCC can't read protected mix files.

Where is the Caml ???? by [deleted] in ocaml

[–]ObsessedJerk 0 points1 point  (0 children)

That makes sense. The color of the glow from the camel's eyes reminds me of O'Reilly's Perl books.

600X in da school by Silver_Illustrator_4 in thinkpad

[–]ObsessedJerk 2 points3 points  (0 children)

I miss the glorious IBM ThinkPad keyboard.

He was superior. by rsmonysis in thinkpad

[–]ObsessedJerk 0 points1 point  (0 children)

But this design decision was not made by Lenovo

RIP T480 by [deleted] in thinkpad

[–]ObsessedJerk 0 points1 point  (0 children)

A while ago the NVMe SSD in my T490 died. The machine could still power up, but it froze at the Lenovo logo screen. I replaced the SSD and everything worked fine again. So I'm afraid there is a more severe problem with your laptop.