Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve syntax of unquote ($) #153

Closed
zingales opened this issue Jul 25, 2011 · 3 comments
Closed

improve syntax of unquote ($) #153

zingales opened this issue Jul 25, 2011 · 3 comments
Assignees

Comments

@zingales
Copy link
Contributor

currently the "unquote" is $.

However, this conflicts with the $ operator, so the answer to

for i = 1:10
    quote
        $(array[i])[
    end
end

is unsure.

also operations like

for
   quote 
        count$i = name$i (or)
       $(count[i])[2]

   end
end

will not do what you want/think it will do

@ghost ghost assigned JeffBezanson Jul 25, 2011
@StefanKarpinski
Copy link
Sponsor Member

These examples are unclear or mis-entered. I've never encountered issues with $ myself.

@JeffBezanson
Copy link
Sponsor Member

I think the fix we want is to be able to use $(expression) like we can in string interpolation. Right now $() is parsed as a function call. I guess writing the function call version inside quote will need ($)().

@StefanKarpinski
Copy link
Sponsor Member

While you're at it, can you make $ expression interpolation ungreedy like $ interpolation in strings and commands are?

JeffBezanson added a commit that referenced this issue Aug 16, 2011
to call or define $ as a function you must use ($)(...)
StefanKarpinski added a commit that referenced this issue Aug 17, 2011
* 'master' of github.com:JuliaLang/julia:
  fast inline code for floating point abs()
  allowing $(...) for unquoting, fixes issue #153 to call or define $ as a function you must use ($)(...)
  Various fixes to the eps() function. Should now match Matlab.
  giving an error for overflow in integer literals
  fixing eps(Float32)
  Correct eps(Float32); allow type-specialization of eps(x::Float).
  make reshape() for Arrays share data with the original (SubArray semantics) must use reshape(copy(A), ...) to get the old behavior fixes issue #112
  faster fallback definitions of matrix*matrix and matrix*vector map for cell arrays for any number of arguments
  Add Stephan's instructions for webserver and sample lighttpd.conf.
StefanKarpinski pushed a commit that referenced this issue Feb 8, 2018
Add a default value for the input to __precompile__
cmcaine pushed a commit to cmcaine/julia that referenced this issue Sep 24, 2020
* Add basic GitHub actions CI for exercise tests

* Switch to tagged release
LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Oct 11, 2021
Added tests for sample pair functions
KristofferC pushed a commit that referenced this issue Aug 25, 2023
Stdlib: Tar
URL: https://github.com/JuliaIO/Tar.jl.git
Stdlib branch: master
Julia branch: master
Old commit: ff55460
New commit: 81888a3
Julia version: 1.11.0-DEV
Tar version: 1.10.0 (Does not match)
Bump invoked by: @DilumAluthge
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaIO/Tar.jl@ff55460...81888a3

```
$ git log --oneline ff55460..81888a3
81888a3 Correct some typos (#159)
a82ddde Fix some issues found by JET (#162)
6c51ea7 Give hint about possible insufficient storage on error message (#161)
84e6571 minimize impact of invalidations due to uninferred `ctx` (#158)
b0b8ec7 Merge pull request #157 from JuliaIO/dependabot/github_actions/actions/checkout-3
24bb56d Merge pull request #156 from JuliaIO/dependabot/github_actions/codecov/codecov-action-3
9f7d944 Merge pull request #155 from JuliaIO/dependabot/github_actions/actions/cache-3
d14feb4 Bump actions/checkout from 2 to 3
f149f85 Bump codecov/codecov-action from 1 to 3
ea228f2 Bump actions/cache from 1 to 3
4b54b0c Merge pull request #153 from ranocha/hr/dependabot
c70adcb enable dependabot for GitHub actions
cf089ab fix some sources of invalidations (#152)
```

Co-authored-by: Dilum Aluthge <[email protected]>
vtjnash pushed a commit that referenced this issue Dec 8, 2023
Stdlib: Statistics
URL: https://github.com/JuliaStats/Statistics.jl.git
Stdlib branch: master
Julia branch: jn/loading-stdlib-exts
Old commit: 04e5d89
New commit: 68869af
Julia version: 1.11.0-DEV
Statistics version: 1.11.1(Does not match)
Bump invoked by: @vtjnash
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaStats/Statistics.jl@04e5d89...68869af

```
$ git log --oneline 04e5d89..68869af
68869af Bump patch for version 1.11.1
89f5fc7 Create tagbot.yml
dc844db CI: restore v1.9.4 to build matrix (#159)
d0523ae relax test for mapreduce_empty (#156)
d1c1c42 Drop support for v1.9 in CI (#157)
bfc6326 Fix `quantile` with `Date` and `DateTime` (#153)
b8ea3d2 Prevent overflow in `mean(::AbstractRange)` and relax type constraint. (#150)
a88ae4f Document MATLAB behavior in `quantile` docstring (#152)
46290a0 Revert "Prepare standalone package, step 2 (#128)" (#148)
81a90af make SparseArrays a weak dependency (#134)
```

Co-authored-by: Dilum Aluthge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants