« first day (582 days earlier)      last day (1912 days later) » 

4:07 AM
@Dennis IDK if you still care about the Windows implementation of FFI, but I'm told that the windows equivalent of handling SIGPIPE is to look at the return value of printf or write and if it's negative then you have a broken pipe.
 
 
10 hours later…
1:58 PM
@Dennis Thanks
@ASCII-only 'tis! :) It's very nearly to the point of feature parity with the game that I will start making answers, there's just a couple timing things to fix.
 
@Pavel Ah, that makes sense. Now I just have to replace seven calls to printf, one to gmp_printf, and three calls to putchar with error-checking versions.
 
2:24 PM
Yeah, it's pretty bad.
Apparanatly you can also check ferror(STDOUT). ¯\_(ツ)_/¯
 
Ah, good idea. It would be sufficient to check for that once per loop.
 
Both printf and putchar say they return negative on error, but the printf docs say to use the return value for error checking and the putchar docs say to use ferror. I'm not sure why the discrepency.
 
3:05 PM
@Pavel I've replaced while (1) with while (!ferror(stdout)). Could you check if the issue persists?
 
@Dennis Not right now unfortunatly, but I will when I get home.
 
3:19 PM
OK, no rush.
 
 
2 hours later…
ngn
5:20 PM
@Dennis Hi, I have an interpreter that I'd like to make available in TIO. Would you be interested in adding it if it's not under a free/open source software licence?
 
@ngn I think TIO already has some non-open source languages, but I'm not sure
All the C# implementations are open source
 
ngn
@Pavel yes, Dyalog, for one
 
Oh yeah, and Mathematica
So it shouldn't be a problem
@ngn What language?
 
ngn
@Pavel a modest subset of k
 
So like ngn APL
 
ngn
5:26 PM
@Pavel not really, this one's in c
 
Link?
 
ngn
ngn/apl was in js
@Pavel you need a bitbucket account
 
@ngn You mean Dennis needs a bitbucket account :P
 
ngn
@Pavel yes, but I don't mind giving you access too (if you're interested)
the source is not too pretty anyway :)
 
5:51 PM
@ngn Sure. My BitBucket username is DennisMitchell.
 
ngn
@Dennis you should be able to see bitbucket.org/ngn/k now
@Dennis I forgot to confirm this first: does TIO run on 64-bit Linux?
 
6:06 PM
@ngn yes
 
@ngn I'll check it out when I get home.
 
 
3 hours later…
Okx
9:02 PM
@Dennis Can you update Elixir on TIO? It's on version 1.4.5 which is a bit outdated tio.run/##S0oszvj/PzUnsyKzSEFXtyy1qDgzP@//fwA
 
@Okx Most likely not. Elixir is installed through dnf, and that's the latest version available in Fedora's repos.
 
@ngn How do I print Hello World? Also, what should I call the language, and what "home page" should I link to?
 
@Dennis Does K's HW not work?
 
ngn
@Dennis just "Hello World"
 
Right. Any way to remove the quotes?
 
ngn
9:08 PM
@Dennis I'm not very creative in naming languages, I would call it ngn/k
@Dennis 1@"Hello World\n"
1 stands for stdout
 
Would K (ngn/k) be OK? That's how the other K implementations are listed.
 
ngn
@Dennis yep, sounds good
 
@ngn Hm, that prints it twice: once without quotes and once with.
 
ngn
@Dennis oh, sorry, also a ; at the end to prevent that
@Dennis ; is the statement separator
 
That works. What could I use for the link?
 
ngn
9:12 PM
@Dennis by the way, there's a tradition in the k community to use only lowercase
@Dennis if you want to follow it, it should be "k (ngn/k)", etc
 
Also, should I delete the source code after building? What files do I have to keep?
 
ngn
@Dennis I don't mind if you keep the sources. The file "k" should be sufficient to run it, and also "repl.k" if you want a REPL with a prompt (I suppose that's not necessary for TIO).
 
OK, just checking, since the repo is private.
Now I just need a link.
 
ngn
@Dennis I don't know what link to use, there's no home page for my impl. There's the original k at kx.com, but I'm not affiliated with them and it wouldn't be appropriate to link there.
 
Linking to the private repo is also a bit pointless.
 
ngn
9:20 PM
@Dennis how about linking to github.com/ngn/k? I can put something there, publicly visible
@Dennis by the way, how do you update language impls on tio? with a cronjob or only upon explicit request?
 
Upon request, and once in a while when I'm rebuilding the servers for some reason.
@ngn That would work.
@ngn Hm, Kona, oK, and the K paper all use an uppercase K.
 
ngn
@Dennis heretics :)
@Dennis I personally don't care much about uppercase vs lowercase
 
@ngn To clarify: the sources would be visible to all TIO users.
 
ngn
the author of the original k, Arthur Whitney, uses only lowercase, so many of his fans do that too
 
Except in the paper I found. archive.vector.org.uk/art10010830
 
ngn
9:32 PM
@Dennis Oh, I didn't realise that. In that case, it may be wiser to delete them.
 
ngn
@Dennis see kparc.com
@Dennis awesome! thank you very much :)
 
@ngn That site doesn't use uppercase at all, not just for the language name. Is that what you meant by Arthur Whitney uses only lowercase?
 
ngn
@Dennis yes
 
o_O
 
ngn
9:46 PM
@Dennis for consistency, would you also rename "ngn-apl" to "ngn/apl", please?
 
@Okx If the versions are different enough, I'll look into installing it from source.
@ngn Sure. Give me a minute to get back to my computer.
 
ngn
@Dennis no rush
 
@ngn Done.
 
ngn
@Dennis thanks
 
@Dennis Re ffi: It's been a while, so I might be doing it wrong, but:
$ ./ffi -p10 -e2 examples/primes09.frac 100 | head
Traceback (most recent call last):
  File "C:/Users/Pavel/git/ffi/ffi.py", line 74, in <module>
    ffi()
  File "C:/Users/Pavel/git/ffi/ffi.py", line 70, in ffi
    print_exp = args.print_exp,
  File "C:\Users\Pavel\git\ffi\lib\compiler.py", line 64, in run
    '-O2', '-o', bin_file.name, c_file.name
  File "C:\Program Files\Python36\lib\subprocess.py", line 267, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Program Files\Python36\lib\subprocess.py", line 707, in __init__
Oh you know what? You didn't make the broken pipe changes to the Windows branch, but to Master.
 
9:59 PM
.oO ( There's a Windows branch? )
 
Yeah
Should I switch to master?
 
Worth a shot.
 
hello
is TIO down?
 
Doesn't seem to be over here
 
Working fine here.
 
10:02 PM
$ ./ffi -p10 -e2 examples/primes09.frac 100 | head
Traceback (most recent call last):
  File "C:\Users\Pavel\git\ffi\lib\compiler.py", line 66, in run
    assert not call(['cc', '-O2', '-oprogram', 'program.c'] + ['-lgmp'] * use_gmp)
  File "C:\Program Files\Python36\lib\subprocess.py", line 267, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Program Files\Python36\lib\subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "C:\Program Files\Python36\lib\subprocess.py", line 992, in _execute_child
 
Figures.
I pushed the change to the windows branch.
> This branch is 13 commits ahead, 8 commits behind master.
That's going to be fun.
 
Back to the error earlier
 
After pulling windows?
 
can't access TIO :(
 
What happens when you try?
 
10:05 PM
@Dennis Yeah. I'm trying some previous commits and nothing is working so now I'm looking through tnb archives to see what I had to configure.
 
This site can’t be reached

tio.run took too long to respond.
Try:
Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERR_TIMED_OUT
 
Hm, that doesn't look like something I could fix.
 
and if I try in IE it will Never Stop Loading
doing nothong by the way
 
Oh I know what's wrong. I have both 32 bit and 64 bit mingw and it only works in 64 bit and I did 32 bit
@Dennis Works, prints 10 numbers and actually exits.
With that said, control c still doesn't work.
 
hmm I did remote desktop to a pc out of here and tried to go to TIO page and it worked!
is it my DNS cache?
 
10:10 PM
@Dennis BTW, if you want to merge it into one branch, you can use #ifdef __MINGW32__
(Which works for 32 and 64 bit Mingw)
Although SO says that the more general solution is #if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
Mingw defines __MINGW32__ and cygwin defines one or more of those others depending on various factors.
 
10:36 PM
it seems it was the VPN link redirection of net flow causing the problem
 
11:10 PM
@Pavel Which Python version are you using?
 
@Dennis 3.6.2
 
OK, so this is not relevant.
 
@Dennis One of the commits is literally called "Don't handle sigint on windows"
 
@Pavel That's no longer relevant. When I switched from shared objects to sub-processes, the standard library should have taken care of signals. At least that's how it works on Linux.
 
Well, what happens is that the shell prompt appears and accepts input, and I can run new commands, but the program continues outputing in the meantime
 
11:24 PM
Oh, so Python gets killed, but the subprocess doesn't?
 
That would appear to be the case
Which is pretty stupid of Windows
 
11:38 PM
It's at least partially Python's fault.
I think I know jow to fix this. I'll try later.
 
When the parent dies the child process should die too, unless you explicitely disown it.
 
11:55 PM
@Dennis Whenever you're done with that, can you add Jasmin?
 

« first day (582 days earlier)      last day (1912 days later) »