SShortSingh.
Back to feed

Montreal passes bylaw making it illegal to insult police and city workers

0
·5 views

The city of Montreal has adopted a new bylaw that prohibits residents from insulting police officers and municipal employees. The regulation represents a formal legal restriction on verbal conduct directed at city staff and law enforcement. The move was approved by Montreal city council, adding insults to the list of punishable offenses under local rules. The bylaw has drawn public attention and debate over its implications for free speech and civil liberties in the city.

Read the full story at Hacker News

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

How Aqiron Security Split Its VS Code Extension from Its TypeScript Core

Developer building Aqiron Security, an open-source application security tool, chose to separate the security runtime from the VS Code extension as the project grew in complexity. Rather than bundling all logic inside the extension host, the architecture now runs the TypeScript core as a distinct Node.js process that the extension communicates with via stdin/stdout. This process boundary keeps VS Code-specific dependencies out of the security core, allowing the logic to operate on abstract concepts like workspaces rather than VS Code APIs directly. The separation also improves lifecycle management, making it easier to handle long-running scan operations, restarts, and failure isolation. A lightweight request-response protocol with typed message interfaces governs communication between the two layers, with the core package currently bundled privately into the extension rather than published as a standalone npm package.

0
ProgrammingDEV Community ·

Java's 'finally' Block Runs Before Exit, But Not Before Return Value Is Saved

A common Java misconception is that reassigning a variable inside a 'finally' block will change the value returned by a method, but the actual returned value is 1, not 99. This is because the JVM evaluates and stores the return expression in a hidden temporary variable before executing the 'finally' block. The stored value is what gets returned, so any reassignment of a primitive inside 'finally' has no effect on the result. However, mutating an object inside 'finally' does affect the outcome, since only the reference is captured, not a copy of the object. A 'return' statement placed inside a 'finally' block overrides everything, including pending exceptions, which is widely considered a bug-prone pattern.

0
ProgrammingDEV Community ·

Audit Finds Curve DEX Smart Contracts Could Cut Gas Costs by Up to 45%

A gas optimization audit of Curve DEX, a decentralized exchange with over $1.3 billion in total value locked, was conducted on September 23, 2026, by a senior DeFi security researcher. The review covered core smart contracts across Ethereum mainnet and Layer 2 networks including Optimism, Arbitrum, and zkSync. Auditors identified 25 findings across seven categories, with the most impactful issues stemming from redundant storage reads, inefficient loops, and suboptimal external call patterns. Applying all high- and medium-priority recommendations could reduce gas costs by 30–45% on the most expensive swap paths, saving users an estimated $0.12–$0.25 per $1,000 swap on Ethereum and $0.03–$0.07 on Layer 2s. The protocol received a gas-inefficiency risk score of 4 out of 10, indicating it is secure and functional but has meaningful room for cost improvement relative to competitors.

0
ProgrammingDEV Community ·

AI Memory Systems Lack Forgetting Controls, Creating Persistent Context Pollution

As AI platforms race to expand memory and context retention, a growing usability problem is emerging: there is no effective way to make AI systems forget irrelevant information. When unrelated conversations enter a user's session, they can permanently skew AI responses, mixing personal project context with unrelated queries. Human cognition relies on selective forgetting to prioritize important information, but current AI tools treat all stored data with equal weight. Developers and power users are resorting to workarounds like maintaining separate accounts to isolate meaningful conversations from throwaway queries. Proposed solutions include conversation tagging, relevance decay, selective memory management, and project-level context scoping, though no major platform has yet implemented these effectively.