by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Maxime Mangel
    @MangelMaxime
    And as you see Fulma.Calendar stopped at version 0.1.7 of the npm library and I believe now it's version 6 something. He made a lot of breaking change in it and don't expect people to use the raw CSS version anymore as it's not documented anymore...
    Steffen Forkmann
    @forki
    yes I'm fine.
    ok then let me rephrase: do you know a nice datetime picker?
    tried react-datetime-picker but
    image.png
    Andreas Vilinski
    @vilinski

    You need web sockets to be able to push to the client

    yes, but should I abandon the Fable.Remoting then or is it possible to use both?

    Alf Kåre Lefdal
    @aklefdal
    How do I set the the Title of the page when using routing? The title that is visible in the tab in the browser, and being used as title when sharing a link.
    Cody Johnson
    @Shmew
    @vilinski that largely depends on your use cases, how important is it to have real-time data? I would just google "Websockets vs REST" and read some articles about the pros and cons of each
    @aklefdal I believe you can use document.title <- "my new title"
    Maxime Mangel
    @MangelMaxime
    @forki No I don't know any good ones. I am creating my own.
    Cody Johnson
    @Shmew
    I have a picker library but it's for material-ui
    Andreas Vilinski
    @vilinski
    @Shmew I know what the difference, I just need to know how to do it with fable or saturn if I already have Fable.Remoting.
    can I use Fable.Remoting together with saturn channels?
    Cody Johnson
    @Shmew
    you can use them together sure, but if you're using websockets for every user then the pros of a rest api drops quite a bit
    I haven't used saturn channels, but Elmish.Bridge works quite nicely
    Andreas Vilinski
    @vilinski
    I'm writing internal tool, so there are at most a few simultaneous users. Each of them can start an operation and make others, who has currently opened the page, aware of this. If it works out I will also push some server logs to them
    Alf Kåre Lefdal
    @aklefdal
    Thanks, @Shmew, I will try it out.
    Damian Reeves
    @DamianReeves
    Hi… is there an example/template that cross compiles an F# Library to Fable and .NET core?
    Cody Johnson
    @Shmew
    any of Zaid's libraries are pretty good examples
    Damian Reeves
    @DamianReeves
    So if I understand correctly, the key bit is to package the source in the fable\ folder of the nuget package:
        <ItemGroup>
            <Content Include="*.fsproj; *.fs" PackagePath="fable\" />
        </ItemGroup>
    Cody Johnson
    @Shmew
    yes, it's important that fable has access to the source files
    Damian Reeves
    @DamianReeves
    So does that mean the same nuget package can host .NET Core and fable assets?
    Cody Johnson
    @Shmew
    correct
    FSharpPlus works in both dotnet and fable for example
    Damian Reeves
    @DamianReeves
    thanks
    Alkasai
    @Alkasai

    I'm trying to work with dates, but no matter what I try, the UTC <> Local conversion doesn't work.
    For example both of these return the same string...

    DateTime.Now.ToLongTimeString()
    DateTime.UtcNow.ToLongTimeString()

    Anyone know how to properly convert dates between UTC and Local?

    Steffen Forkmann
    @forki
    I am creating my own. @MangelMaxime - I'm listening! ;-)
    Eugene Tolmachev
    @et1975
    @ImaginaryDevelopment here's a delay Cmd:
    module Cmd =
        open Browser
        open Elmish
        let delay (time:System.TimeSpan) cmd : Cmd<_> =
            let invoke dispatch =
                cmd |> List.iter (fun f -> f dispatch)
            [ fun dispatch -> 
                window.setTimeout(invoke, (int time.TotalMilliseconds), dispatch) |> ignore ]
    ImaginaryDevelopment
    @ImaginaryDevelopment
    Why would I use that over async.sleep?
    Maxime Mangel
    @MangelMaxime

    @ImaginaryDevelopment setTimeout is a native API and so will not include more code.

    async as known in F# doesn't exist in JavaScript so we creating our own implementation.

    Both will work it's probably a matter of preference I think. In general, I am in favor of the native API
    Cody Johnson
    @Shmew
    Hey @MangelMaxime do you know if there is a way to get fable-splitter to move js source files to the output along with the newly compiled fs -> js files?
    doesn't appear it cares if you set Compile Include in the fsproj
    I already have allFiles: true in my splitter.config.js
    Maxime Mangel
    @MangelMaxime
    You can force it by adding importSideEffect or something like that.
    I think
    Cody Johnson
    @Shmew
    I'd have to do that for every file then, right? What I'm trying to accomplish is copy all my *.test.js.snap to the output tests directory
    Maxime Mangel
    @MangelMaxime
    Yes, or you can attach a hook to fable-splitter and copy the file in your hook
    There is also a PR for adding Glob support to Fable fsproj but I am not sure if it will support it for non F# file.
    fable-compiler/Fable#1946
    Cody Johnson
    @Shmew
    Yeah that's my PR :)
    Maxime Mangel
    @MangelMaxime
    Ah :p
    At least you know I saw it ^^ and you can answer my question ^^
    Cody Johnson
    @Shmew
    yeah it should include anything as far as libraries go, but that shouldn't help in this case. I already have a .snap in my proj and it doesn't copy it
    but that's with fable-splitter specifically
    Maxime Mangel
    @MangelMaxime

    Yes, I guess webpack understand .snap thanks to a loader or something.

    But fable-splitter is more limited I would say.

    Cody Johnson
    @Shmew
    so if I rename the file to .snap.js then it copies it
    but if it isn't fs related or .js it ignores :(
    ah there's a babel-plugin-file-loader package that ought to do it
    robertj
    @robkuz
    Hey,
    is anybody using Fulma/Bulma and Bootstrap together?