바보
남 탓, 세상 탓

'아침편지' 카테고리의 다른 글
| 인공지능 (0) | 2025.10.21 |
|---|---|
| 지옥 같은 고통은 왜 올까 (0) | 2025.10.20 |
| '거대한 가속'의 시대 (0) | 2025.10.17 |
| 저체온 여성이 늘고 있다 (0) | 2025.10.16 |
| 길만큼 좋은 스승은 없다 (0) | 2025.10.15 |
바보
남 탓, 세상 탓

| 인공지능 (0) | 2025.10.21 |
|---|---|
| 지옥 같은 고통은 왜 올까 (0) | 2025.10.20 |
| '거대한 가속'의 시대 (0) | 2025.10.17 |
| 저체온 여성이 늘고 있다 (0) | 2025.10.16 |
| 길만큼 좋은 스승은 없다 (0) | 2025.10.15 |
PHP 8.5: The Version That Will Actually Makes Life Easier
https://pixicstudio.medium.com/php-8-5-new-developer-features-f9617311c590
PHP 8.5: The Version That Will Actually Makes Life Easier
The Developer-Friendly Upgrade You’ve Been Waiting For
pixicstudio.medium.com

PHP 8.5 is out soon, and honestly, it’s one of those releases that makes me excited as a developer. Some of the features are small, but they just feel so right, you know? I’m talking about stuff that just makes your life easier every single day. Let me take you through it.
The pipe operator, you’ve probably seen it floating around in tweets and RFCs. And yes, it’s actually useful.
Imagine this: you have a function called sendEmail. It takes an email address, but before you send it, you want to clean it up. Trim spaces, make it lowercase… usual stuff. Before PHP 8.5, you might do something like this:
$email = " TEST@EXAMPLE.COM ";
$email = trim($email);
$email = strtolower($email);
sendEmail($email);
Temporary variables, reassignments, all that noise. Now with the pipe operator:
" TEST@EXAMPLE.COM "
|> trim()
|> strtolower()
|> sendEmail();
No temporary variables, everything flows left to right. Makes your code so much cleaner.
Next up, #[NoDiscard]. This is actually amazing. Sometimes you call a function, and you must use the return value, but people (or even yourself) might forget. PHP 8.5 can now warn you if you ignore it.
#[NoDiscard]
function getName(): string {
return "Nuno";
}
If you do this:
getName(); // PHP will warn you: "Hey, you should use the return value!"
It forces you to handle the result or explicitly cast to void if you really mean to ignore it. Honestly, this one is top three features for me. You combine this with the pipe operator, and you can write clean, safe chains without warnings.
PHP 8.5 now lets you use static closures in places that only accept compile-time values. Class constants, default property values, attribute arguments… you can now use closures in all of them.
class Example {
public const VALIDATOR = static function($value) {
return !empty($value);
};
}
Before, this would fail, now it works. You can literally attach reusable logic directly to constants or attributes. This is huge for frameworks like Laravel that use a lot of validation or metadata.
You know how annoying it was to get the first or last element of an array? I mean, PHP has reset() and end(), but they move the internal pointer. Now we have:
$users = ["Adrian", "Maria", "Pedro"];
$first = array_first($users); // Adrian
$last = array_last($users); // Pedro
It’s simple, intuitive, and doesn’t mess with your array pointer. Little change, big difference.
Another subtle one. PHP 8.5 now lets you add attributes to global constants. Before, this was impossible. Now, you can do something like:
#[Deprecated("Use NEW_CONSTANT instead")]
const OLD_CONSTANT = 42;
Try echoing it:
echo OLD_CONSTANT; // 42 + deprecation warning
It’s basically metadata for constants. If your framework or package uses constants for configuration, you can now attach extra info cleanly.
For framework developers, this one is neat. PHP 8.5 introduces get_exception_handler(). If you’ve ever used set_exception_handler(), you know it’s hard to inspect the existing closure. Now, you can actually grab it:
set_exception_handler(fn($e) => echo "Caught: " . $e->getMessage());
$handler = get_exception_handler();
var_dump($handler);
Perfect for logging, debugging, or even modifying exception handling at runtime. Frameworks like Laravel could make real use of this for global error handling.
And here’s a fun one: IntlListFormatter. Not something you’d use every day, but when you need it, it’s perfect. You can take a list and format it according to locale rules.
$formatter = new \Intl\IntlListFormatter('en', \Intl\IntlListFormatter::TYPE_AND);
echo $formatter->format(['Lisbon', 'Porto', 'Coimbra']); // "Lisbon, Porto, and Coimbra"
It handles “and”, “or”, and other localized ways of formatting lists automatically. Nice little quality-of-life improvement for internationalized apps.
Even the small improvements in PHP 8.5 make a difference, especially if you work with the CLI or care about internal debugging and configuration.
Ever wish you could quickly see which settings you’ve changed from the default PHP configuration? PHP 8.5 makes this super easy with a new CLI command:
php -i --diff
This shows you exactly which php.ini options differ from the defaults. For example, I always increase memory limits and disable timeouts for scripts while testing:
memory_limit = -1
max_execution_time = 0
Before, you had to manually compare or scroll through phpinfo(). Now it’s literally built-in. Such a small, but life-saving improvement for anyone debugging PHP setups.
PHP 8.5 introduces a new constant that tells you exactly when the binary was built. Want to check?
echo PHP_BUILD_DATE;
Output:
2025-09-17 14:32:00
It’s perfect if you’re running multiple PHP binaries or want to verify the version/build you’re using. Nothing groundbreaking, but again, quality-of-life.
PHP 8.5 improves property promotion with the ability to mark individual properties as final. You could already make an entire class final, but now you can target specific properties in your constructor:
class User {
public function __construct(
final public string $username,
public string $email
) {}
}
Now $username cannot be overridden in subclasses. It’s subtle, but for codebases where immutability matters, this is a huge clarity win.
Other minor improvements include:
None of these require code changes, but if you’re a framework developer or DevOps person, they make day-to-day PHP usage smoother.
Here’s the thing: PHP 8.5 isn’t just about flashy features. Even small internal improvements and CLI tweaks reduce friction in your workflow. That’s the real magic here, less time fighting configuration, more time writing code that actually does something.
PHP 8.5 is packed with quality-of-life features. Not every one of them will change your world, but together they make the language smoother, safer, and more enjoyable.
PHP 8.5 feels like one of those releases that makes you happy to write PHP again. It’s not flashy, but it’s clever, practical, and developer-first.
If you haven’t checked it out yet, start testing the beta. I guarantee some of these features will make their way straight into your daily coding habits.
| 프로그래머 정체성의 위기 (0) | 2025.10.27 |
|---|---|
| 마인크래프트 하면서 영어 배운다…알레프랩 와이콤비네이터에 ‘낙점’ (0) | 2025.10.17 |
| “튜토리얼 지옥”을 대체한 “바이브 코딩 지옥”의 등장 (0) | 2025.10.13 |
| 구글도 ‘어디서나 근무’ 이젠 안돼…회사로 나오라는 빅테크 (0) | 2025.10.13 |
| 왜 우리는 악순환에 빠지는가 (behavioralscientist.org) (0) | 2025.09.22 |
마인크래프트 하면서 영어 배운다…알레프랩 와이콤비네이터에 ‘낙점’
https://www.mk.co.kr/news/business/11443250
마인크래프트 하면서 영어 배운다…알레프랩 와이콤비네이터에 ‘낙점’ - 매일경제
게임형 AI 학습 에이전트 크루캐피탈이어 후속 투자 유치 게임·언어·과목 등 확장 계획
www.mk.co.kr
게임형 인공지능(AI) 스타트업 알레프 랩(Aleph Lab)이 미국 실리콘밸리 대표 스타트업 액셀러레이터인 와이콤비네이터(YC)에 낙점됐다.
알레프랩은 올해 가을(F25) 와이콤비네이터 배치 프로그램에 선정돼 후속 투자를 유치했다고 16일 밝혔다. 지난 8월 설립 직후 크루캐피탈(Krew Capital)로부터 첫 투자를 받은 지 약 한 달 만이다.
알레프 랩은 아이들이 좋아하는 게임을 통해 자연스럽게 영어를 습득하는 경험을 목표로, AI 원어민 친구와 함께 게임 마인크래프트 안에서 실시간으로 대화하며 영어를 배우는 학습 서비스 ‘알레프 키즈(Aleph Kids)’를 개발하고 있다. 연내에 게임 플랫폼 ‘로블록스’에서도 서비스를 지원할 계획이다.
알레프 키즈의 첫 번째 AI 원어민 친구 ‘애니’(Annie)는 단순한 대화형 챗봇이 아닌 AI 에이전트로, 주변 환경을 인식해 아이의 답변을 유도하는 질문을 생성하며 자연스러운 언어 학습을 설계했다.
학습자의 흥미, 언어 수준, 게임 상황을 실시간으로 분석해 맞춤형 학습 커리큘럼을 생성하고, 놀면서 배우는 경험(learn through play)을 제공하는 것이 목표다.
투자금은 이후 로블록스 등 인기 게임 속 AI 친구 출시, 스페인어와 프랑스어 등 언어 확장, 수학·과학 등 과목 추가, 성인 대상 학습 서비스 출시 등 제품 확장에 활용될 예정이다.
장한님·한관엽 공동대표는 “아이들이 값비싼 해외 영어캠프나 유학을 가지 않더라도, 언제 어디서나 AI 원어민 친구와 함께 놀면서 자연스럽게 영어 실력을 키우고 유창해질 수 있도록 하겠다”며 “아이들이 해외에 나가서 자신감 있게 영어로 대화하고, 학업과 커리어에서 더 많은 선택지를 가질 수 있는 세상을 만들 것”이라고 밝혔다.
| 프로그래머 정체성의 위기 (0) | 2025.10.27 |
|---|---|
| PHP 8.5: The Version That Will Actually Makes Life Easier (0) | 2025.10.17 |
| “튜토리얼 지옥”을 대체한 “바이브 코딩 지옥”의 등장 (0) | 2025.10.13 |
| 구글도 ‘어디서나 근무’ 이젠 안돼…회사로 나오라는 빅테크 (0) | 2025.10.13 |
| 왜 우리는 악순환에 빠지는가 (behavioralscientist.org) (0) | 2025.09.22 |
10년 빨리
찾아온 미래를 직시하라.
우리는 시간이 일정한 힘이라고 배웠다.
그러나 시간에 대한 우리의 인식은 일정하지 않다.
나이가 들수록 과거가 차지하는 비중은 커지고,
세월은 더 빨리 흐른다. 아침에는 유치원에
처음 등원하는 아들과 헤어지면서 뽀뽀를
해줬는데, 오후에는 그 아들이 5학년이
되어 집에 돌아오는 식이다.
- 스콧 갤러웨이의《거대한 가속》중에서 -
* 나이가 들면
시간이 빨리 간다고 합니다.
그야말로 '거대한 가속'을 실감하게 됩니다.
'유치원 아이가 반나절 만에 5학년이 되어 돌아온다'는
말이 결코 과장이 아닙니다. 초등학교 5학년이던
어린 시절이 엊그제 같은데 머리엔 흰 눈이 내렸습니다.
그러나 아무리 시간이 빨리 흘러도 천천히 걷는 시간이
필요합니다. 천천히, 아주 천천히 걸으면
시간이 거꾸로 흐릅니다.

| 지옥 같은 고통은 왜 올까 (0) | 2025.10.20 |
|---|---|
| 바보 (0) | 2025.10.20 |
| 저체온 여성이 늘고 있다 (0) | 2025.10.16 |
| 길만큼 좋은 스승은 없다 (0) | 2025.10.15 |
| 집단지성이 필요한 이유 (0) | 2025.10.14 |
Plotly를 사용한 게이지 차트 (Gauge Chart) 생성 예제 (Python Code)
Plotly Tutorial - 파이썬 시각화의 끝판왕 마스터하기 https://wikidocs.net/book/8909
https://plotly.com/python-api-reference/plotly.graph_objects.html
plotly.graph_objects: low-level interface to figures, traces and layout — 6.3.0 documentation
plotly.graph_objects: low-level interface to figures, traces and layout plotly.graph_objects contains the building blocks of plotly Figure: traces (Scatter, Bar, …) and Layout >>> import plotly.graph_objects as go Figure Figure([data, layout, frames,
plotly.com
Plotly는 인터렉티브한 시각화가 가능한 파이썬 그래픽 라이브러리 입니다. 기본적인 시각화부터 통계, 재무, 지리 과학 및 3-dimensional 을 포함한 40개 이상의 차트 타입을 제공하는 오픈소스 입니다. 기본적으로 쥬피터 노트북에 시각화가 가능하며 인터렉티브한 dashboards 위해 Dash 또는 Chart Studio와 같은 라이브러리와 통합 및 확장이 가능합니다.

"""
pip install plotly
Plotly를 사용한 게이지 차트 (Gauge Chart) 생성 예제 (Python Code)
"""
import plotly.graph_objects as go
import plotly.offline as pyo
# --- 게이지 차트 데이터 설정 ---
value = 75 # 현재 값 (예: 판매 목표 달성률 75%)
max_value = 100 # 최대 값
title_text = "판매 목표 달성률"
unit_text = "%"
# --- Plotly Indicator 객체 생성 ---
fig = go.Figure(go.Indicator(
mode = "gauge+number+delta", # 게이지, 숫자, 델타(변화량)를 표시
value = value,
number = {'suffix': unit_text}, # 숫자 뒤에 단위 표시
domain = {'x': [0, 1], 'y': [0, 1]},
title = {'text': title_text, 'font': {'size': 24}},
# --- 게이지 설정 ---
gauge = {
'shape': "angular", # 게이지 모양 (angular: 원형, bullet: 수평 막대)
'axis': {'range': [None, max_value], 'tickwidth': 1, 'tickcolor': "darkblue"},
'bar': {'color': "darkblue"}, # 현재 값 막대의 색상
'bgcolor': "white",
'borderwidth': 2,
'bordercolor': "gray",
# --- 구간별 색상 설정 (Thresholds) ---
'steps': [
{'range': [0, 50], 'color': "lightgray"}, # 0% ~ 50%
{'range': [50, 85], 'color': "lightblue"}, # 50% ~ 85%
{'range': [85, 100], 'color': "yellowgreen"} # 85% ~ 100% (목표 근접/달성)
],
# --- 목표선 설정 (Threshold) ---
'threshold': {
'line': {'color': "red", 'width': 4},
'thickness': 0.75, # 목표선의 두께
'value': 90 # 목표 값 (예: 90%)
}
}
))
# --- 레이아웃 설정 ---
fig.update_layout(
paper_bgcolor = "white", # 배경 색상
font = {'color': "black", 'family': "Arial"},
margin = dict(l=20, r=20, t=50, b=20) # 여백 설정
)
# --- 차트 출력 (브라우저에서 확인) ---
# pyo.plot(fig, filename='gauge_chart.html')
# --- (선택 사항) Notebook 환경에서 출력 ---
fig.show()| [python] asciichartpy - 터미널(콘솔) 환경에 깔끔하고 읽기 쉬운 텍스트 기반의 ASCII 아트 그래프를 그려주는 라이브러리 (0) | 2025.10.22 |
|---|---|
| [PYTHON] Python 3.14.0 정식 버전 출시 🐍 (0) | 2025.10.13 |
| [PYTHON] ASCII 배너 생성 프로그램 (Python Code) (0) | 2025.10.01 |
| [python] Faker 라이브러리로 Dummy 데이터 만들기 (0) | 2025.09.25 |
| [python] voronoi diagram for generative geometry using python (0) | 2025.09.18 |
체온이 섭씨 0.5도 내려가면
면역력은 35%나 낮아진다고 한다.
체온이 저하되면서 효소의 활성도가 약해지기
때문이다. 최근 연구에 따르면 암세포는 체온이
섭씨 35도일 때 가장 활성화된다고 한다. 평균 체온
섭씨 35도인 저체온의 사람들이 젊은 여성을 중심으로
늘어나고 있다. 체온이 낮으면 병에 걸리기 쉬울 뿐
아니라 노화가 진행되는 속도도 빨라진다는
사실을 명심해야 한다.
- 신야 히로미의《불로장생 탑 시크릿 Top secret》중에서 -
* 체온은 우리 몸의 나침판입니다.
평균 체온인 36.5도에서 1도만 높아도 코로나 검사를
받아야 하고, 1도만 낮아도 암 검사를 받아야 합니다.
단지 여성만의 문제는 아닙니다. 몸이 차가운 사람들이
많아지고 있습니다. 첫 증상은 손발이 차가워지는 것이고,
다음은 배, 특히 아랫배와 하초 부위가 얼음장처럼 차가워져
소화불량, 변비 등 만병의 원인이 되고 있습니다.
정상 체온을 유지하는 방법은 간단합니다.
적당한 운동, 특히 유산소 운동을
꾸준히 하는 것입니다.

| 바보 (0) | 2025.10.20 |
|---|---|
| '거대한 가속'의 시대 (0) | 2025.10.17 |
| 길만큼 좋은 스승은 없다 (0) | 2025.10.15 |
| 집단지성이 필요한 이유 (0) | 2025.10.14 |
| 서점 문화운동 (0) | 2025.10.13 |