News for hackers. Stuff that matters.

xonre

Re:LuaJIT 3.0 proposed syntax extensions on Thursday June 25, 2026 @02:09AM (#48669604)
For readability, `then` allows splitting with newlines very long conditional expressions, without having to wrap the condition in parentheses:

  if x + y + z > a
    or verylongconditionalhere ()
    or anotherverylongconditionalhere ()
  then
    ...
after `if` and `elseif` the parser simply goes on until it finds `then`.
Re:C++: The Documentary on Friday June 05, 2026 @07:37PM (#48419776)
Still true for C++. Can still mentally map new features to the core language C. A modern Cfront transpiler can still be written.

Template meta-programming maps to C pre-processor macros. The sad part with both is generated code cannot be examined thus the unreadable compiler errors and slower compilation as it's regenerated every time.

Slightly off-topic: Rust can also be mentally mapped to C.

Re:C++26 is done ISO C++ standards meeting, Trip Report on Monday March 30, 2026 @05:50PM (#47580157)
That place is C++/Lua, with most of the code in Lua. Concurrency model is thread-per-lua-state. Interthread comms is message passing implemented via textbook c++11 atomic and condition variables. Lua is just a small C library so the style remains very friendly to those who like C with classes.
Re:PHP 8.5 gets released today, here's what's new on Thursday November 20, 2025 @06:31AM (#45991542)
PHP should do a real major compatibility break and remove $ sigil from variable names. It's gonna be worth the pain!
Re:Precompiled headers and why Squid won't be using them (2023) on Wednesday November 05, 2025 @08:39AM (#45822697)
Tl;dr: it's an autoconf problem

Article also misses: comparing speed of full rebuilds. Pch gives massive speedup on edit-compile-debug cycle or when several modules can share a single pch.

Re:Show HN: Lux – a luxurious package manager for Lua on Wednesday April 09, 2025 @09:50AM (#43632083)
Yes you should.

You'll need a glob function, cd/getcwd/setcwd, pretty-printer. That's about it.

Lua stdlib replaces sed, awk, grep, cut, tr, tail, etc.

Startup time is the best. In my testing, a lua script that functions like `echo` runs faster than echo.

Re:Show HN: Lux – a luxurious package manager for Lua on Wednesday April 09, 2025 @09:26AM (#43631806)
Load the table. Modify. Serialize to file.

Not too hard. Emacs does it with the .emacs file, mixing generated and manual content.

Re:Show HN: Lux – a luxurious package manager for Lua on Wednesday April 09, 2025 @09:17AM (#43631721)
Lua is C in Lisp's clothing.

Lisp killer features were GC, good data representation, first class functions. Lua has all that and more. But its being a "thin" library over the C runtime shows through the clothes.

Re:C++ Is an Absolute Blast on Monday December 23, 2024 @10:48PM (#42499600)
You are correct wrt to iostream, it's bad. I stick to studio.h.
Re:C++ Is an Absolute Blast on Monday December 23, 2024 @10:34PM (#42499538)
It's probably auto when you wanted auto&.

A copy was made instead of a reference. I've been bitten by that.