<div dir="ltr">Please use the varnish-misc for that kind of questions (I know it failed previously, let's try again)<div><br></div><div>you want `std.random()`, not `std.rand()`: <a href="https://varnish-cache.org/docs/trunk/reference/vmod_std.html#std-random">https://varnish-cache.org/docs/trunk/reference/vmod_std.html#std-random</a> <br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div><div>Guillaume Quintard<br></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 25, 2023 at 10:14 AM Kari Cowan <<a href="mailto:kcowan@alm.com">kcowan@alm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Probably a stupid question, but I have at the top of my file:<br><br>import std;<br><br>But varnish doesn't recognize symbol for std.rand <br><br><br>Aug 25 03:03:35 almstgvarnish124 varnishd[910081]: Message from VCC-compiler:<br>Aug 25 03:03:35 almstgvarnish124 varnishd[910081]: Symbol not found: 'std.rand'<br>Aug 25 03:03:35 almstgvarnish124 varnishd[910081]: At: ('/etc/varnish/default.vcl' Line 94 Pos 17) -- (Pos 24)<br>Aug 25 03:03:35 almstgvarnish124 varnishd[910081]:             if (std.rand(0, 100) < 50) {<br>Aug 25 03:03:35 almstgvarnish124 varnishd[910081]: ----------------########----------------<br><br>Seems odd... I thought it was included in the 7.3 distribution.  How do I fix that?<br clear="all"><div><br></div><span class="gmail_signature_prefix">---</span><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="margin:0px;padding:0px 0px 20px;width:1194px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif"><div style="margin:8px 0px 0px;padding:0px"><div style="color:rgb(34,34,34);font-size:medium"></div><div style="color:rgb(34,34,34);font-size:medium"></div></div><div style="color:rgb(34,34,34);font-size:medium"></div></div></div></div></div>
_______________________________________________<br>
varnish-dev mailing list<br>
<a href="mailto:varnish-dev@varnish-cache.org" target="_blank">varnish-dev@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev</a><br>
</blockquote></div>