News for hackers. Stuff that matters.
Re:CINT – A C/C++ interpreter by batbomb on Monday November 16, 2015 @02:01PM (#10576327)
Please don't use CINT. It's good for a few things, specifically histograms, but too many grad student-years have been wasted on segfaults, stack overflows, and cryptic error messages. I haven't had the chance to use cling, but CINT will almost always bite you in the ass as soon as your code is non trivial.
Re:CINT – A C/C++ interpreter by CyberDildonics on Monday November 16, 2015 @02:50PM (#10576692)
CINT is old. Their new interpreter is called Cling and is based on LLVM.

There is also the Juce projucer which claims live C++11 on mac (and windows at some point). I haven't had a chance to use the live programming but at least the interface so far is slick.

Re:CINT – A C/C++ interpreter by ihnorton on Monday November 16, 2015 @03:57PM (#10577107)
People interested in CINT and Cling might also be interested in Cxx.jl: https://github.com/Keno/Cxx.jl. It provides a C++ REPL mode for Julia and integrates Clang with Julia and the LLVM JIT to provide a powerful C++ FFI (the author has started using to wrap ROOT).
Re:CINT – A C/C++ interpreter by icholy on Monday November 16, 2015 @03:15PM (#10576844)
I can't wait for Autocompletion support in cling.
Re:CINT – A C/C++ interpreter by ics on Monday November 16, 2015 @01:47PM (#10576223)
OT: Check out that layout! Chrome 46/OS X took >4s to resolve the boxes, borders, and positions in steps making it look like a low-frame animation. The HTML is just shy of 300 lines but apparently tables with styles on every cell can still do that.
Re:CINT – A C/C++ interpreter by anonova on Monday November 16, 2015 @03:19PM (#10576867)
It's not a layout issue. There are 50+ tiny requests for images of the background and borders. If anything, this shows the reason to use css sprites.
Re:CINT – A C/C++ interpreter by icholy on Monday November 16, 2015 @01:48PM (#10576229)
I think CINT was superseded by cling.
Re:CINT – A C/C++ interpreter by zx2c4 on Monday November 16, 2015 @01:58PM (#10576308)
Does cling support a C99 or C11 mode?

A lot of times, for C development and related endeavors, I want to quickly determine the size of a struct or do some quick tests with strange arithmetic or casting or whatever else. Usually I just write a tiny test program, compile it, run it, and look at my printf output. This is pretty slow though. Having a C REPL would be quite nice.

It would be nice to see a wrapper around GCC that does this, for, say, a kernel source REPL.

Re:CINT – A C/C++ interpreter by CyberDildonics on Monday November 16, 2015 @02:53PM (#10576717)
The best way might be to use TinyCC.

You can compile C to a byte array, cast it to a function and run it.

I don't know of any REPL so far though (which is surprising).

Re:CINT – A C/C++ interpreter by i336_ on Wednesday November 18, 2015 @12:49AM (#10586174)

  $ git clone https://github.com/zsaleeba/picoc
  ...
  Receiving objects: 100% (3305/3305), 1.29 MiB | 0 bytes/s, done.
  ...
  $ make
  ...
  $ ./picoc -i
  starting picoc v2.2 beta r
  picoc> int i = 1;
  picoc> printf("%d\n", i);
  1
  picoc> printf("%d\n", sizeof(i));
  4
  picoc> 
You might need to nuke the -DVER in the CFLAGS (this code hasn't changed since it was ported from Google Code, which uses svn, but there's no .svn in the dir anymore, so it breaks). I also needed libreadline6-dev.

Oh, and to make things easier, a clickable link: https://github.com/zsaleeba/picoc

Re:CINT – A C/C++ interpreter by cozzyd on Monday November 16, 2015 @06:26PM (#10578098)
Not sure I would trust CINT to pad structs the same way as your compiler.
Re:CINT – A C/C++ interpreter by i336_ on Wednesday November 18, 2015 @12:50AM (#10586180)
About a very simple C REPL, see my comment reply to CyberDildonics.
Re:CINT – A C/C++ interpreter by icholy on Monday November 16, 2015 @02:50PM (#10576689)
AFAIK, it's only C++.

EDIT: you can pass it the -x c flag.

Re:CINT – A C/C++ interpreter by zx2c4 on Monday November 16, 2015 @03:17PM (#10576856)
AMAZING: -x c

Thanks!

Re:CINT – A C/C++ interpreter by dnesteruk on Monday November 16, 2015 @03:20PM (#10576877)
Check out my screencast on Cling (which is CINT's successor): http://www.youtube.com/watch?v=Lbi7MLS03Yc
Re:CINT – A C/C++ interpreter by OJFord on Monday November 16, 2015 @02:42PM (#10576641)
A hit counter!