Questions tagged [semantics]

The study of meaning as it applies to programming languages

Semantics is the study of meaning. In computer programming, semantics refers to the relationships between symbols in a programming language, and how those symbols are combined and manipulated to produce a computing result.

Useful links

1650 questions
55
votes
1 answer

What does the colon dash ":-" mean in bash

The result is the one desired; after a bit of trial and error. I don't understand what the "2:-" and "3:-" do/mean. Can someone explain. #!/bin/bash pid=$(ps -ef | grep java | awk ' NR ==1 {print $2}') count=${2:-30} # defaults to 30…
Stelios
  • 952
  • 2
  • 9
  • 25
51
votes
1 answer

boost spirit semantic action parameters

in this article about boost spirit semantic actions it is mentioned that There are actually 2 more arguments being passed: the parser context and a reference to a boolean ‘hit’ parameter. The parser context is meaningful only if the…
lurscher
  • 23,085
  • 26
  • 113
  • 178
50
votes
6 answers

vs ?

What is the difference? Both of them emphasize the text. The tag shows text as italics, whereas makes text bold, is this the only difference?
Jitendra Vyas
  • 134,556
  • 218
  • 544
  • 822
49
votes
10 answers

What is the semantic web?

I've heard a lot about the semantic web but I'm still not exactly sure what it is. How will it be different to the web we know now?
Matthew James Taylor
  • 4,459
  • 5
  • 26
  • 32
49
votes
3 answers

What is exact meaning of "kitchen sink" in programming?

I read this word many time "Kitchen sink", mostly when i download something from github, there is folder with name "Kitchen sink". but i don't know exact meaning of this. Can anybody explain what is the meaning of Kitchen sink?
user5570620
46
votes
1 answer

If return a = return b then does a=b?

Can you prove that if return a = return b then a=b? When I use =, I mean in the laws and proofs sense, not the Eq class sense. Every monad that I know seems to satisfy this, and I can't think of a valid monad that wouldn't (Const a is a functor and…
PyRulez
  • 9,505
  • 9
  • 37
  • 82
46
votes
3 answers

Python: Semantic similarity score for Strings

Are there any libraries for computing semantic similarity scores for a pair of sentences ? I'm aware of WordNet's semantic database, and how I can generate the score for 2 words, but I'm looking for libraries that do all pre-processing tasks like…
user8472
  • 706
  • 1
  • 8
  • 16
45
votes
2 answers

What's the exact semantics of deleted member functions in C++11?

struct A { A(); A(const A&); A& operator =(const A&); A(A&&) = delete; A& operator =(A&&) = delete; }; struct B { B(); B(const B&); B& operator =(const B&); }; int main() { A a; a = A(); // error…
xmllmx
  • 33,981
  • 13
  • 121
  • 269
40
votes
1 answer

Why does this work? Illogical array access

A friend of mine is learning C++ for the first time, and sent me this snippet: int foo[] = { 3, 38, 38, 0, 19, 21, 3, 11, 19, 42 }; char bar[] = " abcdefghijklmnopqrstuvwxyz01234567890+-,.!?-_"; for (int i = 0; i < 10; ++i) { std::cout <<…
untitled8468927
  • 639
  • 4
  • 13
40
votes
9 answers

Are there any tools to visualize a RDF graph? (please include a screenshot)

I'm looking for a tool that will render a RDF graph in a reasonably useful graphic format. The primary purpose of the graphic format being inclusion into a PowerPoint slide or printing on a large plotter for management review. I am currently using…
Eric Schoonover
  • 44,080
  • 43
  • 148
  • 200
40
votes
15 answers

Is "map" a loop?

While answering this question, I came to realize that I was not sure whether Perl's map can be considered a loop or not? On one hand, it quacks/walks like a loop (does O(n) work, can be easily re-written by an equivalent loop, and sort of fits the…
DVK
  • 119,765
  • 29
  • 201
  • 317
39
votes
1 answer

Why would R use the "L" suffix to denote an integer?

In R we all know it is convenient for those times we want to ensure we are dealing with an integer to specify it using the "L" suffix like this: 1L # [1] 1 If we don't explicitly tell R we want an integer it will assume we meant to use a numeric…
Simon O'Hanlon
  • 54,383
  • 9
  • 127
  • 173
38
votes
8 answers

Frameworks vs. SDKs

What is the difference between a framework and an SDK? Take, for example, the MS platform SDK and the .NET framework. Both have API's, both hide their inner workings, and both provide functionality that may not be quickly/easily accessible…
Brian
  • 3,279
  • 4
  • 28
  • 41
38
votes
5 answers

Is it correct to nest HTML definition lists (
)?

Is it semantically correct to nest definition lists, or should they simply be a 'flat list of name/value pairs'. The specs don't seem to forbid it. Further to this question.
meleyal
  • 28,584
  • 22
  • 68
  • 77
38
votes
1 answer

Xcode 7 what is the view "semantic" storyboard setting?

I see that iOS9 and xCode7 introduced a new field called "semantic" into storyboard config. A google search did not reveal relevant results on top. What is the significance of the view semantic field?
Alex Stone
  • 41,555
  • 51
  • 213
  • 379