❌

Normale weergave

Dirk Eddelbuettel: RQuantLib 0.4.29 on CRAN: New QuantLib, Plus Small Fixes

13 Oktober 2026 om 23:07

A new release 0.4.29 of RQuantLib arrived on CRAN this evening, had already been built for r2u as well as on r-universe and has just been uploaded to Debian.

QuantLib is a rather comprehensice free/open-source library for quantitative finance. RQuantLib connects (some parts of) it to the R environment and language, and has been part of CRAN for twenty-three years (!!) as it was one of the first packages I uploaded to CRAN.

This release of RQuantLib brings two new calendars (Malaysia, Philippines), updates to a number of other calendars as well to other files, and two deprecations we are reflecting in this release. It also benefits from a number of careful and attentive pull requests by Maximilian Muecke cleaning up an (astonishing !!) number of likely rather old little bugs. Full details from the NEWS file follow as usual.

Changes in RQuantLib version 0.4.29 (2026-10-13)

  • Configure check for outdated QuantLib version updated,

  • Adjust two instantiations on macOS x86_64 with old compilers

  • Correct Euribor2W and Euribor3W tenors setters (Maximilian Muecke in #196)

  • Accect Euribor1W as alias for EuriborSW tenor (Maximilian Muecke in #197)

  • Correct default handling of the payFixed parameter (Maximilian Muecke in #198)

  • Assign missing S3 class to American option implied volatitly return (Maximilian Muecke in #199)

  • Correct spelling in manual pages and R code (Maximilian Muecke in #202, #203)

  • Support additional Polish settlements (Maximilian Muecke in #204)

  • Check for curve parameters in FittedBondCurve (Dirk in #205 fixing #201)

  • Reflect two deprecations in QuantLib 1.44 and adjust code in two spot (Dirk in #206)

Courtesy of my CRANberries, there is also a diffstat report for the this release. As always, more detailed information is on the RQuantLib page. Questions, comments etc should go to the rquantlib-devel mailing list. Issue tickets can be filed at the GitHub repo.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. If you like this or other open-source work I do, you can now sponsor me at GitHub.

  •  

Steinar H. Gunderson: Decompilation patterns, part 10: return var_v0

13 Oktober 2026 om 16:30

The v0 register on MIPS is special in that it is the return register (like rax is on x86-64), so when you see code like this:

if (x == 3) {
    var_v0 = 1;
} else if (y == 4) {
    ...
    var_v0 = 3;
}
var_v0 = 5;
return var_v0;

then you have to consider the possibility that the intended match is:

if (x == 3) {
    return 1;
} else if (y == 4) {
    ...
    return 3;
} else {
    return 5;
}

Whether you put the last return in an else block or not is irrelevant for the match, of course, it's purely a matter of taste.

  •  

Maytham Alsudany: Menus without JavaScript

13 Oktober 2026 om 01:34

This is more of a note to myself since I keep forgetting and "rediscovering" this technique every time I need it, but if it helps you, great!

The JavaScript way is to toggle displaying the menu based on a button click. For instance, here's an example in Svelte:

[This interactive/preview is only available on the website.]
<script lang="ts">
	let showMenu = $state(false);
</script>

<button onclick={() => (showMenu = !showMenu)}>
	{#if showMenu}
		Hide menu
	{:else}
		Show menu
	{/if}
</button>
<nav class:hidden={!showMenu}>
	<ul>
		<li>Home</li>
		<li>Blog</li>
		<li>Foo</li>
		<li>Bar</li>
	</ul>
</nav>

<style>
	.hidden {
		display: none;
	}
</style>

But there is a hack to use a hidden checkbox and some CSS to achieve the same thing without any JavaScript. The example here turns the menu button into a label that toggles the checkbox, and uses the checkbox state to determine when to show the menu via the next-sibling combinator.

[This interactive/preview is only available on the website.]
<input type="checkbox" id="menu-state" />
<div class="menu-ctn">
	<label class="menu-toggle" for="menu-state">
		<span class="menu-closed">Show menu</span>
		<span class="menu-open">Hide menu</span>
	</label>
	<nav class="menu-open">
		<ul>
			<li>Home</li>
			<li>Blog</li>
			<li>Foo</li>
			<li>Bar</li>
		</ul>
	</nav>
</div>

<style>
	#menu-state {
		display: none;
	}
	.menu-open {
		display: none;
	}
	.menu-closed {
		display: block;
	}
	#menu-state:checked + .menu-ctn .menu-open {
		display: block;
	}
	#menu-state:checked + .menu-ctn .menu-closed {
		display: none;
	}
</style>
  •  
❌