https://byte.tsundoku.io/

 

Byte - a visual archive

A visual archive. About.

byte.tsundoku.io

BYTE 잡지의 디지털 아카이브.

전체 페이지를 모두 펼쳐놓고 확대해서 보는 것처럼 만들어놓았는데, 꽤 잘 동작한다.

옛 자료 찾는데에도 유용하겠지만, 90년대 추억이 있다면 시간보내기도 좋을 듯.

 

'Etc' 카테고리의 다른 글

[Advent of Code 2024] Day 1  (0) 2024.12.10
AWS Dev Day 2018 Seoul  (0) 2018.11.12
Pencil  (0) 2017.11.29

https://www.superdesign.dev/

 

Superdesign.dev - Open Source Design Agent

Generate UI, mockups, and wireframes inside your IDE with AI-powered design assistance. Works with Cursor, Windsurf, VS Code, and more.

www.superdesign.dev

오픈소스 AI 디자인 에이전트. VS Code 등에 확장으로 설치되어 사용하는 도구로 Anthropic API Key가 필요하다.

데모를 보면 한번 써보고 싶긴한데, AI는 무료가 아니라서 그냥 써볼 수는 없다.

 

'Developing' 카테고리의 다른 글

만들면서 배우는 클린 아키텍처  (0) 2022.05.23
유연한 소프트웨어를 만드는 설계 원칙  (0) 2022.05.13
Brackets 개발 중단  (0) 2021.03.09

재미 삼아서 AI 도구에 넣어서 돌려봤는데, 답이 그럴듯하게 나와서 한번 올려본다.

Day 1 문제는 아래와 같다. (https://adventofcode.com/2024/day/1)

--- Day 1: Historian Hysteria ---

The Chief Historian is always present for the big Christmas sleigh launch, but nobody has seen him in months! Last anyone heard, he was visiting locations that are historically significant to the North Pole; a group of Senior Historians has asked you to accompany them as they check the places they think he was most likely to visit.

As each location is checked, they will mark it on their list with a star. They figure the Chief Historian must be in one of the first fifty places they'll look, so in order to save Christmas, you need to help them get fifty stars on their list before Santa takes off on December 25th.

Collect stars by solving puzzles. Two puzzles will be made available on each day in the Advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants one star. Good luck!

You haven't even left yet and the group of Elvish Senior Historians has already hit a problem: their list of locations to check is currently empty. Eventually, someone decides that the best place to check first would be the Chief Historian's office.

Upon pouring into the office, everyone confirms that the Chief Historian is indeed nowhere to be found. Instead, the Elves discover an assortment of notes and lists of historically significant locations! This seems to be the planning the Chief Historian was doing before he left. Perhaps these notes can be used to determine which locations to search?

Throughout the Chief's office, the historically significant locations are listed not by name but by a unique number called the location ID. To make sure they don't miss anything, The Historians split into two groups, each searching the office and trying to create their own complete list of location IDs.

There's just one problem: by holding the two lists up side by side (your puzzle input), it quickly becomes clear that the lists aren't very similar. Maybe you can help The Historians reconcile their lists?

For example:

3   4
4   3
2   5
1   3
3   9
3   3

Maybe the lists are only off by a small amount! To find out, pair up the numbers and measure how far apart they are. Pair up the smallest number in the left list with the smallest number in the right list, then the second-smallest left number with the second-smallest right number, and so on.

Within each pair, figure out how far apart the two numbers are; you'll need to add up all of those distances. For example, if you pair up a 3 from the left list with a 7 from the right list, the distance apart is 4; if you pair up a 9 with a 3, the distance apart is 6.

In the example list above, the pairs and distances would be as follows:

    The smallest number in the left list is 1, and the smallest number in the right list is 3. The distance between them is 2.
    The second-smallest number in the left list is 2, and the second-smallest number in the right list is another 3. The distance between them is 1.
    The third-smallest number in both lists is 3, so the distance between them is 0.
    The next numbers to pair up are 3 and 4, a distance of 1.
    The fifth-smallest numbers in each list are 3 and 5, a distance of 2.
    Finally, the largest number in the left list is 4, while the largest number in the right list is 9; these are a distance 5 apart.

To find the total distance between the left list and the right list, add up the distances between all of the pairs you found. In the example above, this is 2 + 1 + 0 + 1 + 2 + 5, a total distance of 11!

Your actual left and right lists contain many location IDs. What is the total distance between your lists?

다음은 AI가 생성한 답안이다. 받은 내용 그대로 옮겨보았다. (맞춤법 수정 및 형식만 고쳤다.)


이 문제를 해결하기 위한 Python 코드를 작성해 보겠습니다. 주어진 두 리스트의 각 요소를 정렬하여 짝을 맞추고, 차이의 절댓값을 합산하는 방식으로 구현하겠습니다.

def calculate_total_distance(left_list, right_list):
    # 입력 리스트들을 정렬
    sorted_left = sorted(left_list)
    sorted_right = sorted(right_list)
    
    # 총 거리를 저장할 변수
    total_distance = 0
    
    # 각 위치에서의 숫자 차이를 계산하고 합산
    for i in range(len(sorted_left)):
        distance = abs(sorted_left[i] - sorted_right[i])
        total_distance += distance
        
    return total_distance

def main():
    # 예제 입력
    left = [3, 4, 2, 1, 3, 3]
    right = [4, 3, 5, 3, 9, 3]
    
    # 실제 입력을 받을 경우:
    """
    left = []
    right = []
    while True:
        try:
            l, r = map(int, input().split())
            left.append(l)
            right.append(r)
        except EOFError:
            break
    """
    
    result = calculate_total_distance(left, right)
    print(f"Total distance: {result}")

if __name__ == "__main__":
    main()

 

이 코드는 다음과 같이 작동합니다:

1. `calculate_total_distance` 함수는 두 개의 리스트를 입력받아 총거리를 계산합니다.
   - 각 리스트를 정렬합니다.
   - 같은 인덱스의 숫자들의 차이(절댓값)를 계산합니다.
   - 모든 차이를 더해 총거리를 구합니다.

2. `main` 함수는:
   - 예제 입력값을 사용하거나 실제 입력을 받을 수 있습니다.
   - 계산된 결과를 출력합니다.

예제 입력을 사용할 경우, 출력은 다음과 같습니다:

Total distance: 11

 

실제 문제를 풀 때는 주석 처리된 입력 부분의 주석을 해제하고 사용하면 됩니다. 각 줄에 두 개의 숫자가 공백으로 구분되어 입력될 것으로 가정하고 있습니다.

입력 형식이 다르다면 입력 부분을 적절히 수정하여 사용하면 됩니다.

'Etc' 카테고리의 다른 글

BYTE 아카이브  (0) 2025.08.28
AWS Dev Day 2018 Seoul  (0) 2018.11.12
Pencil  (0) 2017.11.29

제목에 "만들면서 배운다"는 말이 들어가 있어서 실전에 바로 사용할 수 있는 것들을 다루지 않을까 기대했는데, 그런 책은 아니었다. 다만, 자바 코드로 책의 내용을 설명하고 있기 때문에 좀 더 이해하기 좋은 면이 있었다.

책은 "육각형 아키텍처"를 다루고 있다. 육각형 아키텍처의 구현 방법에 대해서 코드와 함께 설명해서 좀 더 명확하게 이해되는 느낌이었다. 얇은 책의 두께도 내용에 대한 부담을 줄여주는 듯했다.

'Developing' 카테고리의 다른 글

SuperDesign  (0) 2025.08.28
유연한 소프트웨어를 만드는 설계 원칙  (0) 2022.05.13
Brackets 개발 중단  (0) 2021.03.09

책 제목에 있는 "설계"라는 단어에 혹 해서 읽어보았는데, 서문에도 있듯이 "인공지능 응용의 핵심부에 해당하는 프로그램을 작성하는데 유용한 기법과 기술(수학적 기호 조작과 규칙 기반 시스템 등)을 학부 고학년과 대학원생에게 가르치는" 강의 내용을 기반으로 하고 있다. 또한, 한 학기 강좌에서 다를 수 있는 것보다 훨씬 많은 내용이 들어있다고 한 것을 보면... 술술 읽기는 어려운 책임에는 분명하다.

주로 수학적인 예제를 스킴(Scheme) 언어를 이용하여 코드로 설명하고 있고, 읽고 빠르게 써먹을 수 있는 실무적인 책은 아니었다. DSL, 확장성 있는 프로시저, 패턴 매칭, 평가(eval), 계층, 전파 등을 다루고 있고 모두 시간을 충분히 들여서 봐야 할 내용들이었다. 언젠가 연습문제도 살펴보면서 느긋하게 다시 한번 읽어볼 만한 책이었다.

'Developing' 카테고리의 다른 글

만들면서 배우는 클린 아키텍처  (0) 2022.05.23
Brackets 개발 중단  (0) 2021.03.09
어려운 스칼라의 underscore  (0) 2020.01.08

blog.brackets.io/brackets-eol-notice/

adobe에서 개발 중이었던 오픈소스 에디터인 Brackets의 개발 중단한다는 소식이다. 한때 잘 사용했던 괜찮은 에디터라서 그런지 (지금은 쓰지도 않지만) 개발 중단 소식이 안타깝다. 오픈소스이니 누군가 fork해서 유지할 수도 있겠지만, MS에서 개발하는 Visual Studio Code나 Github에서 개발하고 있는 Atom을 생각하면, adobe도 손을 뗀 상황에서 대체할만한 경쟁자로 계속 발전하기는 어렵지 않을까하는 생각이 든다.

2021년 3월 1일부터 개발을 중단하고, 9월 1일 부터는 지원도 완전히 중단한다고 한다.

'Developing' 카테고리의 다른 글

유연한 소프트웨어를 만드는 설계 원칙  (0) 2022.05.13
어려운 스칼라의 underscore  (0) 2020.01.08
Spring Social 개발 중단 소식  (0) 2018.07.07

스칼라 스터디 중, 다음과 같은 코드가 왜 오류가 발생하는지 의문이 생겼다. (코드는 재구성함)

val t = Seq(1.0,2.0,3.0)
t.map(math.pow(_ + 1,2))

// error: missing parameter type for expanded function ((<x$1: error>) => x$1.$plus(1))

타입 추론이 잘 안되는가 싶어서, 아래와 같이 해도 동일한 오류가 발생한다.

t.map((_:Double) => math.pow(_ + 1,2))

// error: missing parameter type for expanded function ((<x$2: error>) => x$2.$plus(1))

아래와 같이 하면 문제가 없다.

t.map(_+1).map(math.pow(_,2))

혹은, 아래와 같이 하면 문제가 없다.

t.map(x => math.pow(x + 1,2))

이런 현상이 발생하는 이유를 생각해보았다.

  1. f(_)a => f(a) 와 동일하다.
  2. _ + 1_.$plus(1) 과 동일하다.
  3. _.$plus(1)a => a.$plus(1) 과 동일하다.
  4. math.pow(_ + 1,2)math.pow(a => a.$plus(1),2) 와 동일??

위의 흐름이라면, Double이든 Int 이든 값이 들어가야할 자리에 함수가 들어가면서 문제가 발생한 것으로 보이는데, 맞는지는 잘 모르겠다.

'Developing' 카테고리의 다른 글

Brackets 개발 중단  (0) 2021.03.09
Spring Social 개발 중단 소식  (0) 2018.07.07
Programming in Scala 스터디 정리 - 22장. 리스트 구현  (0) 2017.10.14

11월 6일에 있었던 AWS Dev Day 2018에서 들었던 내용 중, 기억할만한 것 몇가지를 정리해보려고 한다. 발표 자료가 공유되면 그때 정리하려고 했는데, 생각보다 늦게 공개되는 모양이다. 그래서, 별 내용은 없더라도 머릿속에 조금 더 남아있을 때에 남겨본다.

딥러닝 서비스에 쓰이는 GPU 인스턴스 비용 효율을 위한 스팟(Spot) 활용기

  • "콴다" 서비스를 운영한 경험 공유
  • 컨테이너 환경을 사용하기 위해서 nvidia-docker를 사용
  • 사실 GPU 비용은 비싸서 온프레미스 환경이 더 저렴할 수도 있음.
    • 온프레미스에 배포하고 피크 타임 시에만 클라우드 사용하는 것도 방법.
    • 컨테이너 이미지를 보유하고 있으면 환경이 문제되지 않음.
  • 인스턴스 체크만으로는 확장에 필요한 지표로 삼기 어려워서 서비스 처리 상태 지표를 추가로 사용함.
  • 스팟 인스턴스 활용
    • 스팟 인스턴스가 죽는 경우에는 온디맨드 인스턴스 배포
    • 스팟 인스턴스 종료 2분전 상태를 확인해서 온디맨드 인스턴스 시작하는 도구 필요함.

Apache MXNet/Gluon으로 쉽고 빠르게 구현하는 딥러닝

  • Gluon은 Apache MXNet 인터페이스로 NumPy와 유사한 API를 제공하고, 데이터 변환이 가능
  • gradient를 자동으로 계산하는 Autograd 기능을 제공
  • GluonNLP, GluonCV 등의 프로젝트 있음

AWS 기반 블록체인 (1부) 블록체인 환경 구성하기 / (2부) 블록체인 서비스 개발하기

쿠버네티스 환경에 geth 등을 배포하여 PoA 프라이빗 네트워크를 구성하는 것을 보여주고, 2부에서 DApp 개발하는 시연을 보여주는 시간이었다.

코드는 모두 아래의 깃헙에 있다.

나중에 알게된 것이지만, 쿠버네티스에 이더리움 배포는 helm을 사용하면 간편하게 되는 듯 하다. 그리고, 개발 시연 중에 사용/언급한 도구들은 아래와 같다.

Service Mesh를 Amazon EKS로 구현하기

LinkerdIstio라는 도구를 사용하는 것을 보여주었는데, AWS에서 이와 관련한 서비스를 내놓을 듯?

'Etc' 카테고리의 다른 글

[Advent of Code 2024] Day 1  (0) 2024.12.10
Pencil  (0) 2017.11.29
자바 퍼즐러  (0) 2015.06.25

Spring Social이 개발 중단된고한다. Spring Security 5에서 직접 OAuth2를 지원하는 것이 그 이유라고 하는데, Spring Social의 API Binding을 만든 목적이 Spring Social의 Connection Framework 사용방법을 보여주기 위한 것이라는 걸 이제야 알았다. 어쩐지 예전에 spring-social-facebook의 Facebook Graph API 지원이 느린 것에 의문을 가지고 있었는데, 그 정도의 위상을 가진 프로젝트였기 때문에 그렇게 관리되었던 모양이다.

이제 대신 Spring Security 5를 사용하여 소셜사이트 연동하는 방법으로 구현해야 한다. 즉, Spring Social에서 원래 의도했던 바와 같이 Spring Security의 OAuth2 지원을 사용해서 API binding을 직접 만들어 사용하는 것이다.

UI 프로토타이핑 도구를 찾다가 Pencil 이라는 프로젝트를 발견했다. 꽤 오래전에 한번 보고 기능이 너무 단순하고 예쁘지 않아서 관심을 가지지 않았던 기억이 있는데, 최근에 다시 봤더니 꽤 쓸만해졌다. "The Next Version"이라는 말이 있는 걸 보니 Electron 기반으로 새로 만든 것 같다.

사실 비용 지출에 부담이 없는 상황이면 Balsamiq을 사용해도 되겠지만, 이런 도구를 무료로 사용할 수 있다니 훌륭한 것 같다.



'Etc' 카테고리의 다른 글

AWS Dev Day 2018 Seoul  (0) 2018.11.12
자바 퍼즐러  (0) 2015.06.25
Ship it 성공적인 소프트웨어 개발 프로젝트를 위한 실용 가이드  (0) 2015.06.24

+ Recent posts