Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
43 views

Nodes: building a gcc_tree_node for a custom prograimming language compile and base on C++26 the modules are avilable the language using tab-block system every keyword start with '/' I want to ...
Adam Bekoudj's user avatar
0 votes
2 answers
164 views

I want to create a parser in C++ for my programming language. Its logic is a little different than usual, because I want to first organize tokens in blocks (such as expressions or IDs, that are ...
varevind's user avatar
2 votes
1 answer
29 views

I have the Nytril IDE installed and need to add a pie table to my document. I have looked through the tutorial but I am having trouble getting the table to appear. I tried this, but it doesn't work. ...
John Colbert's user avatar
3 votes
2 answers
212 views

So, I need to have an object implement two interfaces that both require a method with the same signature as each other, but different return types. Something like these two: interface FooPrinter { ...
Choosechee's user avatar
0 votes
1 answer
107 views

Is there a PEG parser for C language? Is there any list of programming languages with a PEG specification?
Vasileios Anagnostopoulos's user avatar
-2 votes
1 answer
91 views

I want make CRT (C, C++, Rust use CRT). For what? For my own compiler, i means which minimal suite of functions need for preparing main(argc, argv, envp, auxp, program_name, stack). How did I know ...
Tayler's user avatar
  • 15
1 vote
1 answer
109 views

I saw an article about the Result pattern on the official flutter site(https://docs.flutter.dev/app-architecture/design-patterns/result), and I thought it was a good structure, so I tried to apply it ...
asci's user avatar
  • 11
-1 votes
1 answer
143 views

I am working on my own language and wondering how other language do things. When I am using irb for example and just type a number like "5" I get: irb(main):001:0> 5 => 5 irb(main):003:...
Eric Seifert's user avatar
  • 2,032
0 votes
1 answer
67 views

I am making a program where I need to play files many times. When I play a file, it plays, but after 2 seconds the program closes with exit code -1073741819. Code: " from pydub import ...
CSER228's user avatar
0 votes
0 answers
25 views

In Lustre v6 syntax rules, there is a => expression Expression ::= ... | Expression => Expression ... It seems that => accepts 2 boolean operands and also returns ...
Mahler's user avatar
  • 466
1 vote
1 answer
55 views

I'm currently making a compiler that outputs bare LLVM-IR instructions and implementing variadic function calls. I have defined a println function that accepts a (format) string and variable amount of ...
johron's user avatar
  • 13
0 votes
1 answer
131 views

I'm currently working on programming language compiler that generated LLVM-IR. I'm not using any library for the emitting, so I'm just writing instructions to a file. The problem is mutable variables, ...
johron's user avatar
  • 13
0 votes
1 answer
72 views

In Python, everything is an object. I'm fine with this. If I inspect a list or even a float, I can see there is a class associated with that data. But at the end of the day, if I make an value x = 1, ...
Will Leeson's user avatar
0 votes
1 answer
91 views

I'm writing a programming language in Python, but I have a problem with the lexer function. I'll leave you the code, which is fully functional: import sys inputError = """ (!) Error. (...
Alessio Spinellino's user avatar
-2 votes
2 answers
1k views

I've been using Pine Script on TradingView to develop custom trading indicators, but I'm looking to explore other options. I'm particularly interested in languages and platforms that might offer more ...
Eugenio's user avatar
-1 votes
1 answer
65 views

I'm currently taking a course about programming languages and trying to solve the following question, given the code in SML syntax, assume SML using dynamic scoping, what would be the value of the ...
Newlearner826's user avatar
0 votes
1 answer
87 views

I was wondering how much potential performance of our current HW is unused due to higher level programming languages (here I consider C and C++ to be high level languages). Of course I know that it ...
Pan Mrož's user avatar
  • 101
-1 votes
1 answer
51 views

My question is if writing this line: float* array = malloc(3*sizeof(float)); Is equivalent of writing: float array[3]; If not, why? (i'm reaaally new to C) I noticed that when i try to manipulate the ...
Guilherme Cintra's user avatar
-3 votes
1 answer
100 views

I have a question regarding the sizeof() operator. If you can see my code below in the pic: When I used sizeof(command), it showed me that the number of bytes was equal to 28: When I counted by ...
Ziad Hawsawi's user avatar
0 votes
1 answer
228 views

What programming languages other than Python has the floor division as a single operator from the programmers' point of view? Why does it even exist? Please don't give me the answer of because it can! ...
stackoverblown's user avatar
1 vote
1 answer
119 views

I don't quite understand how printing (outputting to the screen) can be considered pure in a programming languages sense, but I was claimed to that such a concept exists in Haskell. You create an IO ()...
user129393192's user avatar
0 votes
0 answers
113 views

Here is a list length method: list_length([], 0). list_length([_|T], N) :- list_length(T, TN), N is TN + 1. If I query list_length(X, 1) and pass over the first answer, it infinite loops. Here's a ...
user129393192's user avatar
0 votes
1 answer
83 views

Consider this: list_length([], 0). list_length([H|T], N) :- list_length(T, N - 1). It doesn't give a compilation error, but it doesn't work. my thinking is: suppose i call list_length([1], N) we ...
user129393192's user avatar
0 votes
0 answers
67 views

in a problem using void solve(int index,string &s,vector<vector> &ans,vector &temp) passes all test cases where as void solve(int index,string s,vector<vector> &ans,vector &...
kingoftypos-'s user avatar
0 votes
1 answer
73 views

I'm working on a simple programming language, writing it from scratch, and using Flex and Bison. This language recognizes simple arithmetic expressions and imperative variable statements. I'm having a ...
André Rosa's user avatar
2 votes
1 answer
583 views

I have my own programming language, and I want to make it appear in the list of languages in a repository. However, I can't find any answers to this question in the documentation. Can someone please ...
risknu's user avatar
  • 13
0 votes
0 answers
28 views

When I declare a variable in, let's say C: int x; The compiler allocates memory, and assigns a memory address to that variable. When I reference the variable again, the compiler generates some ...
T. Feix's user avatar
  • 35
3 votes
1 answer
256 views

Our Programming Languages professor told us that: "In Ada, the return type of an overloaded function can be used to disambiguate calls (thus two overloaded functions can have the same parameters)&...
Elco's user avatar
  • 308
0 votes
2 answers
152 views

I'm working on a personal project just for fun, a new programming languages (just because there are not enough). I m going to make it run on JVM but I need to store some metadata in the compiled file. ...
rain 183's user avatar
0 votes
1 answer
119 views

In which programming languages is a conditional block (if) not syntactically different than a function invocation, including any "else" block of code to be executed in the false condition? ...
sondra.kinsey's user avatar
0 votes
1 answer
130 views

Recently, I have been interested in how Apache can support Python WSGI. After researching, I found out that there is a mod_python module, which is a shared library written in C. Furthermore, I also ...
Skipper's user avatar
  • 303
0 votes
1 answer
45 views

This really, really messed with me today. This is the most minimum working example I could get: array = [ 1, 2, 1, 3, 4 ] n = 3 ...
user129393192's user avatar
0 votes
0 answers
70 views

I'm making my own programming language. But now I want Intellij to highlight my new language and also - and that is very important for me - to collapse code blocks. What I mean by that is the ...
Zwerg's user avatar
  • 91
0 votes
1 answer
149 views

I'm trying to draw an environment diagram, as defined in SICP (see here), programmatically, such that a diagram will be associated with an evaluation of an expression. I'm testing Mermaid.js for that ...
Gino's user avatar
  • 913
1 vote
0 answers
114 views

I am writing a (most likely bottom-up) parser for a new general-purpose programming language. My parser takes in a stream of tokens. For completeness, here is the token_t. struct token_t { // Kind ...
Jose Fruan's user avatar
0 votes
1 answer
379 views

In Rust, a raw string literal (emphasis mine): ...start with the character U+0072 (r), followed by fewer than 256 of the character U+0023 (#) and a U+0022 (double-quote) character. The raw string ...
Ryan Waskiewicz's user avatar
0 votes
1 answer
40 views

I don't get behind the magic of these kind of calls, especially the second argument: [DllImport("Kernel32.dll", CharSet = CharSet.Auto)] The constructor of DllImport is called with two ...
kvirk's user avatar
  • 141
0 votes
0 answers
144 views

Here is a minimal example: int main (int argc, char **argv) {} and then % gcc main.c && otool -xv a.out a.out: (__TEXT,__text) section _main: 0000000100003f9e pushq %rbp 0000000100003f9f ...
user129393192's user avatar
1 vote
0 answers
132 views

I've thought about creating a programming language specifically for developing ECS, but I do not have enough experience to conclude whether or not it would be useful at all or not. Can anyone give me ...
quaivatsoi01's user avatar
0 votes
2 answers
868 views

The suggestions to allow arrow methods in Typescript have been rejected on the basis on "changing Javascript as language". How would it exactly change the language to have one less character ...
Anton Duzenko's user avatar
1 vote
2 answers
94 views

I am developing an online service with python. Since it is an ONLINE service, I do not want the service down under any circumstances. So I add lots of try.. except... to make sure that if anything bad ...
Cino's user avatar
  • 93
1 vote
1 answer
201 views

I am learning about programming languages and trying to learn about the design principles behind them. Below is code for C and Golang for a simple test of associativity and precedence. #include <...
Joe's user avatar
  • 41
0 votes
1 answer
142 views

I am trying to do continuation passing style for a simple programming language made with antlr. Typically you would have an eval procedure that takes as arguments the expression to be evaluated as ...
Plegeus's user avatar
  • 402
0 votes
0 answers
91 views

i have an xlsx file with some sheets. What I want to do, is to Programming a small GUI that read out 150 Cells show the user up to 50 inputboxes and take the inputboxes-Value into an other sheet. Is ...
TheRob87's user avatar
  • 146
1 vote
2 answers
130 views

I am reading The scheme programming language and seeing this example in continuation section: (((call/cc (lambda (k) k)) (lambda (x) x)) "HEY!") => "HEY!" I cannot figure out ...
happybzy's user avatar
4 votes
1 answer
1k views

I am creating a VS Code extension that supports a small proprietary language. One of the minimal requirements for it is to have a "Go To Definition" functionality for procedures only. Being ...
Nan Nanco's user avatar
1 vote
0 answers
88 views

This question is not specific to one programming language in particular, and perhaps intended to help someone who isn't formally trained in programming. I have always worked on my own and without any ...
Mikkel Rev's user avatar
6 votes
3 answers
925 views

In The C Programming Language, 2nd Edition, by authors Brian W. Kernighan and Dennis M. Ritchie, they talk about declarators and direct-declarators. The discussion starts in the book on p. 122 with ...
Joshua Ginn's user avatar
1 vote
0 answers
78 views

I'm implementing a JavaScript interpreter, and I can't figure out the details of binding functions to objects in JavaScript. A rudimentary example: const o = { x: 1, getX: function() { return ...
Adam Ruka's user avatar
  • 136
1 vote
0 answers
66 views

I'm studying programming language with ocw(stanford). x=0;\n\twhile (x < 10) { \n \tx++; \n } I understood that consecutive space,\n,\t count as one whitespace token. But in the lecture, it says ...
ignorant student's user avatar

1
2 3 4 5
82