#const

2025-11-15

Обзор утилиты TunerPro

TunerPRO это бесплатный бинарный редактор прошивок. Это аналог STM32Studio. Эта программа позволит вам редактировать константы в готовом bin файле. Минуя стадию повторной пере сборки всего проекта прошивки. Можно сказать, что TunerPRO хакерская tool-а. Эта утилита связывает в едино всю информацию про переменные. Это адрес ячейки памяти в bin-аре, размерность переменной, размер параметра, формат ее хранения в памяти, имя переменной, множитель, единицу измерения, максимальное и минимальное значение. В то время как map файл дает только инфу про имя адрес в памяти и размер.

habr.com/ru/articles/965828/

#TunerPro #STM32Studio #bin #xdf #Tuner_PRO #stm32 #const #volatile #volatile_const #flashпамять

2025-09-18

И ещё немного про то, что const в dart надо ставить где попало

В статье рассказал про случай из реальной жизни, когда использование const и линтера на него помогли бы мне сэкономить полдня рабочего времени и сохранить нервы

habr.com/ru/articles/948074/

#Flutter #dart #dartdefine #const

:rss: Qiita - 人気の記事qiita@rss-mstdn.studiofreesia.com
2025-04-07

関数スコープとブロックスコープ (PHPはなぜ var, let, const がない?アロー関数はブロックがない?)
qiita.com/Jim_Jin/items/8135b4

#qiita #PHP #変数 #スコープ #const #アロー関数

GripNewsGripNews
2025-04-06

🌘 C 字串常數是否應設為 const?
➤ 評估 C2y 標準中字串常數 const 限制的影響
gustedt.wordpress.com/2025/04/
Jens Gustedt 的部落格文章探討了在 C2y 標準中,是否應將字串常數的類型改為 const-qualified 的基本類型,如同 C++ 所做的一樣。雖然編譯器早已支援此功能,甚至有些預設啟用,但這仍屬於標準規範的變更,可能對現有程式碼造成影響。作者呼籲社羣提供回饋,特別是那些已經使用相關選項(如 gcc 的 -Wwrite-strings)或測試過此變更影響的專案,以便評估此變更的影響程度。作者強調需要的是實際數據而非主觀意見,並要求提供專案的相關資訊。
+ 「這個改變聽起來很有道理,能更早發現潛在的錯誤,但不知道會不會影響到一些舊的程式碼。」
+ 「我很好奇有多少專案實際上會受到影響,而且需要花費多少精力來適應這個變更。」
程式語言 限制

silkysoft fluffything :vivi_sit: 🍮 [Viridi Vix]vivi@arff.archandle.net
2025-01-24

@katlyn generic as can be :neofox_floof: it's still in theory & planning but i'd like to make something somewhere between a mix of Jai and Kotlin, essentially a quite low level language with a syntax more typical of a high level language.

There are a couple neat features that I plan on having, one is automatic callsite syntax variants for functions, where a function definition func(a, b) can be called in any supported syntax style; procedural (func(a, b)), OOP (a.func(b)), infix if it has exactly 2 arguments (a func b), etc.

Functions are first-class members (now that i've touched a language with it, I can't stand any language without it) and can appear in any place any other variable may appear

Here's a bit of sample for my ideas so far

//Syntax not final

numberOfBoops: Int = 1234 //Mutable variable declared and re-declared with = operator
numberOfBoops = 999999 //Cannot redeclare type
millionBoops = numberOfBoops + 1 //Type specification optional; when not specified, type will be inferred as narrowest type returned by expression (here, Int)

billionBoops: Int := 1000000000 //Immutable declarations use := operator
billionBoops = 1 //Compile error, cannot reassign immutable declaration

PI: Double #const := 3.14159265359 //'const' declarations may be optimized by compiler to inline at use-sites instead of appearing in heap memory
TAU #const := PI * 2.0 //Type is optional for all declarations; will be inferred as the narrowest type of the expression (here being a Double)

myCoolNumber: Int //uninitialized variable, must be initialized before appearing in any read position

main := () { /*statements*/ } //skeleton of function declaration syntax. No return type
getCoolNumber := () -> Int { return 420 } //function with return type

myCoolNumber = getCoolNumber() //initialize previously uninitialized variable, now it can be used

plus := (a: Int, b: Int) -> Int { a + b } //function with parameters and return type; 'return' may be omitted if last expression of function scope is of return type
myCoolerNumber := myCoolNumber plus 69 //infix call to 'plus'. Immutable declarations can be made from mutable expressions

myCoolestNumber: Int #const := myCoolerNumber + 1337 //Compile error, const declarations can only be constructed with literals and other const expressions

fold := <T, E>(elements: Iterable<E>, initial: T, op: (T, E) -> T) -> T { //function declaration with generic types T and E
accumulator = initial //Function parameters are always immutable, redeclare 'initial' with mutable variable
itr := elements.iterator() //function 'iterator := <E>(Iterable<E>) -> Iterator<E>' defined in Iterable class
while(itr.hasNext()) {
item := itr.next() //Immutable variables can be defined once per iteration of any scope ({}) so 'item' may be immutable here
accumulator = accumulator op item //Infix notation of 'op' function
}
return accumulator
}

sum := (values: Iterable<Int>)[fold, plus] -> Int { //optional brackets is a closure: if present, only variables in wider scope listed inside brackets may be referenced (here being the 'fold' and 'plus' function)
return values.fold(0, (acc, next){acc plus next}) //anonymous function provided as 'op' first-class function parameter to 'fold' function. Parameter types and return type inferred by 'fold' declaration
}
2024-05-21

Theo on const vs let in #JavaScript:

youtu.be/dqmtzHB2zTM (32 min).

It's a long video, and he's basically only reacting to and commenting on Let me be epicweb.dev/talks/let-me-be (12 min) by Ryan Florence.

Theo's main point is that const doesn't mean "this value will never change" (since objects and arrays can obviously still be mutated), but that let means "pay attention, this value will be reassigned further down", and I totally agree.

#const #let

pablolarahpablolarah
2024-05-07

🟪🟥 JavaScript var, let, and const explained
by Kevin Powell @KevinJPowell
Feat.: Chris Ferdinandi @ChrisFerdinandi @cferdinandi

youtube.com/watch?v=pobWEaHNChY

Pictures of Kevin Powell (right) & Chris Ferdinandi (left) with cyan text on blue rounded borders rectangles in dark green blue with gradient violet magenta background: var let const.
Overlaid white text: explained.
Gradient violet magenta background.
🧿🪬🍄🌈🎮💻🚲🥓🎃💀🏴🛻🇺🇸schizanon
2024-05-07

"People who don't understand how objects work in JavaScript might be confused by it" is the worst reason not to use `const`

moved to @amanjeev@hachyderm.ioamanjeev@mstdn.ca
2024-01-08

fact: #rustlang #const stuff moves slowly because it is short for constipation

2023-09-25

Global News BC: ‘I’ll miss him forever’: B.C. teacher remembers fallen RCMP officer globalnews.ca/news/9982550/bc- #globalnews #britishcolumbia #news #RidgeMeadowsRCMPOfficerKilled #Const.RickO’Brien #RidgeMeadowsRCMP #RickO’Brien #Canada

2023-07-17

Global News BC: Vernon, B.C. man accused in string of suspicious fires globalnews.ca/news/9837513/ver #globalnews #britishcolumbia #news #3400-blockof30thAvenue #Const.ChrisTerleski #SuspiciousFires #RomanRoyOoley #30thavenue #Vernon #Crime #Arson #Fire

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst