首页 \ 问答 \ 球拍:内在减少与懒惰评估?(Racket: inner reduction vs. lazy evaluation?)

球拍:内在减少与懒惰评估?(Racket: inner reduction vs. lazy evaluation?)

我认为球拍总是进行内部减少评估,但我发现例如“if”(和cond?!)是球拍中的懒惰评价......为什么需要?

通过内部还原来实现if语句是不可能的吗?

我无法弄清楚懒惰评价在哪里比内在更好,反之亦然? 有人可以提供一个例子吗?


I thought racket does inner reduction always for evaluation but I found out e.g. "if" (and cond?!) is lazy evaluation in racket...why is this needed?

Is it impossible to realize an if-statement via inner reduction?

I can not figure out where lazy evaluation is better than inner and vice versa? Could someone supply an example?


原文:
更新时间:2022-04-01 21:04

最满意答案

您似乎有一些自动安装服务正在运行,它会检测闪存盘并安装分区。 但是,您已经知道该分区是什么,所以我建议您只需在脚本中安装磁盘,自己选择合适的安装点。

mkfs.vfat -I -F32 -n "LABELNAME" /dev/sdb
echo "Format complete, remounting"
mount /dev/sdb $mountpoint #<-- you would choose $mountpoint
echo "Running make master."
perl /home/labelname_master.20120830.pl

It seems that you have some automatic mounting service running which detects the flash disk and mounts the partition. However, you already know what the partition is, so I recommend that you simply mount the disk in your script, choosing a suitable mount point yourself.

mkfs.vfat -I -F32 -n "LABELNAME" /dev/sdb
echo "Format complete, remounting"
mount /dev/sdb $mountpoint #<-- you would choose $mountpoint
echo "Running make master."
perl /home/labelname_master.20120830.pl

相关问答

更多
  • fdisk -l → 磁盘标识符mount -o iocharset = gb2312 磁盘标识符 /mnt格式:mount 参数 目标标识符 挂接点 -o iocharset = gb2312 //以简体中文方式挂接文件系统 -o ro // 以只读方式挂接文件系统 -o rw // 以读写方式挂接文件系统 -o wid=用户ID // 修改挂接文件系统的所有者 -o gid=组ID // 修改挂接文件系统的组
  • linux的shell script 是有命令加一些条件组合起来的 可以多关注《Linux就该这么学》这本书,我都是从这里面学到的
  • USB电压固定在标称的5伏特上,不能被控制。 USB设备关于其电流消耗的行为在USB规范中已有明确定义。 除非USB设备已经从USB主机协商出更高的负载,否则USB设备应该消耗1个单位负载(100mA)。 很有可能您所拥有的伺服电机需要耗费更高的电流,并且如果不是USB设备并与主机协商,将无法请求伺服电机。 根据您试图控制的伺服电机,也可能需要提供PWM信号或模拟电压来控制电机位置。 USB主机不打算提供这些。 从电脑驱动电机的最佳选择是: 为您的伺服电机获取一个专用的USB控制器(如果有的话) 根据一个小 ...
  • 显然发生了I / O错误,内核决定卸载设备并再次检测它。 它可能反过来了:设备被移除(通过USB子系统)并导致错误,因为它仍然被挂载。 这看起来像是一个硬件问题 - AFAIK设备检测和删除是在主机控制器或集线器的硬件中完成的。 检查电缆和连接,包括焊接连接。 用示波器观察USB上的+5伏电压也很有价值 - 电压可能超出规格几毫秒,导致USB复位。 Apparently an I/O error occurred and the kernel decided to unmount the device an ...
  • 卸载文件系统需要适当的权限(Linux: CAP_SYS_ADMIN功能)。 每次umount代码umount 。 但是,您需要特权才能卸载设备。 CAP_SYS_ADMIN功能允许进程执行各种管理任务,即:调用mount(),umount()。 这里有两篇关于功能的文章: CAP_SYS_ADMIN:新根 Linux功能概述(功能列表) Appropriate privilege (Linux: the CAP_SYS_ADMIN capability) is required to unmount fi ...
  • 我会建议一个类似下面的解决方案: using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Threading; /// /// Represents our program class which contains the entry point of our application. /// public cla ...
  • 我发现这段代码完全符合我的需要: foreach (const QStorageInfo &storage, QStorageInfo::mountedVolumes()) { qDebug() << storage.rootPath(); if (storage.isReadOnly()) qDebug() << "isReadOnly:" << storage.isReadOnly(); qDebug() << "name:" << storage.name(); ...
  • UPDATE 正如Chris Stratton在评论中指出的那样,这个问题与OTG无关。 我试图读取的设备是FAT12文件系统,该手机不支持。 在与公司的工程师联系后,我正在尝试连接设备,我终于得到了答案。 USB OTG是USB协议的扩展。 如果设备不支持OTG扩展(此特定设备没有)并且Android上的USB大容量存储驱动程序需要这些扩展,则主机将无法成功枚举USB设备。 UPDATE As pointed out by Chris Stratton in the comments, the issue ...
  • 这似乎与/proc/partitions和ephimient采用的/sys/class/block方法相结合。 #!/usr/bin/python import os partitionsFile = open("/proc/partitions") lines = partitionsFile.readlines()[2:]#Skips the header lines for line in lines: words = [x.strip() for x in line.split()] ...
  • 您似乎有一些自动安装服务正在运行,它会检测闪存盘并安装分区。 但是,您已经知道该分区是什么,所以我建议您只需在脚本中安装磁盘,自己选择合适的安装点。 mkfs.vfat -I -F32 -n "LABELNAME" /dev/sdb echo "Format complete, remounting" mount /dev/sdb $mountpoint #<-- you would choose $mountpoint echo "Running make master." perl /home/labe ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)