Readit News logoReadit News
samth commented on Rivian's TM-B electric bike   theverge.com/news/804157/... · Posted by u/hasheddan
conk · 2 months ago
I think the MPH limit for ebike classification makes sense. But why do they need a 750W limit? Whats the harm in a motor putting out 3000W to get a loaded cargo bike up a steep hill at 8 MPH.
samth · 2 months ago
You don't need 3000W, 1kW is plenty. I have a Yuba Mundo (one of the biggest long-tail cargo bikes) and my Bafang motor tops out around 1kW and it's plenty even for the biggest hills here in Bloomington (which is quite hilly).
samth commented on Gemini 2.5 Computer Use model   blog.google/technology/go... · Posted by u/mfiguiere
mohsen1 · 2 months ago
> Solve today's Wordle

Stucks with:

> ...the task is just to "solve today's Wordle", and as a web browsing robot, I cannot actually see the colors of the letters after a guess to make subsequent guesses. I can enter a word, but I cannot interpret the feedback (green, yellow, gray letters) to solve the puzzle.

samth · 2 months ago
I tried this also, and it was totally garbage for me too (with a similar refusal as well as other failures).
samth commented on Is sound gradual typing dead? Performance problems in Typed Racket (2016)   dl.acm.org/doi/abs/10.114... · Posted by u/fanf2
MrJohz · 3 months ago
> Typescript is unsound: since it just erases types, an untyped library that a typed component is using might return something the typed component isn’t expecting leading you to get a type error in typed code. Gradually typed python variants typically are better, though they usually just inspect the shape of the data and don’t check that eg every element in a list is correctly typed as well

This is not typically what is meant by soundness. Most gradual type systems erase types (see also Python, Ruby, Elixir), and provide ways of overriding the type system's inference and forcing a certain expression to be typed a certain way, even if that type cannot be proven by the type checker.

What makes TypeScript unsound is that, even if you don't override the type checker at all, there are certain expressions and constructs that will produce no compile-time error but will produce a runtime error. This is a deliberate choice by the TypeScript team to make the type checker less correct, but simpler to use and adopt. The Flow type checker took the opposite approach and was sound, but was occasionally harder to use.

I believe most type checkers in other languages tend to hew closer to the TypeScript approach, and favour being intuitive to use over being completely sound. However, they do work in the same way of being compile-time constructs only, and not affecting runtime at all. Python is slightly exceptional here in that the type annotations are available as metadata at runtime, but are not used for type checking unless the user explicitly checks them at runtime. There are a couple of runtime libraries that add decorators that automatically do this runtime type checking, but (a) their usage is fairly rare, and (b) their presence does not change how the type checker behaves at all.

samth · 3 months ago
No, this is exactly what is meant by soundness. Using the `Any` type in TypeScript can result in values that have type `integer` being actually strings, which is unsoundness.
samth commented on Advanced Scheme Techniques (2004) [pdf]   people.csail.mit.edu//jhb... · Posted by u/mooreds
ashton314 · 3 months ago
Sam will definitely know more about this than I will, so if he contradicts me, listen to him.

If I am not mistaken, the racket language does not convert to CPS during compilation. Instead, when you want to get the continuation, I think you just get a pointer to the stack frame that you want. All I know for sure is that it uses something called a-normal form, which is kind of like SSA in some ways, and that the continuation is 2x 64/32-bit words depending on your architecture.

samth · 3 months ago
The main implementation of Racket today is built on top of Chez Scheme, which uses the techniques described by Dybvig that I linked to.

In the earlier implementation of Racket, indeed it doesn't convert to CPS but does use something like A-normal form. There, continuations are implemented by actually copying the C stack.

samth commented on Thoughts on Racket and Chez Scheme (2021)   beautifulracket.com/appen... · Posted by u/swatson741
samth · 3 months ago
The predictions from this post have almost entirely turned out to be wrong. Chez Scheme upstream decided to merge in Racket's changes entirely, and to make the lead developer of Racket (Matthew Flatt) a core Chez developer. These days Matthew is the most active Chez developer. Over the past few years, half of the serious Chez committers are people who come from Racket.
samth commented on Advanced Scheme Techniques (2004) [pdf]   people.csail.mit.edu//jhb... · Posted by u/mooreds
s20n · 3 months ago
Speaking from personal experience, Scheme looks deceptively simple but it is one of the hardest languages to write a compiler for.

I say this mainly because of 2 things:

1. Hygienic Macros (You practically have a whole another language inside the language)

2. First Class Continuations (There is no good way to achieve this other than doing a CPS transform on the AST)

samth · 3 months ago
It's not true that you need to use CPS to implemented first-class continuations. There are plenty of slow ways to do it, and even if you want to be fast you can do multiple different things. Dybvig describes a number of options in his thesis: https://www.cs.unc.edu/xcms/wpfiles/dissertations/dybvig.pdf
samth commented on Ex-Waymo engineers launch Bedrock Robotics to automate construction   techcrunch.com/2025/07/16... · Posted by u/boulos
benreesman · 5 months ago
I doubt you meant it this way, but that last bit hits a little rough. It's good that you are able to hire people when you have vacancies, and it's good that you don't have to be at the mercy of some insane rent-seeking because one crew in town has managed to monopolize one of your inputs.

But saying it's unfortunate that you can't just whack anyone at will with 20 people lined up behind them jobless is wishing for a pretty bad situation right? If all your positions were filled by someone with 20 jobless people standing behind them, who would buy the homes you build?

samth · 5 months ago
The post doesn't mean there are 20 unemployed people, but that there are 20 interchangable pest control contractors who all do an adequate job, and so the one they fired was easy to replace.
samth commented on On eval in dynamic languages generally and in Racket specifically (2011)   blog.racket-lang.org/2011... · Posted by u/swatson741
behnamoh · 7 months ago
Is my understanding correct that Lisp's powerful macro system stems from the ability to write the eval function in Lisp itself? From what I gather, Lisp starts with a small set of primitives and special forms—seven in the original Lisp, including lambda. I recall Paul Graham demonstrating in one of his essays that you can build an eval function using just these primitives. Those primitives are typically implemented in a host language like C, but once you have an eval function in Lisp, you can extend it with new rules. The underlying C interpreter only sees the primitives, but as a programmer, you can introduce new syntax rules via eval. This seems like a way to understand macros, where you effectively add new language rules. I know Lisp macros are typically defined using specific keywords like defmacro, but is the core idea similar—extending the language by building on the eval function with new rules?
samth · 7 months ago
No, macros and eval are quite different. You can see this for example in Python or JavaScript, which have eval but not macros.
samth commented on Hacker News now runs on top of Common Lisp   lisp-journey.gitlab.io/bl... · Posted by u/Tomte
mdaniel · 7 months ago
Apologies that may have come across as more accusative than I intended. I was just surprised that whatever missing(?) feature or behavior that would cause one to move off of Racket wouldn't be of interest to other Racket users
samth · 7 months ago
The big difference between SBCL and Racket today is support for parallelism, and that's about decisions made by both projects a very long time ago. Racket has incrementally added significantly more parallelism over the years, but supporting lightweight parallel tasks that do IO (as in a web server) is still not something Racket's great at.

(Source: I'm one of Racket's core developers.)

samth commented on Reversing the fossilization of computer science conferences   cacm.acm.org/blogcacm/rev... · Posted by u/tosh
samth · 8 months ago
This article is mostly whining that evidence-free speculation about how to write good software is no longer publishable in top conferences. And the major evidence cited is that there's a specific citation style required, a standard feature of every kind of publishing since forever. I promise (having reviewed many times for the specific conference under discussion) that no one's paper is rejected (or even denigrated) for failing to use appropriate citation style, people comment on it the same way they would comment on any other style issue.

u/samth

KarmaCake day1703June 8, 2010
About
I'm an Associate Professor in Computer Science at Indiana University.
View Original