00:19:17 | * | oculux quit (Ping timeout: 258 seconds) |
00:20:07 | skrylar[m] | sealmove: pretty sure you can do things like \`==\`(a, b) because thats whata the compiler is doing in secret |
00:21:09 | sealmove | ? |
00:22:00 | skrylar[m] | earlier someone was asking about "putting symbols at the back" (whatever this meant?) |
00:22:17 | skrylar[m] | they dont postfix but you can prefix operators by quoting them |
00:22:20 | skrylar[m] | iirc |
00:23:05 | sealmove | he asked specifically for postfix |
00:23:23 | skrylar[m] | rip |
00:23:58 | * | oculux joined #nim |
00:25:40 | FromGitter | <jrfondren> it's vitally important for factorial operators. |
00:28:05 | sealmove | :D |
00:29:13 | PMunch | Of course you can postfix |
00:29:34 | PMunch | !eval echo 100.`*`(10) |
00:29:37 | NimBot | 1000 |
00:29:55 | PMunch | Or even: |
00:30:04 | PMunch | !eval echo 100.`*` 10 |
00:30:07 | NimBot | 1000 |
00:30:16 | skrylar[m] | that looks mildly painful |
00:30:30 | PMunch | Yeah, and why not just do 100 * 10? |
00:30:40 | FromGitter | <alehander42> thats not the point |
00:30:42 | FromGitter | <alehander42> the guy wants |
00:30:46 | FromGitter | <alehander42> <expr>? |
00:30:49 | FromGitter | <alehander42> and similar |
00:30:53 | PMunch | ? |
00:30:53 | FromGitter | <alehander42> which is not possible |
00:30:59 | FromGitter | <alehander42> ? is an operator |
00:31:01 | skrylar[m] | ruby function names :) |
00:31:02 | PMunch | Aaah |
00:31:05 | PMunch | Right |
00:31:08 | FromGitter | <alehander42> iirc |
00:31:32 | FromGitter | <alehander42> btw why so many people awake in 3:30 am |
00:31:47 | PMunch | It's "only" 2:30AM here |
00:31:53 | FromGitter | <alehander42> i see |
00:31:58 | PMunch | And I really should've been in bed a loong time ago :P |
00:32:00 | FromDiscord_ | <lmariscal> It's 7:31pm here |
00:32:04 | FromGitter | <alehander42> white nights! |
00:32:19 | PMunch | But I just got some new parts for an electronics project I'm working on |
00:32:33 | FromGitter | <alehander42> florida? |
00:32:37 | PMunch | So I'm playing around with circuitry |
00:32:53 | FromGitter | <alehander42> i got engaged |
00:33:01 | FromGitter | <alehander42> and i am trying to fix my own |
00:33:07 | FromGitter | <alehander42> refactoring |
00:33:10 | FromGitter | <alehander42> from two days ago |
00:33:37 | PMunch | Engaged? |
00:33:59 | sealmove | alehander42: I am making my hex editor :D it's indeed 3:30 |
00:34:00 | FromGitter | <alehander42> the thing with the ring |
00:34:06 | FromGitter | <alehander42> without ringbuffer |
00:34:17 | FromGitter | <alehander42> ohh nice |
00:34:26 | FromGitter | <alehander42> EET getting stronger |
00:34:40 | FromGitter | <kaushalmodi> Congrats! |
00:34:53 | sealmove | wow aleh congrats :D |
00:34:58 | FromGitter | <alehander42> CET is laggy anyway |
00:35:01 | FromGitter | <alehander42> thank you |
00:35:13 | * | jjido quit (Quit: Connection closed for inactivity) |
00:39:21 | PMunch | Yeah congrats! |
00:39:29 | PMunch | sealmove, hexeditor? |
00:39:47 | sealmove | yeah, want a early draft? |
00:40:16 | * | envoyt quit (Ping timeout: 246 seconds) |
00:40:36 | PMunch | Sure :) |
00:40:37 | * | envoyt joined #nim |
00:41:47 | sealmove | https://we.tl/t-ytxbwcpRbE |
00:43:52 | PMunch | Hmm |
00:44:25 | PMunch | Not really sure how to use it :P |
00:44:27 | PMunch | But it looks nice |
00:45:31 | PMunch | Oh well, time for bed :) |
00:45:32 | * | PMunch quit (Remote host closed the connection) |
00:50:52 | * | envoyt quit (Ping timeout: 272 seconds) |
00:51:10 | * | envoyt joined #nim |
00:51:39 | * | vegax87 joined #nim |
01:06:46 | * | laaron quit (Remote host closed the connection) |
01:08:43 | * | laaron joined #nim |
01:20:19 | * | laaron quit (Remote host closed the connection) |
01:22:14 | * | laaron joined #nim |
01:25:47 | * | laaron quit (Remote host closed the connection) |
01:26:19 | * | laaron joined #nim |
01:30:12 | * | c3v0axz quit (Ping timeout: 258 seconds) |
01:30:32 | * | c3v0axz joined #nim |
01:50:54 | * | vlad1777d quit (Ping timeout: 258 seconds) |
01:52:51 | * | oculux quit (Ping timeout: 244 seconds) |
01:57:01 | * | oculux joined #nim |
02:14:48 | * | Tyresc quit (Quit: WeeChat 2.5-dev) |
03:26:28 | sealmove | https://github.com/sealmove/hex |
03:28:32 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
03:29:18 | * | laaron joined #nim |
04:06:40 | * | vlad1777d joined #nim |
04:16:27 | * | envoyt quit (Ping timeout: 248 seconds) |
04:18:24 | * | envoyt joined #nim |
04:38:54 | * | disruptek quit (Quit: Bye) |
04:45:08 | * | disruptek joined #nim |
04:50:03 | * | envoyt quit (Ping timeout: 248 seconds) |
04:50:24 | * | envoyt joined #nim |
04:58:34 | * | deech_ joined #nim |
05:08:44 | * | sealmove quit (Quit: WeeChat 2.4) |
05:12:27 | * | deech_ quit (Ping timeout: 248 seconds) |
05:41:15 | * | envoyt quit (Ping timeout: 248 seconds) |
05:41:33 | * | envoyt joined #nim |
05:46:00 | * | nsf joined #nim |
05:51:43 | * | vlad1777d quit (Ping timeout: 272 seconds) |
06:32:54 | * | laaron quit (Remote host closed the connection) |
06:34:10 | * | laaron joined #nim |
06:37:06 | * | laaron quit (Remote host closed the connection) |
06:38:32 | * | laaron joined #nim |
06:42:40 | * | laaron quit (Remote host closed the connection) |
06:44:36 | * | laaron joined #nim |
06:55:14 | * | laaron quit (Remote host closed the connection) |
06:57:44 | * | laaron joined #nim |
06:58:54 | * | laaron quit (Remote host closed the connection) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:03:20 | * | narimiran joined #nim |
07:04:30 | * | gmpreussner joined #nim |
07:04:30 | * | laaron joined #nim |
07:13:47 | * | user99010101 joined #nim |
07:13:53 | user99010101 | hi |
07:15:25 | * | user99010101 left #nim (#nim) |
07:27:19 | FromGitter | <Varriount> Hello? |
07:28:18 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
07:29:21 | FromGitter | <kayabaNerve> Hello? Is anybody there? |
07:29:29 | * | laaron joined #nim |
07:30:10 | FromGitter | <kayabaNerve> Damn it. The line from Portal is "Is anyone there?" |
07:56:35 | * | arnetheduck quit (Ping timeout: 252 seconds) |
08:01:51 | skrylar[m] | i'm doing science and am still alive. |
08:27:29 | * | laaron quit (Remote host closed the connection) |
08:30:38 | * | laaron joined #nim |
08:41:04 | * | laaron quit (Remote host closed the connection) |
08:42:50 | * | laaron joined #nim |
08:42:59 | * | bast joined #nim |
08:49:03 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
08:49:22 | * | laaron joined #nim |
08:55:09 | * | Bast_ joined #nim |
08:55:14 | * | bast quit (Quit: Page closed) |
08:57:37 | * | Bast_ quit (Client Quit) |
08:57:47 | * | Bast joined #nim |
08:58:23 | * | Bast is now known as bast_ |
08:58:38 | * | laaron quit (Remote host closed the connection) |
09:00:01 | * | bast_ quit (Client Quit) |
09:00:12 | * | Bast_ joined #nim |
09:00:43 | * | laaron joined #nim |
09:00:45 | * | Bast_ quit (Client Quit) |
09:00:57 | * | Bast_ joined #nim |
09:03:48 | * | ng0 joined #nim |
09:20:50 | * | dddddd quit (Remote host closed the connection) |
09:27:57 | * | hohlerde joined #nim |
09:30:54 | * | neceve joined #nim |
09:35:59 | * | vlad1777d joined #nim |
09:40:20 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
09:42:03 | * | laaron joined #nim |
10:11:12 | * | vlad1777d quit (Ping timeout: 248 seconds) |
10:29:49 | * | Serenitor joined #nim |
10:32:02 | Serenitor | I got my nim script with compiler api running again on 0.20.0 now, but when importing std.math, I get erros like |
10:32:05 | Serenitor | cannot 'importc' variable at compile time; arctan2 |
10:32:09 | Serenitor | any ideas? |
10:32:27 | dom96 | You cannot import C functions at compile time. |
10:33:40 | Serenitor | yea that's what the error message says ^^ how would I go about using the math lib in my nim script like i used to? |
10:35:39 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
10:36:17 | * | laaron joined #nim |
10:36:33 | * | couven92 joined #nim |
10:37:18 | lqdev[m] | kayabaNerve: after speedrunning Portal numerous times, I hereby declare you're wrong, it's actuallly "Is anyone here?" |
10:43:18 | * | ng0_ joined #nim |
10:45:07 | * | ng0 quit (Ping timeout: 256 seconds) |
10:53:19 | Zevv | Serenitor: how do you mean "like I used to"? afaik Nim never supported FFI at compile time? |
10:57:36 | * | AndChat|624225 joined #nim |
11:00:44 | Serenitor | with 0.18.0 I could use math's importc functions in my nim script without issues |
11:00:48 | * | envoyt quit (Ping timeout: 248 seconds) |
11:01:38 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
11:01:56 | * | laaron joined #nim |
11:02:21 | * | ng0_ is now known as ng0 |
11:03:03 | leorize[m] | Serenitor: then maybe it's a regression? try filing a bug on github |
11:04:43 | * | lritter joined #nim |
11:18:18 | FromGitter | <xmonader> actually i think `?` could be very nice in function names |
11:26:13 | narimiran | we have `isFoo` instead of `foo?` |
11:29:56 | FromGitter | <xmonader> `fileExists` `existsFile` vs `fileExists?` :D It might be problematic because of the nim case insensitivity too |
11:31:10 | FromGitter | <alehander42> i also think `?` is cool for func names, but i am afraid it might be too late |
11:31:20 | FromGitter | <alehander42> so many api-s already using `is` and similar |
11:33:55 | * | Bast_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:33:56 | * | PMunch joined #nim |
11:37:31 | narimiran | so, how do you guys profile your (short-lived) code to see if your changes bring any speed/memory improvements? |
11:38:16 | * | Jjp137 quit (Ping timeout: 246 seconds) |
11:38:45 | PMunch | This is a bit worrying: https://www.reddit.com/r/nim/comments/byf84v/multi_threading_and_communication/ |
11:39:10 | PMunch | And I agree, we really need a deep-dive on how to do async and multithreading in Nim |
11:43:21 | * | nsf quit (Quit: WeeChat 2.4) |
11:43:32 | AndChat|624225 | agree must |
11:50:42 | * | zyklon quit (Ping timeout: 252 seconds) |
11:54:50 | * | AndChat|624225 quit (Read error: Connection reset by peer) |
11:55:08 | * | envoyt joined #nim |
12:05:14 | dom96 | xmonader, alehander42: Nim ain't Ruby :) |
12:09:36 | * | envoyt quit (Ping timeout: 248 seconds) |
12:09:56 | * | envoyt joined #nim |
12:11:12 | Zevv | PMunch: true, that's a big black hole still. I have been struggling to get things right for the last two years, and still haven't found the Proper Way To Do Things |
12:11:22 | * | sealmove joined #nim |
12:12:20 | PMunch | Yeah that's my issue as well, I'd like to write a how-to guide on it, but I'm still not sure if I'm doing it correctly :P |
12:12:48 | Zevv | to be honest, it feels a bit like going back to the pthreads level sometimes. |
12:13:14 | laaron | true, anyone thinking about fiber/goroutine? |
12:13:47 | Zevv | A few weeks ago someone came up with a paper here describing a more sensible method for spanwning and reaping threads, the basic idea was the control flow is preserved: you split into threads, you do stuff, and you join. So no real goto-like async. Does anyone know where that came from? |
12:14:16 | * | luis_ joined #nim |
12:14:30 | FromGitter | <alehander42> was it something similar to https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/ |
12:15:16 | * | vlad1777d joined #nim |
12:15:17 | Zevv | yep that was the one |
12:15:29 | FromGitter | <xmonader> I agree on the reddit post. nim/concurrency and threading is just painful. |
12:15:36 | Zevv | that makes a lot of sense, although I lack the theoretical background to say why |
12:18:09 | * | luis_ quit (Remote host closed the connection) |
12:18:29 | FromGitter | <alehander42> yes @zah linked me that article, but still have to re-read it |
12:21:40 | Zevv | alehander42: I do grok what it is trying to say, but I'm not sure if the practical consequences are nice to live with. |
12:22:21 | FromGitter | <xmonader> Something like this is really needed for nim users https://github.com/golang/go/wiki/LearnConcurrency |
12:22:23 | * | luis_ joined #nim |
12:24:05 | laaron | I agree too we need a more simple concurent model. currently i feel like back to C multiple thread programming. not bad, but also not easy |
12:25:06 | dom96 | We won't be doing fibers, we've got async/await |
12:25:29 | PMunch | But no-one knows how to use it properly.. |
12:25:37 | PMunch | I think that's the biggest issue |
12:25:43 | FromGitter | <alehander42> but how does it combine with threads/parallel code |
12:25:45 | dom96 | Plenty of people do |
12:26:03 | PMunch | No-one in this thread it appears (except you probably :P) |
12:26:22 | FromGitter | <alehander42> ok, in this case we need a good intro / some example small repo-s or a tour |
12:26:36 | dom96 | It's definitely not as easy as Go parallelism/concurrency |
12:26:40 | FromGitter | <alehander42> example projects are a very very good form of documentation imo |
12:26:47 | dom96 | But I want to learn people's concrete pain points |
12:27:32 | dom96 | Using it is tough, but I think to a certain extent it should be tough. Making threads too easy means people get sloppy and get all kinds of annoying thread bugs |
12:28:04 | dom96 | There are at least two good examples: HttpBeast and the parallelism examples from my book |
12:28:12 | dom96 | You can see the examples without buying the book |
12:33:49 | FromGitter | <xmonader> @dom96 example question: how to pipelines or do cancellation without using channels with async/await ? or should u use channels? |
12:34:02 | Zevv | ok, my pain would be: how to do async Futures and channels without polling |
12:36:14 | PMunch | Show of hands, how many would want me to read up on this as good as I can and write one or multiple longer articles explaining Nim concurrency? |
12:37:32 | * | uvegbot joined #nim |
12:39:03 | Zevv | \O/ |
12:39:09 | laaron | hand |
12:39:21 | Zevv | tutorial #4! |
12:39:57 | FromGitter | <xmonader> yes please do! |
12:41:07 | FromGitter | <alehander42> +2 |
12:41:43 | narimiran | PMunch: my both hands are up |
12:41:54 | * | dom96 puts up his hand |
12:42:12 | dom96 | Reviews appreciated: https://github.com/nim-lang/Nim/pull/11232 :) |
12:42:37 | dom96 | Zevv, https://github.com/nim-lang/Nim/issues/8080 |
12:42:51 | dom96 | Your pain point is something that we simply need to implement |
12:43:05 | dom96 | If you're feeling brave and have some time, help appreciated :) |
12:43:36 | FromGitter | <kaushalmodi> PMunch: yes please! |
12:44:08 | dom96 | xmonader: use channels. |
12:46:49 | FromGitter | <xmonader> @dom96 see this comment? https://forum.nim-lang.org/t/959#5820 @Araq is saying it's designed to be used with threads and the channel should it be `ptr` or not too :) such things are just confusing. |
12:47:09 | FromGitter | <kaushalmodi> Serenitor: yes, so file an issue with a snippet that worked for you on Nim 0.18.0, which then broke later. |
12:51:20 | FromGitter | <alehander42> but then we have channels and threads and async and also the parallel `||` |
12:51:37 | FromGitter | <alehander42> all i am saying is, it's good to have examples of combinations of them or best usecases |
12:52:05 | FromGitter | <alehander42> (i personally mostly use async, but i probably just dont know well when to use other primitive) |
12:52:26 | * | Snircle joined #nim |
12:52:50 | sealmove | PMunch: https://github.com/sealmove/hex |
12:53:50 | PMunch | Oh cool :) |
12:54:08 | PMunch | Maybe add a recording with something like https://asciinema.org/ ? |
12:57:34 | sealmove | Will do that |
12:58:38 | sealmove | But it's not ready, currently I store the file in a seq[byte]. The real challenge is to use a custom btree-like structure so that bytes can be inserted or deleted effeciently. |
12:59:00 | sealmove | https://www.chiark.greenend.org.uk/~sgtatham/tweak/btree.html |
13:00:28 | * | pyotr joined #nim |
13:02:09 | * | pyotr quit (Client Quit) |
13:14:45 | Mister_Magister | i'll try creating sfos app using nim :P |
13:17:58 | laaron | sealmove, comeon! |
13:18:29 | sealmove | ? |
13:43:23 | * | nsf joined #nim |
13:45:03 | leorize[m] | sealmove: there's rope in the stdlib, does that work? |
13:46:29 | sealmove | leorize: Ropes are optimized for string operation specifically. They work great for a text editor. For a hex editor there is an even better structure that Tatham came up with. |
13:47:26 | narimiran | offtopic: that's the same Simon Tatham who has made this great time-spender: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ |
13:48:40 | sealmove | yup, he also made nasm and PuTTY |
13:54:19 | * | luis_ quit (Ping timeout: 259 seconds) |
14:00:23 | * | dddddd joined #nim |
14:05:19 | * | Trustable joined #nim |
14:06:44 | * | deech_ joined #nim |
14:17:23 | * | luis_ joined #nim |
14:18:51 | FromDiscord_ | <DeltaPHC> I think stuff like the newruntime combined with concepts could potentially make threading easier to reason about |
14:22:12 | FromDiscord_ | <DeltaPHC> In Rust, a lot of threading errors are caught at compile time, from the nature of data ownership and how objects are marked whether they can be sent to another thread, or shared across threads, which can be done with concepts |
14:23:29 | * | luis_ quit (Remote host closed the connection) |
14:24:09 | disruptek | async itself isn't the problem, it's warts surrounding exceptions and newruntime that make it only a step, at best, towards a proper future solution. |
14:25:47 | FromDiscord_ | <DeltaPHC> Yeah, the API is a different problem, but I'm just saying that the building blocks are falling into place for making things reasonably safe |
14:34:37 | Mister_Magister | can i include and use static methods from C++ header? |
14:45:51 | Mister_Magister | ;-; |
14:57:43 | * | laaron quit (Remote host closed the connection) |
15:02:10 | FromGitter | <kaushalmodi> What's does the Appveyor build failure here mean?: https://github.com/nim-lang/Nim/pull/11443 |
15:02:18 | FromGitter | <kaushalmodi> The PR doesn't affect Windows. |
15:02:43 | * | laaron joined #nim |
15:02:51 | * | vlad1777d quit (Ping timeout: 248 seconds) |
15:03:24 | * | vlad1777d joined #nim |
15:07:14 | * | laaron quit (Remote host closed the connection) |
15:09:07 | * | laaron joined #nim |
15:11:03 | * | vlad1777d quit (Ping timeout: 268 seconds) |
15:17:06 | narimiran | restarted |
15:21:57 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
15:23:11 | * | laaron joined #nim |
15:30:25 | leorize | Mister_Magister: importcpp should be able to help you with that |
15:30:53 | * | Jjp137 joined #nim |
15:31:07 | * | laaron quit (Remote host closed the connection) |
15:38:56 | * | laaron joined #nim |
15:41:18 | * | i7sDream_ joined #nim |
15:41:18 | * | vlad1777d joined #nim |
15:43:41 | * | theelous3_ joined #nim |
15:44:16 | * | i7sDream quit (Ping timeout: 258 seconds) |
15:52:38 | FromDiscord_ | <treeform> sealmove, screenshots of your hex editor? |
15:54:43 | FromDiscord_ | <treeform> dom96, should nim have some thing like python's `python -m http.server`? (Where it just starts a static http server in current folder) |
15:54:57 | sealmove | https://asciinema.org/a/hEUxniCSSpImI4yQohLw1oBIn |
15:55:35 | FromDiscord_ | <treeform> sealmove, add that to hithub read me! |
15:55:44 | sealmove | will do ;) |
15:56:54 | FromDiscord_ | <treeform> looks really cool. I feel like I can never find hex editor I like. |
15:57:46 | sealmove | That's why I made it! |
15:57:57 | sealmove | Though I found a quite nice one |
15:58:17 | sealmove | https://github.com/fr0zn/hed |
16:00:27 | sealmove | treeform: please feel free to make suggestions |
16:00:30 | shashlick | I've also used threads and async in the past but will agree it is hard and unsure if my old code still works |
16:12:25 | * | neceve quit (Remote host closed the connection) |
16:24:24 | * | vlad1777d quit (Ping timeout: 272 seconds) |
16:38:45 | xace | do we have a equivalent of `Popen.communicate(input)` in nim? or is there an existing library that handles this? The goal is to send a text string to another process and read its output... |
16:39:38 | xace | (Popen.communicate() from python) |
16:40:33 | shashlick | You can do that with startProcess |
16:40:49 | shashlick | Don't give parent streams and then open input and output handles |
16:41:15 | shashlick | Check how execCmd does it |
16:43:51 | xace | shashlick: but wouldn't that be too late for sending data to the process? |
16:47:24 | FromGitter | <jrfondren> it would be too late if execCmd didn't do some work to support it. |
16:47:42 | FromGitter | <jrfondren> startProcess, rather |
16:48:09 | xace | because my end goal is to send a string of data delimited by newline to `fzf`, basically `echo $mystring | fzf` which outputs the result |
16:49:21 | FromGitter | <jrfondren> you can do that with startProcess |
16:52:51 | xace | jrfondren: if i dont give the process the poParentStreams, `fzf` will not be able to print its prompt (it's sort of a terminal UI). and when I give it `poParentStreams` `outputStreams()` asserts that poParentstreams isnt in process options... |
16:53:12 | FromGitter | <jrfondren> read its output and print it. |
16:53:42 | xace | jrfondren: it's output is probably going to be ncurses like, and not a string that i cant print out as is... |
16:53:57 | FromGitter | <jrfondren> ncurses output is a string that you can print. |
16:54:08 | xace | ill try it out then |
16:59:34 | * | deech_ quit (Ping timeout: 246 seconds) |
16:59:44 | * | deech quit (Ping timeout: 248 seconds) |
17:02:01 | * | deech joined #nim |
17:27:46 | dom96 | treeform: why though? Isn't Python's enough? :) |
17:30:19 | shashlick | xace see my project genotrance/ff |
17:30:36 | shashlick | I've already done all that for fzf so you can leverage |
17:31:13 | xace | shashlick: thanks, ill check it out :) |
17:31:41 | shashlick | Working with processes is a pain |
17:33:56 | xace | yeah, what makes it worse in my case is everything takes time to code because i only have a phone atm... |
17:35:26 | shashlick | Ugh |
17:35:53 | shashlick | fzf is pretty cool |
17:36:01 | shashlick | You can run a custom command on the selection |
17:36:20 | shashlick | So I made a wrapper for windows that I use to do all sorts of stuff |
17:37:05 | shashlick | https://github.com/genotrance/ff |
17:37:13 | xace | shashlick: yeah, ive used dmenu for years, but lately ive only had ssh access via phone and fzf is better than i could imagine |
17:37:27 | xace | yeah, i noticed the ahk file, reminds me of good old days :) |
17:38:53 | dom96 | sealmove: that looks super cool. You should create a Nimble package out of it too if you haven't already :) |
17:38:53 | shashlick | I use ahk all the time, I'm on windows |
17:39:43 | shashlick | @sealmove - how are you handling keyboard input? termios means posix only? |
17:41:28 | shashlick | @dom96 - should we fix that nimble issue with getAppDir()/nim.exe |
17:41:44 | shashlick | That way we are using the same Nim for that nimble |
17:42:02 | dom96 | hrm? Which issue is this? |
17:42:04 | shashlick | But assumes nimble and nim are in the same dir always |
17:42:06 | sealmove | @dom96: that would be awesome :) though I felt it's too incomplete atm to make a nimble package already |
17:42:32 | xace | shashlick: i used to use ahk all the time... a lately i've felt like implementing some of ahk's functionality in nim. if you ever feel tempted of cooperating on implementing various functions (basically cross platform support for most instructions/functions ahk has) of ahk, let me know, because i'd be down for it :) (my windows API knowledge is greater than my linux knowledge but im exclusively using linux |
17:42:38 | xace | these days) |
17:42:47 | shashlick | @dom96 - https://github.com/nim-lang/nimble/issues/665 |
17:43:22 | shashlick | @xace - happy to collaborate |
17:43:30 | dom96 | shashlick, I don't think that's the issue, Nimble already depends on being able to find `nim` pretty heavily |
17:43:36 | dom96 | Otherwise `nimble c` wouldn't work at all |
17:43:36 | shashlick | Do you mean nimscript or pure Nim? |
17:43:41 | dom96 | nor `nimble build` |
17:43:50 | sealmove | shashlick: Yes.. unfortunately procs in terminal module writes to stdout directly so I can't use them since I create a string containing the whole screen and call write() only once. |
17:44:26 | shashlick | @dom96 well the bug is that Nim.exe is hard-coded in nocompiler |
17:44:38 | shashlick | I'll see how you detect Nim in build and Putney places |
17:44:42 | shashlick | Other |
17:44:52 | dom96 | what? How is it hard coded? |
17:46:32 | sealmove | shashlick: Sorry, that's for printing. Keyboard input hmm... not sure if they are posix-specific |
17:47:06 | shashlick | @dom96 - sorry can't be brilliant all the time 😞 https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptwrapper.nim#L43 |
17:48:14 | dom96 | shashlick, that's not "hard-coded", it should use `nim` from PATH |
17:48:25 | dom96 | That's how all of Nimble does it IIRC |
17:49:07 | shashlick | Ok will check the other code too |
17:49:34 | shashlick | I guess we can use findExe and if Nim isn't found then use getAppDir |
17:50:11 | sealmove | shashlick: anyway the whole app is posix-only atm. in the future I might refactor it so it can work in Windows too, but it's not high in my todo list. |
17:53:00 | dom96 | shashlick, no, we shouldn't do this. People should have Nim and Nimble in their PATH |
17:53:07 | dom96 | We shouldn't be trying to work around these things |
17:58:14 | * | AndChat|624225 joined #nim |
17:58:31 | * | AndChat|624225 quit (Read error: Connection reset by peer) |
17:58:55 | shashlick | Ok, let's wait to hear from the submitter if the root cause is correct |
17:59:00 | * | AndChat|624225 joined #nim |
18:00:59 | * | envoyt quit (Ping timeout: 248 seconds) |
18:01:44 | shashlick | @sealmove - I tried to make something generic in genotrance/snip but it is not without warts |
18:02:01 | * | deech_ joined #nim |
18:03:30 | sealmove | what is genotrance about? |
18:04:43 | * | deech quit (Ping timeout: 248 seconds) |
18:05:01 | shashlick | https://github.com/genotrance/snip |
18:05:08 | * | stefanos82 joined #nim |
18:10:26 | sealmove | Yes, just trying to understand what genotrance is. Not familiar with it, it seems like a collection of web-related stuff? |
18:11:13 | sealmove | Or is it just your github page? :P |
18:17:57 | shashlick | I see |
18:18:26 | shashlick | I used to make trance music few decades ago |
18:18:51 | shashlick | My nick was genosha - demoscene stuff |
18:19:04 | shashlick | From there came genotrance which is my website |
18:19:04 | narimiran | you've come a long way, baby |
18:19:22 | shashlick | Yep! |
18:19:48 | * | narimiran hopes somebody will get the music reference |
18:21:32 | sealmove | :D |
18:31:42 | * | terorie quit (Ping timeout: 272 seconds) |
18:39:10 | Zevv | shows your age, though |
18:42:04 | shashlick | Regrettably ;) |
18:42:37 | shashlick | My music is still up on http://genotrance.com for anyone interested |
18:45:22 | Mister_Magister | how do i add c++ include path? |
18:48:12 | shashlick | passC |
18:48:14 | * | lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/JXpOlOyhJJfkgoaRUZpLXPlQ > |
18:48:27 | lqdev[m] | adds the current source'sdirectory into the include path |
18:48:32 | lqdev[m] | source's directory* |
18:52:05 | Mister_Magister | thanks |
18:56:19 | Mister_Magister | i'm trying to use 3 functions from c++ to initialise qml but i'm failing xd |
18:56:30 | * | natrys joined #nim |
19:07:13 | * | cybj quit (Ping timeout: 252 seconds) |
19:08:46 | * | cybj joined #nim |
19:12:03 | shashlick | @lqdev - am going to work on the bitsize piece now |
19:20:05 | lqdev[m] | nice, ping me if you need any help with testing it out |
19:20:14 | shashlick | sure |
19:35:03 | * | AndChat|624225 quit (Ping timeout: 245 seconds) |
19:35:25 | * | envoyt joined #nim |
19:41:58 | * | Trustable quit (Remote host closed the connection) |
19:42:02 | * | laaron quit (Remote host closed the connection) |
19:42:12 | * | laaron- joined #nim |
20:19:03 | Zevv | sealmove: like your hexedit |
20:22:13 | * | envoyt quit (Ping timeout: 246 seconds) |
20:22:31 | * | envoyt joined #nim |
20:28:07 | * | narimiran_ joined #nim |
20:30:37 | * | narimiran quit (Ping timeout: 258 seconds) |
20:37:18 | * | abm joined #nim |
20:38:59 | shashlick | @lqdev - i think i have it working, got time now? |
20:39:23 | lqdev[m] | sure |
20:43:06 | shashlick | i got ma_rb but now need 2 dimensional arrays in ma_channel_router_config |
20:44:37 | * | abm quit (Quit: Leaving) |
20:45:35 | shashlick | lots of other crazy stuff in this h file |
20:49:22 | * | luis_ joined #nim |
20:49:32 | * | abm joined #nim |
20:52:05 | * | mwbrown quit (Ping timeout: 258 seconds) |
20:53:42 | * | natrys quit (Quit: natrys) |
20:55:28 | * | narimiran_ quit (Ping timeout: 248 seconds) |
20:58:17 | shashlick | just pushed bitfield support |
21:04:27 | * | mwbrown joined #nim |
21:04:58 | * | nsf quit (Quit: WeeChat 2.4) |
21:11:56 | FromGitter | <arnetheduck> fun bug in 0.19: ⏎ ⏎ ```0 ⏎ 0 ⏎ 0 ⏎ 0``` ⏎ ⏎ changing to `f(0'u8, 1, 2, 3)` makes it work.. fixed in 0.20 I think [https://gitter.im/nim-lang/Nim?at=5cfd761b3dcdab40031a5268] |
21:12:17 | * | terorie joined #nim |
21:17:00 | * | envoyt quit (Ping timeout: 258 seconds) |
21:17:32 | * | envoyt joined #nim |
21:21:52 | * | couven92 quit (Quit: Client Disconnecting) |
21:26:29 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
21:26:51 | * | luis_ quit (Read error: Connection reset by peer) |
21:32:57 | * | luis_ joined #nim |
21:37:32 | * | vlad1777d joined #nim |
21:45:13 | * | vlad1777d quit (Remote host closed the connection) |
21:47:39 | * | vlad1777d joined #nim |
21:57:35 | xace | shashlick: http://ix.io/1Lm0 # i never get the chance to write to the fzf process as it seems like the process exits early... i might have to go with a posix solution... |
22:05:08 | shashlick | Not sure - do you need to pass something to it on cmd line? |
22:06:00 | xace | shashlick: well in bash i would just: result = "`$(echo -e "uno\ndos\ntres" | fzf)`" |
22:06:33 | * | pyotr joined #nim |
22:07:02 | shashlick | Are you sure it is running? |
22:07:16 | xace | atm im considering using fork() and ensuring i prepare the pipes before i hand it over to fzf... |
22:07:32 | shashlick | Cause fzf should wait indefinitely |
22:07:41 | xace | shashlick: 1 sec let me inject a sleep() to check it out quickly |
22:08:58 | xace | shashlick: yeah it seems to be running, atleast it lists as a running process |
22:09:14 | shashlick | You might need to give it enough time to start running |
22:09:34 | xace | actually it seems like it closes immediately... |
22:09:51 | shashlick | In my case, I run another process before checking it |
22:09:54 | shashlick | So it gets enough time |
22:10:27 | xace | shashlick: tried before i even touch the streams, it closes immediately |
22:10:39 | xace | maybe its behaviour on windows is different |
22:11:00 | * | lritter quit (Ping timeout: 268 seconds) |
22:11:42 | shashlick | I'm running in windows so it should run |
22:12:22 | xace | maybe i should look into whatever `fzf --sync` does |
22:12:23 | shashlick | See if you are getting any exceptions |
22:12:28 | shashlick | The discard |
22:12:52 | * | pyotr quit (Remote host closed the connection) |
22:13:09 | xace | oh i well i do get a "SIGPIPE: Pipe closed." which i guess is a fatal flaw, but thats after its suppose to be done... |
22:13:09 | shashlick | If your process exits, fzf will get killed as well |
22:13:31 | xace | my process should wait for fzf to exit first because of the peekExitCode() != -1 |
22:14:14 | shashlick | Put a sleep before checking running or loop until running |
22:15:42 | * | stefanos82 quit (Quit: Quitting for now...) |
22:15:42 | xace | it closes either way... im guessing its because fzf somehow figures out it cant render its content, ill investigate it |
22:15:47 | shashlick | Actually you are passing an empty string as an arg |
22:16:08 | shashlick | @[""] instead of @[] |
22:16:25 | shashlick | So fzf probably gets confused and errors out |
22:17:55 | xace | oh shashlick well that seems to keep fzf running |
22:18:08 | shashlick | Neat |
22:18:32 | xace | so now, the problem is, nothing happens it stays on the "if sout.readLine():" |
22:18:58 | xace | i guess its simply waitinf for a full line to be read |
22:19:25 | shashlick | So here's the thing |
22:19:53 | shashlick | You cannot read the output |
22:20:11 | shashlick | Otherwise you cannot use the menu functionality |
22:21:12 | shashlick | And fzf will wait to read from sin forever, unless you pick an option then it will execute any bind options and exit |
22:21:25 | shashlick | Your process cannot read that output either |
22:21:41 | shashlick | So you might want to ask fzf to write the selection to a file and read that |
22:22:56 | shashlick | Since I suspect you only care about the selection |
22:23:11 | xace | i was hoping to communicate with fzf directly rather than juggling with files. Yes i only care about the selection |
22:24:29 | shashlick | I understand but unfortunately it isn't that simple |
22:24:47 | shashlick | If you are reading stdout of a process, it doesn't write to the console anymore |
22:25:22 | xace | if im going to be handling files i might aswell make us of mkfifo() instead... |
22:25:42 | xace | but ill see if fork() could circumvent this |
22:34:49 | shashlick | If you find a better way, do let me know |
22:36:21 | xace | shashlick: yes i will keep you up to date, was hoping your ff was a simple `nimble install ff` and `import ff; result = fzf("my\ndata")`though my solution will be solely posix based, so it will not apply for windows (unless you run it under the new linux submodule they added to win10) |
22:38:32 | shashlick | What exactly is your use case |
22:42:23 | xace | shashlick: i'd like to introduce some common "helper" functions to my "nimlibrary" so that whenever i want to prompt the user for a selection of data, i can easily just send the user to `fzf`... I am aware of simple methods of implementing it, but i'm only interested in doing it properly... |
22:43:06 | shashlick | Are you having it run in a different window or inline? |
22:43:11 | xace | for example on my phone i wrote a nim module that has some simple functions such as: `import xace; IsConnectedToHomeWifi()` |
22:43:23 | xace | shashlick: the goal is to have it run in the same window, so i guess inline |
22:43:50 | xace | if there is a x11 session i wouldn't mind sending to to dmenu, which behaves similarily but a GUI and not as cool at fuzzy searching |
22:46:16 | shashlick | Ok cool, again if you figure it out, let me know |
22:58:10 | * | mbarkhau joined #nim |
23:01:39 | * | luis_ quit (Remote host closed the connection) |
23:04:35 | * | Jesin quit (Quit: Leaving) |
23:07:44 | * | mbarkhau quit (Ping timeout: 248 seconds) |
23:17:05 | * | Jesin joined #nim |
23:21:40 | * | deech_ quit (Remote host closed the connection) |
23:21:59 | * | deech_ joined #nim |
23:29:23 | FromDiscord_ | <koalefant> Hello, I am new with Nim and I would like to do following: have a cheap generic function type_index[T]() that returns zero-based index for set of types, and I am fine with instantiating a template/macro for every type manually somewhere in the code. Any suggestions on how this could be implemented? |
23:29:23 | FromDiscord_ | <koalefant> |
23:29:23 | FromDiscord_ | <koalefant> My first thought was to generate overloads. I was able to count t but I am not sure how could I generate functions with different return value from a static block or a template, any suggestions? |
23:32:09 | FromDiscord_ | <koalefant> A bit of a bigger picture: I need this for a simple Entity Component System, I am looking for an efficient way of addressing per-type containers. |
23:41:00 | PMunch | Hmm, not entirely sure what you're actually trying to do |
23:46:13 | shashlick | Why not just use seq |
23:55:19 | * | Bast_ joined #nim |