This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# learning Unicon/Icon. | |
# here's my initial solution to the rmchars string scanning challenge on slide 182 of Unicon Programming Fundamentals | |
# http://www2.cs.uidaho.edu/~jeffery/courses/210/UniconFundamentals.pdf | |
procedure main(args) | |
local t := "For both the structures described." | |
write(rmchars(t, 'sed')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on information from: https://github.com/nim-lang/Nim/issues/16211 | |
git clone https://github.com/nim-lang/Nim | |
cd Nim | |
git clone -q --depth 1 https://github.com/nim-lang/csources_v1.git sources | |
./build_all.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ FreePascal: Generic function example prompted by StackOverflow question: | |
"Does Free Pascal have type variable like Haskell?" | |
https://stackoverflow.com/questions/7799037/does-free-pascal-have-type-variables-like-haskell } | |
{$mode objfpc} | |
program Thrice; | |
uses sysutils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i = 1:5, j = 1:2 | |
println((i, j)) | |
end | |
# yields: | |
# (1, 1) | |
# (1, 2) | |
# (2, 1) | |
# (2, 2) | |
# (3, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# define a function, g, which takes an arbitrary number of keyword arguments and | |
# prints the keys and values of the arguments passed to it. | |
g(;kwargs...) = (println ∘ collect)(kwargs) | |
# for more about varargs, optional arguments, and keyword arguments in Julia | |
# see https://docs.julialang.org/en/v1/manual/functions/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c | |
index 8c34aa8a3f..d36e23b450 100644 | |
--- a/gdb/darwin-nat.c | |
+++ b/gdb/darwin-nat.c | |
@@ -687,7 +687,6 @@ darwin_decode_exception_message (mach_msg_header_t *hdr, | |
/* Not a known inferior. This could happen if the child fork, as | |
the created process will inherit its exception port. | |
FIXME: should the exception port be restored ? */ | |
- kern_return_t kret; | |
mig_reply_error_t reply; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
darwin-nat.c: In function 'int darwin_decode_exception_message(mach_msg_header_t*, inferior**, darwin_thread_t**)': | |
darwin-nat.c:690:21: error: declaration of 'kret' shadows a previous local [-Werror=shadow=compatible-local] | |
kern_return_t kret; | |
^~~~ | |
darwin-nat.c:626:17: note: shadowed declaration is here | |
kern_return_t kret; | |
^~~~ | |
darwin-nat.c: In function 'ptid_t darwin_decode_message(mach_msg_header_t*, darwin_thread_t**, inferior**, target_waitstatus*)': | |
darwin-nat.c:1128:14: error: declaration of 'res' shadows a previous local [-Werror=shadow=compatible-local] | |
pid_t res; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [] | |
forever [ | |
data: input | |
if data = "!quit" [break] | |
print data | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [] | |
forever [ | |
msg: input | |
if msg = "!quit" [break] | |
print msg | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CMSC 421 Operating Systems Lecture Notes | |
(c) 1994 Howard E. Motteler | |
Message Passing | |
================ | |
The goal of critical sections, monitors, etc. is to allow | |
processes to _communicate_ |
NewerOlder