HNHacker News
TopNewBestAskShowJobs

ducaale

3,431 karma · joined May 14, 2017

Sharaf.13@hotmail.com
submissionscomments
ducaale··on Anecdotally, Programmers Dislike "Reduce"
I find `reduce` useful for operations where:

- arg1, arg2 and return value are all of the same type e.g `ADD`, `MAX`, `CONCAT` etc

- and there is an identity value e.g zero for `ADD`, -math.inf for `MAX`

I recommend checking this article[1] on how monoids play nicely with reduce.

[1] https://fsharpforfunandprofit.com/posts/monoids-without-tear...

ducaale··on Ask HN: Who is hiring? (July 2024)
eduMe | Senior Software Engineer | London | Hybrid | https://www.edume.com

eduMe is a mobile-based training platform for the frontline workforce.

We're backed by top-tier venture capital firms, including Prosus, Workday Ventures, and Valo Ventures. We collaborate with companies like Uber, Kering, and Marriott to integrate learning experiences into daily tools and utilise AI for lesson generation.

We're seeking a senior software engineer to drive our technology forward and directly impact our mission.

Apply at https://www.edume.com/careers-listing?gh_jid=5932788003

ducaale··on Show HN: Ezno, a TypeScript checker written in Rust, is now open source
Unlike stc, Ezno is meant to be an extension for what TS offers today. Check this article[1] for all the cool stuff it can do.

[1] https://kaleidawave.github.io/posts/introducing-ezno/

ducaale··on Easy, alternative soft deletion: `deleted_record_insert`
or you can create view for every table that supports soft deletion and ensure all of your read-only queries are using those table

    CREATE VIEW current_customers AS
        SELECT * FROM customers where deleted_at is null;

    SELECT * FROM current_customers JOIN ...
Of course, this comes with its downsides e.g. views need to be recreated in every migration and there might be some complex join operations that might not work.
ducaale··on Rewriting TypeScript in Rust?
Slightly related, there is TypeRunner[1] which aims to rewrite a subset of TypeScript in C++

[1] https://github.com/marcj/TypeRunner

ducaale··on Burrows–Wheeler Transform
Fun fact, burrows-wheeler is one of the assignments in coursera's algorthims course.
ducaale··on Arc Browser Company: Chrome and Safari face a new challenger
Maybe serenityOS browser will be the new engine/browser that rivals existing browser engines

See https://mobile.twitter.com/awesomekling/status/1508953394836...

ducaale··on Ask HN: Should Instagram add labels indicating an image used filters?
This reminds me of Huawei's moon mode https://in.mashable.com/tech/3114/are-the-moon-shots-from-th...

Smartphone Camera vs Reality https://youtu.be/MZ8giCWDcyE

ducaale··on Zq: An easier and faster alternative to jq
In the theme of jq alternatives, there is fx[1] which has an interactive view and supports querying JSON in Javascript, Python and Ruby. It used to be a node CLI but was recently rewritten in golang[2]

[1] https://github.com/antonmedv/fx

[2] https://twitter.com/antonmedv/status/1515429017582809090

ducaale··on -h –Help -help Help –? –?
or you can use C-x C-e to edit the command in $EDITOR
ducaale··on Jo – a shell command to create JSON (2016)
Here is how HTTPie does it:

  x=005  // {"x": "005"}
  X:=005 // {"x": 5}
ducaale··on FX: An interactive alternative to jq to process JSON
This doesn't look to me something that can be evaluated by node

  fx .comments[].authors[].names
You might want to take a look at this post[1] to see everything fx can do.

[1] https://medium.com/@antonmedv/discover-how-to-use-fx-effecti...

ducaale··on FX: An interactive alternative to jq to process JSON
FYI, fx has a jid-like mode that can be started by pressing the dot key. See this post[1] for more information.

[1] https://medium.com/@antonmedv/discover-how-to-use-fx-effecti...

ducaale··on FX: An interactive alternative to jq to process JSON
Apparently, the author wrote this tool because jid was struggling with a 7MB JSON file.

See https://github.com/simeji/jid/issues/66#issuecomment-4436718...

ducaale··on Wrapping Up 2021. Leaving C++
Wouldn't variadic generics make working with tuples of any length easier[1], as const generics did for arrays? If that is the case, then I don't see how Rust not being C++ matters in this case.

[1] https://docs.rs/tuple_list/latest/tuple_list/

ducaale··on Wrapping Up 2021. Leaving C++
Why do you think Rust not supporting variadic generics is the right thing?
ducaale··on Deno Joins TC39
Since TS/Deno has native support for JSX syntax, do you think Browsers will eventually support it as well?
ducaale··on How Qwik addresses JavaScript reactivity challenges
I wonder if one day, browsers will have native support for JSX syntax.
ducaale··on Protected Content, Delete by Date, Device Management and more
This reminds me of Tom Scott's "Welcome to Life: the singularity, ruined by lawyers" video [1]

[1] https://youtu.be/IFe9wiDfb0E

ducaale··on Shader School - An introduction to GLSL shaders that runs in your web browser
The sequel to shader-school: Learn the WebGL API

https://github.com/stackgl/webgl-workshop

ducaale··on TC39 Pipeline Operator – Hack vs. F#
FYI, you can achieve the same thing with F# pipelines + partial application proposal [1]

  input |> func(?, 2)
  input |> func(1, ?)
While hack's placeholders work exclusively in pipelines, the partial application proposal can be used with any function

  "123"
    .split("")
    .map(parseInt(?)) // make sure radix param is not set

[1] https://github.com/tc39/proposal-partial-application
ducaale··on A layman’s guide to recreational mathematics videos
I would add to the list two more channels that were recommended by 3Blue1Brown:

- Welch labs https://youtube.com/c/WelchLabsVideo

- Think twice https://youtube.com/c/ThinkTwiceLtu

ducaale··on An Introduction to JQ
For anyone struggling with jq's syntax, I recommend taking a look at fx [1] which uses JavaScript as the query language.

The author of the tool has also written a guide [2] and recorded a screencast [3] about the tool.

[1] https://github.com/antonmedv/fx

[2] https://medium.com/@antonmedv/discover-how-to-use-fx-effecti...

[3] https://youtu.be/ktfeRxKog98

ducaale··on Beautiful ideas in programming: generators and continuations
For those who don't know, @yelouafi is the original author of redux-saga.
ducaale··on A Short Guide to Iraq (1943)
>Each of the 12 months has only 28 days

Correction: Each month could be either 29 or 30 days

ducaale··on Functors and Monads for People Who Have Read Too Many “Tutorials”
I have enjoyed reading https://dev.to/choc13/series/12008 which uses real world examples to explain Monads, Applicative, Lenses, etc.
ducaale··on Bflat: C# as you know it but with Go-like tooling
This is nice, I have two questions if you don't mind:

- Can bflat be used to compile F# code?

- How do you build multiple files?

ducaale··on Postgres to TypeScript Interfaces and Enums
It might be possible to have a babel macro function that inspects the passed SQL query and generate TS type from it.

However, the query might contain a wild card which means the macro function will also need access to the current DB schema.

ducaale··on A curated list of JavaScript tooling not written in JavaScript
This reminds me of https://www.swyx.io/js-third-age/

>The other assumption going away is that JavaScript tools must be built in JavaScript. The potential for type safety and 10x-100x performance speedup in hot paths is too great to ignore...

ducaale··on n2t-wasm: Emulator for the nand2tetris computer
Nice, I have tried doing something similar[1] but in the terminal. Unfortunately, I discovered that it is not possible to have a proper input handling in the terminal :(

[1] https://github.com/ducaale/hack-cpu-emulator

Page 1 of 4Next →