Questions tagged [backquote]
33 questions
1
vote
2 answers
racket: equivalent to np.zeros((n, m))
I can't understand what I'm doing wrong here. Maybe a misplaced backquote.
The racket code:
(require math/array)
(define mask_cube
(let ([leng 5])
`(make-array #(,leng ,leng) 0)))
What I want it to do, written in python:
np.zeros((5,5))
Why…

Nathan majicvr.com
- 950
- 2
- 11
- 31
1
vote
1 answer
Show shortcodes as text without executing them
Shortcode example: [mytab] my content [/mytab].
But when the plugin is active, it shows the content of shortcode, not show the shortcode as text. I do not want to show the content, I want to show only the shortcode like this. [mytab] my content…
user9576028
1
vote
1 answer
Process single quoutes inside back quoute statement in rake/ruby
I need to execute the following shell command and read out the output in rake variable:
`#{security_bin} find-identity -v -p codesigning #{keychain_path} | grep "$1" | awk -F\" '/"/ {print $2}' | head -n1`
As you can see, I am using back quotes to…

Maxim V. Pavlov
- 10,303
- 17
- 74
- 174
1
vote
1 answer
Comma is illegal outside of backquotes?
I am writing a function that is supposed to take in two values. The first value is supposed to create a list up to five numbers, based on the value entered. The second value is supposed to take the list and rotate it n times, based on the number…

Keith Code
- 57
- 8
1
vote
1 answer
How to take vector content as backquote variable in tidyr/dplyr
I have the following data frame, at it works as I wanted
with this code:
df <- structure(list(celltype = structure(c(1L, 1L, 2L, 2L, 3L, 3L,
4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L, 10L, 10L), .Label = c("Bcells",
"DendriticCells",…

neversaint
- 60,904
- 137
- 310
- 477
1
vote
0 answers
backquote in system() function
I have a problem with backquotes (it seems) in system() function in C.
This is my request :
snprintf (check_cmd, sizeof (check_cmd), "[ $(echo -n '%.*s' | cksum | cut -d' ' -f1) -eq %" PRIu32 " ]", (cfi_sys_int)data_array[i].size,…

V. Pierre
- 21
- 3
0
votes
1 answer
Has anyone ever discussed adding unquote syntax to PostgreSQL dollar-quoted strings?
Remember in LISP macros you could have those back-quotes to place evaluated expressions into larger string constants?
Likewise, javascript has the `backtick quoting where you can place ${2 * 5} expressions` in which get evaluated to form the final…

Gunther Schadow
- 1,490
- 13
- 22
0
votes
1 answer
Why is `(,x) a shorthand for (cons x '())?
I'm told that: `(,x) is a shorthand for (cons x '()).
I'm a bit confused because that's not documented anywhere.
Also if that is the case, what does `(((pea)) ,q) evaluate to?
And why is pea wrapped in two sets of parens?

Alper
- 3,424
- 4
- 39
- 45
0
votes
3 answers
Generate codes including unquote-splice by a loop in Common Lisp
I'm writing a macro to generate codes used by another macro in Common Lisp. But I'm new at this and have difficulty in constructing a macro that takes in a list (bar1 bar2 ... barn) and produces the following codes by a loop.
`(foo
,@bar1
…

Xinyu Wang
- 9
- 2
0
votes
0 answers
Backticks having different output from $()
The following code:
url="http%3A%2F%2Fstackoverflow.com%2Fsearch%3Fq%3Durldecode%2Bbash"
line=`echo -e ${url//%/\\x}`;
echo $line;
line=$(echo -e ${url//%/\\x});
echo…

Raslanove
- 649
- 9
- 16
0
votes
2 answers
Why do I lose output when calling another perl program with backquotes
If I run a perl program and call another perl program using backquotes, print statements from the called program don't appear at the terminal.
If I call the program using 'system', the print statements are displayed.
EG:
This is ProgA.pl
print "In…

user1067305
- 3,233
- 7
- 24
- 29
0
votes
1 answer
Neither a function nor a macro would do
Consider this question. Here the basic problem is the code:
(progv '(op arg) '(1+ 1)
(eval '(op arg)))
The problem here is that progv binds the value to the variable as variable's symbol-value not symbol-function. But, that's obvious because we…

Mooncrater
- 4,146
- 4
- 33
- 62
0
votes
1 answer
Stata variable definition with backquote
I have obtained a copy of Stata ado file written by another researcher. The first few lines are as follows:
program define threshold, eclass
set more off
gen m=`1'
sort mvar
gen lagm=L.m
gen deltam=D.m
...
What does the line…

Prasanna S
- 353
- 1
- 10
0
votes
2 answers
Unquote symbol in lambda expression?
In an anonymous function such as
(lambda () x)
how can I replace the symbol x with its value in the current scope?
The only thing I can think of is
(eval `(lambda () ,x))
but I wonder if there's another way.

Ernest A
- 7,526
- 8
- 34
- 40
0
votes
2 answers
emacs define-generic-mode why cannot use regexp-opt?
I am trying to make simple major mode for syntax highlighting using define-generic-mode. I found that
(define-generic-mode 'mytest-mode
'("//") nil
'(
((regexp-opt '("int" "string" "bool")) . 'font-lock-type-face)
)
nil nil "mytest…

shibormot
- 1,638
- 2
- 12
- 23