HNHacker News
TopNewBestAskShowJobs

akkad33

716 karma · joined September 26, 2022

submissionscomments
akkad33··on The Core of Rust
https://news.ycombinator.com/item?id=44815405#44816592
akkad33··on The Core of Rust
Another post about how Rust is not to their liking because it has things there familiar language does not have. For example the author says exceptions are somehow "simpler" than Result types and it's a downside Rust does not allow you to get a value without checked for error. And complains about ? operator. I think just because you are more familiar with exception style programming does not make it simpler.
akkad33··on The Core of Rust
> It's clearly very heavily inspired by Rust

The creator has said it's not. It's compiler is in rust though. But Gleam is an entirety different language in terms of paradigms and target runtimes. It can't really replace rust

akkad33··on Anna's Archive: An Update from the Team
Now you can publish independently through Kindle or through learnpub. Would that not cut out the intermediary fees?
akkad33··on Anna's Archive: An Update from the Team
Then what's the economic interest for writing a book
akkad33··on Anna's Archive: An Update from the Team
Not sure like between books and AI
akkad33··on Clojure Async Flow Guide
Thanks. Is that the only difference
akkad33··on Clojure Async Flow Guide
Is it like elixir actors
akkad33··on Why Nim?
My personal experience has been different. We recently onboarded a whole team of Devs on a language none of us mastered and it's been running in prod with only a couple bugs so far in 6 months, much lower than our average with our normal stack that everyone masters
akkad33··on Why Nim?
I've said nothing about my experience or seniority in this discussion, so I don't know how they are relevant
akkad33··on Why Nim?
They can help automate the process. Eg from flask creator: https://youtu.be/tg61cevJthc?si=Kd8azCPwXYeb-gac
akkad33··on Why Nim?
> Maybe some day I’ll have the brain cells and skill to write code in zig and be confident I’m Not introducing a whole class of gnarly bugs, but it seems like I should just focus my limited brain power on writing high

Llms solve this problem

akkad33··on Node.js is able to execute TypeScript files without additional configuration
What are the issues
akkad33··on Node.js is able to execute TypeScript files without additional configuration
Ocaml does it fast
akkad33··on Go 1.25 Release Notes
> my editor will offer some field or function that looks like what I want (and is what I'm typing to see if it will autocomplete) but once I select it it complains that there's no such field or function

Are you using copilot?

akkad33··on Books will soon be obsolete in school
Reads like an AI written linkedin post
akkad33··on Kodak has no plans to cease, go out of business, or file for bankruptcy
It's a camera, not a car
akkad33··on OCaml as my primary language
I don't know OCAML well but I think this is referring to the fact that modules on OCAML can be generic. In f# there is no HKTs that is types that can be parameterised with type classes. So in F# you have to have List.map, option.map etc, whereas in a language like OCAML or Haskell they would have one parametrised module
akkad33··on Zig's Lovely Syntax
All of these examples look weird and unreadable to me. Rust borrows from decades of ML language syntax. I don't think that can go wrong. Not sure where the Zig choices come from but they seem to be there just to look "different"
akkad33··on Partially Matching Zig Enums
> No, you assumed that Zig and C++ are equivalent and concluded that they'll follow a similar trajectory. It's your premise that's unjustified.

They did not say Zig and C++ are equivalent

akkad33··on Gleam v1.12
I didn't find it distracting. Why you?
akkad33··on Why F# could be the next mainstream programming language (2024)
I guess vscode is convenient and I don't want to spend the rest of my life configuring vim
akkad33··on Why F# could be the next mainstream programming language (2024)
> Records have built in equality logic, Classes don't.

I'm aware of this but i feel this is confusing. Just putting () changes semantics a whole lot

> Also, just minor pedantic comment, both C# and F# will monomorphize for struct of T

I wasn't aware thanks

akkad33··on Why F# could be the next mainstream programming language (2024)
One thing I would say is if you're writing a normal Rust application or library and do not care about c interoperability, you could get by without being aware of anything other than the first 2 types. However in Fsharp you are forced to learn about all other ways of doing things, plus how C# does things, because it is almost impossible to do anything useful without interoperating with C# and dotnet
akkad33··on Why F# could be the next mainstream programming language (2024)
> struct Foo { x: f64, y: f64 } // Struct struct Foo(f64, f64) // Tuple Struct let f = (1.0, 2.0) // Tuple enum U { Foo(f64, f64) } // Enum Tuple enum V { Foo { x: f64, y: f64 } } // Enum Struct [ 1.0, 2.0 ] // Size-2 Array &[ 1.0, 2.0 ] // Slice vec![1.0, 2.0] // Vec

I don't know, I'm not too bothered by this. If you take struct tuple and struct, Yes synctacticqlly they are different but functionally they are quite similar. You have values lying in memory. There's no reason to prefer one to the other except convenience. Program behaviour will not change. This is not the the case for fsharp classes and records and structs. Same way Fsharp has two types of lists. It also has an array type and all these are different but they look the same. In rust case they all have different names but behaviour wise they are same: data stored in contiguous memory with some differences in what you can do with them. I do like fsharp as a language but it can't go full on its promises because of dotnet. One glaring one is nulls. The language itself claims to be null safe. Except if you use dotnet types like strings. Then the compiler doesn't warn you. Honestly Kotlin does this better with non nullable types and null chaining

akkad33··on Why F# could be the next mainstream programming language (2024)
Yeah those examples I gave are not the best. But why records and classes when records can also have methods. What I was getting at was the language looks good until you dive deeper and get into all those rough edges of dotnet interoperability. An example I can think of is functions/methods. I think F# style is to write curried functions (no brackets for function inputs), except class methods are written mostly non curried. Computation expressions are non curried also even though that is an F# only features. Then there are two ways of writing generics: C# reified generics and rust like monomorphised generics (with inline keyword) and they used to have two different syntaxes until recently
akkad33··on Why F# could be the next mainstream programming language (2024)
> NET has spoiled me so badly with C#, NuGet, and the debugger that I just don't have the patience for any other languages with their half-assed build systems, janky package managers, and after-thought debuggers.

Rust and cargo are pretty good and only getting better. I don't really see a good use case for anything dotnet when JVM exists

akkad33··on Why F# could be the next mainstream programming language (2024)
F# has exceptions though
akkad33··on Why F# could be the next mainstream programming language (2024)
F# is a chimera of a language. The functional parts of the language are nicely designed: no nulls, discriminated unions (ADTs), you write simple functions in simple modules and there is nothing that is too clever to understand: it's very pragmatic. Then there is a whole lot of stuff like inheritance, classes, interfaces, nulls mainly there for dotnet interoperability that gets very ugly very fast. There are way too many variants of the same thing: records, classes, struct records, tuples, struct tuples etc, which are mainly there either for compatibility with similar c# stuff or because the default language constructs often result in suboptimal code. At the end I went with Rust because it has one way of doing such stuff. And for those interested in a gc language with functional features there is now Gleam
akkad33··on Why F# could be the next mainstream programming language (2024)
Not only. I don't want to use Microsoft technologies unless forced to or no better alternatives (GitHub/ vscode)
← PreviousPage 4 of 12Next →