Hacker Newsnew | past | comments | ask | show | jobs | submit | floxy's commentslogin


Whoa you were faster than me!

> (syntax-rules ...) The very first time I tried to use it, I ran into its limitations

syntax-case is the general purpose construct to use. syntax-rules is a restricted, easy-things-should-be-easy construct.

https://www.scheme.com/tspl2d/syntax.html


You don't need syntax case to do advanced things though. Alex shinn's match.scm uses all the dirty syntax-rules trick.

It is pretty awful to write things like that.


It's just not good because you need to work around its limitations, whatever its purpose is. Not good for prototyping because it's the red tape you need to cut to get work done. Red tape isn't, in general, a bad thing, but when it comes to prototyping it is.

I think most people misunderstood syntax rules. It was not meant as the macro system for scheme. It was meant as the template macro system everyone could agree on, while leaving the more powerful low level macro systems to the implementations. Syntax case, or explicit/implicit renaming or syntactic closures or what have you.

Agree. It got the ball rolling.

So you want to line the equals signs up or similar?

  let
     f = 9
    fo = 10
   foo = 123
  in f+fo+foo
vs.

  let
    f = 9
    fo = 10
    foo = 123
  in f+fo+foo

No, the issue is if the first binding is on the same line as the `let`, you are required to write, e.g.:

    someValue = let f = 9
                    fo = 10
                    foo = 123
      in f+fo+foo
rather than:

    someValue = let f = 9
      fo = 10
      foo = 123
      in f+fo+foo
I think it used to be the case that it had to be indented past the `=` or the `let` even if it was't on the same line. Note also that `in` has to be indented past `someValue`, but doesn't need to be indented as far `let`.

This is fine:

    someValue = let
      f = 9
      fo = 10
      foo = 123
      in f+fo+foo
So, it is possible to land on sane indentation, but the parser is much pickier than, e.g., Python's off-sides rule, so it takes some trial and error for new users to find it, and it can be frustrating if you're just temporarily modifying an expression to quickly try something out.

I honestly think it would be less surprising if the parser just disallowed writing the first binding on the same line as the `let` entirely, treating it only as a block, but some people (bewilderingly) do seem to prefer to write their code with the excessive indentation (I'd imagine with editor support, rather than manually maintaining the spacing).


I feel like you are describing that the parser is too lenient rather than too picky. It could just require you to always put `let` and `in` on their own lines, in which case the indentation makes sense, I think. It's only when trying to keep more stuff on the same line that the details of Haskell's indentation rules come into play.

Obligatory "The Evolution of a Haskell Programmer":

https://people.willamette.edu/~fruehr/haskell/evolution.html


That's an odd way to rewrite most of the SfICPICP exercises for scheme.

>And then it's also spiced by the most bizarre indentation rules

Are you mixing tabs and spaces? Maybe an example here would help.

>overloading of literals (heaven, why???)

No, this is important, so that default strings don't to have to be something crummy. Even C++ got on this bandwagon.

>and requiring parenthesis around function arguments both for definition and for application.

??? Again, an example would be helpful. Usually the complaint with Haskell is that people don't use enough parenthesis.

>The execution model is great

...I thought lazy execution was widely agreed to be the worst part of Haskell.


> Are you mixing tabs and spaces? Maybe an example here would help.

This is not what "rules" means. Rules aren't about what I do. Rules are about what the language treats as legal or illegal. I don't write in Haskell at all because I don't like it and have no use for it, but Haskell rules don't change because of that, they are still mindbogglingly complex when it comes to telling the programmer if the next line is the right amount of space to the right or not. None of that complexity is necessary and could've been totally avoided if the language used statement delimiters.

> No, this is important, so that default strings don't to have to be something crummy.

My argument is that to get a little accidental convenience you sacrificed a huge amount of routine convenience. The mental load of having to distrust a string when you see it is just not worth the accidental convenience of writing a prepared statement and making it appear as if it was a string. In other words, you are the guy who traded a donkey for three beans, but the beans didn't sprout into a huge ladder that took you to the giant's castle. You just made a very watery soup and that was that.

> Again, an example would be helpful.

Look up the example I gave in the adjacent reply.

> I thought lazy execution was widely agreed to be the worst part of Haskell.

It's good because it's unique and, when it fits the purpose, it's useful for that particular purpose and neigh irreplaceable, because it is unique. It's worth having for the sake of research, to understand how languages can be designed and what tools or techniques can be discovered on this path. This is said from the perspective that Haskell is not the end product, but rather a research attempting to study how languages can work and what concepts they can develop.


> if the language used statement delimiters

I mean, it does. White-space sensitive syntax is entirely opt-in when you chose to omit delimiters. Here's an explicit delimiter example:

    let {
      a = 1;
      b = 2
    } in a + b

How do those carpets handle in the snow?

>modern trains. Even some American cities have them.

Which American cities have notable modern train systems? Not Portland, or NYC, or Washington DC.


It's hard to say "system", but Seattle's just opened our second line, and we've got a couple in design as well.

What do you mean by notable?

Only that they are worthy of noting. If there is a modern system, but it happens to suck for some reason, you don't have to mention that one. So feel free to strike that "notable". Which American cities have modern train systems?

Ok, that's an unusual definition of notable.

notable

adjective

no· ta· ble ˈnō-tə-bəl for sense 2 also

1 a : worthy of note : remarkable

    | a *notable* improvement
https://www.merriam-webster.com/dictionary/notable

I misread that you were retracting "notable" and replacing it. I thought you were adding "it can't suck for any reason" to your definition.

Thoughts on Idris?

Idris feels mostly dead to me at this point. Which breaks my heart, because for a split second it had real momentum around it.

Not OP, but as Haskell-derived dependently-typed languages Idris and Agda are quite similar, so I suspect if they like one they’d like the other.


I don't know what short-distance data communications will be like in 2050, but we know it will be called USB.

USB-G 4.6 SuperSpeed Plus, but the cables will still just be used for charging your random electronics and won't even work for that half the time.

…because Staples has replaced Amazon and Temu, which both went bankrupt in 2042, and all usb-c cables are made in Papua New Guinea with only 1/4 of the pins connected to wires. Some things never change.

I wouldn’t be too surprised if they rebrand to AI Bus.

Wait, really? Where can I invest?

I know not with what technology 2030 will use, but 2040 will use USB sticks and stones.

Well, obviously. What do you think the U stands for? When we make contact with aliens, we’ll find them using it too.

What's the latest with Intel's Management Engine / Minix that runs on every Intel chipset? Is that still a thing? Did they harden it? Or can you still get access?

https://www.zdnet.com/article/minix-intels-hidden-in-chip-op...


You're missing the most important question: Can the Intel Management Engine run Doom?

Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: