Questions tagged [transpiler]

A transpiler is a compiler that translates the source code of one high-level programming language to the source code of another high-level programming language.

Transpilers are also known as compilers.

429 questions
-1
votes
1 answer

Including ECMA 5 script in IE8

Currently, I am using hls.js in my code to play hls streams. The original code is written in ECMA version 6 and then transpiled into ECMA 5 and places in the dist folder (above link). It works perfectly elsewhere. I don't plan to use any if the…
kosta
  • 4,302
  • 10
  • 50
  • 104
-2
votes
0 answers

How codewars works with different programming languages

I would like to know what mechanism helps codewars to work with solutions in different programming languages. For example, I can send a solution to the same kata in JS, Python, C++. How does it work? I can assume that the transpiler is used. (Maybe…
Sergei
  • 1
-2
votes
1 answer

Why does this Hilbert Curve implementation ported from C (from Wikipedia) seem to fail?

I found the following code for drawing Hilbert Curves on Wikipedia: //convert (x,y) to d int xy2d (int n, int x, int y) { int rx, ry, s, d=0; for (s=n/2; s>0; s/=2) { rx = (x & s) > 0; ry = (y & s) > 0; d += s * s *…
d33tah
  • 10,999
  • 13
  • 68
  • 158
-2
votes
1 answer

How can I understand all this rubbish in js.map files?

I know it's not crucial to being a good coder, but I am curious if someone knows and could explain what is going on in .js.map files. For example for this simple .ts file, import {bootstrap} from 'angular2/platform/browser'; import…
CodyBugstein
  • 21,984
  • 61
  • 207
  • 363
-3
votes
1 answer

Babel incorrect transformation of spread

Babel incorrectly converting/transpiling the following code const arr = [...new Set([1, 2, 3, 1])] into var arr = [].concat(new Set([1, 2, 3, 1])) The first returns a list of numbers, whereas the other returns a list of set(s) Is this a Babel…
laiqjafri
  • 1
  • 1
-3
votes
1 answer

is there any way to convert this python code into php

what i need to accomplish is to reach a way in which i can convert the basics on any python code into php functions and conditions and so on def BitmapHoles(strArr): bitmap = {} for i in range(len(strArr)): for j in…
-3
votes
2 answers

Are all JSON strings also syntactically valid Python string literals?

I am writing a JavaScript function that generates a Python program. Can I use JavaScript's JSON.stringify() on a string and expect a valid Python string every time or are there edge cases that mean I have to write my own toPythonString() function?
Boris Verkhovskiy
  • 14,854
  • 11
  • 100
  • 103
-3
votes
1 answer

Why is indentation important when analysing code?

I am getting an error while transpiling sass to css, "Line X: Inconsistent indentation: Y spaces were used for indentation, but the rest of the document was indented !Y spaces" Here is the error state of my sass code: header { margin: 50px; …
Bobstar89
  • 27
  • 6
-4
votes
1 answer

export default is not getting transpile while traspiling code using babel and webpack

I am building an application in which i m transpiling my es6 code to es5 to make it ready for browser. I am using "export default" for exporting any data/class for accessible in other files. But this "export default" is not working well. How can i…
Ahmad Raza
  • 21
  • 1
1 2 3
28
29