profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/SanderSpies/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Sander SanderSpies Amsterdam, NL Developer with an interest in OCaml and Reason.

reasonml/reason-react 3131

Reason bindings for ReactJS

rescript-association/genType 705

Auto generation of idiomatic bindings between Reason and JavaScript: either vanilla or typed with TypeScript/FlowType.

ocamllabs/furore 12

"an outbreak of public anger or excitement" (about OCaml)

sabine/ocaml-to-wasm 7

trying to make sense of Clambda->WebAssembly, currently experimental and useless

SanderSpies/all-initial 4

A Polyfill for react-style to support all:initial for most browsers.

SanderSpies/awesome-react 1

A collection of awesome React libraries, resources and shiny things.

SanderSpies/acorn 0

A small, fast, JavaScript-based JavaScript parser

SanderSpies/atd 0

Syntax for cross-language type definitions (official repository)

PR opened ocaml/dune

Fix sites installation with opam

Cherrypick from 2.9 (wrong way sorry) #4645

+437 -121

0 comment

15 changed files

pr created time in 6 minutes

Pull request review commentocaml/dune

Add a reproduction case for issue #4684

 module Library = struct         false     in     Obj_dir.make_lib ~dir-      ~has_private_modules:(t.private_modules <> None)+      ~has_private_modules:+        ((* TODO instead of this fragile approximation, we should be looking at+            [Modules.t] and deciding. Unfortunately, [Obj_dir.t] is currently+            used in some places where [Modules.t] is not yet constructed. *)+         t.private_modules <> None+        || t.buildable.root_module <> None)

The alias file is never hidden, and is always public - even in the presence of a user given interface file. We experimented with making it private before but it never worked.

CraigFe

comment created time in 8 minutes

push eventFStarLang/FStar

Tahina Ramananandro

commit sha 7bdd9df3dd1925a43101fa4453536b62b9060f12

Atomic -> AtomicBase; no ifthenelse in vprops; more abstraction lid

view details

push time in 12 minutes

issue commentemscripten-core/emscripten

Add exports to Module.

I need to get instance.exports.memory. Is there any way to get it in --js-library ?

DiachenkoIgor

comment created time in 22 minutes

issue openedrescript-lang/rescript-compiler

[BUG] ReScript 9.1.4 does not work with relative file paths?

Problem

Trying out that new rescript feature to generate an interface for an existing rescript file.

Reproduction

  1. Ensure rescript 9.1.4 is active:
    > npx rescript -v
    9.1.4
    
  2. Create a valid, working .res file like Example.res
  3. Build the .res file
  4. Invoke the dump command
    npx rescript dump ./lib/bs/src/Example-Project.cmi
    

Expected

Similar output when running bsc -i ./lib/bs/src/Example-Project.cmi, content that types the exports for a module that can be saved into a .resi file.

Actual

Get an error:

> npx rescript dump ./lib/bs/src/Example-Project.cmi

rescript: error: unknown target 'lib/bs/src/Example-Project.cmi'

Solution

After playing around did get it working with:

> npx rescript dump src/Example-Project.cmi

type example = int
type add5 = int => int

It was unclear that it expected a path suffix vs a real file, and not many hints from the CLI to figure out what it should be.

created time in 23 minutes

push eventocaml/ocaml

Leo White

commit sha 1768cbcfd5733638e7f374fb71d9aedcf7b7a36c

Give more precise error when disambiguation could not possibly work

view details

Leo White

commit sha 526ea2a188c62a3eb66d2d84b474ccc1a90d9d8b

Add Changes entry

view details

Florian Angeletti

commit sha aa890e2df4c125d7b7360845b7a1bbacc7f42317

Merge pull request #10328 from lpw25/better-disambiguation-error Give more precise error when disambiguation could not possibly work

view details

push time in 23 minutes

PR merged ocaml/ocaml

Give more precise error when disambiguation could not possibly work

Constructor disambiguation can lead to confusing error messages, like:

module M = struct
  type t = A | B | C
  let get _ _ = A 
end

let () =
  match M.get () with
  | A | B | C -> ();;

Line 8, characters 4-5:
8 |   | A | B | C -> ();;
        ^
Error: Unbound constructor A

Here, the mistake was clearly missing an argument in the call to M.get, but the error message is complaining about an unbound constructor.

This PR adds a more specific error message for cases where disambiguation could not possibly work. For example, the above now gives:

Line 8, characters 4-5:
8 |   | A | B | C -> ();;
        ^
Error: This pattern should not be a constructor, the expected type is
       'a -> M.t
+438 -88

3 comments

8 changed files

lpw25

pr closed time in 23 minutes

Pull request review commentocaml/dune

Add a reproduction case for issue #4684

 module Library = struct         false     in     Obj_dir.make_lib ~dir-      ~has_private_modules:(t.private_modules <> None)+      ~has_private_modules:+        ((* TODO instead of this fragile approximation, we should be looking at+            [Modules.t] and deciding. Unfortunately, [Obj_dir.t] is currently+            used in some places where [Modules.t] is not yet constructed. *)+         t.private_modules <> None+        || t.buildable.root_module <> None)

I'm okay with the change and the todo. Unrelated to the current problem, I was just wondering why we are not testing if the alias file is hidden by a user given interface for a wrapped library. But it is perhaps not installed at all, always public?

CraigFe

comment created time in an hour

push eventFStarLang/FStar

Aseem Rastogi

commit sha d9322cb8c11b43cf8156c9f61e01564bbf65ab69

monotonic counter

view details

push time in an hour

Pull request review commentocaml/dune

Add a reproduction case for issue #4682

 val fold_user_written : t -> f:(Module.t -> 'acc -> 'acc) -> init:'acc -> 'acc val map_user_written :   t -> f:(Module.t -> Module.t Memo.Build.t) -> t Memo.Build.t +val fold_user_visible : t -> f:(Module.t -> 'acc -> 'acc) -> init:'acc -> 'acc

I'm not sure to which user we are talking about: user of the library, or the library developer.

CraigFe

comment created time in an hour

push eventFStarLang/FStar

Aseem Rastogi

commit sha b9fd42b196247008b53533a4781d8ce5caa12476

fix Steel.Preorder

view details

Aseem Rastogi

commit sha fc5f5aaaa44d7906243f30516acaaf0747bf967b

another lemma from Steel.Preorder

view details

Aseem Rastogi

commit sha 23d880d19cdd89f2fc9bb9acffbf1a0d90060fb0

fixing Duplex.PCM

view details

push time in an hour

PR merged swiftwasm/swift

[pull] main from apple:main :arrow_heading_down: Upstream Tracking

See Commits and Changes for more details.


Created by <img src="https://prod.download/pull-18h-svg" valign="bottom"/> pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

+11 -2

0 comment

2 changed files

pull[bot]

pr closed time in 2 hours

push eventswiftwasm/swift

FW

commit sha 1f4eabcbf17ac543effdfa806f2bfd423cfc98f6

[android] Fix lib path in android docs Point `ARM_DIR` to the output directory containing the libraries.

view details

FW

commit sha 1a229578bf20e414ab149a33f0597092100d8700

[android] Fix Android target name in docs The target arch name used here is `armv7` rather than `armv7a`.

view details

Kim de Vos

commit sha b7d4dec54e87cfe093a9a0e966cd66c94b2f87eb

[SwiftSyntax] Add helper for default value in swift syntax builder inits

view details

swift-ci

commit sha 92580800e27747553348296b6ecb0e73cf3cb482

Merge pull request #35949 from fwcd/android-lib-path

view details

Alex Hoppen

commit sha e8d1a160e3e2074a93e41c127910e521b2a76f56

Merge pull request #37712 from kimdv/kimdv/add-helper-for-swift-syntax-default-value [SwiftSyntax] Add helper for default value in swift syntax builder inits

view details

push time in 2 hours

PR opened swiftwasm/swift

[pull] main from apple:main

See Commits and Changes for more details.


Created by <img src="https://prod.download/pull-18h-svg" valign="bottom"/> pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

+11 -2

0 comment

2 changed files

pr created time in 2 hours

pull request commentrescript-lang/rescript-compiler

Rewrite `rescript format`

I'll revert to the previous command line argument parsing.

Note that the diff is so huge because almost all the code has been restructured/rewritten; it is not just reformatted. But if you want I can try to split it up, this will be difficult though.

Minnozz

comment created time in 2 hours

issue commentrescript-lang/rescript-compiler

macOS: compiled `rescript.exe` fails with `Error: Ui_defs does not have implementation file`

The output above is from the root of the rescript-compiler repository, not to compile something there but just to check if my build succeeded.

Is there a different way I should invoke the compiler I just compiled?

Minnozz

comment created time in 2 hours

startednessjs/ness

started time in 2 hours

issue openedocaml/ocaml

[RFC] Stdlib thread-safety - Format

Multicore OCaml team has been working on ensuring that the stdlib remains backwards compatible and fast for sequential programs, and provides reasonable behaviour when used in parallel by multiple domains. We've written down the guarantees we expect to provide when stdlib is used in parallel. In particular, we propose not to provide thread-safety by default as this would slow down sequential programs. Hence, mutable data structures such as queues will not be thread-safe but remain type-safe. We would also like observationally pure interfaces to remain so even when used in parallel. We have made the internal mutable states in random, filename and hashtbl to be domain-local (PR#582).

Format

Similarly, format also has some global state, which causes issues in functions such as Format.printf when used in parallel, though they appear to be observationally pure. We would like to fix Format.printf such that they avoid unexpected behaviours -- such as raising Stdlib.Queue.Empty exception.

However, unlike the other modules, the global state is exposed by the format interface. In particular, the formatter type includes mutable state, and the interface exposes this mutable state in std_fomatter, err_formatter, str_formatter, but also std_buf. Since accessing domain-local state in Multicore OCaml needs to run code on the requesting domain, the current interface cannot be supported as is.

Proposal

The multicore team would prefer not to introduce a breaking change. Hence, our plan is to

  1. Introduce domain-local format buffers for stdout, stderr and string formatters. This will fix Multicore OCaml Issue #563.
  2. Update the documentation associated with values std_formatter, err_formatter, str_formatter and std_buf to indicate that they are the formatters and buffer used by the initial domain.
  3. Provide additional functions to access the domain-local stdout, stderr and string formatters and the string buffer.

We request your comments on this proposal. We plan to adopt a similar strategy for other global states that may be exposed by stdlib.

created time in 3 hours

push eventocaml-multicore/ocaml-multicore

KC Sivaramakrishnan

commit sha a331839200af62da73154d957e2f54100c3d3461

Update DLS docs

view details

push time in 3 hours

created repositoryocaml-bench/sandmark-nightly

created time in 3 hours

MemberEvent

issue closedocaml/ocaml

Problem with constraints, with type, and polymorphic variants

Original bug ID: 7834 Reporter: @lpw25 Status: new Resolution: open Priority: normal Severity: minor Category: typing Monitored by: smuenzel-js @gasche

Bug description

The following code seems pretty reasonable:

  module type Q = sig
    type 'a t constraint 'a = [< `Empty | `Filled of _ ]
    module type S = sig 
      type 'a t constraint 'a = [< `Empty | `Filled of _ ] 
    end
    module M : S with type 'a t = 'a t
  end;;

but fails with the following error:

  Error: In this `with' constraint, the new definition of t
  does not match its original definition in the constrained signature:
  Type declarations do not match:                                                                                 
       type 'a t = 'a t constraint 'a = [< `Empty | `Filled of 'b & 'c & 'd ]
     is not included in
       type 'a t constraint 'a = [< `Empty | `Filled of 'b ]
     Their constraints differ.

I haven't dug into this issue properly, but I can see basically how it happens. I'm not really sure there is much we can do to fix it, I suspect it would require comparing the different &ed types, and that has been ruled out as a too much of a PITA before. Still I figured it was worth reporting anyway.

closed time in 4 hours

vicuna

issue commentocaml/ocaml

Filename.dirname on Win32 UNC paths

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

vicuna

comment created time in 4 hours

issue closedocaml/ocaml

feature wish: some reasonable way to disable taill-call optimization to get better backtraces

(Edit: this issue was originally written as a bug report, see the discussion below.)

Details can be found in depth in the README/code of this repo I created to reproduce the issue.

Essentially if I have the following code (pardon the syntax/formatting, I wrote this example in Reason and then outputted it as ocaml. this is all in the example repo in both ocaml and reason because I thought that might be a complicating factor, but it was not)

ExampleFramework.ml

;;Printexc.record_backtrace true
let numSlots = 100
let printBacktraceOnCall () =
  (Printexc.get_callstack numSlots) |> (Printexc.print_raw_backtrace stdout)
let run fn =
  match fn printBacktraceOnCall with
  | exception _ -> Printexc.print_backtrace stdout
  | _ -> ()

Examples.ml

let exceptionCase _ = raise Not_found
let callbackLastLineCase callback = (); callback ()
let unitLastLineCase callback = callback (); ()

ReproOcamlBugApp.ml

;;print_endline "\nexception behavior:\n"
;;ExampleFramework.run Examples.exceptionCase
;;print_endline "\nworks as expected:\n"
;;ExampleFramework.run Examples.unitLastLineCase
;;print_endline "\ndoes not have the Examples file in the stack trace:\n"
;;ExampleFramework.run Examples.callbackLastLineCase

I get the following output:

exception behavior:

Raised at file "ocaml-src/Examples.ml", line 1, characters 22-37
Called from file "ocaml-src/ExampleFramework.ml", line 6, characters 8-31

works as expected:

Raised by primitive operation at file "ocaml-src/ExampleFramework.ml", line 4, characters 2-35
Called from file "ocaml-src/Examples.ml", line 3, characters 32-43
Called from file "ocaml-src/ExampleFramework.ml", line 6, characters 8-31
Called from file "ocaml-src/ReproOcamlBugApp.ml", line 4, characters 2-48

does not have the Examples file in the stack trace:

Raised by primitive operation at file "ocaml-src/ExampleFramework.ml", line 4, characters 2-35
Called from file "ocaml-src/ExampleFramework.ml", line 6, characters 8-31
Called from file "ocaml-src/ReproOcamlBugApp.ml", line 6, characters 2-52

Essentially in the exception case and in the case with Printexc.get_callstack and a unit after the line that calls the callback I correctly get Examples.ml in the callstack, but without the unit Examples.ml is not in the callstack with Printexc.get_callstack and I expect it to be there (both logically and based on the exception behavior).

closed time in 4 hours

bandersongit

issue commentocaml/ocaml

`Thread.exit` considered harmful

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

jhjourdan

comment created time in 4 hours

MemberEvent
GollumEvent

issue closedrescript-lang/rescript-compiler

Rethink -make-world?

I feel like the real-world results are in, and forgetting/questioning -make-world is still a recurring problem for newcomers. I'm wondering if we should flip the priority and have bsb default to -make-world, and optionally expose a -self-only?

closed time in 5 hours

chenglou

issue commentrescript-lang/rescript-compiler

Rethink -make-world?

this is fixed. for normal users, they only need run rescript or rescript build -w

chenglou

comment created time in 5 hours