question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Input stream line position and read term start and end lines

See original GitHub issue

As a future enhancement, it would be quite useful if we could call the stream_property/2 predicate to get the current line and if the read_term/3 predicate could support an option to get the term start and ending lines. In my particular case, Logtalk uses these features to pinpoint warnings and errors when compiling a file. When we use the sandbox in the Tau Prolog website, warnings and errors tell us the source file line number. Thus, I assume the some of the necessary bits to support these features are already present internally?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jariazavalverdecommented, Aug 25, 2020

Thanks. Fixed!

1reaction
jariazavalverdecommented, Aug 24, 2020

Added stream_position_data/3 built-in predicate.

stream_position_data(?Field, +Pos, -Data). Field is one of line_count, line_position or char_count.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Read a line of text from an input stream in Java keeping the ...
I'm reading a POST request. They consists of pure text messages where the lines always end with \r\n (by the standard specification). However ......
Read more >
BufferedReader (Java Platform SE 8 ) - Oracle Help Center
Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
Read more >
StreamReader.ReadLine Method (System.IO) - Microsoft Learn
Reads a line of characters from the current stream and returns the data as a string.
Read more >
Reading a File Line by Line in Java - Stack Abuse
This method returns the rest of the current line, excluding any line separator at the end of the line. The read position is...
Read more >
How to Read a File in Java - Baeldung
JDK8 offers the lines() method inside the Files class. It returns a Stream of String elements. Let's look at an example of how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found