Commit Graph
2346 Commits
Author SHA1 Message Date
aliaegikandRubén Rincón Blanco 91334b9d9b New Language: C3 (#5086)
Related to: https://github.com/compiler-explorer/infra/pull/1017

C3 is a system programming language based on C. It is an evolution of C
enabling the same paradigms and retaining the same syntax as far as
possible.

Design Principles:
Procedural "get things done"-type of language.
Try to stay close to C - only change what's really necessary.
C ABI compatibility and excellent C integration.
Learning C3 should be easy for a C programmer.
Data is inert.
Avoid "big ideas" & the "more is better" fallacy.
Introduce some higher level conveniences where the value is great.

You can try it out live on its tutorial website:
https://www.learn-c3.org
Source code: https://github.com/c3lang/c3c

---------

Co-authored-by: Rubén Rincón Blanco <git@rinconblanco.es>
2023-06-02 08:08:57 -05:00
Jeremy Rifkin 794a350a9e Add something to the context menu in place of paste when not supported (#5081)
In case anyone asks why "Paste" is missing from the context menu in the
future:


![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/32070502-fa17-44e3-ba5c-8924294b7e74)

Paste is present in chrome and other browsers that support the clipboard
api, just not firefox. This should change upstream some day.
https://github.com/microsoft/vscode/blob/1052813be23485fd9c17ac77b517241479c21142/src/vs/editor/contrib/clipboard/browser/clipboard.ts#L27-L30

Closes #3113
2023-05-30 21:19:06 -05:00
Jeremy RifkinandMatt Godbolt edcacc0272 Better compiler argument warnings handling (#5076)
The goal of this PR is to display any warnings about compiler arguments,
e.g. the warning about -march=native, somewhere else instead of a toast
notification every time. Feature requested on discord.


![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/40a0c670-b2bb-4fae-b98d-937dbeb7d2e6)

![Animation](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/43575608-daa6-487d-9ef9-ca04bdd38a38)

![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/551e26e5-1e4f-4802-a68a-fb63e0e5e415)

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-05-30 21:18:09 -05:00
Jeremy Rifkin 0bc22f8883 Egregiously overengineered fix for a niche UI bug (#5074)
Fixes #4714
2023-05-30 21:11:21 -05:00
Jeremy Rifkin 0364ef87ad Use a discriminated union for the ConfiguredOverride type (#5075)
Closes #5054
2023-05-25 13:10:54 -04:00
fodinaborandMatt Godbolt e28e67d972 Add new "Debug intrinsics" filter. (#5045)
For now, this removes all `llvm.dbg.*` calls from LLVM IR. This is
useful to keep coloring the line correspondence between source and IR,
while not polluting the IR with the debug intrinsics.

Admittedly, I don't have much of a clue of what's going on here, so I
might be missing obvious adaptions (e.g. can we disable this for all
non-LLVM compilers for now somehow?).
Also, not really a Node.JS testing wizard either... 🤷🏼 

Just wanted this really bad for a workshop that's coming up soon ^^

Only tested with my system's default `clang` for now.

Fixes #5044

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-05-22 22:35:01 -05:00
Johel Ernesto Guerrero Peña c2c5ffd458 feat: parse Cpp2 to highlight it (#5061)
This is the follow-up to #5027.
The test cases: <https://highlight-cpp2.godbolt.org/z/qrqYPvaWE>.

<details><summary>Preview</summary>


![1684378584](https://github.com/compiler-explorer/compiler-explorer/assets/21071787/8fcac705-880c-4ad0-bce9-4c28fe9f0359)

</details>
2023-05-22 22:34:36 -05:00
Patrick Quist 44a8011571 min width spon thing (#5072)
only tested manually in chrome, not by running CE
2023-05-22 22:23:31 -05:00
Jeremy Rifkin 476b983a45 Better tab width handling (#5066)
Fixes #4877
2023-05-22 22:17:16 -05:00
Jeremy Rifkin ad6aa98284 Make compiler full version tooltips scrollable (#5067)
Fixes #4816
2023-05-22 12:19:54 -04:00
Jeremy Rifkin 22fa0511e4 Fix warning detection for wine msvc (#5068)
Fixes #4809
2023-05-22 12:19:38 -04:00
Patrick Quist 079d495757 Compiler overrides (#5001) 2023-05-16 03:53:57 +02:00
Siyao (Jane) He d784a48c33 Add feature to save assembly output on Ctrl+s (#5041) 2023-05-15 13:52:35 +02:00
Siyao (Jane) He 514c3c763f Assembly syntax highlight of comments after code (#5046)
Solving the issue #4876 @jeremy-rifkin 
![Screenshot 2023-05-11 at 9 44 19
AM](https://github.com/compiler-explorer/compiler-explorer/assets/113857408/742c610b-632e-4e8a-a533-082abbbd6e51)
2023-05-14 14:55:37 -04:00
Johel Ernesto Guerrero Peña c76b16ef69 lang(cpp2): improve highlighting (#5027) 2023-05-09 19:18:57 +02:00
Patrick Quist 675b428846 Fix drag source component state creation in compiler pane (#5000) 2023-04-27 17:49:07 +02:00
Jeremy Rifkinandmmozeiko 2800d90be8 Set maxOptions for the language select (#4991)
Fixes #4988, haven't tested locally as I don't have >50 languages
installed locally

Co-authored-by: mmozeiko <martins.mozeiko@gmail.com>
2023-04-24 16:42:24 -04:00
Patrick Quist b262531cdd Offer timetrace json to view somewhere (#4967) 2023-04-23 11:29:52 +02:00
Matt Godbolt 362ebf7a57 npm update and bump; run all the formatters and linters (#4984) 2023-04-21 18:25:57 -05:00
Patrick Quist 3154327800 Device view diff (#4973) 2023-04-19 23:20:31 +02:00
partouf 458f3446be #4976 do compile when done initializing 2023-04-19 22:41:03 +02:00
Patrick Quist 4f0f64943a defer compilation by when still loading panes (#4976) 2023-04-19 22:06:48 +02:00
Patrick Quist e57ba99ce7 chart version migration fix (#4969) 2023-04-19 22:01:14 +02:00
Patrick Quist a0e42db400 Basic CMake support for CUDA (#4286) 2023-04-18 15:21:17 +02:00
David Hewitt a7da7e83c4 Add the Vala programming language (#4955)
See https://gitlab.gnome.org/GNOME/vala/ for the language repository.

> Vala is a programming language that aims to bring modern programming
language features to GNOME developers without imposing any additional
runtime requirements and without using a different ABI compared to
applications and libraries written in C.
> 
> `valac`, the Vala compiler, is a self-hosting compiler that translates
Vala source code into C source and header files. It uses the GObject
type system to create classes and interfaces declared in the Vala source
code.
> 
> The syntax of Vala is similar to C#, modified to better fit the
GObject type system.

I've also created https://github.com/davidmhewitt/vala-builder based on
https://github.com/compiler-explorer/python-builder and tested that it
can build tarballs of arbitrary versions of Vala. I'd be happy to
transfer the ownership of this repository, or feel free to clone it into
the `compiler-explorer` org.

However, I'm a little unsure of how to join up the pieces and get this
Docker builder integrated with the `infra` repository. Let me know where
to go next and I'd be happy to open the relevant PRs.
2023-04-10 22:47:49 -05:00
Patrick Quist d9030cf41e fix url includes for files used in tree (#4937) 2023-04-03 23:14:57 +02:00
Jeremy Rifkin 4878402b53 A few pink mode fixes (#4935)
Fix selection, set a pink selection color, fix executor stdout, and fix
the cursor position indicator.

Resolves #4926, resolves #4933
2023-04-03 12:25:06 -04:00
Jeremy Rifkin 55b82bb12c Turn off april fools mode (#4927)
This PR has the changes to remove the pink banner once we are ready to do so
2023-04-02 19:31:46 -05:00
Matt Godbolt 54a99f6d51 Upgrade all minor versions; format; bump sonar and css minimizer (#4920) 2023-04-01 20:29:06 -05:00
Jeremy RifkinandMatt Godbolt e93fc860fe Add a close button for the "Now in pink" banner (#4919)
![image](https://user-images.githubusercontent.com/51220084/229311841-9183d8cd-c24d-404c-bbf4-2caa8b45f7c8.png)

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-04-01 16:29:28 -04:00
Jeremy c8b8733f84 Templates and a quick fix 2023-04-01 01:35:51 -04:00
Jeremy Rifkin 5d8d39f136 Pink (#4916) 2023-04-01 00:52:27 -04:00
Jeremy Rifkin 01935ecb2a Ensure a default language is provided for new editor panes (#4890)
Fixes #4889
2023-03-20 17:03:42 -04:00
Jeremy Rifkin 69568af990 Fix issue with all alert popups being red (#4891)
All alertSystem.alert popups have a red border at the moment, even when
isError is not set to true
2023-03-20 17:03:13 -04:00
Jeremy Rifkin 7a105ad0d0 Capture info to help triage an issue #4868 (#4871)
Trying to figure out #4868, unless anyone has an idea how to repro
locally
2023-03-13 12:06:47 -06:00
Jeremy Rifkin 53567c97ce Add a boundary check for the compiler context menu handler (#4870)
Fixes #4415
2023-03-13 12:06:23 -06:00
Jeremy Rifkin ca4ab7148b Give an error when no editor language is specified (#4864)
Following discussion at #4817 and with partouf/matt. An editor's
state.lang being undefined should probably always be an error since
it'll be susceptible to the same default language shenanigans.

Closes #4817
2023-03-12 19:40:12 -04:00
Matt Godbolt 515c130300 Make bracket colourisation configurable. (#4863)
See microsoft/monaco-editor#3013 for ways this can be improved in future
2023-03-12 16:25:34 -05:00
Jeremy Rifkin 6b31ec8baf Address lzstring decompress failure (#4859)
Fixes #4555. Might also address #4817.
2023-03-12 17:09:17 -04:00
Jeremy RifkinandMatt Godbolt 55dc09017e Compiler Picker UI Improvements (#4849)
Alrighty, round 2!

This PR makes the compiler picker dropdown taller (max height is to the
bottom of the screen)

![image](https://user-images.githubusercontent.com/51220084/224517409-17706ba6-fe85-444a-ad3b-f244f66eea5b.png)

I've added a toolbar button for opening the popout as well as a button
when the dropdown is open:


![image](https://user-images.githubusercontent.com/51220084/224517304-6478fca5-7bc1-4f87-b2ae-e9091d7d48bc.png)

![image](https://user-images.githubusercontent.com/51220084/224517317-83468805-1e9d-4bc6-8a4f-8786325f1e7b.png)

Then the modal interface allows text searching, filtering by compiler
category, and filtering by compiler instruction set. In the future I'd
like to replace the instructionSet property with an architecture
property so the filtering here can be a little better.


![image](https://user-images.githubusercontent.com/51220084/224517348-9cf40866-c5af-4274-84ba-21eb640ab2ea.png)

Demo of the category filtering:


![image](https://user-images.githubusercontent.com/51220084/224517529-5370b3f9-9ad3-4340-838a-b2d0a47c7467.png)

The text filtering highlights results the same as tomselect does:


![image](https://user-images.githubusercontent.com/51220084/224517490-d0dfa6d0-9b61-4be4-8cc7-ca4a4729a532.png)

I moved the favorites permanently to their own column so compilers
aren't jarringly shifted around the screen when favoriting /
unfavoriting.

Also added media queries so the modal looks ok on smaller screens:


![image](https://user-images.githubusercontent.com/51220084/224517563-bdf409c1-7e3a-4c73-812b-f02179b55799.png)


![image](https://user-images.githubusercontent.com/51220084/224517574-07fa2c8b-67d2-496d-9174-b1343e22bd62.png)

I think the only other two changes from the first PR are now the active
compiler is highlighted like it is in the tomselect dropdown and I
figured out how to reliably focus the search bar on modal open. (Oh, and
now clicking a compiler actually does something!)

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-03-12 17:07:44 -04:00
Jeremy Rifkin bbabd514a5 Update error alert styling (#4860)
![image](https://user-images.githubusercontent.com/51220084/224565888-e0b98abf-6e1c-4914-8695-b31a2275b364.png)
2023-03-12 17:03:36 -04:00
Matt Godbolt 14eb2b0802 Bump to latest LRU library and use new clear() method (#4852)
Tested locally; read release notes, all seems good.
2023-03-12 12:58:52 -05:00
Matt Godbolt 82b1ca9cce Bump to latest monaco (#4854)
Fixes #4355
2023-03-12 12:58:22 -05:00
Matt Godbolt 3461db6c19 Bump all minor versions - npm update; also bump webpack version speculatively... (#4851)
also npm lint and format to make sure any changes turn up.
2023-03-12 11:29:57 -05:00
Matt Godbolt 231ac3a38d Upgrade LRU-Cache (#4833)
- rephrase a few LRUs in terms of the new API
- add `okToCache` to the `CompilationResult` to make typing more correct
(I _think_)
2023-03-11 14:18:04 -06:00
Patrick Quist 8f118a22c3 Add default cmake arg (#4830) 2023-03-11 14:18:04 -06:00
Jeremy Rifkin 8cb2e22605 More work needed, thanks for the comments Ruben and Matt! :)
Revert "Compiler picker UI improvements (#4789)"

This reverts commit d4a8c2bdb2.
2023-03-11 14:18:03 -06:00
Jeremy Rifkin 46a4d6e0f8 Compiler picker UI improvements (#4789)
Makes the compiler picker dropdown a bit taller, prevents the dropdown from overflowing the page, and also adds a compiler picker popup
2023-03-11 14:18:03 -06:00
wxwisiasdf d4623e907c Duplicate COBOL regex matching fix 2023-03-02 22:33:26 +08:00
wxwisiasdf 0e6158b824 Fix COBOL regex issues 2023-03-02 13:52:31 +08:00