HackerTrans
TopNewTrendsCommentsPastAskShowJobs

judicious

no profile record

Submissions

Cheap Ornament and Status Games

worksinprogress.co
1 points·by judicious·6 bulan yang lalu·0 comments

Euergetism

en.wikipedia.org
3 points·by judicious·6 bulan yang lalu·0 comments

Build Systems Are Spreadsheets

functional.computer
1 points·by judicious·7 bulan yang lalu·0 comments

Rain: A key-value store for Strava's scale

medium.com
2 points·by judicious·9 bulan yang lalu·0 comments

The Weird Concept of Branchless Programming

sanixdk.xyz
170 points·by judicious·10 bulan yang lalu·90 comments

I learned to stop worrying and love the debt

worksinprogress.co
1 points·by judicious·10 bulan yang lalu·1 comments

What if Humanity forgot how to make CPUs? [video]

youtube.com
2 points·by judicious·10 bulan yang lalu·0 comments

Class Based Programming Sucks

loup-vaillant.fr
4 points·by judicious·2 tahun yang lalu·1 comments

Snapshot Testing for the Masses

tigerbeetle.com
2 points·by judicious·2 tahun yang lalu·1 comments

Increasing velocity by modernizing a Python codebase

engineering.ramp.com
1 points·by judicious·2 tahun yang lalu·0 comments

Every Simple Configuration Language Will Eventually End Up Turing Complete

solutionspace.blog
4 points·by judicious·2 tahun yang lalu·0 comments

The Dynamics of Network Effects

a16z.com
1 points·by judicious·3 tahun yang lalu·0 comments

Why we decided to write our real-time market gateway in Rust

databento.com
1 points·by judicious·3 tahun yang lalu·0 comments

Elixir at Ramp

engineering.ramp.com
175 points·by judicious·3 tahun yang lalu·57 comments

Intern Spotlight: 2023 Software Engineering Summer Projects

hudsonrivertrading.com
1 points·by judicious·3 tahun yang lalu·0 comments

comments

judicious
·10 bulan yang lalu·discuss
I’m by no means an expert on this topic, but what about using predefined hash map of value to function call/closure unless that also yields branched programming underneath? Additionally, maybe you want to use macros of some kind to generate the “magic” function you’re looking for, where it constructs a single branchless statement up to N terms, whether it’s procedural macros in Rust or C macros.
judicious
·2 tahun yang lalu·discuss
Something like this occurs cross-linguistically: https://en.wikipedia.org/wiki/Evidentiality

Turkish has some evidentiality.
judicious
·2 tahun yang lalu·discuss
Here's a link to their library in GitHub: https://github.com/tigerbeetle/tigerbeetle/blob/588123f219f1...
judicious
·2 tahun yang lalu·discuss
That's incredibly clever, generators are underrated. I once challenged my friend to do leetcode problems with only expressions. Here's levenshtein distance, however it's incredibly clunky.

  levenshtein_distance = lambda s1, s2: [matrix := [[0] * (len(s2) + 1) for _ in 
  range(len(s1) + 1)], [
          [
              (matrix[i].__setitem__(j, min(matrix[i-1][j] + 1, matrix[i][j-1] + 
  1, matrix[i-1][j-1] + (0 if s1[i-1] == s2[j-1] else 1))), matrix[i][-1])[1]
              for j in range(1, len(s2) + 1)
         ]
         for i in range(1, len(s1) + 1)
     ], matrix[-1][-1]][-1]
judicious
·2 tahun yang lalu·discuss
I guess for most purposes, OrderedDicts are then obsolete, but I believe there are some extra convenience methods that they have, but I've only really needed to preserve order.

Makes you think what other parts of Python have become obsolete.
judicious
·2 tahun yang lalu·discuss
I find converting things from map objects or filter objects back to lists to be a bit clunky. Not to mention chaining operations makes it even more clunky. Some syntatic sugar would go a long way.
judicious
·2 tahun yang lalu·discuss
Dictionary comprehensions can be very elegant. List and dictionary comprehensions are very powerful and expressive abstractions. In fact, while not good practice you can pretty much write all Python code inside comprehensions including stuff regarding mutation.

This is valid(as in it will run, but highly unidiomatic) code:

quicksort = lambda arr: [pivot:=arr[0], left:= [x for x in arr[1:] if x < pivot], right := [x for x in arr[1:] if x >= pivot], quicksort(left) + [pivot] + quicksort(right)][-1] if len(arr) > 1 else arr

print(quicksort([1, 33, -4, -2, 110, 5, 88]))
judicious
·2 tahun yang lalu·discuss
There in lies another reason why OrderedDicts are still useful even in 3.12
judicious
·2 tahun yang lalu·discuss
I work with different versions of Python3 (and 2 unfortunately) and some code is still in 3.6, hence I used OrderedDicts.
judicious
·2 tahun yang lalu·discuss
I find defaultdict, OrderedDict, namedtuple among other data structures/classes in the collections module to be incredibly useful.

Another module that's packaged with the stdlib that's immensely useful is itertools. I especially find takewhile, cycle, and chain to be incredibly useful building blocks for list-related functions. I highly recommend a quick read.

EDIT: functools is also great! Fantastic module for higher-order functions on callable objects.

https://docs.python.org/3/library/itertools.html
judicious
·2 tahun yang lalu·discuss
Definitely very excited to see this be a thing. Genuinely liked the approach to make function calls strongly typed and rely on functional programming principles.

During my senior year, I worked on a research project very similar to this and I’m glad to see this out there for everyone. I’d love to connect with the team if possible!
judicious
·3 tahun yang lalu·discuss
I’m always amazed by the level of the discussions on Signals and Threads. I especially enjoyed hearing about the challenges with performance engineering in OCaml versus C++. The work on unboxed types is very promising.
judicious
·3 tahun yang lalu·discuss
This is unironically my plan/playbook with ideas I have for startups. Start with Python, node, or whatever. Then go to Rust once product-market fit has been established.

Rust really hits that sweet spot with memory-management, programming paradigm flexibility, and speed. It’s precisely great for what I need because it’s essentially an ML with good imperative constructs.
judicious
·3 tahun yang lalu·discuss
I loved reading the “making of” post. I’m very interested in getting into technical writing and your post, really helped me understand your thought process behind “Elixir at Ramp”.
judicious
·3 tahun yang lalu·discuss
Totally agree, when is everything is functions and data, it makes life a lot easier. I especially find it useful when refactoring code while trying to keep an existing function signature.
judicious
·3 tahun yang lalu·discuss
Kotlin, definitely an interesting choice for backend development. But I love to see idiosyncratic language choices being made.
judicious
·3 tahun yang lalu·discuss
Do you foresee a larger scale migration to Elixir in the future?

Or would you say that Elixir lends itself to some services and Python others?
judicious
·3 tahun yang lalu·discuss
Yeah, I’m definitely curious too. From what I know Ramp is primarily a Python shop on the backend.

I just love to see functional programming being used in industry and seeing the thought process behind it.

Also, I agree. I’m a big fan of Pablo’s posts.