<< 21-06-2019 >>

00:14:41*vlad1777d_ joined #nim
00:19:39*skaruts quit (Quit: Page closed)
00:53:56*Jesin quit (Quit: Leaving)
00:56:53FromDiscord_<SychoRyn> Oh my GOD
00:56:53FromDiscord_<SychoRyn>
00:56:53FromDiscord_<SychoRyn> https://cdn.discordapp.com/attachments/371759389889003532/591431297813970944/unknown.png
00:57:22*Jesin joined #nim
01:00:20*Tyresc quit (Quit: WeeChat 2.5-dev)
01:26:25*stefanos82 quit (Quit: Quitting for now...)
02:11:48*vlad1777d_ quit (Ping timeout: 272 seconds)
02:32:02*dddddd quit (Remote host closed the connection)
02:36:30*laaron quit (Remote host closed the connection)
02:37:27*laaron joined #nim
04:13:31*nsf joined #nim
05:38:26*narimiran joined #nim
05:52:02FromGitter<rokups> Nim is done. Time to switch to Y lang. https://github.com/SanderMertens/y
05:52:11FromGitter<rokups> Who is with me?!
05:53:53Araqthat did get old very quickly
05:55:36laarontime even would not come to "y"
05:56:13FromDiscord_<SychoRyn> Okay who made this this is the funniest thing I've ever seen
06:01:14*laaron quit (Remote host closed the connection)
06:06:21*laaron joined #nim
06:08:31Araqhere, Z is even better. its interface happens to be an RTS but it is Turing complete, https://www.youtube.com/watch?v=AQq3xp9NPrc
06:21:42FromGitter<AmberSaber> 真可怕,26个字母都被你们用完了
06:25:10FromGitter<gogolxdong> 你好
06:27:33*solitudesf joined #nim
06:28:10FromGitter<AmberSaber> 你好
06:29:42FromGitter<gogolxdong> It would be more friendly to speak in English. :)
06:31:20FromGitter<gogolxdong> Seems like it's not the first time to see you. What can I help you?
06:31:40FromGitter<rokups> its english, just encrypted
06:47:53*PMunch joined #nim
06:49:10*uptime is now known as sargeant_uptime
06:51:49FromGitter<rokups> as for my macro it is probably best to stick with `untyped` and instead of `new` for refs and `init` for values just use `init` for all types and ref/value result is determined by type constructor is invoked on. `TableRef[int, int].init({1: 2, 3: 4})` would make a TableReft then.
06:52:20FromGitter<rokups> just one tiny usability downside... if there is no alias to ref type then user would have to `(ref Table[int, int]).init({1: 2, 3: 4})` which sucks
06:52:43livcdis not that Y lang a mock of V lang ?
06:53:11FromGitter<rokups> seems to me its a mock of all those new languages gamedev community is pooping out
06:53:27FromGitter<rokups> and people go crazy about them because gamedevs know best what gamedevs need
06:53:38FromGitter<rokups> ignoring the fact that making language is anything but trivial....
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:57PMunchrokups, you can do the reverse of what I did, and have an untyped macro that expands to a call to another untyped macro which takes one of it's parameters from a typed macro
07:01:01PMunchI think that should work..
07:01:33FromGitter<rokups> PMunch i tried but didnt seem to work
07:02:25PMunchHmm, yeah it can be a bit tricky to get right..
07:04:23*dwdv joined #nim
07:04:37*gmpreussner joined #nim
07:04:55FromGitter<rokups> this is what i tried http://ix.io/1MmC/nim
07:08:51*Trustable joined #nim
07:10:22PMunchYeah that won't work
07:10:26FromGitter<rokups> it seems to me that isnt even possible. typed macro operates on symbols of parent macro
07:10:29PMunchYou need to return a call to the proc
07:10:35PMunchmacro*
07:11:01FromGitter<rokups> im not sure what you mean
07:11:14PMunchExactly, and besides, what you're doing there is expanding the macro within the macro
07:11:30PMunchSo it will get the AST for prc[3][0] as it's input
07:12:47FromGitter<rokups> and indeed it does. so how exactly is it supposed to be done? ^_^
07:13:42*tjmac joined #nim
07:14:11PMunchA little something like this: http://ix.io/1MmG/nim
07:14:29PMunchBut note that currently you get an error that A isn't defined
07:14:46PMunchNot entirely sure how to fix that..
07:16:59FromGitter<rokups> thanks ^_^
07:17:38*Elronnd quit (Quit: So long, and thanks for all the fish <3)
07:30:04Zevvrayman22201: good work with the RFC!
07:33:23FromGitter<AmberSaber> There are too many scripting language grammars in some of the new static languages, which are very convenient to use. But it is not consistent with the object-oriented philosophy. Very discordant
07:35:10FromGitter<AmberSaber> For example, v language, he also made a vote on the grammar of array operations on Twitter.
07:39:08FromGitter<rokups> what new language is convenient to use? all i see is people making different syntax for the sake of being different. it renders our previous knowledge useless in learning new language while giving little to no benefit
07:39:40FromGitter<rokups> if people are making a new language they should really stick with a tried syntax unless they have a very solid explanation why change is needed
07:39:55FromGitter<AmberSaber> These languages ​​are hard to say very rigorous
07:40:14FromGitter<rokups> nowdays we see languages full of `~-*-~-*-~-*-~-*-~` because magic symbols make developers feel good about themselves
07:40:18PMunchZevv, link?
07:40:58FromGitter<rokups> nim thankfully does not suffer from crazy syntax too much, though it has it's fair share of non-obvious operators
07:41:03lqdev[m]I'd just like to point out that Nim has a lot of new syntax, albeit borrowed from other languages
07:41:29narimiranPMunch: https://forum.nim-lang.org/t/4952
07:41:31FromGitter<rokups> borrowed is good because it is familiar already. if its good it does not need to be changed
07:41:36PMunchrokups, the worst are the "but it's easier to type" arguments. It normally only holds for American layouts, and requires some finger-gymnastics to type on anything else
07:41:38ZevvPMunch: https://forum.nim-lang.org/t/4952 you guys should team up I guess
07:42:14FromGitter<rokups> PMunch yes! and also we type maybe 20% of time or less and read code the rest of time. it should be optimized for reading, not for typing
07:42:20FromGitter<rokups> but hey - nobody cares :|
07:42:28lqdev[m]PMunch: I still prefer short names, like `proc` over `procedure`
07:42:51PMunchlqdev[m], oh yeah thats fine
07:42:58lqdev[m]I'm not a great typist, so it matters to me
07:43:04FromGitter<rokups> hey at least its not `fn` :D
07:43:14lqdev[m]oh man, not the fn
07:43:17PMunchBut ¤ instead of proc would be super annoying for people not on a Scandinavian layout
07:43:33FromGitter<rokups> rust keywords encourage use of abbreviations. planes crashed due to use of abbreviations.... :\
07:43:44FromGitter<rokups> or was it a space rocket or something, i dont even recall
07:44:24PMunchWell I still like being able to type my code reasonably fast
07:44:32PMunchThing is, I'm really fast at typing normal text
07:44:36FromGitter<rokups> PMunch `¤` is terrible. i mean scandinavians would still find it ok. i believe you can do better and find a symbol that isnt on any keyboard layout used on the planet :trollface:
07:44:40lqdev[m]in my code, I only abbreviate common names which are annoying to type often, like `Graphics` -> `Gfx`, `TilemapWorld` -> `TmWorld`
07:44:53PMunchBut typing crazy characters, even though it's fewer keystrokes, slows me down
07:45:16narimirani just copy-paste code from stack overflow, no typing
07:45:26lqdev[m]but, for instance, I didn't call the `AudioDecoder` `AudioDec` because it's not that common
07:45:44PMunchHaha, narimiran here living in 2059
07:45:54PMunchlqdev[m], that makes sense
07:46:15PMunchAt some point I just get lazy and name things "f" or "c"..
07:46:24PMunchNaming things is hard..
07:46:51PMunchrokups, yeah, just find some obscure UTF rune
07:47:04lqdev[m]that's my naming convention for algorithms I can't explain well (yet I understand how they work)
07:47:09PMunchPlenty of characters no-one have on their keyboard
07:47:14FromGitter<rokups> zero-width space sounds like a good candidate! :D
07:47:56PMunchBut ¤ got a special place in my heart, it's on Shift+4 on Scandinavian keyboard, `$` is on AltGr+4. And we don't use it for anything, 99% of people don't even know what it's for.
07:49:00PMunchrokups, I actually found a key combination once that created nbsp..
07:49:07lqdev[m]Linux users on X.org have easy access to arrows, ß, TM, (R), (C), π, and other crazy characters. Let's make devs switch to Linux by making use of them
07:49:07PMunchTrying to debug that was kinda hard
07:49:44narimiranvar Ħ: Table
07:49:55FromDiscord_<djazz> Can emojis be used for variable names?
07:49:57lqdev[m]π is nicer than PI, to me.
07:50:01lqdev[m]yes
07:50:04FromDiscord_<djazz> Yay
07:50:13lqdev[m]not yay
07:50:40PMunch·þ¥ªç®­ßðı€×µ < a collection of the symbols I can get with AltGr + letter keys on my keyboard :P
07:50:51narimiranPMunch: i too use colemak layout ;)
07:50:54FromDiscord_<djazz> Emoji operators? :D
07:51:01PMunchnarimiran, I use Dvorak :)
07:51:05FromGitter<rokups> π may be nicer but if some smartass forced such variable on to me he would be cursed for the rest of his life
07:51:27lqdev[m]PMunch: don't forget you can press shift and get even more cool stuff
07:51:45narimiranPMunch: ah, here is my altgr+ number row ¡ºª¢€ħðþ‘’× and the same with shift ¹²³£¥ĦÐÞ“”÷
07:51:54lqdev[m]rokups: that's why I think it should only be an alias and not an enforcement
07:52:02PMunchlqdev[m], yeah but we're talking about ergonomic shortcuts here! :P
07:52:21PMunch¡@£$½¾{[]}±
07:52:35PMunchThat's my number row with AltGr (yes the Norwegian layout is dumb)
07:52:45narimiranhere is the full list: https://colemak.com/Multilingual
07:52:46lqdev[m]pi is alt gr+q on X.org for me, so it's not terrible
07:53:15PMunchlqdev[m], hmm, that only creates a `q` for me
07:54:16lqdev[m]maybe it's my keyboard layout
07:54:44PMunchPet peeve: american editors that bind stuff to things like shift+[. I already need to hit AltGr to get to [, and AltGr+Shift+[ seldom actually works
07:55:11PMunchlqdev[m], my keyboard is all kinds of messed up, so it might be something that I've done at some point
07:55:59FromDiscord_<djazz> Im swede but I use an ANSI keyboard with US layout mostly. I miss the AltGr combos. I know there is a way to enable them in Xorg somehow..
07:56:29FromDiscord_<djazz> Right now its just "Right Alt"
07:56:46PMunchdjazz, you can just dump your xmodmap to a file, then add whatever you want, and then tell X to load your keymap from that file
07:57:34lqdev[m]I use the Polish QWERTY keyboard layout, I know it's not specific to this layout though because my friend uses US QWERTY and it's still here
07:58:34lqdev[m]I never changed any settings in xmodmap, so this just might be the default
07:59:16*Vladar joined #nim
07:59:40PMunchCould be, maybe the Norwegian Dvorak layout just doesn't have Pi for some reason
08:00:25PMunchOr I've managed to delete it at some point :P
08:01:00narimiranPMunch: ii think it is the difference between qwerty and dvorak/colemak. i also don't have it
08:07:56FromGitter<rokups> anything other than US keyboard layout is suboptimal yeah..
08:08:16FromGitter<rokups> i used to make my custom layout for lithuanian letters so ą would be gr+a and so on
08:08:22FromGitter<rokups> too much trouble to maintain though
08:08:44FromGitter<rokups> standard lt keyboard aint worst. ą = gr+1
08:29:41*Tanger quit (Quit: Leaving)
08:31:35PMunchHow is that too much to maintain? X doesn't change that often, so you just need to keep your .xmodmap file around :P
08:32:25FromGitter<rokups> i was modifying keyboard layout file in /usr/share and updates nuke it sometimes
08:32:39FromGitter<rokups> .xmodmap would affect all layouts too, no?
08:38:30PMunchYes
08:38:40PMunchIt basically is a layout
08:41:19*floppydh joined #nim
08:51:00FromGitter<rokups> is there a way to limit `T` to a types that are subtypes of something?
08:57:45PMunchWell you can limit T, but I'm not sure if "subtype of X" is a constraint you can express easily
08:58:36FromGitter<mratsim> you can
08:58:40FromGitter<mratsim> T: Someinteger
08:58:57FromGitter<rokups> but `SomeInteger` must be defined as a list of types
08:59:04FromGitter<rokups> thats fine for integers, not so much for user classes
08:59:16FromGitter<rokups> i would like to limit T to anything that derives from Exception
08:59:29FromGitter<mratsim> you can use a concept or a inherited type root
08:59:30FromGitter<rokups> naturally i cant have a list of user types that may be defined by the user
08:59:53FromGitter<rokups> oh so `T: Exception` would accept say `IndexError`?
08:59:54FromGitter<mratsim> I'm pretty sure if you do T: Exception, user defined exceptions will work
09:00:20FromGitter<mratsim> that's the whole point of inehritance ;)
09:08:59*tjmac left #nim ("-bye")
09:47:04*vlad1777d_ joined #nim
09:47:55*laaron quit (Remote host closed the connection)
09:49:02leorizenarimiran: my tests with tfloatrange doesn't seem to yield any reason for why it's flaky on azure & travis windows
09:49:17leorizeso if you want to merge the azure-pipelines config, I may have to disable that test
09:49:35narimiranok
09:50:30narimirani need to talk to others about azure, probably on monday
09:51:39*laaron joined #nim
09:54:59leorizedo I need to tag the commits with `[other]`?
09:55:30narimiranasking generally or for something you already sent a PR?
09:56:03narimirangenerally - it would be nice; if you have a PR without it - we can add it when merging
09:56:21*abm joined #nim
09:56:37livcdot: sorbet.rb the typechecker for ruby got open sourced today
09:58:00leorizenarimiran: for that azure PR. I'd prefer to have it rebase-merged because the history makes sense :p
10:00:48narimiranleorize: that means we'll need to remember to use our non-default merge. i wouldn't count on that :D :D
10:00:52leorizenarimiran: also, the link to the `widestr` module from https://nim-lang.github.io/Nim/system.html is broken
10:03:21narimiranleorize: what do we have to do to enable azure on our end? add a webhook in github settings? something else?
10:03:44leorizeinstall the azure app from github marketplace
10:04:02leorizemake a nim-lang organization there
10:04:24narimiranre widestr: ah, it is widestr*s*
10:05:00leorizethen go to pipelines -> add pipelines
10:05:09leorizethe rest is self-explainatory
10:08:19*neceve joined #nim
10:24:27*dddddd joined #nim
10:43:58*leorize quit (Quit: WeeChat 2.3)
10:51:51*natrys joined #nim
10:59:22*envoyt quit (Ping timeout: 258 seconds)
10:59:28*stefanos82 joined #nim
11:07:30*leorize joined #nim
11:19:25*natrys quit (Ping timeout: 268 seconds)
11:26:49*natrys joined #nim
11:41:35Calinoulivcd: thanks for mentioning it :) (link for those who need it, https://sorbet.org/)
11:43:30*envoyt joined #nim
11:43:36FromGitter<kaushalmodi> I am pretty delighted.. I think I have grokked this issue: https://github.com/nim-lang/Nim/issues/11552#issuecomment-504396129
11:43:37FromGitter<kaushalmodi> :)
11:45:30narimirankaushalmodi what if you used uint in your example? then once again you have a similar problem, no?
11:46:11ZevvIf I do this: http://ix.io/1MnB, where does the [int] go?
11:46:25FromGitter<kaushalmodi> narimiran: no
11:46:34FromGitter<kaushalmodi> because low(uint) would be 0
11:47:37FromGitter<kaushalmodi> the *total number of values for `int64`* == *total number of values for `uint64`* == `high(uint64)`
11:48:42narimiran(btw, there's no `high(uint64)` currently ;))
11:48:51FromGitter<kaushalmodi> huh, really?
11:48:59FromGitter<kaushalmodi> may be then that's the root cause
11:49:19FromGitter<kaushalmodi> but I hope my point is valid based on bit theory
11:50:01*envoyt quit (Ping timeout: 246 seconds)
11:50:19*envoyt joined #nim
11:52:45FromGitter<kaushalmodi> narimiran: so this needs to work first: https://play.nim-lang.org/index.html#ix=1MnD
11:53:22FromGitter<kaushalmodi> fixed.. this: https://play.nim-lang.org/index.html#ix=1MnE
11:54:50narimirani'm not sure that's correct
11:55:23*AndChat|624225 joined #nim
11:55:24narimiran`-2 * low(int)` is still an int, and it overflows
11:56:40*envoyt quit (Ping timeout: 246 seconds)
11:56:44FromGitter<kaushalmodi> trying to play with it.. this also doesn't work: https://play.nim-lang.org/index.html#ix=1MnL
11:56:52FromGitter<kaushalmodi> `*` isn't implemented for uint?
11:57:17narimiran-2 --> int
11:57:21narimiranlow(int) --> int
11:57:50narimiranhttps://play.nim-lang.org/index.html#ix=1MnM
11:58:17FromGitter<kaushalmodi> this works: https://play.nim-lang.org/index.html#ix=1MnN
11:59:24FromGitter<kaushalmodi> this works too (same, without the extra type specifiers): https://play.nim-lang.org/index.html#ix=1MnO
11:59:32FromGitter<kaushalmodi> now let's add that in :)
12:00:32*qwertfisch quit (Remote host closed the connection)
12:02:26*Trustable quit (Remote host closed the connection)
12:07:12*natrys quit (Ping timeout: 258 seconds)
12:11:50*fredrik92 joined #nim
12:12:26*couven92 quit (Disconnected by services)
12:12:35*fredrik92 is now known as couven92
12:12:54*fredrik92 joined #nim
12:14:26*natrys joined #nim
12:15:55*neceve quit (Read error: Connection reset by peer)
12:15:59*Kaivo joined #nim
12:22:32*abm quit (Ping timeout: 258 seconds)
12:23:09*abm joined #nim
12:25:04*nsf quit (Quit: WeeChat 2.4)
12:33:24*laaron- joined #nim
12:33:24*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
12:38:01*Snircle joined #nim
12:58:02*AndChat|624225 quit (Read error: Connection reset by peer)
12:58:23*envoyt joined #nim
13:04:43PMunch@kaushalmodi, new feature of the playground, you don't need index.html any longer ;)
13:08:40FromGitter<kaushalmodi> PMunch: After "Share to ix", I just do Ctrl+L Ctrl+C to copy the link
13:08:47FromGitter<kaushalmodi> that includes the index.html automatically
13:09:10PMunchOnly if you started by being at play.nim-lang.org/index.html
13:09:36PMunchIf you start from play.nim-lang.org/ it should only append #ix=<code> to it
13:09:38FromGitter<kaushalmodi> ah, got it.. may be my browser history always took me there first
13:09:38FromGitter<kaushalmodi> thanks
13:09:46PMunchYeah probably :)
13:10:33PMunchI mean it doesn't do anything different if you're just copy pasting it, but I thought I'd mention it in case you wrote them by hand for some reason :P
13:11:10FromGitter<kaushalmodi> PMunch: I confirm what you said, simply deleted all play.nim-lang.org history
13:13:00*jokul quit (Ping timeout: 272 seconds)
13:13:19*envoyt quit (Ping timeout: 246 seconds)
13:14:00*envoyt joined #nim
13:17:40PMunchIs there an easy way to blank an array?
13:18:32PMunchAh reset
13:22:25FromGitter<kaushalmodi> PMunch: can you add a redirect from play.nim-lang.org/index.html to play.nim-lang.org/ ?
13:24:42PMunchHmm, yeah I guess I could
13:28:27PMunchThere
13:28:58PMunchOnly issue now is that it redirects index.html#ix=<code> to / and not to /#ix=<code>..
13:29:12laaron-PMunch, so you are the `play.nim-lang.org` admin?
13:29:18PMunchlaaron-, yes :)
13:29:59laaron-PMunch, nice, good work
13:30:06PMunchThanks
13:30:25PMunchThe server was mostly done my zacharycarter
13:30:40PMunchI just fixed some bugs and tweaked it a bit
13:30:50PMunchBut the front-end is completely redesigned
13:32:12laaron-i know, still nice
13:34:38*jokul joined #nim
13:36:13PMunchThere, now it should redirect properly for index.html#ix=<code> links as well
13:36:19PMunch(Plus the #tour= links of course)
13:36:32PMunchlaaron-, glad you like it :)
13:39:02*NimBot joined #nim
13:42:49FromGitter<kaushalmodi> PMunch: yeah, it should have retained the stuff after # after redirecting
13:43:04FromGitter<kaushalmodi> I have experience only with Netlify..
13:43:24PMunchkaushalmodi, it should do that now
13:43:39FromGitter<kaushalmodi> and it does
13:43:41FromGitter<kaushalmodi> awesome!
13:43:44FromGitter<kaushalmodi> thanks PMunch
13:43:52PMunchNo problem :)
13:44:31*narimiran quit (Remote host closed the connection)
13:44:56FromGitter<kaushalmodi> as an aside.. it's crazy.. I wouldn't have know how to suggest to fix this using redirect had I not started tinkering with Hugo 2 yrs back
13:45:15noonienhello folks
13:45:15FromGitter<kaushalmodi> I didn't know what a "redirect" was back then
13:46:43noonienis there an easy way of getting just part of a sequence in the stdlib? for example, i've got @[1, 2, 3, 4], and i want @[2, 3, 4]
13:48:32FromGitter<kaushalmodi> seqVar[1 .. seqVar.len()-1]
13:48:42noonienoh, nice
13:49:30FromGitter<Vindaar> or `seqVar[1 .. seqVar.high]` or `seqVar[1 .. ^1]` :)
13:49:49FromGitter<kaushalmodi> yes, that ^
13:49:57noonienyeah, i ended up going with seqVar[1 .. ^1]
13:50:08noonieni just didn't know you could slice sequences like that :D
13:50:11noonienthanks!
13:51:05*dddddd quit (Ping timeout: 258 seconds)
13:51:56FromGitter<kaushalmodi> slice is awesome :) https://nim-lang.github.io/Nim/system.html#..%2CT
13:52:53*beatmox quit (Remote host closed the connection)
13:55:14*beatmox joined #nim
14:03:15*ehmry quit (Remote host closed the connection)
14:05:18*krux02 joined #nim
14:05:52*Cthalupa quit (Ping timeout: 248 seconds)
14:06:24FromGitter<rokups> whats the trick to get proper variables list in vscode instead of this junk? https://i.imgur.com/JiyG3Jz.png
14:06:53*Cthalupa joined #nim
14:11:17FromGitter<mratsim> debugger:native maybe
14:11:22FromGitter<rokups> already using that
14:11:59FromGitter<rokups> `-d:debug --debuginfo --lineDir:on --debugger:native` - im trying hard here :D
14:12:09FromGitter<mratsim> no idea then, GDB is directly using the nim source code when I use that
14:12:22FromGitter<mratsim> not sure if VScode adds additional logic on top
14:12:39FromGitter<mratsim> if you launch gdb on that does it steps through the Nim code or the C code?
14:13:46FromGitter<rokups> nim code of course. and i even set up vscode to use nim-gdb script. changed nothing it seems
14:14:14FromGitter<mratsim> no idea then, I never tried to make it work :p
14:14:46PMunchHmm, ran into this strange issue again..
14:15:00PMunchI have an array of ref objects
14:15:19PMunchAnd trying to access an element in it fails with a SIGSEGV
14:15:41PMunchNot trying to access a field in it, but just trying to do for i in myobjects fails
14:16:05PMunchI can do myobjects.len, but trying to loop over them fails..
14:16:19FromGitter<rokups> this is terrible though. visual studio until very recently was quite a crappy IDE, but everyone loved it mainly because of stellar debugging experience. nim being unable to show a simple list of variable will not leave a good first impression on people\
14:24:57*PMunch quit (Remote host closed the connection)
14:26:02*nsf joined #nim
14:33:04*envoyt quit (Ping timeout: 248 seconds)
14:47:32*solitudesf quit (Ping timeout: 245 seconds)
14:49:57*floppydh quit (Quit: WeeChat 2.5)
15:02:22*dddddd joined #nim
15:03:43noonienhmm, can i execute async futures in paralel?
15:03:48nooniennot just concurrently
15:03:57noonienasync procedures*
15:04:42noonienor, actually, i just need them to execute "in the background", so the current code can continue executing
15:04:51noonieni don't care if it's paralel or not
15:05:12nooniendo i just do `asyncCheck`?
15:10:10*Vladar quit (Remote host closed the connection)
15:18:18leorizethe entire idea of async proc is that they're executed in the background :p
15:18:45FromGitter<dom96> Yes. Precisely, just use asyncCheck
15:23:23FromGitter<waghanza> hi @/all, do someone have a way to setup a cool `nim` version on `bionic` ? the stable one is too old `0.17.2` and I could not install `nimpretty` in https://travis-ci.com/the-benchmarker/web-frameworks/jobs/209986126
15:27:39leorize@waghanza: use choosenim to install it
15:27:44leorizeshould work on travis
15:27:57leorizeand the latest choosenim should have nimpretty support now
15:28:10FromGitter<waghanza> choosine is not inetrractive only ?
15:29:50leorize@dom96 ^
15:31:10leorize@waghanza: https://github.com/nim-lang/Nim/wiki/BuildServices#building-nim-projects-on-travis-ci
15:34:05FromGitter<waghanza> oh I need to pick other CI them
15:34:35FromGitter<waghanza> my `.travis.yml` is already over complicated https://travis-ci.com/the-benchmarker/web-frameworks/jobs/209986126/config
15:34:38FromGitter<waghanza> 😛
15:37:24*natrys quit (Ping timeout: 272 seconds)
15:40:06*nsf quit (Quit: WeeChat 2.4)
15:41:46*natrys joined #nim
15:45:29*laaron- quit (Remote host closed the connection)
15:48:45*laaron joined #nim
15:51:38*neceve joined #nim
15:55:09*Jesin quit (Quit: Leaving)
15:55:41*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
15:56:25*laaron joined #nim
15:56:33leorize@waghanza: it should be simple enough, assuming that you have docker on your ci :p
16:01:54FromGitter<alehander42> @rokups @bobeff managed to make it work in vscode
16:02:10FromGitter<alehander42> but it needed a settings check, it must be somewhere on github
16:03:15FromGitter<alehander42> buut the paste service doesnt have it anymore
16:03:56FromGitter<alehander42> basically you need to get the build or debug settings correct and to load krux02's nim-gdb.py
16:04:02FromGitter<alehander42> which is in the nim repo
16:27:52*PrimHelios_ joined #nim
16:27:57*PrimHelios quit (Ping timeout: 245 seconds)
16:28:28Calinousee also https://github.com/Calinou/clr/blob/master/.travis.yml for an example
16:30:26*envoyt joined #nim
16:35:51FromGitter<rokups> @alehander42 I copied configs from GitHub issue. Might be from same person. No workie
16:38:29*solitudesf joined #nim
17:01:24*qwertfisch joined #nim
17:16:48*envoyt quit (Ping timeout: 248 seconds)
17:17:30*envoyt joined #nim
17:24:08*Jesin joined #nim
17:29:39*leorize quit (Ping timeout: 256 seconds)
17:31:47*leorize joined #nim
18:02:09FromGitter<aaveidt> Hi all, can nim import and use binary module?
18:07:17*abm quit (Quit: Leaving)
18:13:27*narimiran joined #nim
18:15:57leorizebinary module?
18:17:45AraqDLL
18:23:14*nsf joined #nim
18:26:33*ehmry joined #nim
18:29:34*rockcavera quit (Remote host closed the connection)
18:37:59rayman22201@Zevv, @Pmunch, late reply, was sleeping. Thanks for kind words about the RFC.
19:02:31*neceve quit (Read error: Connection reset by peer)
19:03:47ZevvWhat is the proper syntax for declaring a type for a generic proc? This is not ok: invalid indentation
19:03:50ZevvSomeFn = proc[T](s: string, state: T)
19:04:22Zevvoh wait, SomeFn[T] = ... of course
19:15:48dom96hello everyone
19:19:47Zevvoi
19:22:53dom96How's things? Working on something in Nim? :)
19:23:56ZevvYeah, breaking my brain over generic macros. Please tell me, how do I do this?
19:23:57Zevvhttp://ix.io/1Mr4
19:24:17ZevvI need to pass a generic type through a macro into a template
19:25:29dom96Hm, not sure macros can take generics like that
19:25:44dom96You can pass a typedesc to a macro though, would that be okay for your usecase?
19:27:14Zevvhmm let me see
19:30:20Zevvit seems that there's an other underlying reason
19:30:50Zevvthis also does not work: http://ix.io/1Mrb
19:30:57Zevvand there's no type passed through the macro
19:31:13FromGitter<Vindaar> this works: http://ix.io/1Mrc/nim
19:31:16FromGitter<Vindaar> gotta go :)
19:31:30Zevvquote do, wth
19:31:49Zevvwell, thanks, but I'll have to read up why and how this works :)
19:34:30Zevvwhat is this, and where is it documented?
19:35:14*dwdv quit (Quit: quit)
19:36:17Zevvwow. quasi-quoting. TIL
19:41:41FromGitter<kayabaNerve> If my system uses GCC 7.4, yet has GCC 8.3 installed, and I want Nim to use GCC 8, what command line args should I pass?
19:49:26leorize--gcc.exe: and --gcc.linkerexe:
19:50:30*Trustable joined #nim
20:00:55FromGitter<aaveidt> yes, if i compile a nim module to binary
20:01:07FromGitter<aaveidt> then import it, can i use it normally?
20:02:49Araqread about DLL generation
20:13:04FromDiscord_<SychoRyn> I left hopson’s server
20:13:08FromDiscord_<SychoRyn> Too toxic
20:13:26FromDiscord_<SychoRyn> Now this is the only programming server I’m on, so yo yo
20:15:00*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
20:15:32*laaron joined #nim
20:24:56FromGitter<kayabaNerve> Thanks leorize. My recent package upgrade, GUI suggested, broke my GCC.
20:25:32FromGitter<kayabaNerve> Generally, linking fails with an error, but I've had ld say to report crashes and even had gcc segfault on me.
20:26:07FromGitter<kayabaNerve> Right now, I'm running a dist upgrade off LTS to try to fix it system wide.
20:33:34lqdev[m]TIL about https://github.com/nim-lang/Nim/blob/devel/lib/prelude.nim
20:38:03*Trustable quit (Remote host closed the connection)
20:45:53noonienhmm, can i convert any FD to an AsyncFile with asyncfile.newAsyncFile?
20:46:34FromGitter<kayabaNerve> Interesting collection of modules. I have something similar in my project, yet I use import.
20:46:55noonieni tried doing this with a pipe FD returned by osproc.outputHandle, and doing `await asyncfile.readBuffer` seems to hang
20:49:57dom96noonien, you can't do that. You need to use https://github.com/cheatfate/asynctools
20:50:04*narimiran quit (Ping timeout: 258 seconds)
20:50:05noonienshould i fnctl the fd to make sure it's nonblocking?
20:50:51noonienyeah, i was reading thought the source of that module, that's basically what it does as far as i can tell
20:54:41noonienyeah, that appears to be the case
20:55:58*shadowbane quit (Quit: Konversation terminated!)
21:03:44*nsf quit (Quit: WeeChat 2.4)
21:16:12rayman22201I know the stdlib is supposed to be getting smaller, but I am starting to think that cheatfaces's asynctools is a good candidate for merging or adapting into the stdlib.... just saying....
21:25:27dom96You volunteering to maintain this module if it's in the stdlib? ;)
21:27:31dom96So TIL Chrome needs me to tell it "please render this canvas element quickly" with a CSS property
21:27:32dom96otherwise it renders at a dog-slow pace of 10 FPS
21:27:46dom96Silly Google
21:28:58*rayman22201 kindly shuts up when asked to maintain things
21:29:29*vlad1777d__ joined #nim
21:30:15*vlad1777d_ quit (Ping timeout: 244 seconds)
21:32:45dom96for real though, I think you're right, it would be nice to have it in stdlib
21:37:07AraqI think we should create a "Nim cold fusion" distribution that bundles superior Nimble packages with Nim
21:37:51lqdev[m]where did that name come from!?
21:38:11Araqfrom me.
21:38:16Araqwhy?
21:39:51lqdev[m]"cold fusion" is the process of fusing atoms at room temperatures, afaik
21:40:03lqdev[m]don't know how you came up with that idea
21:40:57*couven92 quit (Quit: Client Disconnecting)
21:41:29Araqwhat's better than "batteries included"? "cold fusion".
21:42:06lqdev[m]makes sense
21:42:09Araqand also we fuse Nim with good Nimble packages
21:42:29Araqwithout asking their autors :P (hence "cold")
21:42:34lqdev[m]at room temperatures
21:42:46lqdev[m]lol
21:42:55Araqand yeah, I know what "cold fusion" is, thanks. ;-)
21:42:58dom96Araq has all sorts of names up his sleeve
21:43:04dom96What was that other bundle called? Gamera?
21:43:15Araqah the Gamera edition
21:43:47*lqdev[m] cries because he can't come up with good names
21:44:00Araqwe only had one of these iirc.
21:44:23dom96lqdev[m], take inspiration from Greek/Egyptian/Norse gods :)
21:44:56lqdev[m]people already did that, see: elementary OS, Odin, (insert other things here)
21:46:16dom96Names don't have to be unique :P
21:46:39lqdev[m]the thought process behind my names is always weird, eg. the name `rapid` came from me playing RCT2 and somehow memorizing the River Rapids ride
21:48:50Araqwhat did we watch? https://www.youtube.com/watch?v=ynl2abx1baI not this one...
21:49:56lqdev[m]recently I also wrote a little program that made executables from videos, so that you could display them in a terminal. it was hard to come up with a name, so I thought "what's this project about?—it's an **A**udio**v**isual **to**y **ge**nerator—avtoge"
21:50:48lqdev[m]I never got to open-source it, by the way. just used it a few times to prank my friends
21:51:40*solitudesf quit (Ping timeout: 246 seconds)
21:53:48*vlad1777d__ quit (Ping timeout: 245 seconds)
21:54:50lqdev[m]great, Nimble destroyed its source code
21:55:02dom96wut
21:55:58lqdev[m]I put `avtoge.nim` in a `src` directory because I wanted to create a Nimble package for it (and open-source it), I ran `nimble init` and it overwrote `avtoge.nim` with its template
21:56:09lqdev[m]well that sucks
21:56:44lqdev[m]at least I still have the executable
21:57:23dom96wtf, that's a really bad bug
21:57:33dom96sorry about that
21:57:37dom96Can you create an issue on github?
21:57:38lqdev[m]I'll go report it
21:57:46lqdev[m]sure
21:59:04lqdev[m]it's already been reported: https://github.com/nim-lang/nimble/issues/581
21:59:29dom96:'(
21:59:48lqdev[m]it's fine, the script wasn't anything complicated
22:00:03dom96up for making a PR to fix this?
22:00:07dom96It should be pretty simple
22:00:23lqdev[m]I can give it a shot
22:06:35FromGitter<mohamedmoussa89> Whats the correct way of implementing the `[]` operator for distinct arrays? Borrowing doesn't seem to work. (github.com/nim-lang/Nim/issues/3564)
22:07:46dom96Tried converting your distinct array into an array and then using `[]` on it?
22:07:52FromGitter<mohamedmoussa89> yes
22:08:01FromGitter<mohamedmoussa89> but then I cannot implement `+=`
22:08:06FromGitter<mohamedmoussa89> it complains that the LHS is immutable
22:08:14dom96make it return a 'var T'
22:08:26dom96*make that the return type I should say
22:09:12lqdev[m]are there any commit name conventions for Nimble?
22:09:28FromGitter<mohamedmoussa89> like this? ⏎ proc `[]`*(v: Vector, i: SomeInteger): var float = ⏎ array3,float (v)[i]
22:09:37FromGitter<mohamedmoussa89> ah how do i post code in here
22:09:40dom96Not really, `Fixes #xxx. Nimble init will no longer overwrite` is fine
22:09:53lqdev[m]okay
22:10:48dom96mohamedmoussa89: use markdown
22:10:54dom96(or a pastebin service)
22:11:52FromGitter<mohamedmoussa89> https://pastebin.com/raw/Yb4kmEZp
22:12:05FromGitter<mohamedmoussa89> This is what i'm trying to get to compile
22:12:30FromGitter<mohamedmoussa89> with var float, it says expression has no address..
22:12:57lqdev[m]dom96: done https://github.com/nim-lang/nimble/pull/670
22:13:44lqdev[m]staying on the topic of nimble init
22:13:45lqdev[m]https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/init.nim#L45
22:13:54lqdev[m]have you guys ever noticed this?
22:14:27dom96mohamedmoussa89: https://play.nim-lang.org/#ix=1Msj
22:14:55FromGitter<mohamedmoussa89> Interesting, thank you
22:14:55dom96lqdev[m], hah, nope
22:16:22dom96lqdev[m], I don't suppose I could entice you to write a test for this as well? :)
22:16:32dom96also, please output a warning
22:16:42dom96when the file already exists and it hasn't been overwritten
22:16:49dom96or actually, maybe an info-level message would be enough
22:20:54lqdev[m]hm, regarding that test: how can I control Nimble from the test's code? just write to the process's stdin?
22:21:54dom96just pass the `-y` flag
22:22:19lqdev[m]that makes it use default settings for everything?
22:24:50dom96yeah
22:25:07dom96in fact, if you use the same functions that other tests use you should get that flag by default
22:25:10lqdev[m]also, what settings should I use in `display()`? I'd guess low priority message, with category "Info:"
22:27:08*vlad1777d__ joined #nim
22:37:14lqdev[m]turns out I can't just pass -y since I need to select binary/library/hybrid
22:41:27*FromGitter quit (Ping timeout: 264 seconds)
22:41:48*oprypin quit (Ping timeout: 252 seconds)
22:42:56dom96lqdev[m], feel free to make binary the default
22:43:01dom96to make this work
22:43:06dom96messing with stdin will be painful
22:43:25dom96lqdev[m], also, go with high priority
22:43:38dom96otherwise it'll be hidden by default
22:43:57*oprypin joined #nim
22:44:25*FromGitter joined #nim
22:55:57*natrys quit (Quit: natrys)
23:15:09lqdev[m]finishing the test now, I'll commit once it's done
23:18:56lqdev[m]everything's done: https://github.com/nim-lang/nimble/pull/670
23:32:58dom96Thanks! Approved, will merge once tests apss
23:33:00dom96*pass
23:50:29*krux02_ joined #nim
23:51:05*damosan joined #nim
23:53:18*krux02 quit (Ping timeout: 252 seconds)