profile
viewpoint

buckaroo-pm/adishavit-argh 0

Argh! A minimalist argument handler.

buckaroo-pm/agauniyal-rang 0

A Minimal, Header only Modern c++ library for terminal goodies 💄✨

buckaroo-pm/AmokHuginnsson-replxx 0

A readline and libedit replacement that supports UTF-8, syntax highlighting, hints and Windows and is BSD licensed.

buckaroo-pm/aws-sdk-cpp 0

AWS SDK for C++

buckaroo-pm/awslabs-aws-c-common 0

Core c99 package for AWS SDK for C. Includes cross-platform primitives, configuration, data structures, and error handling.

buckaroo-pm/awslabs-aws-c-event-stream 0

C99 implementation of the vnd.amazon.eventstream content-type.

buckaroo-pm/awslabs-aws-checksums 0

Cross-Platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations. C interface with language bindings for each of our SDKs

buckaroo-pm/awslabs-aws-lambda-cpp 0

C++ implementation of the AWS Lambda runtime

buckaroo-pm/boost-algorithm 0

Boost.org algorithm module

buckaroo-pm/boost-align 0

Boost.Align

push eventbikehackers/components-db

njlr

commit sha 2cbfdc717bb3a39f656b6b7d9f00adc6dcc86366

* Adds chains

view details

push time in a minute

push eventbikehackers/components-db

njlr

commit sha 14da8e2d73aba8cedae5b0c63ef5c66c01ba604b

* Adds integrated shifters

view details

push time in 15 minutes

push eventbikehackers/components-db

njlr

commit sha 459a1e397fff3f3cfac5e5d2ae229ee7fa7be601

Update .travis.yml

view details

push time in 30 minutes

push eventbikehackers/components-db

njlr

commit sha af8deadc9850a3f65d59e0174f9c8caedbc9f841

Update .travis.yml

view details

push time in 42 minutes

push eventbikehackers/components-db

njlr

commit sha 53ef6d299aef9efeba588b2965287ae385438e5c

Update .travis.yml

view details

push time in 2 hours

push eventbikehackers/components-db

njlr

commit sha 536174a9e42ece97b19ec5fafe5a827ff0cedce6

Update .travis.yml

view details

push time in 2 hours

push eventbikehackers/components-db

njlr

commit sha 6b8a29e2a760442de2ba274df427d6c7097c702c

Create .travis.yml

view details

push time in 2 hours

startedMoiraeSoftware/myriad

started time in 3 days

issue openedfsprojects/Paket

generate-load-scripts does not load transitive dependency Newtonsoft.Json

Description

I have an fsx script that uses paket generate-load-scripts output in order to load Nuget dependencies.

In particular:

nuget Thoth.Json
nuget Thoth.Json.Net

However, when I run my script, I get the error:

error FS0074: The type referenced through 'Newtonsoft.Json.Linq.JToken' is defined in an assembly that is not referenced. You must add a reference to assembly 'Newtonsoft.Json'.

Repro steps

Please provide the steps required to reproduce the problem

paket.dependencies

source https://api.nuget.org/v3/index.json

generate_load_scripts: true
storage: none
framework: netcore3.1, netstandard2.0, netstandard2.1
nuget DotNet.Glob 3.0.9
nuget FsToolkit.ErrorHandling 1.4.1
nuget Thoth.Json
nuget Thoth.Json.Net

paket.references

FSharp.Core
FsToolkit.ErrorHandling
Thoth.Json
Thoth.Json.Net
DotNet.Glob

My script (check-data.fsx):

#load @".paket/load/netcoreapp3.1/main.group.fsx"

#load @"components/Types.fs" // This file uses Thoth.Json.Net

Steps:

dotnet restore
dotnet paket install
dotnet paket generate-load-scripts
dotnet fsi ./check-data.fsx

Expected behavior

I would expect the script to run.

Actual behavior

I get this error:

error FS0074: The type referenced through 'Newtonsoft.Json.Linq.JToken' is defined in an assembly that is not referenced. You must add a reference to assembly 'Newtonsoft.Json'.

Known workarounds

I can workaround the error by loading Newtonsoft.Json before the main group:

#load @".paket/load/netcoreapp3.1/Newtonsoft.Json.fsx"
#load @".paket/load/netcoreapp3.1/main.group.fsx"

#load @"components/Types.fs"

Versions etc.

$ dotnet --version
3.1.300

$ dotnet paket --version
Paket version 5.245.2

created time in 11 days

push eventnjlr/tusk

njlr

commit sha 3cf7375b514566db6d455d3c0462f2a11bb363ea

Update README.md

view details

push time in 15 days

issue commentfable-compiler/Fable

Async.StartChild does not appear to apply the optional timeout parameter correctly

Work-around using setTimeout (not rigorously tested!)

module Async =

  let withTimeout timeout workflow =
    Async.FromContinuations
      (fun (resolve, reject, cancel) ->
        let timer =
          setTimeout
            (fun _ ->
              sprintf "Task took longer than %ims! " timeout
              |> Exception
              |> reject)
            timeout

        let q =
          workflow
          |> Async.StartAsPromise

        q.``then``
          (fun x ->
            clearTimeout timer
            resolve x)
        |> ignore

        q.``catch``
          (fun exn ->
            clearTimeout timer
            reject !!exn)
        |> ignore
      )
njlr

comment created time in 16 days

issue openedfable-compiler/Fable

Async.StartChild does not appear to apply the optional timeout parameter correctly

Description

Async.StartChild does not appear to apply the optional timeout parameter correctly.

Repro code

This code should time out.

open Fable
open Fable.Core
open Fable.Core.JS
open System

module Async =

  let withTimeout timeout action =
    async {
      let! child = Async.StartChild (action, timeout)
      return! child
    }

(async {
    printfn "Started... "

    do!
      Async.FromContinuations ignore
      |> Async.withTimeout 3_000

    printfn "Finished. "
}
|> Async.StartAsPromise).catch (fun error -> console.error error)
|> ignore 

REPL

Expected and actual results

The program never terminates

Related information

  • Fable version: 2.10.1
  • Operating system: Ubuntu 18.04

created time in 16 days

issue openedIrcDotNet/IrcDotNet

Unhandled exception. System.NotSupportedException: This protocol version is not supported.

To test out the library I am trying to connect to a server and list the channels.

However, I get the exception This protocol version is not supported:

Unhandled exception. System.NotSupportedException: This protocol version is not supported.
   at System.Net.Sockets.Socket.ConnectAsync(SocketAsyncEventArgs e, Boolean userSocket)
   at System.Net.Sockets.Socket.ConnectAsync(SocketAsyncEventArgs e)
   at IrcDotNet.StandardIrcClient.ConnectAsync(EndPoint remoteEndPoint, Object token)
   at IrcDotNet.StandardIrcClient.Connect(EndPoint remoteEndPoint, Boolean useSsl, IrcRegistrationInfo registrationInfo)
   at IrcDotNet.StandardIrcClient.Connect(String hostName, Int32 port, Boolean useSsl, IrcRegistrationInfo registrationInfo)
...
var irc = new StandardIrcClient ()

var host = "chat.freenode.net"
var port = 6667

var regInfo = IrcUserRegistrationInfo ()
r.UserName = "testaccount123"
r.NickName = "testaccount1234"
r.RealName = "testaccount12345"

irc.Connect (host, port, true, regInfo)

Have I somehow configured this incorrectly or is this a limitation of the library?

Note: I am able to connect to the server using HexChat.

created time in 19 days

startedZaid-Ajaj/Snowflaqe

started time in a month

issue commentfsprojects/FSharp.Data.GraphQL

GraphQL Client and Fable 2

Recently I have a published a different solution for Fable called Snowflaqe. It is a dotnet CLI tool that code-generates a Fable (or F#) GraphQL client project based on the schema and input query files. The tool also performs validation and partial type-checking against the input queries.

Interesting! Why code generation over a Type Provider?

bilkusg

comment created time in a month

issue commentkoajs/koa

Suggestion: consistent package names on NPM

Who has the access required to do this?

njlr

comment created time in a month

issue commentbazelbuild/rules_dotnet

Support for F#

Are there any plans surrounding this?

samuela

comment created time in a month

startediNecas/fsharp-sqlite

started time in a month

startedjoelverhagen/TorSharp

started time in a month

issue commentfable-compiler/fable-fetch

How do I get the HTTP status code in the error case?

I started using SimpleHttp, but only because that's the one I stumbled upon first.

I will leave this open since having the error code seems like an important addition to Fable.Fetch.

njlr

comment created time in 2 months

issue openedionide/ionide-vscode-fsharp

Type annotations are missing

Describe the bug

  • Type annotations are missing
  • Projects stuck in "not yet loaded" state

To Reproduce

Steps to reproduce the behaviour:

  1. Open VS Code in an F# solution folder
  2. Open any F# file
  3. Observe that no type annotations are available
  4. Open the Ionide solution explorer tab
  5. Observe that none of the projects are loaded

Environment (please complete the following information):

  • OS: Ubuntu 18.04.4 LTS
  • Ionide version: 4.11.0
  • VSCode version: 1.45.1
  • dotnet SDK version: 3.0.103
  • mono / .Net Framework version: NA

Additional context

Sometimes it works then stops working on the same project after editor open / close so maybe a cache issue?

created time in 2 months

PR opened Zaid-Ajaj/Fable.SimpleHttp

Update README.md

Minor fix to example code

+2 -2

0 comment

1 changed file

pr created time in 2 months

push eventnjlr/Fable.SimpleHttp

njlr

commit sha 3e4d367e6e1f4cbb4c8dca5a189aa1dd9e614fcc

Update README.md Minor fix to example code

view details

push time in 2 months

push eventnjlr/Fable.SimpleHttp

njlr

commit sha 29c6b24ea4e95b9f532e4147193c66711ff3aee6

Update README.md Minor fix to example code

view details

push time in 2 months

fork njlr/Fable.SimpleHttp

Http with Fable, made simple.

fork in 2 months

startedZaid-Ajaj/Fable.SimpleHttp

started time in 2 months

issue openedfable-compiler/fable-fetch

How do I get the HTTP status code in the error case?

It looks like the response gets turned into a string for all response codes other than 200:

https://github.com/fable-compiler/fable-fetch/blob/b79a153b59f806771508fa36321221e5dc338269/src/Fetch.fs#L379

However, I need to handle HTTP codes differently in my app.

How can I get the HTTP code for error cases (e.g. 401)?

created time in 2 months

issue commentdemystifyfp/FsToolkit.ErrorHandling

Compatability with AsyncSeq?

Exactly!

I'm not sure which behaviour is preferable.

njlr

comment created time in 2 months

issue openedkoajs/koa

Suggestion: consistent package names on NPM

One of the off-putting things about Koa vs other solutions is that it isn't clear which NPM packages are maintained by the Koa authors and which are community efforts. I would like to stick to official Koa packages to get some degree of assurance.

It would be great if these packages had a common naming scheme on NPM.

My suggestion would be to follow the @koa/router package:

  • Koa main package koa
  • Router @koa/router
  • Body Parser @koa/bodyparser
  • Static @koa/static
  • etc...

This convention is already used by Babel.

created time in 2 months

issue commentdemystifyfp/FsToolkit.ErrorHandling

Compatability with AsyncSeq?

Should only AsyncSeq<Result<_, _>> be supported?

I'm unsure what you're asking.

Basically it comes to down to this example. Should it work?

let xs = asyncSeq {
  yield 1
  yield 2
  yield 3
}

let ys = asyncSeq {
  yield Ok 1
  yield Ok 2
  yield Ok 3
}

for x in xs do
  printfn "%i" x

for y in ys do
  printfn "%i" y // y is an int because the `Ok` is automatically unwrapped
njlr

comment created time in 2 months

issue commentdemystifyfp/FsToolkit.ErrorHandling

Compatability with AsyncSeq?

I was able to design an async version like this:

[<AutoOpen>]
module AsyncSeqExtensions =

  // Add asynchronous for loop to the 'asyncResult' computation builder
  type FsToolkit.ErrorHandling.AsyncResultCE.AsyncResultBuilder
    with
      member x.For (seq : AsyncSeq<Result<'T, 'TError>>, action : 'T -> Async<Result<unit, 'TError>>) : Async<Result<unit, 'TError>> =
        seq
        |> AsyncSeq.foldAsync
          (fun acc x ->
            async {
              match acc, x with
              | Ok (), Ok x ->
                return! action x
              | Ok (), Error e ->
                return Error e
              | acc, _ ->
                return acc
            })
          (Ok ())

I'm still unsure of the best semantics though. Should the for stop at the first Result.Error?

njlr

comment created time in 2 months

issue openedionide/ionide-vscode-fsharp

Autocomplete on attributes should remove "Attribute" from the annotation

If I start writing an attribute by typing [, < then choosing from the auto-complete pop-up (e.g. RequireQualifiedAccessAttribute) then the inserted text is literally that:

[<RequireQualifiedAccessAttribute>]
let f x = x

But it should be this:

[<RequireQualifiedAccess>]
let f x = x

Environment (please complete the following information):

  • OS: Ubuntu 18.04
  • Ionide version: 4.10.1
  • VSCode version: 1.44.2
  • dotnet SDK version: 3.0.103
  • mono / .Net Framework version: -

created time in 2 months

push eventnjlr/solid-hex-fs

dependabot[bot]

commit sha a2a6d32d10ce3e8ac2169dd78b7836d6947bdb7f

Bump acorn from 6.4.0 to 6.4.1 in /demo Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1. - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1) Signed-off-by: dependabot[bot] <support@github.com>

view details

njlr

commit sha 1a625be006fa7c4d441739ed5c538584f238b121

Merge pull request #1 from njlr/dependabot/npm_and_yarn/demo/acorn-6.4.1 Bump acorn from 6.4.0 to 6.4.1 in /demo

view details

push time in 2 months

PR merged njlr/solid-hex-fs

Bump acorn from 6.4.0 to 6.4.1 in /demo dependencies

Bumps acorn from 6.4.0 to 6.4.1. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/acornjs/acorn/commit/9a2e9b6678e243d66846b91179d650d28453e70c"><code>9a2e9b6</code></a> Mark version 6.4.1</li> <li><a href="https://github.com/acornjs/acorn/commit/90a9548ea0ce351b54f956e2c4ed27cca9631284"><code>90a9548</code></a> More rigorously check surrogate pairs in regexp validator</li> <li>See full diff in <a href="https://github.com/acornjs/acorn/compare/6.4.0...6.4.1">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

dependabot[bot]

pr closed time in 2 months

issue commentdemystifyfp/FsToolkit.ErrorHandling

Compatability with AsyncSeq?

I didn't realize you could extend an existing computation expression in that way, very useful trick!

However, where should this extension live? I presume you don't want to take FSharp.Control.AsyncSeq as a dependency?

njlr

comment created time in 2 months

issue openeddemystifyfp/FsToolkit.ErrorHandling

Compatability with AsyncSeq?

So FSharp.Control.AsyncSeq extends async so that you can do this:

async {
  let xs = asyncSeq {
    yield 1
    yield 2 
    yield 3
  }

  for x in xs do
    printfn "%A" x
}

But this is not implemented for asyncResult:

async {
  let xs = asyncSeq {
    yield 1
    yield 2 
    yield 3
  }

  for x in xs do // Only seq allowed here
    printfn "%A" x
}

I would be great if this worked, although I'm not sure how it could be implemented. Perhaps this is just a limitation of F#?

created time in 2 months

issue openedfsharp/FSharp.Data

HTML attributes require a space between them

open System
open FSharp.Data

[<EntryPoint>]
let main argv =
  let sample =
    """
    <html>
      <body>
        <h1 class="foo"style="font-size: 0.7em">Apple</h1>
        <h1 class="foo" style="font-size: 0.7em">Banana</h1>
        <h1 class="foo">Cherry</h1>
      </body>
    </html>
    """

  let doc = HtmlDocument.Parse sample

  doc.CssSelect "h1.foo " 
  |> Seq.map (fun x -> x.InnerText ()) 
  |> Seq.toList
  |> printfn "h1.foo %A"

I would expect this to print:

h1.foo [ "Apple"; "Banana"; "Cherry ]

But instead I get:

h1.foo [ "Banana"; "Cherry ]

I think FSharp.Data is confused by the lack of a space here:

        <h1 class="foo"style="font-size: 0.7em">Apple</h1>

created time in 2 months

issue commentfsharp/fslang-suggestions

Ability to pass ownership of an IDisposable to caller

I like the idea of unuse or give (if I understand those correctly), it would be great if such value would create a warning if the value is bound (without use) to a local member at call site.

let produce () =
  let disposeSomeOtherPlace = new SomethingDisposable()
  give disposeSomeOtherPlace 

let consume () =
   let produced = produce ()  // warning: IDisposable value bound locally without the 'use' keyword
   ()

type Consumer () =
  let mutable disposable = null
  member x.Foo () = x.disposable <- produce () // no warning

The proper escape analysis though would be non trivial, probably akin to what is being done for nullable reference types, or going all the way to rust borrow checker.

I think your produce function should also be use instead of let. give should only be used in conjunction with use:

let produce () =
  use disposeSomeOtherPlace = new SomethingDisposable()
  give disposeSomeOtherPlace 
njlr

comment created time in 2 months

issue commentfsharp/fslang-suggestions

Ability to pass ownership of an IDisposable to caller

This is not a breaking change to the F# language design

I just want to point out that the the outlined approach unfortunately is a breaking change. It's changing existing well-defined behavior (perhaps for the better).

You are right, the exact approach I suggested would be breaking. However, it could also be implemented without changing existing code, for example with a new keyword (give?)

njlr

comment created time in 2 months

issue commentdiscord-net/Discord.Net

System.InvalidOperationException: This property has no value set.

I am also seeing this issue.

msx752

comment created time in 2 months

issue openedfsharp/fslang-suggestions

Ability to pass ownership of an IDisposable to caller

I propose we provide a mechanism for passing ownership of an IDisposable to the caller in computation expressions, particularly async.

One approach would be: if a variable is declared with use but that name is returned, then Dispose should not be called. If the async throws, then Dispose should be called as usual.

Some examples with the new approach:

async {
  use foo = new Foo ()
  return foo // foo.Dispose is not called
}

async {
  use foo = new Foo ()
  use bar = new Bar ()
  return bar // foo.Dispose is called, but bar.Dispose is not called
}

async {
  use foo = new Foo ()
  return 1 // foo.Dispose is called
}

async {
  use foo = new Foo ()
  failwith "Error!" // foo.Dispose is called
  return foo
}

async {
  use! foo = 
    async {
      use foo = new Foo ()
      return foo // foo.Dispose is not called
    }
  do! foo.Stuff ()
  return 1 // foo.Dispose is called
}

This enables us to do some work with an IDisposable and return it without using let with manual clean-up. It looks like RAII from the C++ world.

Without the proposed change we need to do this:

let createFooWithStuff = 
  async {
    let foo = new Foo ()

    try
      do! foo.Stuff ()
      return foo
    with exn ->
      foo.Dispose () 
      raise exn
  }

With the proposed change we can do this:

let createFooWithStuff = 
  async {
    use foo = new Foo ()
    do! foo.Stuff ()
    return foo
  }

Pros and Cons

The advantages of making this adjustment to F# are...

  • Much less error prone handling of IDisposable
  • (Arguably) more intuitive behaviour

The disadvantages of making this adjustment to F# are...

  • Changes the semantics of existing code

Extra information

Estimated cost (XS, S, M, L, XL, XXL): S

Related suggestions: (put links to related suggestions here)

Affidavit (please submit!)

Please tick this by placing a cross in the box:

  • [X] This is not a question (e.g. like one you might ask on stackoverflow) and I have searched stackoverflow for discussions of this issue
  • [X] I have searched both open and closed suggestions on this site and believe this is not a duplicate
  • [X] This is not something which has obviously "already been decided" in previous versions of F#. If you're questioning a fundamental design decision that has obviously already been taken (e.g. "Make F# untyped") then please don't submit it.

Please tick all that apply:

  • [X] This is not a breaking change to the F# language design
  • [X] I or my company would be willing to help implement and/or test this

created time in 2 months

issue closeddiscord-net/Discord.Net

Am I using the packages and classes correctly?

I am trying to create a client and connect to Discord.

I have the package from Nuget:

nuget Discord.Net 2.2.0

My code:

using Discord;
using Discord.Net;
using Discord.Net.WebSockets;

void DoStuff() 
{
    var config = new DiscordSocketConfig();

    var client = new DiscordSocketClient(config);

    return;
}

But I get a compilation error:

The value or constructor 'DiscordSocketConfig' is not defined. Maybe you want one of the following: DiscordConfig DiscordClientExtensions Discord DiscordComparers

I am using .NET Core 3.0 on Linux.

closed time in 2 months

njlr

issue commentdiscord-net/Discord.Net

Am I using the packages and classes correctly?

Yes, can confirm the imports were wrong.

using Discord.WebSocket;
njlr

comment created time in 2 months

issue openeddiscord-net/Discord.Net

Am I using the packages and classes correctly?

I am trying to create a client and connect to Discord.

I have the package from Nuget:

nuget Discord.Net 2.2.0

My code:

using Discord;
using Discord.Net;
using Discord.Net.WebSockets;

void DoStuff() 
{
    var config = new DiscordSocketConfig();

    var client = new DiscordSocketClient(config);

    return;
}

But I get a compilation error:

The value or constructor 'DiscordSocketConfig' is not defined. Maybe you want one of the following: DiscordConfig DiscordClientExtensions Discord DiscordComparers

I am using .NET Core 3.0 on Linux.

created time in 2 months

issue commentLoopPerfect/buckaroo

Loading macros from buckaroo dependencies

@errangutan

I'm not getting something. The package which contains buckaroo_setup is generated? Who generates it?

Buckaroo is a tool that fetches packages containing Buck or Bazel projects. It downloads them to a folder local to the project (a bit like node_modules) and also generates a set of macros for the user to use in their own BUILD files. Buckaroo solves the transitive workspace dependency problem for Bazel.

Buckaroo packages are usually identified by a name like github.com/someorg/someproject. However, it is possible to depend on two different versions of one package, so the workspace names, which must be globally unique to satisfy Bazel, have a hash appended like this:

package name                      ->    workspace name
github.com/someorg/someproject    ->    github_someorg_someproject_aabbccdd

The challenge now is that the user wants to load a macro from a package. We can get the workspace name using a function generated by Buckaroo:

load("//buckaroo:defs.bzl", "buckaroo_workspace")

someproject_workspace = buckaroo_workspace("github.com/someorg/someproject") 

someproject_workspace # github_someorg_someproject_aabbccdd

But we cannot use this variable in a load:

# Not allowed
load(someproject_workspace, "my_macro")

Perhaps you can give some insight into how we can achieve this in Bazel?

roey-e

comment created time in 2 months

issue commentLoopPerfect/buckaroo

Loading macros from buckaroo dependencies

According to the Bazel docs:

Arguments must be string literals (no variable) and load statements must appear at top-level, i.e. they cannot be in a function body.

So we cannot use function outputs or variables in a load.

The reason the actual workspace name has a weird hash appended is to ensure that even when there are two different versions of the same package somewhere in the resolution tree there is not a name collision.

I will have to think further about how this might work.

roey-e

comment created time in 2 months

issue commentegramtel/tdsharp

Does offset in GetChatsAsync work?

Since the example on the official tdlib is basically spaghetti, the important bit is to set the order and offset.

var limit = 3;

var offset = 0;
var order = 0;

while (true)
{
  var chats = await client.GetChatsAsync(order, offset, limit);

  Console.Log(chats.ChatIds);

  if (chats.ChatIds.IsEmpty)
  {
    break;
  }

  var lastChatId = chats.ChatIds.Last;

  var chat = await client.GetChatAsync(lastChatId);

  order = chat.Order;
  offset = chat.Id;
}
njlr

comment created time in 2 months

issue openedegramtel/tdsharp

Does offset in GetChatsAsync work?

I would like to get all chats, but I might have more chats than the limit so I want to call GetChatsAsync multiple times.

However, this code never terminates.

var offset = 0;
var limit = 3;

while (true)
{
  var chats = await client.GetChatsAsync(offset, limit);

  Console.Log(chats.ChatIds);

  if (chats.ChatIds.IsEmpty)
  {
    break;
  }

  offset += 1; // What should the next offset be?
}

created time in 2 months

issue commentfsharp/FAKE

Octokit.fsx is not DotNET Core compatible?

I am trying to build https://github.com/fsprojects/FSharp.Control.AsyncSeq which uses that file here.

I suppose this build script was written before that FAKE 5 API was written?

njlr

comment created time in 3 months

more