RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.25.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <drosehn> in my case I was reading from the process, not writing to it. So when the process dies, the `read_line` raises an exception. I also tried to use `p.terminated?`, only to see it didn't exist (or maybe it did exist at the time, but didn't do what I wanted it to do).
<FromGitter> <drosehn> Also, while you have `while true`, I had `while ! hproc.output.closed?`. I'm not saying that's the right thing to do, but maybe it'll give you some more ideas of things to try for your case.
<FromGitter> <drosehn> I used the variable `hproc` for what you have as `p`.
<FromGitter> <talbergs> Yes, this time `begin ... rescue ... end` didn't change this for me. But I am reading from process here too. ⏎ ⏎ I undestood why the process is not exited when shell script is exited. (that while loop), because the docs states so: "Executes a process, yields the block, and then waits for it to finish." when &block is given. ⏎ ⏎ By the time I will get this process reading to finish as expected, I
<FromGitter> ... want to be able to attach to arbitrary running PID and pipe the output from there. Any pointers? [https://gitter.im/crystal-lang/crystal?at=5b3c103370efc60660aadc39]
<FromGitter> <talbergs> the loop exits now ^^ ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ any critisism on this snippet is very much appreciated.. [https://gitter.im/crystal-lang/crystal?at=5b3c11d9bd92d807829157ba]
alex`` has quit [Ping timeout: 256 seconds]
<FromGitter> <drosehn> Well, I didn't try to do anything with spawn. I didn't see any reason to need to do that for what I wanted to do.
<FromGitter> <drosehn> ( maybe I should have, but I didn't! )
<travis-ci> crystal-lang/crystal#735be7f (master - Implemented #2770 (#6306)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/399811042
<DeBot> https://github.com/crystal-lang/crystal/issues/2770 (Normalize IDNs to punycode in OpenSSL::SSL::Socket for hostname verification) | https://github.com/crystal-lang/crystal/pull/6306 (Implemented #2770)
<FromGitter> <talbergs> The purpose of this is to pipe shell script output into some function (puts in this case). I see there a ton of lines and deeply nested stuff. ⏎ In my mind this could rather look like this ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5b3c13a09b82c6701ba03bea]
<FromGitter> <drosehn> I don't know enough to help you there, and I'm tied up with other projects right now. I'd think we'd have to really understand how Process.run works (by looking at the source-code for it), and I don't have the time to do that right now.
<FromGitter> <talbergs> Much appreciated, If I may be in any help to you, give it a shot, Ill be online some time.
<FromGitter> <bew> @jwoertink you can do `enum Foo : UInt8; Bar = 2; Bar = 4_u8; end`
wontruefree has quit [Quit: bye]
zachk has quit [Quit: Leaving]
<crystal-gh> [crystal] maxfierke opened pull request #6324: Fix: Disallow setters with multiple arguments (master...mf-disallow_mutli_arg_setters) https://git.io/fbl4P
wontruefree has joined #crystal-lang
<FromGitter> <drosehn> I played with my little test program a little more, and it seems like Process.run() always returns NIL. But that may be because I keep reading the output and error IO streams until the IO::EOFError is raised.
<FromGitter> <talbergs> Do you use the latest crystal version?
<FromGitter> <drosehn> compiled by crystal 0.25.1 [5.0.2]
<FromGitter> <talbergs> same here. What IDE do you use?
<FromGitter> <drosehn> "IDE"? 😊 I'm on a Mac, and all I'm using is Xcode to edit the program, and then I compile-and-run the program in a unix Terminal window.
<FromGitter> <drosehn> MacOS El Capitan, so I'm a little behind the curve on MacOS versions (which also means I'm a little behind on Xcode releases, since the latest Xcode won't run on El Capitan)
<FromGitter> <talbergs> I'm on mac too, maybe xcode has intelligent completion for crystal. I have almost never used xcode (cos it's heavy on resources - cpu and memory).
<FromGitter> <drosehn> Do you get a non-NIL status? If so, then the NIL I'm seeing is probably just to how I'm abusing the interface.
<FromGitter> <talbergs> tried to make vim completion to work - no decent luck =/
<FromGitter> <drosehn> Well, I just tell Xcode to syntax-color for Ruby, and that's good enough. Other times I use Sublime Text. I'm just used to Xcode, and I'm running on a Mac Pro with 48-gig of RAM, so resources aren't a problem. Not sure what that has to do with `Process.run()` returning NIL though.
<FromGitter> <drosehn> Well, if you're not interested in Xcode (and many people are not), Sublime Text or maybe Atom might be of interest to you.
<FromGitter> <talbergs> jeez, that's decent machine!
<FromGitter> <drosehn> Atom might even be better than Sublime Text, for all I know. It's just that for a long time Atom had a few bugs in it which really irritated me. Those have been fixed now (after a few years...), but I haven't used it enough to compare it to Sublime Text.
<FromGitter> <talbergs> If they provide intelligent code completion, inspection, static analysis, popup documentation, then yes im interested in Atom and ST
<FromGitter> <drosehn> Well, they're free to download and test. But it's about 40 minutes past the time where I had intended to leave, so I have to head out now. Bye!
<FromGitter> <talbergs> C ya!
<FromGitter> <drosehn> To be clear: I use Xcode because I've been using it for 20 years, so I'm pretty used to it. I'm not saying it's a better choice than some of the newer editors!
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
wontruefree has quit [Ping timeout: 265 seconds]
alex`` has joined #crystal-lang
akaiiro[m] has joined #crystal-lang
<FromGitter> <Blacksmoke16> any ideas what would cause Postman to return `Could not get any response` for a request that returns fine on chrome?
<FromGitter> <talbergs> no, but I suggest swithing to Insomnia (tool)
<FromGitter> <talbergs> Might be the case when server just gave plain empty resp
<FromGitter> <talbergs> show me the raw resp obj
<FromGitter> <Blacksmoke16> ```{ ⏎ "code": 404, ⏎ "message": "An item with the provided ID could not be found." ⏎ }``` ⏎ ⏎ via Kemal halt [https://gitter.im/crystal-lang/crystal?at=5b3c58b2a99e1e52b7144a57]
<FromGitter> <Blacksmoke16> ` halt env, 404, response: %({"code": 404, "message": "An item with the provided ID could not be foudsfnd."})`
<FromGitter> <talbergs> 404 - valid not found response
<FromGitter> <Blacksmoke16> am getting a db record by id, if a valid id is used it works fine
<FromGitter> <Blacksmoke16> but when doing a non existent id, postman does `could not get any response` while chrome produced the correct json
<FromGitter> <Blacksmoke16> huh, seems to work occasionally
<FromGitter> <talbergs> raw response please? Maybe something with headers and chrome is being user firendly.
<FromGitter> <talbergs> oh no
<FromGitter> <talbergs> that's bad :D
<FromGitter> <talbergs> Maybe it is client - then try Insomnia
<FromGitter> <Blacksmoke16> worth a shot
<FromGitter> <talbergs> hmm, maybe response takes a long time
<FromGitter> <Blacksmoke16> yea must be a bug with postman :shrug:
<FromGitter> <Blacksmoke16> thats dumb, oh well
<FromGitter> <Blacksmoke16> insomnia it is :p
fbu has quit [Quit: WeeChat 2.1]
akaiiro has quit [Remote host closed the connection]
marius has quit [Quit: baj]
marius has joined #crystal-lang
<FromGitter> <bendietze_twitter> @Blacksmoke16 @talbergs for much testing purposes its very cheap to run https://github.com/icyleaf/halite spawned in your code - you can send the request and #to_raw the output to console - so first no need for a browser - saves much time - but lastly testing in browser / postman / imsomnia must be done too :) But, for most testing it is very nice to spawn it side by side to server code and let it
<FromGitter> ... run/output the needed requests just by starting your server :)
beizhia has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.1]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
<crystal-gh> [crystal] icyleaf opened pull request #6328: Fix File.join with separator path component (master...fix-file-join-with-separator) https://git.io/fbxru
lvmbdv has joined #crystal-lang
alex`` has joined #crystal-lang
<FromGitter> <bendietze_twitter> Has someone experiences with spawning multiple postgres on a single db server vs standard? I think it could help due splitting jobs/DBs in maintaining and security and at least (depending on machine/s) in performance against parallel options of pg? Or would someone never do this again, because it didn't help or became more complex overall/Recovery? I think, multiple could be a nice try? The other
<FromGitter> ... option would be multiple but running on several more job-calculated cloudservers? Today it's very cheap to run separate cloud-instances and increase their level as needed :)
<FromGitter> <spTorin> In the future it is planned to add support for the interpretation mode and REPL? Or is it technically very difficult and have to wait for version 1.x and higher?
<FromGitter> <bcardiff> @spTorin there is no current goal to have a repl before 1.0.
<FromGitter> <bcardiff> It's challening due to the nature of crystal to allow a full featured repl. Partial support is possible though. The more similar thing right now that is built in is `$ crystal play`
<FromGitter> <bararchy> Crystal play is really good until you play with special strings :) https://github.com/crystal-lang/crystal/issues/5613
<FromGitter> <bararchy> 👹
<FromGitter> <bcardiff> :-) it came a long way. helped discover lots of bugs in ToSVisitor, and is not perfect. If you want to see the very first screen of it http://g.recordit.co/5W2eDtlkwj.gif
<FromGitter> <bararchy> I use it all the time, that's how I find those wierd bugs with it hahaha
<FromGitter> <bcardiff> 👍 keep them coming, sometimes they are not about playground itself. But they helped.
<FromGitter> <bcardiff> Did you use the workbook feature @bararchy or build presentations with it?
<FromGitter> <bararchy> I did not, but I saw Lucky and Kemal using it, maybe we will do one for SHAInet :)
<crystal-gh> [crystal] bcardiff opened pull request #6329: Add &+ &- &* &** operators parsing (master...feature/parse-amp-ops) https://git.io/fbxDe
<crystal-gh> [crystal] bcardiff opened pull request #6330: Refactor codegen_binary_op (master...refactor/codegen_binary_op) https://git.io/fbxDF
<FromGitter> <straight-shoota> @bararchy workbooks are really awesome for demonstrating 👍
<FromGitter> <straight-shoota> eh @bcardiff
<FromGitter> <bcardiff> @s
<FromGitter> <bcardiff> @straight-shoota :-P did you use the presentation extension?
<FromGitter> <bcardiff> i haven't touch it in a while but it was a nice complement https://github.com/crystal-lang/crystal-presents
<FromGitter> <straight-shoota> yes, I've seen it and played a bit with it. But didn't produce anything useful with it (yet).
<FromGitter> <bcardiff> Great, just wanted to check interest on it. :-)
<FromGitter> <straight-shoota> I have some ideas for with it #4462 =)
<FromGitter> <bendietze_twitter> Hehe, when started with Crystal playground i found a possible bug, but i forgot it... Would you like to test? It freezes every browser and system i tried with... Please edit https://play.crystal-lang.org/#/r/4g7v/edit the following: first denote 'HERE and then 'HERE' the second one or first the right ' and then the left ' :) I tried on my phone, at work and at home, mostly with chrome
<FromGitter> <bendietze_twitter> I meant it freezes the browser tab, not the systems at all
<FromGitter> <bararchy> if were talking about phone, the play.crystal-lang.org is so bad on mobile, I can't even type most of the times, it will just overwrite charcters at random and then delete random stuff
<FromGitter> <bendietze_twitter> @bararchy you must type more slowly 😆 i have had this to :)
<FromGitter> <bararchy> lol hahaha
<FromGitter> <bendietze_twitter> Sometimes i thought i will hammer my phone, but it's like the monitors or the keyboards they will be destroyed for the errors of the PC 😆
<FromGitter> <bendietze_twitter> Oh, and if you worry about playground on mobile - please, first try gitter 😆
<RX14> @straight-shoota I think that your path_spec is probably not going to be well portable
<RX14> you should spec everyting *explicitly* as both windows and unix paths
<RX14> and then have a small section at the bottom that deals with anything to do with native paths
<RX14> and the few small bits of "unpurity"
<RX14> like stuff that uses the dirrect directory
<RX14> current*
<FromGitter> <bendietze_twitter> @straight-shoota the Go tour discussion - very good idea 👍 but for me i haven't used it - i am more for reading @sdogruyol ;)
<RX14> to me it rings huge alarm bells that you would need a "win_base" helper
<RX14> or "tmpdir" on either platform
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/fbx7y
<crystal-gh> crystal/master dd84ad0 Icyleaf Wang: fix File.join with separator path component (#6328)
<travis-ci> crystal-lang/crystal#dd84ad0 (master - fix File.join with separator path component (#6328)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/399999554
<DeBot> https://github.com/crystal-lang/crystal/pull/6328 (Fix File.join with separator path component)
<FromGitter> <bararchy> Isn't doing `spawn do` just the same? What am I missing https://github.com/anykeyh/await_async/blob/master/README.md
<FromGitter> <jspillers> I know I am probably overlooking something really simple, but is there a better way to guard against nilable properties (really just macro'd instance var with accessor) than to assign an intermediate local var? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b3cd7db70efc60660acb073]
<FromGitter> <bendietze_twitter> @bararchy i don't know ... Can't figure it out after reading 5.times on my mobile 😄 could be is just syntactic sugar - or nice game :) i will check this out for me 👍
<FromGitter> <bararchy> lol that's nice https://github.com/NeuraLegion/shainet/issues/88 thanks @psikoz
<FromGitter> <bararchy> I saw this guy is making other logos for other projects, hahah Crystal project :)
cyberarm has quit [Ping timeout: 260 seconds]
<FromGitter> <bendietze_twitter> One cool thing on C# is their delegates. I like their 'delegate += whatever' or '-=' and just call 'delegate'... Is there something similar or near in Crystal? :)
<FromGitter> <j8r> Arg I've an `can't set IO#raw: Inappropriate ioctl for device`. ⏎ I do more or less ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b3ce006f166440661193423]
<RX14> well if gets_to_end returns, then the STDIN is already EOF
<RX14> and I suppose rawing the tty might fail
<FromGitter> <j8r> what should i do?
<RX14> well
<RX14> i can't tell from that code what you're trying to do at all
<FromGitter> <j8r> I'm working on a text editor
<FromGitter> <j8r> It can take from stdin, and the input from the keyboard
<RX14> well you *always* want to be working with stdin in raw mode then
<FromGitter> <j8r> 👍
<RX14> and gets_to_end will never return unless the user presses ctrl-d to close input to the program
<FromGitter> <j8r> I've putted a read timeout to 0
<FromGitter> <j8r> Maybe I can create a new FD?
<RX14> why have you set a read timeout to zero?
<RX14> what are you trying to achieve
<FromGitter> <j8r> for example `cat myfile | myeditor`
<RX14> but then your editor has no input
<RX14> there's ONE stdin
<FromGitter> <j8r> It will fill the editor with the `myfile` contents, and then listen to input
<RX14> it's either the terminal OR it's the output of cat
<RX14> not both
<RX14> you can either pipe or recieve user input
<RX14> never both
<RX14> $ echo "foo" | vi
<RX14> foo: Not an editor command
<RX14> Visual needs addressible cursor or upline capability
<RX14> doesn't work with vim
<RX14> because it's impossible to work
<RX14> vim just complains that it's not connected to a TTY
<RX14> which it's not
<RX14> and bails
<RX14> you need to use `myeditor file.txt` like other editors
<FromGitter> <j8r> but it works with e.g `micro`
<FromGitter> <j8r> before using crystal's stdin, i was using poll_event of termbox, which use (https://github.com/nsf/termbox/blob/355cccf74f4c7b896ea8a30b318d18d6d199204d/src/termbox.c#L627)
<FromGitter> <j8r> I think I will do like you said, only one STDIN raw
<FromGitter> <j8r> thansk :)
<RX14> but you can't have more than one stdin
<RX14> I don't understand
<RX14> it's impossible to make your command work
<FromGitter> <j8r> I guess Termbox doesn't use the same STDIN
<FromGitter> <j8r> use another way
<RX14> i don't know how thats possible
<RX14> if it's managing to get a TTY then it's using some black magic fuckery
<FromGitter> <j8r> hum... even `echo "a" | crystal eval 'slice = Bytes.new 6; STDIN.raw &.read slice'` fails
<RX14> yes
<RX14> because it's a pipe
<RX14> if you pipe something to a process
<RX14> STDIN becomes a pipe
<RX14> not a TTY
<RX14> and you can only use #raw on a tty
<RX14> $ echo "a" | crystal eval 'p STDIN.tty?'
<RX14> false
<RX14> $ crystal eval 'p STDIN.tty?'
<RX14> true
<FromGitter> <j8r> I will dig on this, thanks RX14
return0e has quit [Remote host closed the connection]
<FromGitter> <talbergs> Hey, how could I make the `|proc|` variable there to be available from other defs? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b3cff1b3d8f71623d5c7659]
<FromGitter> <talbergs> Reason is - web ui has button to stop process (wsocket.on_message), so I could call `proc.kill` there
<FromGitter> <talbergs> 2nd question is, why the `while` loop above, never stops? Should'n `rec.gets` return nil at some point? And if within `while` I check for `process.terminated?` < thats always false, how so?
<FromGitter> <bew> For an interactive tty program you can have 2 stdin (kindof), the basic STDIN you know to get the file from a pipe, and you can open `/dev/tty` and do read/write operations on it to directly read/writd from/to the tty
<FromGitter> <bew> @j8r ^
<FromGitter> <bew> You can see here https://github.com/nsf/termbox/blob/355cccf74f4c7b896ea8a30b318d18d6d199204d/src/termbox.c#L139 that's what termbox is initialized with
<FromGitter> <bew> RX14 ^ here is the "black magic" :P
<FromGitter> <bew> @talbergs you could save the proc variable somewhere where it can be called from another handler (and killed from there)
<FromGitter> <bew> `rec.gets` will return `nil` only if the other end of the pipe is closed, which will happen only if the child process ends iirc
<FromGitter> <bew> Also you can avoid building the pipe yourself, you can call Process.run with `output: :pipe`, and for the while, do `while o = proc.output.gets`
<FromGitter> <bew> Finally, why do you think the process should be terminated? You are reading its output while it is running, so it's not terminated..
alex`` has quit [Ping timeout: 256 seconds]
<FromGitter> <valamorgon> https://crystal-lang.org/docs/syntax_and_semantics/global_variables.html says I can create global variables like this $myvar
<FromGitter> <valamorgon> but the I get this error: $global_variables are not supported, use @@class_variables instead
<FromGitter> <valamorgon> am I missing something?
<FromGitter> <bcardiff> They were removed long time ago. docs are not updated. https://github.com/crystal-lang/crystal/issues/3139
<FromGitter> <bcardiff> There are some special variables with `$var` syntax. but there are no global vars that the user can define.
<FromGitter> <bcardiff> Please, submit or check if there is an issue/pr already handling this at https://github.com/crystal-lang/crystal-book .
<FromGitter> <valamorgon> okay @bcardiff thanks for the information
<FromGitter> <valamorgon> if ! @@myvar.nil? ⏎ ⏎ ```@@myvar += code``` ⏎ ⏎ end ... [https://gitter.im/crystal-lang/crystal?at=5b3d15db70efc60660ad4db4]
<FromGitter> <j8r> thanks a lot @bew it works :D
return0e has joined #crystal-lang
<FromGitter> <asterite> @valamorgon you have to assign it to a local variable first
<FromGitter> <valamorgon> @asterite but the problem is, my function is calling itself rescursively, I need to keep adding information to my variable. Since global variables not supported anymore, how can you save your info to a variable rescursively?
<FromGitter> <valamorgon> local variable would mean overriding in each call for recursive function calls
<FromGitter> <bcardiff> Either the `@@var` needs to be not nillable. or before recurring you will need to update it's value.
<FromGitter> <valamorgon> class maCls ⏎ myvar = "" ⏎ def self.myfunc(par) ⏎ ⏎ ```@@myvar += par ⏎ myrecursive(par)``` ... [https://gitter.im/crystal-lang/crystal?at=5b3d18def16644066119c94b]
<FromGitter> <valamorgon> how can myvar not nillable
<FromGitter> <valamorgon> and I call it like this ⏎ ⏎ ``` maCls.myfunc("say hi ")``` [https://gitter.im/crystal-lang/crystal?at=5b3d193270efc60660ad54e1]
<FromGitter> <valamorgon> maCls.myfunc("say hi ")
<FromGitter> <bcardiff> the first myvar needs to have `@@`
<FromGitter> <valamorgon> wow, rookie mistake, now I see
<FromGitter> <valamorgon> thanks again @bcardiff
<FromGitter> <bcardiff> Welcome. But beware of the global state you have there ;-)
<FromGitter> <valamorgon> you mean like I should clear it after I'm done?
<FromGitter> <valamorgon> def self.myfunc(par) ⏎ ⏎ ``` @@myvar = "" ⏎ self.myrecursive(par) ⏎ @@myvar = ""``` ⏎ ⏎ end [https://gitter.im/crystal-lang/crystal?at=5b3d19db3572e970c1762bfb]
<FromGitter> <valamorgon> like this?
return0e has quit [Remote host closed the connection]
wontruefree has joined #crystal-lang
<FromGitter> <bcardiff> no, like, you should avoid it :-). I'm not sure what you want to do since the code will hang since there is no base case for the recursion. Without that is harder to suggest a way to go. A general tip is that if you need state to be carried, make it a parameter.
<FromGitter> <valamorgon> I see, I will consider it, thanks
<crystal-gh> [crystal] bcardiff closed pull request #6330: Refactor codegen_binary_op (master...refactor/codegen_binary_op) https://git.io/fbxDF
alex`` has joined #crystal-lang
zachk has joined #crystal-lang
zachk has joined #crystal-lang
zachk has quit [Changing host]
<FromGitter> <bararchy> @bcardiff How far do you think https://github.com/crystal-lang/crystal/pull/5635 is to get merged in (following by File\Dir)?
<travis-ci> crystal-lang/crystal#7aa7628 (master - Refactor codegen_binary_op (#6330)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/400130475
<DeBot> https://github.com/crystal-lang/crystal/pull/6330 (Refactor codegen_binary_op)
<FromGitter> <bew> Also @valamorgon if you plan to use a recursive that appends stuff to a string, this is quite slow and you might want to use a `IO::Memory` that you populate in the recursive, and finish by doing `to_s` on it to get a string back
<FromGitter> <valamorgon> @bew you mean @@myvar should be equal to IO::Memory?
<FromGitter> <valamorgon> and one more question, XML::Node children method returns also text between two tags? is this expected behavior? shouldn't it return just element children?
<FromGitter> <bew> sth like this maybe?: https://carc.in/#/r/4g9n
<FromGitter> <valamorgon> @bew now that makes more sense to me, also it is like @bcardiff pointed out. thank you.
<FromGitter> <bew> you're welcome ;)
<FromGitter> <bararchy> Woot https://crystal.connpass.com/event/93629/
<FromGitter> <bararchy> I wish someone would teansalte the timeline and talks (as in what talks are going to be there)
daemonwrangler has quit [Quit: ZNC 1.6.5 - http://znc.in]
daemonwrangler has joined #crystal-lang
daemonwrangler has quit [Remote host closed the connection]
daemonwrangler has joined #crystal-lang
<oprypin> gee anything in europe?
daemonwrangler has quit [Quit: ZNC 1.6.5 - http://znc.in]
daemonwrangler has joined #crystal-lang
<Yxhuvud> oprypin: we should do a meetup in stockholm
return0e has joined #crystal-lang
<oprypin> Yxhuvud, i was just thinking that the other day
<oprypin> when you wrote "uri:s" :D
<Yxhuvud> so basically about 24 hours ago :P
<crystal-gh> [crystal] felixbuenemann opened pull request #6332: Add XML::Reader ParserOptions Support (master...xml-reader-parser-options) https://git.io/fbpBm
daemonwrangler has quit [Quit: ZNC 1.6.5 - http://znc.in]
daemonwrangler has joined #crystal-lang
DTZUZO has quit [Quit: WeeChat 2.0]
DTZUZO has joined #crystal-lang
<FromGitter> <j8r> @bew The solution with `TTY_STDIN = File.open "/dev/tty"` instead of `STDIN` works perfectly, I ve set a buffer of 4096, all works perfectly. I don't miss to `TTY_STDIN.close`at the end. However, when I resize the terminal, an exception is raised:`Error reading file: Interrupted system call`. Have you an idea about?
<FromGitter> <Val> Is it a way to know current process `euid` in Crystal ?
<FromGitter> <Val> Like in Ruby `Process.euid`
<FromGitter> <j8r> More I advance, more I'm replacing Termbox with native Crystal 😄
<FromGitter> <bew> @j8r nice! I'm working on doing that too :P I'm working on a terminfo parser (already done actually I just need a better API to use it)
<FromGitter> <j8r> @bew have you a link on this project? I could use it, and merge some of my work on it maybe
<FromGitter> <bew> @j8r for the interrupted system call maybe try to catch the error, and re-try the read
<FromGitter> <bew> @j8r it's currently a private repo, I don't have time now to polish, but yeah it might be a good idea for you to use it and give me feedback ;)
<FromGitter> <bew> also it's currently not fully usable, for example you can't use parameterized string capabilities yet
<FromGitter> <j8r> This is a library about parsing the terminal input right?
<FromGitter> <bew> no, this will be another one
<FromGitter> <j8r> this is for display so?
<FromGitter> <j8r> Nice because this is the only part of Termbox i still rely for
<FromGitter> <bew> no, this is to read the terminfo database that should be used by programs to know how to talk to the terminal, see https://linux.die.net/man/5/terminfo
<FromGitter> <j8r> in can build "CLI vues" with this?
<FromGitter> <bew> also see the list of capabilities here http://pubs.opengroup.org/onlinepubs/7908799/xcurses/terminfo.html
<FromGitter> <bew> no idea what you mean by "CLI vues"..
<FromGitter> <j8r> describe margins, colors etc?
<FromGitter> <j8r> Ok I better what it does
<FromGitter> <j8r> | it tells application programs what the terminal is capable of doing ⏎ We need terminfo to interact with a terminal, ok go it
return0e has quit [Remote host closed the connection]
beizhia has quit [Quit: ERC (IRC client for Emacs 26.1)]
duane has quit [Ping timeout: 240 seconds]
greengriminal has joined #crystal-lang
akaiiro has joined #crystal-lang
alex`` has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] straight-shoota opened pull request #6333: Extract platform-specifics from ENV to Crystal::System::Env and implement for win32 (master...jm/feature/windows-env) https://git.io/fbpup
lvmbdv has quit [Ping timeout: 240 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
return0e has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
return0e has quit [Client Quit]
return0e has joined #crystal-lang
duane has joined #crystal-lang