티스토리 간만에... 2024.03.10

다운완료~실행.

정식버전 언제나오려나..

 

근데 나 러스트? 설치 안했는데...

아..?

Install Rustup 누르니, 알아서 설치해준다.

아는게 없으니.. 알아서 잘해주겠지

대충 저기 설치된거같고...

프론트도 러스트로 할 수 있단건지... 잘 모르겠네.. 당연히 안될거같..

백엔드 합한 모노레포 말하는걸까. 나중에 만들어봐야겠어.

 

러스트를 주피터 노트북에 사용해서 간단하게 돌려볼 수 있고.

https://pipln.medium.com/rust-%EB%A5%BC-jupyter-notebook-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0-cd939324e23f

 

Rust를 Jupyter Notebook에서 사용

0. 사전 준비

pipln.medium.com

참고하길.

 

RustRover-EAP 는 젯브레인 새 인터페이스가 기본인가보다.

기본으로 깃 세팅도 해두나보네...

대충... src/main.rs 하나있고,

fn은 함수겠거니.

우측상단 초록 화살표나 눌러서 헬로 월드나 찍어보면...

잘되네.

이제 뭐해본다...(?)

..

터미널에 보니 rustup 이랑 cargo 가 추가된거같네

주피터나 설치하자.

에러나네...

버전이 높아서?

https://github.com/evcxr/evcxr/blob/main/evcxr_repl/README.md

리드미나 읽고..

저기 블로그 글과 명령어가 좀 다르지?

cargo install --locked evcxr_repl

--locked 가 붙었는데... 

설치가 되네?

다시 저 블로그 글 가서 따라하고...

...? conda 가 없네...

https://www.anaconda.com/download

드가서 설치...

아... 뭐가 설치하고나니 뭐가 ... (뭐가 많아)

다 꺼

conda create --name evcxr
conda activate evcxr
conda install jupyter
conda install -y -c conda-forge nb_conda_kernels
cargo install evcxr_jupyter
evcxr_jupyter --install
jupyter notebook

귀찮다고 ...걍 여기서 붙여넣으면?

중간중간에 y 눌러줘야한다.

뭐야 되네?

... 

이제 기본 문법이나 익혀볼까.

'몰라그거무서운거 > 알고모르고' 카테고리의 다른 글

week2 과제  (1) 2021.05.23
week 1 과제  (0) 2021.05.15
시, 공간 복잡도  (0) 2021.05.10

안망했으니 글써봐야지

'잡담' 카테고리의 다른 글

2021년 회고 (처음으로 쓰는...)  (0) 2021.12.31
시니어가 아니더라도 기술을 공부하고 나누는 이유  (0) 2021.12.18
7월까지 잠깐 잠수  (0) 2021.05.31
2021.05.07 메모  (0) 2021.05.07
2021.04.27 기록  (0) 2021.04.27

Self-hosted

구축 메모

- 키워드 : postgreSQL, kafka, sentry, docker, k8s, 또 뭐있나 clickhouse? 흠 -_-

뭐 이런게 있긴 해

... 읽어보자

음... https://clickhouse.com/docs/en/intro/

 

What Is ClickHouse? | ClickHouse Docs

ClickHouse® is a column-oriented database management system (DBMS) for online analytical processing of queries (OLAP).

clickhouse.com

 

https://github.com/sentry-kubernetes/charts

 

GitHub - sentry-kubernetes/charts: Easily deploy Sentry on your Kubernetes Cluster

Easily deploy Sentry on your Kubernetes Cluster. Contribute to sentry-kubernetes/charts development by creating an account on GitHub.

github.com

이런것도 보이고...

복잡하구나

 

--------------------------

설치 후 https 아니면 안되는 설정들이 있어서 인증서도 붙여야했고,

slack 앱 만들어서 알람연동까지 되는건 좋네 확실히

yarn set version berry 

까지만 해도 웹스톰은 잘 찾는데,

yarn add @yarnpkg/sdks -D
yarn dlx @yarnpkg/sdks vscode

까지 했는데도 모듈을 vscode에서 못찾는 경우가 발생한다
마음을 가다듬고 yarn cache clean --all ..

..

자... 베리로 3.2.1로 한번 해보자.. 까나린 안쓸거고

yarn set version berry 
yarn add typescript (4.7.4 깔림)
yarn dev (ts-node index.ts)

일단 yarn dev 로 실행하는 ts-node는 되는데 VSCODE 에서 import 패키지들을 인식을 못한다.

흠...시스템의 문젠가? VS코드를 날려볼까

남아도는게 시간이니

rm -rf .vscode
rm -rf /Library/Application Support/Code

-------------

다운 https://code.visualstudio.com/docs?dv=osx 하고 새로 실행하니 그대로인게

npm install 패키지는 잘 되는걸로 봐서 yarn 과 연결고리를 찾아야겠다.

yarn set version berry

yarn add typescript

yarn dlx @yarnpkg/sdks vscode

했는데 똑같이 못찾고...

이것도 해줬는데 아니고...

이것도 작업영역 버전 사용했는데... 아닌거같고

 

... 아

nested 하게 open 하면 작업영역 버전을 사용 못해서 못찾는 문제구나

이렇게 열지 말 것...

https://github.com/reyoucat/simple-yarn3

 

GitHub - reyoucat/simple-yarn3

Contribute to reyoucat/simple-yarn3 development by creating an account on GitHub.

github.com

 

---------- 2022/6/26 삽질----------

Q: tsdk 위치를 맞는게 뭘까 하고 바꿔도 인식 못함... 경로 설정을 별의 별 각종 패턴으로 먹였는데도 안먹음.

A: 근데 이렇게 해서 되어도 문제가 다른사람의 PC에서 동작 안할거니까... 포기하자 ^ㅁ^

++ 민상님이 트윗으로 알려주시길... 아직 미구현 https://twitter.com/minsangk/status/1540934024578732032

 

트위터에서 즐기는 Minsang Kim

“@RE_U_CAT 아하, nested 된 프로젝트의 상위를 기준으로 프로젝트를 열었을 때, 서브디렉토리에 있는 settings.json 을 읽지 못하는 문제였군요. 꽤 논의가 있긴한데 아직 구현이 안됐나봐요ㅎㅎ https:/

twitter.com

https://github.com/Microsoft/vscode/issues/32693

 

Monolithic structure, multiple project settings · Issue #32693 · microsoft/vscode

I was wondering if it is possible for VSCode to pick up on multiple .vscode/settings.json For instance if you are working in an monolithic environment with multiple smaller projects inside it, and ...

github.com

 

import yargs from 'yargs/yargs';
import { hideBin } from 'yargs/helpers';
import { lookItUp } from 'look-it-up';
import Dotenv from 'dotenv';
import fs from 'fs';
// https://fe-developers.kakaoent.com/2021/211125-create-12factor-app-with-nextjs/
// https://fe-developers.kakaoent.com/2022/220505-runtime-environment/
async function parseDotenv(appEnv) {
  // dotenv 파싱
  const envFilePath = await lookItUp(`.env.${appEnv}`);
  const parsedEnv = Dotenv.config({ path: envFilePath }).parsed || {};
  return parsedEnv;
}

async function copyEnv(appEnv) {
  // 파싱 대상 파일은 '.env'파일로 복사
  const envFilePath = await lookItUp(`.env.${appEnv}`);
  const dotenvFilePath = `${fs.realpathSync(process.cwd())}/.env`;
  fs.copyFileSync(envFilePath, dotenvFilePath);
}

function writeEnv(parsedEnv) {
  // 파싱 된 내용을 /public/__ENV.js에 출력
  const scriptFilePath = `${fs.realpathSync(process.cwd())}/public/__ENV.js`;
  fs.writeFileSync(scriptFilePath, `window.__ENV = ${JSON.stringify(parsedEnv)}`);
}

yargs(hideBin(process.argv))
  .command(
    'next-env',
    'Create Next.js runtime environment js',
    function builder(y) {
      return y.option('env', {
        alias: 'e',
        type: 'string',
        description: 'Environment name(ex: alpha, dev, staging, real)',
      });
    },
    async function handler(args) {
      const appEnv = args.e || args.env || 'dev';

      const parsedEnv = await parseDotenv(appEnv); // dotenv 파싱
      writeEnv(parsedEnv); // 환경 변수 스크립트 파일 생성
      await copyEnv(appEnv); // .env 파일 복사

      return parsedEnv;
    },
  )
  .parse();
"env:dev": "node dotenv.rollup.mjs next-env --env=${APP_ENV:-dev} && next dev",
"env:start": "node dotenv.rollup.mjs next-env -e ${APP_ENV:-dev} && next start"

 

빙빙돌아가기 싫으면

+ Recent posts