Programming Erlang读书笔记2:Getting Started

去[url]http://www.erlang.org/download.html[/url]下载Windows版本的Erlang,将bin目录加入到系统path中
cmd进去输入erl回车,就进入Eshell了,输入q().或者Ctrl+C/Break可以退出Eshell(命令末尾加.然后回车才会执行函数)

在Eshell里输入help().可以看到命令列表(实际上是函数列表)

基于Debian的Linux系统下可以用命令apt-get install erlang来安装Erlang,Mac OSX下可以使用MacPorts来安装

从源代码构建:
[code]
$ tar -xzf otp_src_R11B-4.tar.gz
$ cd otp_src_R11B-4
$ ./configure
$ make
$ sudo make install
[/code]

[url=http://cean.process-one.net/]CEAN[/url](Comprehensive Erlang Archive Network)是类似于Py的CPAN的东东,也可以选择从CEAN安装Erlang环境

[b]整数[/b]
Erlang里允许任意长度的整数
[code]
1> 123456789 * 987654321 * 112233445566778899 * 998877665544332211.
[/code]
当然Ruby也一样

[b]不可变的变量[/b]
Erlang里的变量首字母要求大写
[code]
1> X = 123456789.
[/code]
Erlang里的变量像代数里的变量一样只允许赋值一次,可以使用f()函数来forget all variable bindings
赋过值的变量称为bound variable,否则称为unbound variable
“=”在这里不是赋值操作符,而是模式匹配符
在Erlang里一个变量只是一个值的引用,即一个指向存储值的区域的指针,而这个值不能被改变

Erlang里变量不可变最大的好处利于多核编程,因为Erlang不像C或Java,它没有mutable state,所以没有shared memory,没有锁

[b]浮点数[/b]
[code]
1> 5/3.
1.66667
2> 4/2.
2.00000
3> 5 div 3.
1
4> 5 rem 3.
2
5> 4 div 2.
2
6> Pi = 3.14159.
3.14159
7> R = 5.
5
8> Pi * R * R.
78.5397
[/code]

[b]Atom[/b]
在Erlang里,Atom用来表示非数字常量,它类似于C或Java里的枚举类型
Atom以小写字母开始,后面接字母、下划线或@符
Atom也可以用单引号括起来,这样就可以使用大写字母开头或带空格等的Atom

Atom有点类似Ruby里的Symbol

[b]Tuple[/b]
Tuple用来将一些元素分组,它使用大括号将元素括起来,并用逗号隔开
Tuple类似于C里的structs,但Tuple是匿名的,而且Tuple里的fields没有名字
Tuple里的items可以为任何类型,Tuple可以嵌套
推荐做法是Tuple的第一个元素为一个Atom,这样可以清楚的描述该Tuple
[code]
1> Person = {person,
{name, joe},
{height, 1.82},
{footsize, 42},
{eyecolour, brown}}.
[/code]
Erlang也是有垃圾回收机制的,不用的内存会自动回收
取Tuple的值:
[code]
1> Point = {point, 10, 45}.
{point, 10, 45}
2> {point, X, Y} = Point.
{point, 10, 45}
3> X.
10
4> Y.
45
[/code]
也可以用匿名变量“_”作为占位符放在不想取值的地方:
[code]
5> {_, _, A} = Point.
{point, 10, 45}
6> A.
45
[/code]

[b]List[/b]
List用来存放多个元素,它用中括号将元素括起来,并用逗号隔开
List左边第一个元素我们称为head,剩下的元素组成的List称为tail
例如对[1,2,3,4,5],head为1,tail为[2,3,4,5]
如果T为一个List,则[H|T]也是一个List,head为H,tail为T

从List取值的方法:
[code]
1> L = [1,2,3,4,5].
[1,2,3,4,5]
2> [A1|Rest] = L.
[1,2,3,4,5]
3> A1.
1
4> Rest.
[2,3,4,5]
5> [A2,A3|TheRest] = L.
[1,2,3,4,5]
6> A2.
1
7> A3.
2
8> TheRest.
[3,4,5]
[/code]

[b]字符串[/b]
Erlang里字符串必需用双引号括起来
Erlang的字符串使用Latin-1(ISO-8859-1)字符集
YOLO26算法心电图十二导联目标检测+训练好的模型+368张数据集+pyqt可视化界面.zip 附训练好的 YOLO 权重与 PyQt 可视化检测界面,页面底部含可视化效果预览,毕设/课设开箱即用。 【数据集概况】 · 检测类别(中文):[导联I(I), 导联II(II), 导联III(III), 胸导联V1(V1), 胸导联V2(V2), 胸导联V3(V3), 胸导联V4(V4), 胸导联V5(V5), 胸导联V6(V6), 加压肢体导联aVF(aVF), 加压肢体导联aVL(aVL), 加压肢体导联aVR(aVR)] · 训练集:313 张 · 验证集:37 张 · 测试集:18 张 · 总计:368 张 该数据集聚焦于临床心电图信号的精准识别与定位,其核心检测目标为标准12导联心电图中的各个独立导联波形区域,涵盖肢体导联(I、II、III)与加压肢体导联(aVR、aVL、aVF),以及胸前导联(V1至V6),适用于心电图自动分析系统中对各导联位置的快速准确标注与分类。数据采集场景真实还原了医院心电图室或急诊监护环境下的标准心电图记录纸,波形清晰、基线稳定,具有高度临床参考价值。... 【训练曲线与评估图】 【模型训练配置】 参数 | 值 模型 | yolo26n 训练轮数 | 100 epochs 输入尺寸 | 640x640 批次大小 | 24 优化器 | auto 初始学习率 | 0.01 训练设备 【关键指标汇总】 训练了 57 个 epoch,最终轮指标: 指标 | 数值 mAP50 | **0.9708** mAP50-95 | 0.6344 Precision | 0.8990 Recall | 0.9191 train/box_loss | 1.2231 train/cls_loss | 0.9703 val/box_loss | 1.2779 val/cls_loss | 0.... 使用场景:毕业设计、课程设计、深度学习入门、工业场景落地验证。 立即下载

相关推荐

企业级AI助手平台 开箱即用的全栈AI平台,支持多智能体协同、Supervisor模式编排、多种决策模式、RAG技术和流程编排能力 支持多厂商大模型统一接入与管理,安全可控的企业知识库与高精度检索优化

企业级AI应用开发框架,支持多厂商大模型统一接入与管理,安全可控的企业知识库与高精度检索优化能力,提供可视化流程编排、自主决策智能体与多智能体协同调度,兼容主流 Agent Skill 协议,帮助企业与开发者零门槛快速构建安全、高效、可落地的AI智能体应用与行业解决方案。

Erlang学习

Invariable VariablesDoing arithmetic is alright, but you won't go far without being able to store results somewhere. For that, we'll use variables. If you have read the intro to this book, you'll know...

litoujkl的专栏 459

基于动态窗口法DWA的机器人路径规划研究(Matlab代码实现)

内容概要:本文系统研究了基于动态窗口法(DWA)的机器人局部路径规划算法,深入剖析其在动态环境中实现自主避障与实时轨迹优化的核心机制。文章详细阐述了DWA算法的速度空间采样策略、轨迹预测模型、动力学约束处理及多目标代价函数的设计原理,并通过构建完整的Matlab仿真框架验证算法有效性。结合典型场景的仿真实验,展示了机器人在复杂障碍物环境下如何实时生成安全、平滑且符合运动学约束的最优路径,充分体现了DWA在移动机器人导航中的实用性与鲁棒性。; 适合人群:具备机器人运动规划基础知识和Matlab编程能力,从事智能移动机器人、自动驾驶或服务机器人研发的研究生、科研人员及工程技术人员。; 使用场景及目标:①深入理解DWA算法的理论基础与实现细节;②掌握机器人局部路径规划的仿真实现方法;③为实际机器人系统的导航模块开发提供可复用的算法原型与代码参考;④作为进一步研究高级导航算法(如TEB、MPC)的技术基础。; 阅读建议:建议结合提供的Matlab代码逐模块分析与调试,重点关注速度采样、轨迹积分、障碍物距离计算及代价评估等关键环节,通过调整参数在不同地图环境中进行对比实验,以深刻把握算法性能与参数之间的关系,进而提升对实时路径规划系统设计的理解与应用能力。

matlab中向量

一直接生成向量 >> x=[1;2;5;6] x =      1      2      5      6 >> y=[1,2,3] y =      1     2     3   二利用增量生成 >> x=1:2:3 x =      1     3 >>   三产生线性等分向量 >> x=linspace(2,4,20) x =   Columns

数学屌丝走在it的道路上 1331

机器视觉/将HIK海康面阵相机连接Halcon软件

本文简述了如何将海康面阵相机连接到Halcon软件中进行实时取图的过程。

Dahe.qu 4866

在Rviz仿真环境中搭建传送带

<geometry><material>

qq_58268456的博客 935

SLAM之camera(Intel RealSense D435)调试第一弹:Win10平台下getting started

参见官方的getting started文档 https://software.intel.com/en-us/realsense/d400/get-started,这个quick start guide是Intel RealSense D435包装盒里面的附件指定的参考链接,一切初始化配置以这个为准。 一、开箱资料 Box Contents Intel® RealSense™ Depth ...

vslyu的博客 5980

VHDL实战:基于EDA的数字频率计(FREQ)设计与优化

本文详细介绍了使用VHDL语言和EDA工具设计并优化数字频率计(FREQ)的全过程。从核心原理与模块划分入手,深入讲解了时钟分频、测频控制、计数锁存及显示驱动等关键模块的VHDL实现,并提供了从代码编写、功能仿真到综合布局布线的完整EDA实战指南。文章还探讨了测量精度优化、资源权衡及跨时钟域处理等进阶话题,是掌握FPGA数字系统设计的经典案例。

milk8的博客 583

Erlang节点的连接

副标题:《Programming Erlang》第十章 分布式编程 读书笔记题外话:很久没更新blog了,前阵子又是工作忙,又是要考试,实在没精力写blog。倒是攒了不少材料,以后慢慢添吧。这章最重要的内容就是erlang中两个节点之间的连接规则。同一台机器上的两个节点之间的连接很简单,直接照着书上做就行了,比较麻烦的是不同机器之间节点的连接。书中的部分代码我测试的结果是错的,

智障大师 的专栏 7226

用FSL的eddy_topup pipeline完整处理DTI数据:从原理到实战,搞定涡流和磁化率畸变

本文详细介绍了如何使用FSL的eddy_topup pipeline完整处理DTI数据,解决涡流和磁化率畸变问题。从原理到实战,涵盖了数据格式转换、脑提取、b0图像处理等关键步骤,并提供了acqparams.txt配置和eddy命令的详细解析,帮助研究人员高效完成DTI数据校正。

weixin_29235525的博客 282

2-1 AUTOSAR ASW概述

应用软件层(Application Software Layer,ASW)位于AUTOSAR整个架构的顶层。它由各种AUTOSAR Software Component(SW-C)组成,每个SW-C封装了各种应用的功能集。每个SW-C只能运行在一个ECU中。ASW层的设计目标是实现功能的可重用性和可配置性。它通过封装底层提供的服务,为上层应用层提供统一的接口。ASW层的开发可以基于AUTOSAR提供的标准化软件组件,也可以根据具体需求进行定制开发。

qq_42357877的博客 1902

《Programming Erlang》读书笔记(持续更新)

Erlang惯用模式: 递归求和:total([Head|Tail])->some_function_of(Head)+total(Tail);Total([])->0.list-at-a-time操作:Even=fun(X)->(Xrem2)=:=0end.lists:map(Even,[1,2,3,4]).>>[false,tru...

weixin_30340617的博客 121

Android功耗系列专题理论之六:外设功耗问题分析方法

本文介绍了移动设备功耗问题的分析方法,重点针对传感器和GPU两大模块。传感器部分详细讲解了通过ADB命令获取日志、状态差异分析和单传感器隔离测试的排查方法,并给出优化建议。GPU部分从基础功耗测量、场景测试到功能模块拆解进行多维度分析。同时阐述了GNSS/GPS功耗的测试方法,包括前后台对比、星座双频拆解及SAP/DPO等特殊功能的电流分析,为移动设备功耗优化提供系统性的诊断思路。

371

Programming Erlang读书笔记8: Concurrency Programming

在Erlang里: 1,创建和销毁进程非常快 2,进程间发送消息非常快 3,在所有的操作系统间进程行为一致 4,可以有大量的进程 5,进程不共享内存并且完全独立 6,与进程交互的唯一途径是发送消息 Concurrency Primitives [code] Pid = spawn(Fun) Pid!Message receive Pattern1 [when...

hideto 174

YOLOv8训练流程-原理解析[目标检测理论篇]

本篇文章主要介绍了YOLOv8训练的流程,主要介绍了Task Aligned Assigner正负样本匹配策略以及YOLOv8的损失计算。

ice 4516

【嵌入式 – GD32开发实战指南(ARM版本)】第1部分 基础篇 - 第1章 开发环境搭建

开发环境: MDK:Keil 5.30 MCU:GD32F207IK 1.1 GD32F207I-EVAL开发板简介 笔者使用的开发板是兆易创新设计的GD32F207I-EVAL开发板。 GD32F207I-EVAL开发板使用 GD32F207IK作为主控制器,主频120MHz、集成3MB Flash、256KB SRAM、通用定时器*10、Adv. TM*2、Basic TM*2、系统时钟*1、看门狗*2、RTC*1、USART*4、UART*4、I2C*3、SPI*3、I2S*1、SDIO*1、CAN

不问归期的博客 9986

Programming Erlang读书笔记3: Sequential Programming

module是Erlang代码的基本单元,我们写的所有function都存储在module里面,module存储在.erl文件里面 module编译成.beam文件后方可运行 在Erlang_HOME建立一个名为.erlang的文件: [code] io:format("consulting .erlang in ~p~n", [element(2, file:get_cwd())])...

hideto 166

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Programming Erlang读书笔记1:Why Erlang?

公司产品终于上线了,一切告一段落,可以有大把时间看书写字了。 新年最令人激动事:可以开始系统的学习Erlang了! Erlang的书籍和教材还很少,《Programming Erlang》是Erlang的发明者Joe Armstrong自己写的学习Erlang的书,可谓经典 为什么要学习Erlang?现在还不知道,学完了才知道Erlang值不值得学。 搞程序的需要宗教信仰啊。 [b]...

hideto 170

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

Programming Erlang读书笔记6: 编译和运行Erl程序

启动和停止Eshell [code] $ erl 1> halt(). [/code] 查看/添加代码查找路径 [code] code:get_path(). code:add_patha(Dir). code:add_pathz(Dir). erl -pa Dir1 -pa Dir2 ... -pz DirK1 -pz DirK2 [/code] 查看载入...

hideto 275

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

Programming Erlang读书笔记5: Advanced SP

所有的BIFs都属于erlang module,如erlang:tuple_to_list()、erlang:time(),但是大部分BIFs都auto-imported了,所以可以直接调用tuple_to_list()、time() erlang module的所有BIFs列表见:[url]http://www.erlang.org/doc/man/erlang.html[/url] B...

hideto 153

Programming Erlang读书笔记7: Concurrency

1, Erlang程序由许多进程组成,这些进程可以相互发送消息 2,这些消息可能接收并理解也可能不接收不理解,如果你希望消息被接收并理解,你必须等待应答 3,进程组可以连在一起,如果一组进程中的一个死掉,则该组的其他进程会收到一个说明那个进程为啥死掉的消息...

hideto 132

Programming Erlang读书笔记9: 并行程序里的错误

使用BIF link将两个节点连接起来,如果其中一个节点B退出,则另一个节点A会收到{'EXIT', B, Why}的信号 可以创建一个on_exit(Pid, Fun)方法来捕获某个Pid进程的死掉: [code] on_exit(Pid, Fun) -> spawn(fun() -> process_flag(trap_exit, true), li...

hideto 180

Programming Elixir, Functional |> Concurrent |> Pragmatic |> Fun, Pragmatic 读书笔记

Programming Elixir,  Functional |> Concurrent |> Pragmatic |> Fun, Pragmatic 安装配置 又是‘Don't worry about details’!最烦这种写法 def module Par do def pmap(coll, f) do coll |> Enum.map(

cteng的专栏 876

Programming Eralng读书笔记10: 分布式编程

分布式程序指设计用于运行在网络中的可以通过消息传递相互交流彼此的活动的计算机上的程序 分布式应用的好处:Performance、Reliability、Scalability、Intrinsically distributed application、Fun、 1, key-value server的简单例子: [code] -module(kvs). -export([star...

hideto 205

Programming in Scala (Second Edition) 读书笔记1 为什么选择scala

为什么选择Scala ?1.The name Scala stands for “scalable language.” The language is so named because it was designed to grow with the demands of its usersScala代表可伸缩的语言。之所以这样命名是因为它被设计成可随着用户的需求扩展的语言...

weixin_33712881的博客 177
上一篇: Programming Erlang读书笔记1:Why Erlang?
下一篇: Programming Erlang读书笔记3: Sequential Programming
hidetobj
博客等级 码龄19年 16粉丝 301原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值