스타일 | 이전 | 이후 |
---|---|---|
|
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
// https://github.com/rajib76/langchain_examples/blob/main/examples/chain_of_thoughts_example_01.py | |
import { PromptTemplate } from "@langchain/core/prompts"; | |
import { ChatOpenAI } from "@langchain/openai"; | |
const prefix = | |
"당신은 도움이 되는 챗봇이며, 제공된 맥락에 기반하여 질문에 대답합니다. 만약 답변이 맥락에 없다면, 당신은 답변이 없다는 것을 정중하게 말할 수 있습니다."; | |
const examples = [ | |
`다음 형식을 사용하세요: |
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
// core v1.5.1 기준 | |
function cycleDetected(): never { | |
throw new Error("Cycle detected"); | |
} | |
function mutationDetected(): never { | |
throw new Error("Computed cannot have side-effects"); | |
} | |
const identifier = Symbol.for("preact-signals"); |
이 글은 소프트웨어 아키텍처 시리즈 글 중 소프트웨어 아키텍처 연대기의 일부입니다. 이 글에서는 제가 소프트웨어 아키텍처에 대해 배운 것과 생각하는 것, 그리고 그 지식을 어떻게 사용하는지에 대해 이야기합니다. 이 시리즈의 이전 글 읽으셨다면 이 글의 내용을 더 잘 이해할 수 있을 것입니다.
저는 대학을 졸업한 후 고등학교 교사로 근무하다가 몇 년 전 교직을 그만두고 풀타임 소프트웨어 개발자가 되기로 결심했습니다.
그때부터 저는 항상 '잃어버린' 시간을 되찾고 가능한 한 많은 것을, 가능한 한 빨리 배워야 한다고 생각했습니다. 그래서 저는 소프트웨어 디자인과 아키텍처에 특히 중점을 두고 실험하고, 읽고, 글을 쓰는 데에 약간 중독(?)되었습니다. 그래서 제가 이 글을 쓰는 이유는 제 배움에 도움이 되기 위해서입니다.
최근 새로운 자바스크립트 서버 사이드 런타임인 Bun이 발표되었습니다. Bun은 Node.js에 비해 엄청난 속도 향상을 약속했습니다. 이 글에서는 작은 애플리케이션 대신 복잡한 애플리케이션을 사용해 실제 성능을 확인해봤습니다.
Bun 웹사이트(https://bun.sh/)를 보면 Node.js 사용을 대체하는 흥미로운 대안처럼 보이게 합니다. Bun은 Node.js와 같은 아이디어이지만, 훨씬 더 나은 성능을 약속합니다. Node.js와 마찬가지로, Bun은 웹 브라우저에서 자바스크립트 엔진을 서버 사이드 자바스크립트 플랫폼으로 패키징하고 완전한 호환성을 위해 Node.js API를 구현할 것을 약속합니다.
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
<div css={{ padding: '0.5rem', border: '1px solid #ddd' }}>...</div> |
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
const myCss = css({ | |
backgroundColor: "blue", | |
width: 100, | |
height: 100, | |
}); | |
function MyComponent() { | |
return <div css={myCss} />; | |
} |
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
function MyComponent() { | |
return ( | |
<div | |
css={{ | |
backgroundColor: "blue", | |
width: 100, | |
height: 100, | |
}} | |
/> | |
); |
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
// colors.ts | |
export const colors = { | |
primary: "#0d6efd", | |
border: "#ddd", | |
/* ... */ | |
}; | |
// MyComponent.tsx | |
function MyComponent({ fontSize }) { | |
return ( | |
<p |
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
.row { | |
padding: 0.5rem; | |
border: 1px solid #ddd; | |
} |
NewerOlder