Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:38

    pmoura on master

    Additional tests for Unicode su… (compare)

  • 17:31

    pmoura on master

    Additional tests for Unicode su… (compare)

  • 16:03

    pmoura on master

    Additional tests for Unicode su… (compare)

  • 15:26

    pmoura on master

    Move Unicode and unbounded inte… (compare)

  • 15:17

    pmoura on master

    Add predicates `check_text_outp… Update SVG diagrams (compare)

  • 14:52

    pmoura on master

    Additional tests for Unicode su… (compare)

  • 14:48

    pmoura on master

    Fix typo in the documentation o… Fix `lgtunit` tool `set_text_in… (compare)

  • 14:00

    pmoura on master

    Additional tests for Unicode su… (compare)

  • 11:33

    pmoura on master

    Additional tests for Unicode su… (compare)

  • 11:15

    pmoura on master

    Add preliminary tests set for U… (compare)

  • Apr 18 20:34

    pmoura on master

    Fix TravisCI script calls to th… Merge branch 'master' of git@gi… (compare)

  • Apr 17 16:25

    pmoura on master

    Update `atom_concat/3` and `sub… (compare)

  • Apr 16 16:07

    pmoura on master

    Require Trealla Prolog 1.8.19 o… (compare)

  • Apr 15 19:17

    pmoura on master

    Add support for reporting tests… (compare)

  • Apr 15 19:03
    kaiser185 commented #99
  • Apr 15 18:58
    pmoura closed #99
  • Apr 15 18:58
    pmoura commented #99
  • Apr 15 18:57

    pmoura on master

    Fix expired link in the documen… (compare)

  • Apr 15 17:18
    pmoura commented #99
  • Apr 15 17:12
    kaiser185 edited #99
Jacob Friedman
@jacobfriedman
That's fantastic. I got stuck at stream byte endings of -1 (is that latin1 encoding a bye stream needs after get_byte?) I should be able to test it more tomorrow afternoon.
Paulo Moura
@pmoura
-1 means end of file.
Jacob Friedman
@jacobfriedman
This is an inet stream - I may have to send a latin-encoded marker
Paulo Moura
@pmoura
As CBOR text streams are UTF-8 streams and ISO-Latin-1 is a single byte encoding, the alternative is to use a byte string.
Jacob Friedman
@jacobfriedman
Hrm. Maybe I'll have to just put a bytearray-size flag at the front and call it a day.
Paulo Moura
@pmoura
Updated the CBOR library. For an overview of the new features do a git pull on your logtalk3 clone or see https://logtalk3.readthedocs.io/en/latest/libraries/cbor.html
The main change is that you can now choose the text representation for strings when encoding or decoding.
Jacob Friedman
@jacobfriedman
oh, thats fantastic!
Jacob Friedman
@jacobfriedman

Here's an example of the latest CBOR library streaming from browser->websocket->nodejs->logtalk

https://media.discordapp.net/attachments/752941769095643156/817875450230472704/unknown.png?width=1208&height=678

Paulo Moura
@pmoura
👍
Paul Brown
@PaulBrownMagic
So I was playing with named pipes. The os object has a predicate to see if a file exists, or if a directory exists, but to check if a named pipe exists I need to call the shell. For this unusual case, this might be sufficient, but I thought it worth pondering.
Paulo Moura
@pmoura
While files and directories are common to POSIX and Windows operating-systems, I don't think that's the case with named pipes?
Of course, the shell/1-2 predicates provided by some backend Prolog systems are also problematic or simply don't work on Windows...
Paul Brown
@PaulBrownMagic
I don't think they're common any where anymore! But they're definitely supported on Windows
Paulo Moura
@pmoura
Supported how? cmd.exe? PowerShell?
Looking into the documentation of GNU Prolog (as an example backend that provides a good OS interface), there's a create_pipe/2 predicate and a file_property/2 where one of the valid properties is fifo. But these features are not common.
Paul Brown
@PaulBrownMagic
I don't know how to work with them on Windows I'm afraid
Yes, I don't know as it's worth supporting given that they're not widely used. They're a handy communication bridge though that blocks and is sequential, which is probably why they're not widely used these days.
Paulo Moura
@pmoura
ECLiPSe provides a get_file_info/3 predicate with a type attribute that can return fifo.
Paul Brown
@PaulBrownMagic
That could work well in conjunction with os::directory_files/2
Paulo Moura
@pmoura
On the other hand, I don't find similar suppory on SICStus Prolog.
Paul Brown
@PaulBrownMagic
Or a more generic os::directory_contents/2...
Paulo Moura
@pmoura
os::directory_files/2 returns both regular file and directories. To be clear, what would be the difference for os::directory_contents/2? Pipes?
Paul Brown
@PaulBrownMagic
Yes, named pipes aren't currently included in by os::directory_files/2
Paulo Moura
@pmoura
SWI-Prolog provides a pipe/2 predicate but I'm not finding a way to query if a "file" is a pipe.
Apparently, it also only works on POSIX systems.
Paul Brown
@PaulBrownMagic
I don't know if it's something worth supporting, but it's worth thinking about
Jacob Friedman
@jacobfriedman
Hello, I have a general question about calling parent directory modules. Can the loader load one directory above it? How does it do that, if I try to call something like this
`logtalk_load([
     module1, module2, '../src/module3'
])`
A Man With A Clever Disguise
@ACleverDisguise
@PaulBrownMagic Named Pipes in Win32, IIRC, aren't part of the file system logic. They have handles, but in the same vein as all NT entities have handles. They don't have existence in the file system.
Paul Brown
@PaulBrownMagic
@ACleverDisguise, Thank you
@jacobfriedman Checkout line 165-233 in the settings example (https://github.com/LogtalkDotOrg/logtalk3/blob/master/settings-sample.lgt) It has various ways to handle imports from other directories.
Paulo Moura
@pmoura
@jacobfriedman A loader file can load files from parent directories. There are some portability issues with some backends but most use internally POSIX file paths. That said, that's an odd setup. Usually we have a root loader file, possibly loading loader files in sub-directories in the case of complex applications.
Logtalk 3.45.0 was released yesterday: https://github.com/LogtalkDotOrg/logtalk3/discussions/97
Jacob Friedman
@jacobfriedman
That makes sense for a top-level API structure. Thank you for clarifying.
Anton Danilov
@Stranger2015
Hi all! Has anybody working on implementing Language Server for Logtalk?
Paulo Moura
@pmoura
Not that I'm aware. It's on my TODO list, however, but not currently a priority.
Anton Danilov
@Stranger2015
what can you tell about this task?
A Man With A Clever Disguise
@ACleverDisguise
That would be the documentation.
Since I assume you're interested in specifically the VSCode case: https://code.visualstudio.com/api/language-extensions/language-server-extension-guide gives the nitty-gritty details here.
Anton Danilov
@Stranger2015
thanx a lot. i'd like to know is there some specific things regarding Logtalk
Paulo Moura
@pmoura
I don't think so. A language server thsat can communicate with the Prolog backend should be enough for Logtalk purposes.
Anton Danilov
@Stranger2015
ok
if i recall corectly there's SWI PROLOG LSP example
Paulo Moura
@pmoura
There's. But never tried it. If you do, please report back your findings.
Anton Danilov
@Stranger2015
Ok i'll try )
Jacob Friedman
@jacobfriedman
How fitting! I just saw the UTF update a couple hours ago and see it's required for the WebAssembly spec. Logtalk wraps trealla out-of-the-box... if there are dragons, they will be slain. Fantastic work