نمیدانم – Telegram
1
نمیدانم
Photo
یعنی ادم حتی یه ترمینالم نمیتونه توی این زباله بریزه
👍2
یعنی این کمیته نابغه cpp یه api درست درمون نمیتونن آماده کنن
آخه این یعنی چی خداوکیلی
یکی بیاد به من توضیح بده که
bool && string
یعنی چی 😐
خب بدیهیه که ملت میرن راست و زیگ و هزار تا زبون دیگه میسازن و استفاده میکنن
فک کن مثلا میخوای یه کامپایل عادی بکنی توی ویندوز
و ۸۰ درصد پردازنده رو بقیه چرندیات گرفتن
و کامپایلر بدبخت داره ضجه میزنه ۲۰ درصد پردازنده رو دادن بهش
Forwarded from Programmer Jokes
Programmer Jokes
Photo
صحبت کردن در مورد این دوست عزیز خیییلی میتونه جذاب باشه
#zig #comptime
const std = @import("std");
fn ComptimeArrayList(T: type) type {
return struct {
__total_mem: []T,
__size: usize,
const Arr = @This();
fn init() Arr {
var new_mem: [1]T = undefined;
return .{
.__size = 0,
.__total_mem = new_mem[0..],
};
}
fn append(comptime self: *Arr, comptime item: T) void {
if (self.__size == self.__total_mem.len) {
var new_mem: [self.__total_mem.len * 2]T = undefined;
@memcpy(new_mem[0..self.__total_mem.len], self.__total_mem);
new_mem[self.__size] = item;

self.__total_mem = new_mem[0..];
self.__size += 1;
} else {
self.__total_mem[self.__size] = item;
self.__size += 1;
}
}
fn items(self: *Arr) []T {
return self.__total_mem[0..self.__size];
}
fn finalize(comptime self: *Arr) [self.__size]T {
var result_mem: [self.__size]T = undefined;
@memcpy(result_mem[0..], self.__total_mem[0..self.__size]);
return result_mem;
}
};
}
pub fn main() !void {
comptime var arr = ComptimeArrayList(i32).init();
comptime {
arr.append(1);
arr.append(2);
arr.append(3);
arr.append(4);
arr.append(5);
}
const result = comptime arr.finalize();
for (result) |x| {
std.debug.print("{} ", .{x});
}
std.debug.print("\n", .{});
}


خب خب خب
من تا چند وقت پیش فک میکردم نمیشه مثلا یه چیز ArrayList طوری توی کامپتایم زیگ درست کرد
ولی امشب خیلی تصادفی به این بنده خدا برخوردم :
https://github.com/ziglibs/computils/blob/master/src/comptime_array_list.zig
که خب خیییلی کد قدیمی ایه و احتمالا هم کار نمیکنه
ولی خب ایده گرفتم ازش و کد بالارو زدم

اگه حال داشتید میتونید خودتون اجرا کنید
ولی اون بالا رسما یه پیاده سازی آرایه قابل گسترشیه که توی زمان کامپایل میتونه گسترش پیدا بکنه
و در نهایت وقتی کارمون زمان کامپایل تموم شد میتونیم آرایه رو نهایی بکنیم و از اونجا به بعد دیگه میتونه توی زمان اجرا هم استفاده بشه
🔥1
نمیدانم
#zig #comptime const std = @import("std"); fn ComptimeArrayList(T: type) type { return struct { __total_mem: []T, __size: usize, const Arr = @This(); fn init() Arr { var new_mem: [1]T = undefined; …
البته اینم بگم که یه proposal برای تخصیص دهنده های امن زمان کامپایل وجود داره که هنوز کارش انجام نشده ولی این حقه هه کار میکنه
#zig
یه کتابخونه چند بستری نیاز داشتم برای این پنجره های انتخاب فایل و پوشه توی زیگ
یکی بود ولی بر مبنی یه نسخه قدیمی یه پروژه c بود و یکی دیگم بود که برمبنی نسخه جدید همون پروژه هه بود ولی هیچی نداشت عملا
امروز نشستم و اونو کاملش کردم
https://github.com/MahdiGMK/nfde-zig
🔥5
یه چیز خنده دار دیگه بگم از ویندوز
نصاب VS (و همه جعبه ابزارای مایکروسافت) حداقل اندازه داره و باید نمایشگرت از یه اندازه ای بزرگتر باشه 😂
به جز اینم واقعا شاهکاره که یه کامپایلرو میخوای نصب کنی باید ۹۰۰ مگ دانلود کنی و ۴ گیگ حافظه بهش بدی
https://news.ycombinator1.com/item?id=46064571
پیرو مهاجرت زیگ از روی گیتهاب به طرف codeberg
منم کتابخونه هامو از این به بعد میبرم اونور
🔥5
Forwarded from Tensorflow(@CVision)
This media is not supported in your browser
VIEW IN TELEGRAM
نه بابا هوش مصنوعی قراره دنیارو بگیره.
🤣11
Tensorflow(@CVision)
نه بابا هوش مصنوعی قراره دنیارو بگیره.
از ته قلب میخوام که حباب للم ها بترکه و اینهمه آسیب که دارن به دنیا و اقتصاد میزنن متوقف بشه
https://www.youtube.com/watch?v=ERiXDhLHxmo
👍7👎2💩1
نمیدانم
https://www.youtube.com/watch?v=ERiXDhLHxmo
ولی حالا مستقل از اینکه با نظر من موافقید یا نه اینو ببینید
TechTube 𝕏 تک توب
در خبری بزرگ و به دنبال افزایش شدید قیمت رم، شرکت امریکایی Micron، سومین تولیدکننده بزرگ رم و چهارمین تولیدکننده بزرگ SSD در جهان، رسما اعلام کرده که از بازار مصرف کنندگان عادی خارج میشه و کل ظرفیت تولیدش رو به بازار پرسود دیتاسنتر و هوش مصنوعی اختصاص خواهد داد!

بدین صورت Micron، برند Crucial که در رمها و SSDهای ساخته شده برای خریداران عادی استفاده میشد رو بعد از 30 سال کنار میزاره، تا اوایل سال اینده فقط کانالهای فروش مصرف کنندگانش رو تامین خواهد کرد و بعد از اون به طور کامل از بازار مصرف کنندگان عادی خارج میشه و از اون بعد صرفا گارانتی و پشتیبانی از محصولات فعلی رو انجام خواهد داد.

با این تصمیم عملا بازار دست سامسونگ و SK hynix میافته که اونها هم پیش از این اعلام کرده بودن که قصد افزایش تولید ندارن و با کمبود عرضه، افزایش قیمت رم ممکن هست تا سال 2028 هم ادامه پیدا کنه.
با این خبر تیر دیگری به بازار غیر حوش زده شد
حالا ممکنه براتون سوال باشه که خب اینا چرا توی این بازار پرسود خب حجم تولیدو بیشتر کنن دیگه
۲ دلیل داره
۱. آدمای سامسونگ و هاینیکس و به طور کلی صنعت میدونن که این روند پایدار نمیمونه
۲. بازار رم یکی از ناپایدار ترین بازارا بین تمام قسمت های صنعت نیمه هادیه و بازیگراش پایداری رو ترجیح میدن و افزایش قیمت رم به اندازه کافی سودشون رو بالا میبره

این پایین سقوط های مختلف بازار DRAM رو مشاهده میکنید :

1. The First Major Crash (Mid-1980s)

Cause: In the early 1980s, many new players (especially Japanese companies) entered the market and invested heavily in fabrication plants (fabs). This led to massive overproduction.

Effect: A brutal price war ensued. Prices plummeted by up to 70%. Many U.S. manufacturers, including Intel, were driven out of the DRAM business entirely. The era of Japanese dominance began.

2. The Crisis of 1996-1998

Cause: A perfect storm of over-investment in new fabs (expecting endless Windows 95-driven PC demand) combined with the 1997 Asian Financial Crisis. Demand collapsed just as massive new supply came online.

Effect: DRAM prices fell by as much as 80%. This caused severe financial distress for almost all manufacturers. Samsung famously survived only by "counter-cyclical investment"—doubling down on production and R&D while others retrenched, a strategy that ultimately cemented its future dominance.

3. The Post-Dotcom Bust (2001-2002)

Cause: The collapse of the dot-com bubble led to a sharp reduction in IT spending. Servers and PC demand dried up, leaving DRAM makers with huge inventories.

Effect: Prices crashed again. The downturn was so severe that it led to major industry consolidation. For example, the Taiwanese DRAM industry was restructured, and the German company Infineon (later Qimonda) was severely weakened.

4. The Financial Crisis Collapse (2008-2009)

Cause: The global financial crisis caused a sudden stop in consumer and corporate electronics spending. PC shipments dropped sharply.

Effect: DRAM prices went into freefall. The DRAM spot price index dropped over 60% in a matter of months. This led to the bankruptcy of Qimonda (2009) and Elpida Memory of Japan eventually filing for bankruptcy in 2012 as a direct consequence of this period's debts and losses.

5. The 2011-2012 Downturn

Cause: Another case of overcapacity following investment in new technology (shift to 30nm processes) combined with weak PC demand and fallout from the 2011 Thailand floods, which disrupted the HDD supply chain and thus PC production.

Effect: Prices fell steadily throughout 2011, leading to significant losses for all players and the aforementioned bankruptcy of Elpida in early 2012. Elpida was later acquired by Micron.

The "New Stability" Era (Post-2013)
1🔥1