Giter Site home page Giter Site logo

term-termios's People

Contributors

hythm7 avatar krunen avatar rcmlz avatar samcv avatar skids avatar stmuk avatar titsuki avatar zoffixznet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

term-termios's Issues

Please "git tag" your RAKU modules with it's versions

Can you please set a specific "version" for your RAKU module in your META6.json file? You have a '*" now, which is known to make trouble and may not be supported within the RAKU tool chain (soon), say ZEF, FEZ, MI6...

And can you please "GIT TAG" your RAKU modules with it's version, similar and at the same time you maintain it's "version": "x.y.z" in your META6.json file, then and in the future?

I was told, this will happen "for free" going forward with mi6 anyhow, but for now it would be great if you spend those 2 seconds already now :)

"Tagging" is generally highly appreciated in regards to "reproducible builds" and here especially for the "Rakudo Star" modules

THANK YOU!

Bug with zef temp dir

Came back after winter break to find that the REPL in raku was broken, complaining about a raku file missing from a temp dir.

Did a refresh install of raku latest with rakubrew, installed Terminal::LineEditor, worked.

Removed $TMPDIR/.zef, and the problem happened again. (assuming original problem was tmpdir getting cleaned after a reboot)

Did a force reinstall of Term::termios, and the problem was resolved. (This is one of the deps of Terminal::LineEditor)

This seems similar to ugexe/zef#546

resources was removed from meta file

Looks like this commit removed libraries/myhelper from resources, which has broken the module.

To reproduce the issue, I install Terminal::LineEditor which depends on Term::termios, then run raku, the repl doesn't load and continuously throws error
relevant part in the error is:

Use of uninitialized value element of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
  in sub guess_library_name at /home/hythm/.rakubrew/versions/moar-HEAD-HEAD-HEAD/install/share/perl6/core/sources/D4356A413F4B0437F7F4404FF5A225216F22EFFA (NativeCall) line 217
Cannot locate native library '/home/hythm/.raku/libresources.so': /home/hythm/.raku/libresources.so: cannot open shared object file: No such file or directory

...
...
in submethod BUILD at /home/hythm/.raku/sources/B15919F9457782C67E2B931F9411A81839F73152 (Term::termios) line 168`

Adding back libraries/myhelper to meta file resources fixes the issue for me.

raw mode not working on macOS

Hi

I was having issues with https://github.com/ab5tract/Terminal-Print not capturing input on macOS and after some research I've found it uses Term::termios under the hood to switch terminal into raw mode.

So I've tried to switch terminal into raw mode using following oneliner:

perl6 -e 'use Term::termios; my $termios := Term::termios.new(fd => $*IN.native-descriptor).getattr; $termios.makeraw; $termios.setattr(:DRAIN); $*IN.getc; die;'

And it dies instantly without waiting for any input. Am I right by saying that in raw mode reading from STDIN should be blocking action?

I'm using

This is Rakudo version 2017.09 built on MoarVM version 2017.09.1
implementing Perl 6.c.

on macOS 10.10.5.

install fails on mac m2

✗ raku --version
Welcome to Rakudo™ v2023.06-241-gcb8d2a125.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2023.06-4-g75fe055c2.
...
===> Building: Term::termios:ver<0.2.6>:auth<zef:krunen>
[Term::termios] Command: /Users/coke/.rakubrew/versions/moar-cb8d2a125/install/bin/rakudo -I/var/folders/8n/rypl9_990b9578zd5435pgr40000gn/T/.zef/1692564298.8422/Distribution%3A%3ABuilder%3A%3AMakeFromJSON%3Aver%3C0.6%3E%3Aauth%3Cgithub%3Aniner%3E.tar.gz/Distribution-Builder-MakeFromJSON-master -I/var/folders/8n/rypl9_990b9578zd5435pgr40000gn/T/.zef/1692564298.8422/d254fdd0efd10a06bde98ee99b6ab1349532760a.tar.gz -MMONKEY-SEE-NO-EVAL -e exit((require ::(q|Distribution::Builder::MakeFromJSON|)).new(:meta(EVAL($*IN.slurp(:close)))).build(q|/var/folders/8n/rypl9_990b9578zd5435pgr40000gn/T/.zef/1692564298.8422/b7707185f4d678efd41f95d08a06dc13560c6f3f.tar.gz/dist|)??0!!1)
===> Building [FAIL]: Term::termios:ver<0.2.6>:auth<zef:krunen>
Aborting due to build failure: Term::termios:ver<0.2.6>:auth<zef:krunen> (use --force-build to override)

Must specify something as a path: did you mean '.' for the current directory?

Following the example provided on the main site, I am getting the error as described in the subject.
Here is a stack trace:

Must specify something as a path: did you mean '.' for the current directory?
in sub guess_library_name at /opt/rakudo-star-2018.04/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 220
in method setup at /opt/rakudo-star-2018.04/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 275
in method CALL-ME at /opt/rakudo-star-2018.04/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 570
in method overwrite_constant at /home/pprocacci/.perl6/sources/5CB2E088A2F6E19C63814E195E60C87BDA3C9F63 (Term::termios) line 154
in submethod BUILD at /home/pprocacci/.perl6/sources/5CB2E088A2F6E19C63814E195E60C87BDA3C9F63 (Term::termios) line 171
in submethod BUILDALL at /home/pprocacci/.perl6/precomp/697B026D10D669F6D32B196457B6D9631A5E2155/5C/5CB2E088A2F6E19C63814E195E60C87BDA3C9F63 line 1
in block at ./test.pl6 line

A simple script that reproduces the problem .....

###############################################
#!/usr/bin/env perl6

use Term::termios;

my $saved_termios := Term::termios.new(fd => 1).getattr;
################################################

This is FreeBSD 11.1.
This is Rakudo Star version 2018.04.1 built on MoarVM version 2018.04.1 implementing Perl 6.c.

In addition to the above which may need it's own ticket, the installation of this module has the following "error" though it seems to still install successfully:

% zef install Term::termios
===> Searching for: Term::termios
===> Building: Term::termios:authgithub:krunen
===> Building [OK] for Term::termios:authgithub:krunen
===> Testing: Term::termios:authgithub:krunen
===> Testing [OK] for Term::termios:authgithub:krunen
===> Installing: Term::termios:authgithub:krunen
Use of Nil in string context
in block at home#sources/5CB2E088A2F6E19C63814E195E60C87BDA3C9F63 (Term::termios) line 145

Please help me understand and solve these errors.

.getc won't permit completely raw input

The example code is wrong in that the getc method will always wait for additional input in order to determine whether it is a combining character or not.

To actually do raw input, you need to set the IO::Handle (e.g. $*IN) to binary mode ($*IN.encoding(Nil);) and use $*IN.read(1) to read a single byte; note that this will give you a Buf instead of a Str. (A quick hack for that is $*IN.read(1).decode("latin-1"), especially since Buf is currently not as easy to work with as Str.)

The raw input mechanism may require a somewhat recent moarvm and matching rakudo to work properly.

Failed to open libmyhelper.so

When trying to install Term::termios in the rakudo-star Docker image, I get the following error:

===> Install [FAIL] for Term::termios:auth<github:krunen>: Failed to open file /root/.zef/store/term-termios.git/f4c84e1d95cb11be7655c489d2e470011ff269c8/resources/libraries/libmyhelper.so: No such file or directory
Failed to open file /root/.zef/store/term-termios.git/f4c84e1d95cb11be7655c489d2e470011ff269c8/resources/libraries/libmyhelper.so: No such file or directory
  in any  at /usr/share/perl6/site/precomp/F91BAB44DF15C5C298C627DD5E0F9D819ED79939.1521092667.22273/90/9062A39D0256C0BD797016C3FE93D839191AFE2B line 1
  in block  at /usr/share/perl6/site/sources/9062A39D0256C0BD797016C3FE93D839191AFE2B (Zef::Client) line 591
  in any  at /usr/share/perl6/site/precomp/F91BAB44DF15C5C298C627DD5E0F9D819ED79939.1521092667.22273/90/9062A39D0256C0BD797016C3FE93D839191AFE2B line 1
  in block  at /usr/share/perl6/site/sources/9062A39D0256C0BD797016C3FE93D839191AFE2B (Zef::Client) line 599
  in block  at /usr/share/perl6/site/sources/9062A39D0256C0BD797016C3FE93D839191AFE2B (Zef::Client) line 562
  in sub  at /usr/share/perl6/site/sources/9062A39D0256C0BD797016C3FE93D839191AFE2B (Zef::Client) line 551
  in method install at /usr/share/perl6/site/sources/9062A39D0256C0BD797016C3FE93D839191AFE2B (Zef::Client) line 643
  in sub MAIN at /usr/share/perl6/site/sources/9E04C517E18C976DC9F459E2CE31A87142034020 (Zef::CLI) line 152
  in block <unit> at /usr/share/perl6/site/resources/25ADD3DE4D08C272AC81C82BCB2DBE07D909E768 line 3
  in sub MAIN at /usr/share/perl6/site/bin/zef line 2
  in block <unit> at /usr/share/perl6/site/bin/zef line 2

The testing phase returns OK.

UPDATE: If I install build-essential first (which contains a C compiler and make), the module installs correctly. So it seems to be mostly a LTA error message.

Please "git tag" your RAKU modules with it's versions

As you closed #15 , this is a way of re-opening it again.


Can you please set a specific "version" for your RAKU module in your META6.json file? You have a '*" now, which is known to make trouble and may not be supported within the RAKU tool chain (soon), say ZEF, FEZ, MI6...

And can you please "GIT TAG" your RAKU modules with it's version, similar and at the same time you maintain it's "version": "x.y.z" in your META6.json file, then and in the future?

I was told, this will happen "for free" going forward with mi6 anyhow, but for now it would be great if you spend those 2 seconds already now :)

"Tagging" is generally highly appreciated in regards to "reproducible builds" and here especially for the "Rakudo Star" modules

THANK YOU!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.