HNHacker News
TopNewBestAskShowJobs

reverseblade2

293 karma · joined August 30, 2020

submissionscomments
reverseblade2··on F# to Rust Ray Tracer
Perhaps one reason is that is the easiest way to use WASM. There is still not a mature .NET compiler that can generate WASM.

Another would be, you may want to interop with Rust at source level.

reverseblade2··on F# to Rust Ray Tracer
Source code is here: https://github.com/ncave/fable-raytracer/

Basically the demo is F# -> Rust -> Wasm

reverseblade2··on OCaml 5.0 Multicore is out
I'd say significant portion of F# users are using Fable to generate Javascript. F# can compile to Rust and Python as well. https://github.com/ncave/fable-raytracer
reverseblade2··on Htmx in a Nutshell
HTMX can't find dom nodes inside Shadow DOM and hyperscript can't execute scripts injected inside a shadow dom. So no web components.
reverseblade2··on Htmx in a Nutshell
Careful, it doesn't work inside shadow dom, nor hyperscript.
reverseblade2··on Breaking up with JavaScript front ends
Probably broken when run inside shadow dom like htmx. Next please?
reverseblade2··on LiteDB: A .NET embedded NoSQL database
No async.
reverseblade2··on The Case for C# and .NET
Just use F# instead and you will have Rust, typescript, Javascript, dart, python all at once https://twitter.com/FableCompiler/status/1550429007443017729...
reverseblade2··on Edits to a cholesterol gene could stop the biggest killer on earth
There is no such thing called bad cholesterol. Just make sure triglycerides/hdl < 3
reverseblade2··on Why I left Google: work-life balance
If you are not happy with what you do, you can't make others happy even if you have time to do so.
reverseblade2··on PSA: React 18 calls code twice in strict dev mode to detect side effects
Off topic but anyway To all react devs, If you are not using web components (not mutually exclusively) then you are doing it wrong.
reverseblade2··on [dead]
It's an a good demonstration of F#'s expressiveness. It compiles to JavaScript here thanks to Fable.
reverseblade2··on A pipe operator for JavaScript: introduction and use cases
You can instead just use F# today for Javascript via fable.io
reverseblade2··on Why C# goes well with TypeScript
Alternatively to both, you could use F# as a single language.
reverseblade2··on 'Google' is most searched word on Bing
Referrals
reverseblade2··on Domain-Driven Design
Mark my words, DDD without cqrs is a futile attempt.
reverseblade2··on Minimal APIs at a glance in .NET 6
I like giraffe better. https://github.com/giraffe-fsharp/Giraffe
reverseblade2··on Why is learning functional programming so damned hard? (2019)
this 3d bin packer is fully coded in F# and I wouldn’t be able to do so without it.

https://bindrake.com/

reverseblade2··on Employers bow to tech workers in hottest job market since the dot-com era
I agree. I am not FAANG but the second biggest tech company next to Apple:) I think pandemy affected this a lot. Companies looking for local people have less options now as immigration has become difficult.

But also remote options made highly paid devs more accessible.

I am currently in Norway and when I turn on "I am open" in LinkedIn, my phone just doesn't stop ringing.

reverseblade2··on F# is the best coding language today
If you don't what fable is, you don't have any idea about how powerful f# can be.
reverseblade2··on AlpineJS
Just learn and use web components instead
reverseblade2··on F# is gaining independence from .NET
let (model', cmd') = state.update msg

In order to write that you have to pin a reference to the state. But state is something that has to flow. Sure you can pin it to a ref, make it mutable and change the state but then nothing prevents you to change the state arbitrarily e.g. from a command. I believe yes the answer is because we want to stay on the FP realm. FP imposes some restrictions to keep our sanity. So not having a reference to the state and making it immutable is one of those restrictions.

reverseblade2··on F# is gaining independence from .NET
OP here, it's a great question indeed! Now let's forget about elm/elmish but we are to write a stateful application. It doesn't have to be a web app, just any application needs to hold some state. And that state should be modifiable (Not to mention we will have side-effects as well.) in order to do something useful but we also want to stay on the Functional programming realm to get benefit from things like immutability and other functional goodies.

So you see these two goals are contradictory. How FP tackles this state problem? One solution is to use actors and agents. And that's precisely what elmish is. Unlike the conventional apps where you mutate the state directly, an agent in F# is a recursive call which can await for further messages.

So just like Flip Flop holds the state in memory, an agent hold the state in a recursive function. And how is this connected to elmish? Let's see how elmish v2 is implemented: https://github.com/elmish/elmish/blob/5330f52153d5181923bb3c... You can see an agent there and that's the core of elmish.

So basically elm and elmish is a way to handle state changes in a functional manner along with side effect support via commands.

I cannot emphasis importance of elmish, because not only it helps for isolating the state functionally but it helps you to keep your business logic separate from UI. So you don't end up messing your code like you use React hooks or context.

reverseblade2··on F# is gaining independence from .NET
I am the author of the post and author of this https://www.udemy.com/course/learning-functional-programming...

Don't be deceived by low rating. It's low because people expected a course on syntax.

Also other continuations are as below:

https://www.udemy.com/course/functional-application-designin...

https://www.udemy.com/course/end-to-end-real-world-applicati...

And if you have any questions find me from @OnurGumusDev on twitter and I will gladly help

reverseblade2··on F# is gaining independence from .NET
Sure, but functional programming requires some discipline and restrictions for a greater good. It's certainly a choice though.
reverseblade2··on F# is gaining independence from .NET
I guess they don't. It's my mistake and I have just fixed it.
reverseblade2··on F# is gaining independence from .NET
Firstly you can share code with .net and JS side. Secondly, you can do proper functional programming with F#. Third I find type system typescript as cryptic.
reverseblade2··on F# is gaining independence from .NET
This one does https://resoptima.com/
reverseblade2··on Fable 3: F# to JavaScript compiler
here's a 3d bin packer written in Fable: http://bindrake.com/ and source: https://github.com/OnurGumus/BinDrake
reverseblade2··on Fable 3: F# to JavaScript compiler
https://www.udemy.com/course/learning-functional-programming...

https://www.udemy.com/course/functional-application-designin...

https://www.udemy.com/course/end-to-end-real-world-applicati...

← PreviousPage 4 of 5Next →