Posts filter


image_2025-03-09_02-22-58.png
220.1Kb
التصميم عم استوحيه من تطبيق DB Browser


the rewrite is going great btw


it was a one day thing




somebody on reddit got the full v0.dev system prompt

https://github.com/x1xhlol/v0-system-prompts-models-and-tools


fr


تقبل الله صلاتكم


تحتاج شيء من Steam ؟
ان كان لعبه او Item من الMarket

65% من السعر الرسمي
يعني لو الشيء بي 100$ تدفع 65$

ضيفني:
https://steamcommunity.com/id/BunJS/

وارسلي خاص مع الرابط:
@NotUsed
Crypto payments only


ByteDance/Tiktok dropped out a banger




Postgres
Postgres
Postgres
Postgres
Postgres
Postgres




Hint: 1 of 100 reasons why python sucks


What is the GIL?
Poll
  •   Global Interpreter Language
  •   Gate Initiation Lock
  •   Gate Interpretation Language
  •   Gate Interpreter Logarithm
  •   Global Interpreter Lock
10 votes


وشخصيا افضل تصميم الdefer statement باي scope مثل ZIG بدل الfunctions فقط مثل GO


بس عندك بلغات ثانيا مثل ZIG الdefer statement مش محدوده داخل function تقدر تنفذها داخل اي scope


Defer Statement ( defer )

بكل بساطه مجرد statement بتاخر تنفيذ expression حتى خروج النطاق أو الوظيفة المحيطة.

امثله في GO:
func example() {
defer fmt.Println("Will execute last")
fmt.Println("This executes first")
}
بعد ما يخلص الfunction راح تتنفذ الdefer statement.

مفيدًا لتنظيف الموارد (على سبيل المثال، إغلاق الملفات):
func readFile(filename string) {
file, err := os.Open(filename)
if err != nil {
fmt.Println("Error opening file:", err)
return
}
defer file.Close()

fmt.Println("Reading file:", filename)
}
بعد ما يطلع من الfunction راح تتنفذ الdefer statement و راح يسكر الملف

طبعا تقدر تنفذ اكثر من defer statement وراح يتنفذو حسب ترتيب LIFO.
func example() {
defer fmt.Println("Execute third last")
defer fmt.Println("Execute second last")
defer fmt.Println("Execute last last")
fmt.Println("This executes first")
}

بس بي GO هو محدود داخل الfunctions فقط وبيتنفذ بعد خروج الfunction


hello world.jpg
116.5Kb
PewDiePie is using arch btw as a ( Gamer )


Walrus Operator ( := )

اسمه Walrus لانه ييشبه حيوان فض البحر ( Walrus ) قاعد على جنبه.

هو بلاساس assignment expression يسمح لك تعين قيمه داخل expression. طبعا يعين قيمه ويرجعها بنفس الوقت لانه expression.

يساعدك في ترتيب الكود وقليل التكرار.
موجود في لغات عده وهذا مثال في بايثون:
nums = [99, 24, 35, 12, 52]
if (n := len(nums)) > 3:
print(f"The list is too long with {n} elements!")
while (line := input("Enter (or type 'quit' to exit): ")) != "quit":
print(f"You entered: {line}")


Which of the following is the Walrus Operator?
Poll
  •   +=
  •   -:
  •   =:
  •   =/
  •   /=
  •   :=
7 votes

20 last posts shown.