<< 09-06-2019 >>

00:19:17*oculux quit (Ping timeout: 258 seconds)
00:20:07skrylar[m]sealmove: pretty sure you can do things like \`==\`(a, b) because thats whata the compiler is doing in secret
00:21:09sealmove?
00:22:00skrylar[m]earlier someone was asking about "putting symbols at the back" (whatever this meant?)
00:22:17skrylar[m]they dont postfix but you can prefix operators by quoting them
00:22:20skrylar[m]iirc
00:23:05sealmovehe asked specifically for postfix
00:23:23skrylar[m]rip
00:23:58*oculux joined #nim
00:25:40FromGitter<jrfondren> it's vitally important for factorial operators.
00:28:05sealmove:D
00:29:13PMunchOf course you can postfix
00:29:34PMunch!eval echo 100.`*`(10)
00:29:37NimBot1000
00:29:55PMunchOr even:
00:30:04PMunch!eval echo 100.`*` 10
00:30:07NimBot1000
00:30:16skrylar[m]that looks mildly painful
00:30:30PMunchYeah, and why not just do 100 * 10?
00:30:40FromGitter<alehander42> thats not the point
00:30:42FromGitter<alehander42> the guy wants
00:30:46FromGitter<alehander42> <expr>?
00:30:49FromGitter<alehander42> and similar
00:30:53PMunch?
00:30:53FromGitter<alehander42> which is not possible
00:30:59FromGitter<alehander42> ? is an operator
00:31:01skrylar[m]ruby function names :)
00:31:02PMunchAaah
00:31:05PMunchRight
00:31:08FromGitter<alehander42> iirc
00:31:32FromGitter<alehander42> btw why so many people awake in 3:30 am
00:31:47PMunchIt's "only" 2:30AM here
00:31:53FromGitter<alehander42> i see
00:31:58PMunchAnd I really should've been in bed a loong time ago :P
00:32:00FromDiscord_<lmariscal> It's 7:31pm here
00:32:04FromGitter<alehander42> white nights!
00:32:19PMunchBut I just got some new parts for an electronics project I'm working on
00:32:33FromGitter<alehander42> florida?
00:32:37PMunchSo I'm playing around with circuitry
00:32:53FromGitter<alehander42> i got engaged
00:33:01FromGitter<alehander42> and i am trying to fix my own
00:33:07FromGitter<alehander42> refactoring
00:33:10FromGitter<alehander42> from two days ago
00:33:37PMunchEngaged?
00:33:59sealmovealehander42: I am making my hex editor :D it's indeed 3:30
00:34:00FromGitter<alehander42> the thing with the ring
00:34:06FromGitter<alehander42> without ringbuffer
00:34:17FromGitter<alehander42> ohh nice
00:34:26FromGitter<alehander42> EET getting stronger
00:34:40FromGitter<kaushalmodi> Congrats!
00:34:53sealmovewow aleh congrats :D
00:34:58FromGitter<alehander42> CET is laggy anyway
00:35:01FromGitter<alehander42> thank you
00:35:13*jjido quit (Quit: Connection closed for inactivity)
00:39:21PMunchYeah congrats!
00:39:29PMunchsealmove, hexeditor?
00:39:47sealmoveyeah, want a early draft?
00:40:16*envoyt quit (Ping timeout: 246 seconds)
00:40:36PMunchSure :)
00:40:37*envoyt joined #nim
00:41:47sealmovehttps://we.tl/t-ytxbwcpRbE
00:43:52PMunchHmm
00:44:25PMunchNot really sure how to use it :P
00:44:27PMunchBut it looks nice
00:45:31PMunchOh 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:28sealmovehttps://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:53user99010101hi
07:15:25*user99010101 left #nim (#nim)
07:27:19FromGitter<Varriount> Hello?
07:28:18*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
07:29:21FromGitter<kayabaNerve> Hello? Is anybody there?
07:29:29*laaron joined #nim
07:30:10FromGitter<kayabaNerve> Damn it. The line from Portal is "Is anyone there?"
07:56:35*arnetheduck quit (Ping timeout: 252 seconds)
08:01:51skrylar[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:02SerenitorI 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:05Serenitorcannot 'importc' variable at compile time; arctan2
10:32:09Serenitorany ideas?
10:32:27dom96You cannot import C functions at compile time.
10:33:40Serenitoryea 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:18lqdev[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:19ZevvSerenitor: 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:44Serenitorwith 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:03leorize[m]Serenitor: then maybe it's a regression? try filing a bug on github
11:04:43*lritter joined #nim
11:18:18FromGitter<xmonader> actually i think `?` could be very nice in function names
11:26:13narimiranwe have `isFoo` instead of `foo?`
11:29:56FromGitter<xmonader> `fileExists` `existsFile` vs `fileExists?` :D It might be problematic because of the nim case insensitivity too
11:31:10FromGitter<alehander42> i also think `?` is cool for func names, but i am afraid it might be too late
11:31:20FromGitter<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:31narimiranso, 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:45PMunchThis is a bit worrying: https://www.reddit.com/r/nim/comments/byf84v/multi_threading_and_communication/
11:39:10PMunchAnd 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:32AndChat|624225agree 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:14dom96xmonader, alehander42: Nim ain't Ruby :)
12:09:36*envoyt quit (Ping timeout: 248 seconds)
12:09:56*envoyt joined #nim
12:11:12ZevvPMunch: 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:20PMunchYeah 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:48Zevvto be honest, it feels a bit like going back to the pthreads level sometimes.
12:13:14laarontrue, anyone thinking about fiber/goroutine?
12:13:47ZevvA 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:30FromGitter<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:17Zevvyep that was the one
12:15:29FromGitter<xmonader> I agree on the reddit post. nim/concurrency and threading is just painful.
12:15:36Zevvthat 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:29FromGitter<alehander42> yes @zah linked me that article, but still have to re-read it
12:21:40Zevvalehander42: 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:21FromGitter<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:05laaronI 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:06dom96We won't be doing fibers, we've got async/await
12:25:29PMunchBut no-one knows how to use it properly..
12:25:37PMunchI think that's the biggest issue
12:25:43FromGitter<alehander42> but how does it combine with threads/parallel code
12:25:45dom96Plenty of people do
12:26:03PMunchNo-one in this thread it appears (except you probably :P)
12:26:22FromGitter<alehander42> ok, in this case we need a good intro / some example small repo-s or a tour
12:26:36dom96It's definitely not as easy as Go parallelism/concurrency
12:26:40FromGitter<alehander42> example projects are a very very good form of documentation imo
12:26:47dom96But I want to learn people's concrete pain points
12:27:32dom96Using 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:04dom96There are at least two good examples: HttpBeast and the parallelism examples from my book
12:28:12dom96You can see the examples without buying the book
12:33:49FromGitter<xmonader> @dom96 example question: how to pipelines or do cancellation without using channels with async/await ? or should u use channels?
12:34:02Zevvok, my pain would be: how to do async Futures and channels without polling
12:36:14PMunchShow 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:03Zevv\O/
12:39:09laaronhand
12:39:21Zevvtutorial #4!
12:39:57FromGitter<xmonader> yes please do!
12:41:07FromGitter<alehander42> +2
12:41:43narimiranPMunch: my both hands are up
12:41:54*dom96 puts up his hand
12:42:12dom96Reviews appreciated: https://github.com/nim-lang/Nim/pull/11232 :)
12:42:37dom96Zevv, https://github.com/nim-lang/Nim/issues/8080
12:42:51dom96Your pain point is something that we simply need to implement
12:43:05dom96If you're feeling brave and have some time, help appreciated :)
12:43:36FromGitter<kaushalmodi> PMunch: yes please!
12:44:08dom96xmonader: use channels.
12:46:49FromGitter<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:09FromGitter<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:20FromGitter<alehander42> but then we have channels and threads and async and also the parallel `||`
12:51:37FromGitter<alehander42> all i am saying is, it's good to have examples of combinations of them or best usecases
12:52:05FromGitter<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:50sealmovePMunch: https://github.com/sealmove/hex
12:53:50PMunchOh cool :)
12:54:08PMunchMaybe add a recording with something like https://asciinema.org/ ?
12:57:34sealmoveWill do that
12:58:38sealmoveBut 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:00sealmovehttps://www.chiark.greenend.org.uk/~sgtatham/tweak/btree.html
13:00:28*pyotr joined #nim
13:02:09*pyotr quit (Client Quit)
13:14:45Mister_Magisteri'll try creating sfos app using nim :P
13:17:58laaronsealmove, comeon!
13:18:29sealmove?
13:43:23*nsf joined #nim
13:45:03leorize[m]sealmove: there's rope in the stdlib, does that work?
13:46:29sealmoveleorize: 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:26narimiranofftopic: that's the same Simon Tatham who has made this great time-spender: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/
13:48:40sealmoveyup, 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:51FromDiscord_<DeltaPHC> I think stuff like the newruntime combined with concepts could potentially make threading easier to reason about
14:22:12FromDiscord_<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:09disruptekasync 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:47FromDiscord_<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:37Mister_Magistercan i include and use static methods from C++ header?
14:45:51Mister_Magister;-;
14:57:43*laaron quit (Remote host closed the connection)
15:02:10FromGitter<kaushalmodi> What's does the Appveyor build failure here mean?: https://github.com/nim-lang/Nim/pull/11443
15:02:18FromGitter<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:06narimiranrestarted
15:21:57*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
15:23:11*laaron joined #nim
15:30:25leorizeMister_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:38FromDiscord_<treeform> sealmove, screenshots of your hex editor?
15:54:43FromDiscord_<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:57sealmovehttps://asciinema.org/a/hEUxniCSSpImI4yQohLw1oBIn
15:55:35FromDiscord_<treeform> sealmove, add that to hithub read me!
15:55:44sealmovewill do ;)
15:56:54FromDiscord_<treeform> looks really cool. I feel like I can never find hex editor I like.
15:57:46sealmoveThat's why I made it!
15:57:57sealmoveThough I found a quite nice one
15:58:17sealmovehttps://github.com/fr0zn/hed
16:00:27sealmovetreeform: please feel free to make suggestions
16:00:30shashlickI'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:45xacedo 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:38xace(Popen.communicate() from python)
16:40:33shashlickYou can do that with startProcess
16:40:49shashlickDon't give parent streams and then open input and output handles
16:41:15shashlickCheck how execCmd does it
16:43:51xaceshashlick: but wouldn't that be too late for sending data to the process?
16:47:24FromGitter<jrfondren> it would be too late if execCmd didn't do some work to support it.
16:47:42FromGitter<jrfondren> startProcess, rather
16:48:09xacebecause 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:21FromGitter<jrfondren> you can do that with startProcess
16:52:51xacejrfondren: 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:12FromGitter<jrfondren> read its output and print it.
16:53:42xacejrfondren: it's output is probably going to be ncurses like, and not a string that i cant print out as is...
16:53:57FromGitter<jrfondren> ncurses output is a string that you can print.
16:54:08xaceill 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:46dom96treeform: why though? Isn't Python's enough? :)
17:30:19shashlickxace see my project genotrance/ff
17:30:36shashlickI've already done all that for fzf so you can leverage
17:31:13xaceshashlick: thanks, ill check it out :)
17:31:41shashlickWorking with processes is a pain
17:33:56xaceyeah, what makes it worse in my case is everything takes time to code because i only have a phone atm...
17:35:26shashlickUgh
17:35:53shashlickfzf is pretty cool
17:36:01shashlickYou can run a custom command on the selection
17:36:20shashlickSo I made a wrapper for windows that I use to do all sorts of stuff
17:37:05shashlickhttps://github.com/genotrance/ff
17:37:13xaceshashlick: 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:27xaceyeah, i noticed the ahk file, reminds me of good old days :)
17:38:53dom96sealmove: that looks super cool. You should create a Nimble package out of it too if you haven't already :)
17:38:53shashlickI use ahk all the time, I'm on windows
17:39:43shashlick@sealmove - how are you handling keyboard input? termios means posix only?
17:41:28shashlick@dom96 - should we fix that nimble issue with getAppDir()/nim.exe
17:41:44shashlickThat way we are using the same Nim for that nimble
17:42:02dom96hrm? Which issue is this?
17:42:04shashlickBut assumes nimble and nim are in the same dir always
17:42:06sealmove@dom96: that would be awesome :) though I felt it's too incomplete atm to make a nimble package already
17:42:32xaceshashlick: 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:38xacethese days)
17:42:47shashlick@dom96 - https://github.com/nim-lang/nimble/issues/665
17:43:22shashlick@xace - happy to collaborate
17:43:30dom96shashlick, I don't think that's the issue, Nimble already depends on being able to find `nim` pretty heavily
17:43:36dom96Otherwise `nimble c` wouldn't work at all
17:43:36shashlickDo you mean nimscript or pure Nim?
17:43:41dom96nor `nimble build`
17:43:50sealmoveshashlick: 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:26shashlick@dom96 well the bug is that Nim.exe is hard-coded in nocompiler
17:44:38shashlickI'll see how you detect Nim in build and Putney places
17:44:42shashlickOther
17:44:52dom96what? How is it hard coded?
17:46:32sealmoveshashlick: Sorry, that's for printing. Keyboard input hmm... not sure if they are posix-specific
17:47:06shashlick@dom96 - sorry can't be brilliant all the time 😞 https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptwrapper.nim#L43
17:48:14dom96shashlick, that's not "hard-coded", it should use `nim` from PATH
17:48:25dom96That's how all of Nimble does it IIRC
17:49:07shashlickOk will check the other code too
17:49:34shashlickI guess we can use findExe and if Nim isn't found then use getAppDir
17:50:11sealmoveshashlick: 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:00dom96shashlick, no, we shouldn't do this. People should have Nim and Nimble in their PATH
17:53:07dom96We 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:55shashlickOk, 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:44shashlick@sealmove - I tried to make something generic in genotrance/snip but it is not without warts
18:02:01*deech_ joined #nim
18:03:30sealmovewhat is genotrance about?
18:04:43*deech quit (Ping timeout: 248 seconds)
18:05:01shashlickhttps://github.com/genotrance/snip
18:05:08*stefanos82 joined #nim
18:10:26sealmoveYes, just trying to understand what genotrance is. Not familiar with it, it seems like a collection of web-related stuff?
18:11:13sealmoveOr is it just your github page? :P
18:17:57shashlickI see
18:18:26shashlickI used to make trance music few decades ago
18:18:51shashlickMy nick was genosha - demoscene stuff
18:19:04shashlickFrom there came genotrance which is my website
18:19:04narimiranyou've come a long way, baby
18:19:22shashlickYep!
18:19:48*narimiran hopes somebody will get the music reference
18:21:32sealmove:D
18:31:42*terorie quit (Ping timeout: 272 seconds)
18:39:10Zevvshows your age, though
18:42:04shashlickRegrettably ;)
18:42:37shashlickMy music is still up on http://genotrance.com for anyone interested
18:45:22Mister_Magister how do i add c++ include path?
18:48:12shashlickpassC
18:48:14*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/JXpOlOyhJJfkgoaRUZpLXPlQ >
18:48:27lqdev[m]adds the current source'sdirectory into the include path
18:48:32lqdev[m]source's directory*
18:52:05Mister_Magisterthanks
18:56:19Mister_Magisteri'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:03shashlick@lqdev - am going to work on the bitsize piece now
19:20:05lqdev[m]nice, ping me if you need any help with testing it out
19:20:14shashlicksure
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:03Zevvsealmove: 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:59shashlick@lqdev - i think i have it working, got time now?
20:39:23lqdev[m]sure
20:43:06shashlicki got ma_rb but now need 2 dimensional arrays in ma_channel_router_config
20:44:37*abm quit (Quit: Leaving)
20:45:35shashlicklots 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:17shashlickjust pushed bitfield support
21:04:27*mwbrown joined #nim
21:04:58*nsf quit (Quit: WeeChat 2.4)
21:11:56FromGitter<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:35xaceshashlick: 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:08shashlickNot sure - do you need to pass something to it on cmd line?
22:06:00xaceshashlick: well in bash i would just: result = "`$(echo -e "uno\ndos\ntres" | fzf)`"
22:06:33*pyotr joined #nim
22:07:02shashlickAre you sure it is running?
22:07:16xaceatm im considering using fork() and ensuring i prepare the pipes before i hand it over to fzf...
22:07:32shashlickCause fzf should wait indefinitely
22:07:41xaceshashlick: 1 sec let me inject a sleep() to check it out quickly
22:08:58xaceshashlick: yeah it seems to be running, atleast it lists as a running process
22:09:14shashlickYou might need to give it enough time to start running
22:09:34xaceactually it seems like it closes immediately...
22:09:51shashlickIn my case, I run another process before checking it
22:09:54shashlickSo it gets enough time
22:10:27xaceshashlick: tried before i even touch the streams, it closes immediately
22:10:39xacemaybe its behaviour on windows is different
22:11:00*lritter quit (Ping timeout: 268 seconds)
22:11:42shashlickI'm running in windows so it should run
22:12:22xacemaybe i should look into whatever `fzf --sync` does
22:12:23shashlickSee if you are getting any exceptions
22:12:28shashlickThe discard
22:12:52*pyotr quit (Remote host closed the connection)
22:13:09xaceoh 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:09shashlickIf your process exits, fzf will get killed as well
22:13:31xacemy process should wait for fzf to exit first because of the peekExitCode() != -1
22:14:14shashlickPut a sleep before checking running or loop until running
22:15:42*stefanos82 quit (Quit: Quitting for now...)
22:15:42xaceit closes either way... im guessing its because fzf somehow figures out it cant render its content, ill investigate it
22:15:47shashlickActually you are passing an empty string as an arg
22:16:08shashlick@[""] instead of @[]
22:16:25shashlickSo fzf probably gets confused and errors out
22:17:55xaceoh shashlick well that seems to keep fzf running
22:18:08shashlickNeat
22:18:32xaceso now, the problem is, nothing happens it stays on the "if sout.readLine():"
22:18:58xacei guess its simply waitinf for a full line to be read
22:19:25shashlickSo here's the thing
22:19:53shashlickYou cannot read the output
22:20:11shashlickOtherwise you cannot use the menu functionality
22:21:12shashlickAnd fzf will wait to read from sin forever, unless you pick an option then it will execute any bind options and exit
22:21:25shashlickYour process cannot read that output either
22:21:41shashlickSo you might want to ask fzf to write the selection to a file and read that
22:22:56shashlickSince I suspect you only care about the selection
22:23:11xacei was hoping to communicate with fzf directly rather than juggling with files. Yes i only care about the selection
22:24:29shashlickI understand but unfortunately it isn't that simple
22:24:47shashlickIf you are reading stdout of a process, it doesn't write to the console anymore
22:25:22xaceif im going to be handling files i might aswell make us of mkfifo() instead...
22:25:42xacebut ill see if fork() could circumvent this
22:34:49shashlickIf you find a better way, do let me know
22:36:21xaceshashlick: 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:32shashlickWhat exactly is your use case
22:42:23xaceshashlick: 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:06shashlickAre you having it run in a different window or inline?
22:43:11xacefor example on my phone i wrote a nim module that has some simple functions such as: `import xace; IsConnectedToHomeWifi()`
22:43:23xaceshashlick: the goal is to have it run in the same window, so i guess inline
22:43:50xaceif 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:16shashlickOk 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:23FromDiscord_<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:23FromDiscord_<koalefant>
23:29:23FromDiscord_<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:09FromDiscord_<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:00PMunchHmm, not entirely sure what you're actually trying to do
23:46:13shashlickWhy not just use seq
23:55:19*Bast_ joined #nim