Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Jeff – Jev-compatible 0.8B decision models, trained at home, ~30 ms (github.com/firelex)
    144comments
  2. 1996 chat room simulator connected to Win95 and System 7 web desktops (lolchat.rip)
    31comments
  3. Pirating the Pirates (mubi.com)
    236comments
  4. MicroLLM Lab – Try 7 tiny LLM's in the browser (stateofutopia.com)
    68comments
  5. 12,000-year-old Göbeklitepe burials explain scattered bones (archaeologymag.com)
    27comments
  6. Tank Body Problem (jimsitu.com)
    8comments
  7. Show HN: Pac-Bench – How well can models one-shot a Pac-Man game? (jonclegg.github.io)
    4comments
  8. California farmers are struggling to sell grapes as demand for wine drops (kqed.org)
    243comments
  9. ESP32S3 cluster running 1.58-bit (BitNet) Language model (github.com/low-zi-hong)
    5comments
  10. Scientists solve 1840s space weather mystery (arstechnica.com)
    39comments
  11. Sonnet 5.5 (anthropic.com)
    438comments
  12. U.S. Strategic Petroleum Reserve Falls to Lowest Level Since 1982 (oilprice.com)
    98comments
  13. Hijacking the PS5's RTMP stream (yashgarg.dev)
    67comments
  14. World Labs Is Joining AMD (worldlabs.ai)
    88comments
  15. Who Killed Paulina Borsook's Career? (wired.com)
    —discuss
  16. Kids turned low-traffic NPR Spotify comments into a secret group chat (thisamericanlife.org)
    193comments
  17. How to win a beer with high-dimensional statistics (jamiesimon.io)
    3comments
  18. Bluegraph – Explore NOAA buoy data, rebuilt in 3D from measured spectra (bluegraph.io)
    2comments
  19. What is the best shape of a city? Modelling effect of urban form on distance (sagepub.com)
    12comments
  20. The Art Forger Who Became a National Hero (priceonomics.com)
    4comments
  21. Updated Google Maps shows destruction of the city of Rafah (twitter.com/aliabunimah)
    165comments
  22. Does Reddit have an astroturfing problem? What the data suggests (petervijeh.com)
    174comments
  23. Nvidia wants to put a watchdog chip next to every AI agent (cnbc.com)
    157comments
  24. It's Time to Investigate the AI Labs (calnewport.com)
    133comments
  25. Show HN: HN.watch – Videos of all Hacker News posts (hn.watch)
    85comments
  26. Cf: The Agentic CLI for the Cloudflare API (cloudflare.com)
    58comments
  27. Behold the pawpaw (cbc.ca)
    26comments
  28. What reversing, modernising old games tells us about the economic impact of AI (isfine.org)
    36comments
  29. Show HN: Destroy Any Website with Stickman (spritefusion.com)
    28comments
  30. Profit Margins of the Largest Companies (visualcapitalist.com)
    2comments

ParaSail Programming Language: parallel programming language

97 pointsby 7y agoparasail-lang.org
19 comments
7y agoHN ↗

I used to check the discussion groups every now and then.

They were a bit more lively.

7y agoHN ↗

The syntax seems a bit old school for my liking but otherwise seems nice. Interesting to see where this goes.

7y agoHN ↗

What an odd choice, for a terse language with modern syntactic sugar to use "end func Sum_Of_Squares"

7y agoHN ↗

Yep, and also if then, case of, end if... Hopefully an editor can color out the less relevant keywords and maybe autotype them.

It's strange that the home page of a parallel language doesn't give an example of parallel code. Check https://elixir-lang.org/ instead.

Does anybody use ParaSail here? What are its pros and cons?

7y agoHN ↗

it's strange that the home page of a parallel language doesn't give an example of parallel code

Read the page again :)

Func Sum_Of_Squares(N : Int) -> Int is

  //  Built-in and inherently parallel map-reduce

  //  Initial value is enclosed with angle brackets

  return (for I in 1 .. N => <0> + I ** 2)

end func Sum_Of_Squares

7y agoHN ↗

Thanks! Invisible parallel code is a good idea. Less code to write.

7y agoHN ↗

It does make the code a little verbose, but in my experience with this (in modern Fortran), it can be rather nice.

Explicitly tagging the construct you are closing makes it easier to understand long swaths of code (where the start of a loop or function may have disappeared off the top of the page by the time you scroll to the end of the loop/function). It can also make compiler error messages more helpful.

I don't see it in the ParaSail code samples, but where this really shines in Fortran is letting you name loops. This makes the control structure much easier to understand (again, especially in longer loops). So you can have code like

    loop_timesteps: do
        ...
        loop_converge: do
            ...
            loop_actors: do
                ...
            end do loop_actors
            ...
        end do loop_converge
        ...
    end do loop_timesteps

Now to break out of a loop, you can be explicit about which one you want to break out of. Not only does that help with code clarity, it also allows you to jump out of a deeper nesting than just the immediate one, which means you don't have to set flags, or repeat tests, in order to get to where you want to go.

I realize that most programmers on HN will be thinking "if I had a loop or function that long, I would break it up into smaller functions, and express my nesting that way."

That's generally good advice, but it's not always useful in numerical code (which ParaSail seems to target).

In numerical code, you tend to run through those loops a lot of times, and you tend to have a lot of local variables (for example, in a physics calculation you might take primary variables like pressure, temperature, and mass fractions, and use them to find a lot of related values like humidity ratio and molar concentration and gradient estimates &etc). So the overhead of making large numbers of function calls with long parameter lists can become too much.

7y agoHN ↗

There is no doubt that ParaSail syntax is verbose, mainly because it was designed more with readability than writeability in mind. But knowing how strong are the feelings about syntax, we actually designed four different parsers (all of which are included in the downloadable release). The one we use normally is the one we wrote about, and is the most oriented toward readability. The other three have somewhat winsome names and presumably obvious connections to Python, Java, and SPARK: Parython, Javallel, and Sparkel. In fact, the ParaSail parser permits the use of Python-like syntax, with ":" instead of keywords like "then" or "loop" and no "end blah" (so long as the indentation is all copacetic), and "def" instead of "func" -- hence:

  def Sum_Of_Squares(N : Int) -> Int:

    return (for I in 1 .. N => <0> + I ** 2)

is legal ParaSail syntax. Parython uses a syntax similar to this, but with the "for loop" syntax re-arranged a bit to better match existing Python syntax.

So the hope is for folks to look a bit beyond the surface syntax, and consider the underlying semantic model, which is hopefully where the more interesting issues reside in any case.

-Tuck

7y agoHN ↗

Please fix the CSS: I have to scroll horizontally every single line. I stopped at the first one (sorry to be negative.)

Tested with Firefox and Chrome on Android. Firefox reader mode doesn't work on that site. Opera has text reflow so it works around the CSS. BTW, why in 2019 Opera is still the only browser with text reflow?

7y agoHN ↗

I was able to read it on my Android device in Chrome by using landscape mode. Until I scrolled down a little. Then a huge static navigation popup appeared taking up 40% of the screen!

Even better, the page somehow disables Chrome's normal behavior of hiding the browser navigation bar when you scroll. (Does anyone know how they did that? Not that I'd ever want to, just curious.)

So that's another 20% of the screen gone, leaving only 40% of the screen for content. Ouch.

7y agoHN ↗

I really hate it how these websites try to limit the amount of context that can be shown horizontally. If I wanted to see less stuff in a line I would just resize my browser, while if I am using a phone I won't be seeing long lines anyway.

7y agoHN ↗

Having built in pre/post conditions is pretty nice.

7y agoHN ↗

You might want to look into Ada and SPARK. It allows constraint-based programming, formal verification to verify your program's correctness, and so on.

https://www.adacore.com/about-spark

https://en.wikibooks.org/wiki/Ada_Programming/Contract_Based...

https://www.adacore.com/gems/gem-31

https://www.adacore.com/uploads/books/pdf/AdaCore-Tech-Cyber...

On top of that, Ada was designed with parallel programming in mind as well, so there are language constructs built in to make your job easier.

7y agoHN ↗

I tried to get the released 8.zip file:

drive.google.com refused to connect

Too popular? AdaCore maintains ParaSail; why using google instead of Ada Web Server?