<< 30-04-2018 >>

00:08:29Araqwhat is a 'trySend' ?
00:08:38Araqit's called tryRecv
00:09:10AraqI said "send" does not block, depending on your definition of block.
00:13:57*CodeVance quit (Quit: Leaving)
00:14:10*CodeVance joined #nim
00:19:33*CodeVance is now known as CodeVance_
00:20:33*CodeVance_ is now known as CodeVance
00:23:39*CodeVance quit (Quit: Leaving)
00:23:51*CodeVance joined #nim
00:25:50*xkapastel quit (Quit: Connection closed for inactivity)
00:39:18*smt quit (Read error: Connection reset by peer)
00:39:33*smt joined #nim
01:10:17*CodeVance quit (Read error: Connection reset by peer)
01:17:55*skrylar joined #nim
01:18:46*skrylar appears inside a crate of old fruit
01:22:17*vivus joined #nim
01:34:27*salewski_ joined #nim
01:37:21*salewski quit (Ping timeout: 240 seconds)
01:43:20*skrylar quit (Remote host closed the connection)
01:43:33*Lord_Nightmare quit (Ping timeout: 264 seconds)
01:46:29*Lord_Nightmare joined #nim
01:46:56*onionhammer1 quit (Quit: WeeChat 1.9.1)
01:47:18*onionhammer joined #nim
02:02:44*vivus quit (Quit: Leaving)
02:04:15*dddddd quit (Remote host closed the connection)
02:22:36*arecaceae quit (Read error: Connection reset by peer)
02:23:00*arecaceae joined #nim
02:42:11*rockcavera joined #nim
03:45:53*darithorn joined #nim
03:58:16*endragor joined #nim
04:10:10*Lord_Nightmare2 joined #nim
04:11:45*Lord_Nightmare quit (Ping timeout: 263 seconds)
04:11:45*Lord_Nightmare2 is now known as Lord_Nightmare
04:12:11*darithorn quit (Quit: Leaving)
04:16:39*endragor quit (Remote host closed the connection)
05:30:28*nsf joined #nim
05:38:24*skrylar joined #nim
05:52:21*miran joined #nim
06:05:55*xkapastel joined #nim
06:09:49*yglukhov quit (Ping timeout: 260 seconds)
06:37:21*skrylar quit (Remote host closed the connection)
06:37:42*skrylar joined #nim
06:50:14*salewski_ quit (Quit: WeeChat 2.0.1)
07:16:41*yglukhov joined #nim
07:19:34*skrylar quit (Quit: Leaving)
07:28:33*yglukhov quit (Read error: Connection reset by peer)
07:29:09*yglukhov joined #nim
07:31:05*yglukhov quit (Remote host closed the connection)
07:47:51*nsf quit (Quit: WeeChat 2.0.1)
07:57:36*yglukhov joined #nim
07:59:06*yglukhov quit (Read error: Connection reset by peer)
07:59:42*yglukhov joined #nim
08:04:21*sendell joined #nim
08:12:33*Lord_Nightmare2 joined #nim
08:14:07*Lord_Nightmare quit (Ping timeout: 265 seconds)
08:14:08*Lord_Nightmare2 is now known as Lord_Nightmare
08:15:21*xkapastel quit (Quit: Connection closed for inactivity)
08:17:17FromGitter<alehander42> there is no way to `setType` of a nnkSym, right :D
08:23:23FromGitter<alehander42> there is no way to even check if it hasType without a stack trace right
08:28:37*Lord_Nightmare quit (Ping timeout: 265 seconds)
08:30:29*Lord_Nightmare joined #nim
08:34:07*floppydh joined #nim
08:37:57*yglukhov quit (Read error: Connection reset by peer)
08:38:34*yglukhov joined #nim
08:40:21*xet7 joined #nim
08:47:51*Vladar joined #nim
09:08:15*miran quit (Ping timeout: 265 seconds)
09:10:07*Vladar quit (Remote host closed the connection)
09:11:42FromGitter<mratsim> here is your new home @alehander42 ;) https://github.com/nim-lang/Nim/issues/7719
09:12:23FromGitter<mratsim> otherwise I use that to check types during macro time: https://github.com/mratsim/Arraymancer/blob/master/src/private/ast_utils.nim#L20
09:21:50*xet7 quit (Read error: Connection timed out)
09:22:31*xet7 joined #nim
09:42:55FromGitter<alehander42> yeah , the things I did.. ugly things
09:43:11FromGitter<alehander42> I also had a very weird problem : I couldn't `getType` of NimNode itself
09:43:29FromGitter<alehander42> somehow I only got ref NimNodeObj and this resolved to empty object
09:45:50FromGitter<alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ae6e5ce1388b2df211295ad]
09:45:56FromGitter<alehander42> @Araq do you know why this happens ^
09:46:44FromGitter<alehander42> it runs ⏎ ⏎ ```ref[NimNodeObj] ⏎ object``` [https://gitter.im/nim-lang/Nim?at=5ae6e60415c9b031144e6c70]
09:48:46Araqmacro call within macro
09:48:52Araqit's the correct behaviour
09:49:10Araqident"e" is a NimNode
09:49:18FromGitter<alehander42> yes this is exactly what I wanted
09:49:21FromGitter<alehander42> what I mean is
09:49:31FromGitter<alehander42> why couldn't I get the fields of NimNodeObj but I saw
09:49:38FromGitter<alehander42> `NimNode* {.magic: "PNimrodNode".} = ref NimNodeObj`
09:49:42FromGitter<alehander42> in system.nim
09:50:06Araqwell it has no fields?
09:51:16FromGitter<alehander42> yeah I was assuming it has, but then I saw it's all getters
09:55:16FromGitter<alehander42> so is there a good way to directly somehow getType of `symbol` . `property` in a macro?
09:55:43*PMunch joined #nim
09:55:47FromGitter<alehander42> (without generating an invocation of a next macro with typed )
09:56:15FromGitter<mratsim> none :/ or I didn’t find it.
09:57:03FromGitter<mratsim> I think this needs a dedicated section in the macros module
09:59:17*yglukhov quit (Remote host closed the connection)
09:59:54*yglukhov joined #nim
10:04:15*yglukhov quit (Ping timeout: 255 seconds)
10:05:34*dddddd joined #nim
10:17:58*Vladar joined #nim
10:24:50*Vladar quit (Quit: Leaving)
10:24:51*nsf joined #nim
10:26:05*SenasOzys quit (Ping timeout: 240 seconds)
10:56:54*xet7 quit (Read error: Connection timed out)
10:57:31*xet7 joined #nim
11:03:16*miran joined #nim
11:06:46*yglukhov joined #nim
11:09:44*yglukhov quit (Remote host closed the connection)
11:10:14*yglukhov joined #nim
11:11:34*Ven`` joined #nim
11:13:25*shashlick quit (Ping timeout: 256 seconds)
11:15:14*shashlick joined #nim
11:20:02*yglukhov quit (Ping timeout: 276 seconds)
11:21:28*yglukhov joined #nim
11:22:14*SenasOzys joined #nim
11:24:24*SenasOzys quit (Read error: Connection reset by peer)
11:26:52*yglukhov quit (Remote host closed the connection)
11:28:48*yglukhov joined #nim
11:29:40*BitPuffin joined #nim
11:34:18*SenasOzys joined #nim
11:42:09*yglukhov quit (Remote host closed the connection)
11:49:06FromDiscord<goeo_> https://getdownon.it/two.png uh oh
12:08:08dom96hrm?
12:09:21*CodeVance joined #nim
12:09:39*CodeVance quit (Client Quit)
12:10:12*CodeVance joined #nim
12:27:43*athenot joined #nim
12:34:17*yglukhov joined #nim
13:00:23*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:04:35*athenot joined #nim
13:09:34PMunchIs ziotom78 from GitHub ever around?
13:09:45PMunchThe guy behind this: https://github.com/ziotom78/parsetoml
13:11:32PMunchYardanico, you and sporto also committed to the repository
13:17:10*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:24:44*SenasOzys quit (Remote host closed the connection)
13:28:41*SenasOzys joined #nim
13:34:12*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:35:40*athenot joined #nim
13:37:45dom96Might be on Gitter
13:39:26PMunchAren't we linked to Gitter from here?
13:40:14livcdi am do not really have a strong opinions when websites change design but the new reddit looks atrocious
13:40:37PMunchThe new reddit?
13:44:16livcdthe new design
13:45:29PMunchWhat new design? Looks about the same to me..
13:46:12miranit has not rolled out for everybody yet
13:46:16livcddont worry it will change
13:46:33mirani'm still on the old one, but from the comments, it looks something like twitter
13:46:50PMunchNoooo
13:47:09miraneasier to incorporate ads into legitimate content
13:47:15PMunchReddit has such a simple design..
13:47:36PMunchmiran, how? There are already ads injected in the Reddit feed isn't there?
13:48:09mirandon't know how, i have just read about it somewhere
13:49:02PMunchhttps://cdn.vox-cdn.com/thumbor/BBCPnU3BwLFffELeZCsRHsz68GI=/0x0:2560x1996/920x0/filters:focal(0x0:2560x1996):format(webp)/cdn.vox-cdn.com/uploads/chorus_asset/file/10574197/W93a53ceOYUq3f28nx0mSPdmmj3FMkshDUU8QtIrzbM.png
13:49:09PMunchEh, it's not as bad as I feared
13:49:35PMunchAt least it still appears to be full width
13:49:58PMunchTBH it just looks like someone applied a material theme to it
13:51:59mirani've seen different design....
13:53:04livcdinternet is such an irrational platform for business. You either make it big that you are a subject to monopoly regulations or you struggle and then resort to all sorts of intrusive and aggressive monetization
13:58:48*Ven`` joined #nim
14:00:46PMunchI think that's a problem in any business
14:01:25PMunchA business with stocks only serves to make money for it's shareholders, so by definition it must try to either grow large, or make money otherwise
14:01:44PMunchNo such business is happy just making the wheels go round
14:02:45*shashlick quit (Ping timeout: 264 seconds)
14:03:20*yglukhov quit (Remote host closed the connection)
14:03:42livcdWell I have the feeling that the "real world" is more balanced. It takes much more for a bakery chain to crush its competitors
14:04:31federico3livcd: #nim-offtopic :)
14:04:35*shashlick joined #nim
14:04:56livcdsorry
14:06:40*yglukhov joined #nim
14:07:56*Vladar joined #nim
14:11:38dom96livcd: Indeed the new reddit design sucks. But AFAIK you can always return to the old design.
14:12:52shashlickI don't see anything new on reddit.com
14:14:26*yglukhov quit (Remote host closed the connection)
14:15:23shashlickOk not rolled out yet
14:22:15FromGitter<data-man> https://www.reddit.com/r/nim/comments/8fwu36/what_needs_nim_to_grow_up_more_the_community/
14:23:29mirannot mentioned there: we need 0.18.2 / 0.19, to introduce new notNil behaviour of seqs and strings to the stable branch
14:28:35*yglukhov joined #nim
14:30:57*yglukhov quit (Remote host closed the connection)
14:35:13FromGitter<data-man> It would be great if the Nim developers worked more consolidated. E.g. create more Nim-organizations: NimSystem, NimGraphics, NimDB, NimMath, etc.
14:35:38mirangood idea, write it there to have all ideas in one place....
14:36:31*yglukhov joined #nim
14:37:30federico3data-man: are you talking about splitting the sdlib repo?
14:39:20FromGitter<data-man> @miran: Please, do it! I'm ashamed of my English. :) ⏎ @federico3: No. Combine existing projects in the organizations.
14:39:33shashlickso there's been 3 attempts to my knowledge for a nim installer - niminst, finish and choosenim
14:39:43mirandata-man: your english is as good as mine ;)
14:40:41federico3data-man: you mean to encourage collaborative maintenance?
14:40:49*yglukhov quit (Remote host closed the connection)
14:41:01*yglukhov joined #nim
14:41:10miranfederico3: i would say - more focused development (as i just mentioned in my reddit comment) - divide people into groups, so they can focus on one part of nim language and work on it
14:42:21mirancurrently it feels to me the development is like a bit of this, a bit of that, a bit of long term goals, a bit of something urgent, a bit of something else, etc
14:43:40federico3miran: if you are referring to core stuff (compiler, stdib, tooling) than yes, having roles/owners/teams could really help
14:45:15mirani'm trying to expand on what data-man has mentioned
14:46:33miranthis can be, of course, postponed after v1.0 is out. having said that - we probably need at some point 'feature freeze' - no more new features for 1.0, and work only on bugfixes
14:46:54FromGitter<data-man> @federico3: Yes, to encourage collaborative maintenance.
14:48:08CodeVanceGood idea
14:49:24*noonien joined #nim
14:50:07FromGitter<data-man> Hurray, now Nim in https://github.com/topics/ ! I just noticed. :-D
14:55:04*sendell quit (Remote host closed the connection)
14:56:09*CodeVance claps
14:56:59FromGitter<data-man> It is a bit prehistory: https://github.com/github/explore/pull/129
15:00:54*yglukhov quit (Remote host closed the connection)
15:02:07shashlickdata-man: how come nimgen isn't on the list? 27 stars... how does it detect nim projects?
15:02:39PMunchDoes Windows have a stderr? If not where does stuff written to it in Nim go?
15:05:23FromGitter<data-man> @shashlick: You can do it yourself for your projects and it's preferable.
15:05:42*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:06:18*SenasOzys quit (Remote host closed the connection)
15:06:42*SenasOzys joined #nim
15:09:17FromGitter<data-man> @PMunch: Yes, Windows have a stderr.
15:09:39PMunchAh okay, nice
15:10:54*yglukhov joined #nim
15:11:54shashlickdata-main: what do I need to do?
15:12:43FromGitter<zetashift> Aw yiss uni exams done time to get to programming
15:12:54PMunchNice zetashift!
15:13:22PMunchHere we have the day off tomorrow, so I took today off as well to have a super long weekend :)
15:13:25FromGitter<zetashift> Thanks, I'll probably jump into Nim in Actions metaprogramming chapter one of these days
15:13:58mirani'm also on a 4-day weekend :) feels really good
15:14:02FromGitter<zetashift> We have the day off tomorrow too so I'll be staring at my screen a long ass time this night and tomorrow
15:14:03PMunchIf you haven't read it this is a super good read: https://hookrace.net/blog/introduction-to-metaprogramming-in-nim/
15:14:23PMunchHow I got started with metaprogramming
15:14:40PMunchNim in Action wasn't out yet then though, so that might be even better :P
15:15:05FromGitter<data-man> @shashlick: Where is "Add topics" and "Manage topics" links in your repos (below a Project description).
15:15:09livcddoes anyone here use Nim with emacs here ?
15:15:25FromGitter<zetashift> I used it a while with spacemacs, had no big issues
15:15:35*yglukhov quit (Ping timeout: 265 seconds)
15:15:43livcdah ok
15:15:59FromGitter<zetashift> at the start it worked actually better than the vscode one
15:16:49*floppydh quit (Quit: WeeChat 2.1)
15:20:21*xkapastel joined #nim
15:20:26FromGitter<zetashift> I think @krux02 used it a lot more than I did
15:20:32shashlickdata-man: cool thanks :)
15:20:51livcddeep fakes in Nim :3
15:23:07*Trustable joined #nim
15:26:03*smt` joined #nim
15:26:42PMunchHmm, is it possible to quit a Nim program with something else than 0 or 1?
15:29:26shashlickquit(91)
15:29:28FromGitter<mratsim> quit “foo”, 3 ?
15:29:37*smt quit (Ping timeout: 248 seconds)
15:30:39dom96quit(QuitFailure)
15:32:41shashlickNim windows installer related: https://gist.github.com/genotrance/534e3a49138eec2894299881f5e60105 <== feedback appreciated, cc @dom96 @araq
15:33:37PMunchshashlick, I tried quit(100) but it quits with error code 1
15:33:43PMunchNo matter what number I put
15:34:24PMunchSame if I try to use an error message
15:35:14shashlickideally choosenim can be enhanced to do most of the heavy lifting and GUI is just a front-end to choosenim, also leverage code from finish and niminst where appropriate
15:36:13livcdshashlick: that's nice and all but..not long ago people had been advised to stick to Nim devel
15:36:18livcdbecause of whatever bugs
15:36:52miranone more reason to do more frequent stable versions!
15:37:00shashlickwell, we need to move away from that based on https://github.com/nim-lang/Nim/issues/7527
15:37:46shashlicka release is a release that people should stick to for a project and only upgrade if something blocks them
15:38:31livcdwell users that just want to poke around want "use whatever works not atm / use whatever everyone uses atm"
15:38:40livcdworks*
15:39:04*rauss quit (Quit: WeeChat 2.1)
15:39:14shashlickthat's why I have added the ability to live on devel
15:39:26shashlickin fact, it should allow single click updates as well
15:39:36dom96shashlick: yes, all we need is a thin GUI wizard on top of choosenim IMO
15:40:03dom96I've thought about generalizing that to all CLI programs and creating a project that allows to easily create an installer for CLIs
15:40:34*rauss joined #nim
15:41:01FromGitter<data-man> @PMunch: I assume, that a mistake on your side because the quit is heavily used in tests.
15:42:01shashlickdom96: well, choosenim still needs to allow binary install, git pull capable devel install, arch detection, etc to pull this off
15:42:17shashlickbut I agree it is the right base
15:42:21*xet7 quit (Read error: Connection timed out)
15:43:01*xet7 joined #nim
15:43:05dom96shashlick: yep
15:46:53shashlicklivcd: made some updates to handle devel + upgrade better
15:47:25*Ven`` joined #nim
15:48:05shashlickdom96: I'm not sure a generalized GUI will work for this
15:48:18shashlickespecially installing compilers, git, etc. seamlessly
15:48:31dom96why?
15:49:10dom96There might need to be some hooks to specify progress or check boxes for options
15:50:00shashlickwell, for example, assuming we add code to choosenim to detect installer presence, it needs to inform the GUI on the results
15:50:13shashlickfor that the CLI => GUI will need to scrape the output kind of stuff
15:50:22shashlickor CLIs will need to adhere to some scheme
15:50:30shashlickwhich means the CLIs need to change to work with the GUI
15:50:50FromGitter<data-man> For Windows users we should recommend to use MSYS2 :)
15:50:50shashlickit's a conversation in my mind, not just calling the CLI with a bunch of predetermined flags
15:51:31shashlickdata-man: i'm saying allow install of vc++ or clang as well so user has choice
15:51:41dom96Sure, CLI will need to adhere to a certain scheme. Most CLIs already do.
15:52:06dom96Like I said, there will need to be some customisability. But that can be done using simple checkboxes (for a first version at least)
15:52:13dom96I'm just curious how far this concept can go
15:52:23dom96If you don't want to try it then no worries
15:52:51shashlickwell, i'm always open to generic methods
15:53:12shashlickbut do you think we can handle the "Figure out C/C++ compiler" section with this method?
15:54:51dom96We can also support dropdowns
15:55:05dom96The idea is to map UI elements to simple CLI flags
15:55:20shashlickPMunch: I just tried on Windows / devel and quit(5) => ERRORLEVEL = 5
15:55:25dom96so you can run `choosenim --cc:clang stable`
15:55:39livcdwhy not to have the ...by default support for mingw and the resp optional where the user points the installer to the right paths for other compilers ?
15:55:45dom96or rather so that the installer can run this
15:56:14shashlicklivcd: ya we can go step by step, not have to support everything in one shot
15:56:15dom96yeah, to be honest supporting installation of other compilers is something that's a far off goal for choosenim IMO
15:56:31shashlickbut this is purely aspirational at this point
15:56:33dom96It probably pays to have as few variables as possible too
15:57:23*jrbrt joined #nim
15:57:27*yglukhov joined #nim
15:58:36shashlickdom96: so if clang is already installed then the GUI shouldn't show that option at all - so we'd need some way for GUI <=> CLI to have a conversation and intelligently show the right things on the GUI
15:59:17shashlickso CLI would need to have a --detect flag or something that gives the GUI all the state info it needs to show the right info
15:59:36shashlickplus any dependency info where if A is selected, then B is greyed out and things like that
15:59:58dom96Meh, I think the abstraction breaks a bit for that case.
15:59:59shashlickwithout this, it won't have a refined experience typical of installers
16:00:05dom96But my idea is to keep things simple
16:01:45shashlickok considering the base is choosenim, what features do we need in it to meet this requirement list? I added some stuff to the gist, please see if it is complete
16:02:03*yglukhov quit (Ping timeout: 256 seconds)
16:03:17dom96choosenim is missing many things from your list
16:03:23dom96sorry, I don't have time to go through it all now
16:03:58shashlickwhat's one good choosenim feature you'd like to see soon? I could take a look
16:04:18FromGitter<Bennyelg> Hey guys, ⏎ I have something like that: ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5ae73e82c3072ad76f1ddf15]
16:04:47livcdshashlick: imho try to do the basic gui wrapper :)
16:06:46shashlicklivcd: simpler is definitely better and achievable but I think it's worthwhile to have a nice installer so that first impressions are good
16:07:23*yglukhov joined #nim
16:11:35*yglukhov quit (Ping timeout: 240 seconds)
16:11:48*xet7 quit (Read error: Connection timed out)
16:12:30*couven92 joined #nim
16:12:31*xet7 joined #nim
16:15:38shashlickdoes nim work with cygwin gcc?
16:17:52FromGitter<data-man> @Bennyelg: Don't use fmt with SqlQuery. format proc for DateTime has two parameters. I guess that's the point. :)
16:23:05FromGitter<Bennyelg> I got it, but why `Don't use fmt with SqlQuery`
16:23:47FromGitter<nigredo-tori> @Bennyelg , have you ever heard the tale of Bobby Tables?
16:24:21FromGitter<Bennyelg> what is the point of sqlquery if not preventing sql injection?
16:26:49*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:28:01FromGitter<nigredo-tori> @Bennyelg , `SqlQuery` is a thin wrapper over `string` for better typing. AFAIK, Nim does not have a proper SQL interpolation primitive.
16:28:58FromGitter<nigredo-tori> And even if `SqlQuery` did something like that, any interpolation in your example would have been done by `fmt`, which knows nothing about SQL.
16:29:21FromGitter<Bennyelg> got it Thanks :)
16:30:12FromGitter<data-man> @Bennyelg: ```Try fmt"{student.registrationDate:someDateFormat}"```
16:32:54PMunchdata-man, shashlick, I have a file with only "quit 2" in it. And it quits with error code 1
16:33:23shashlickcan you try quit(2) and see if it works? which OS/compiler?
16:33:40shashlickand nim -v of course
16:34:00CodeVanceIt quit with not zero
16:34:15PMunchOh wait
16:34:16FromGitter<Bennyelg> @data-man working like charm.
16:34:24PMunch"nim c -r" quits with 1
16:34:31PMunchJust running the program quits with 2
16:34:32PMunch..
16:34:55*leorize joined #nim
16:35:26CodeVanceKek
16:36:03*jrbrt quit (Quit: jrbrt)
16:36:51*vivus joined #nim
16:41:00FromGitter<data-man> @PMunch: ```"nim c -r" quits with 1``` - it's nim's exit code :)
16:41:32shashlickhttps://github.com/nim-lang/Nim/blob/devel/compiler/nim.nim#L102 <= it doesn't forward the child's error code
16:42:18*gangstacat joined #nim
16:44:43*Ven`` joined #nim
16:45:47PMunchdata-man, yeah I know
16:46:01PMunchIt was a silly mistake on my end
17:08:08*SenasOzys quit (Remote host closed the connection)
17:11:04*SenasOzys joined #nim
17:18:29PMunchHmm, why doesn't all the pages on nimble.directory have hosted documentation?
17:18:37PMunchEven if the module contains documentation
17:21:33*Vladar quit (Remote host closed the connection)
17:22:06CodeVanceNopa
17:23:41*jrbrt joined #nim
17:30:49*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:32:42*PMunch quit (Quit: leaving)
18:05:35*Ven`` joined #nim
18:06:59*yglukhov joined #nim
18:07:21*SenasOzys quit (Ping timeout: 240 seconds)
18:07:30*natrys joined #nim
18:11:21*yglukhov quit (Ping timeout: 240 seconds)
18:14:42*SenasOzys joined #nim
18:15:47*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:19:07*CodeVance2 joined #nim
18:20:09*CodeVance2 is now known as CodeVance_
18:21:03*CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
18:21:16*CodeVance_ is now known as CodeVance
18:21:48*yglukhov joined #nim
18:31:09*brainpro1 quit (Read error: Connection reset by peer)
18:32:06*brainpro1 joined #nim
18:33:47*Ven`` joined #nim
19:09:18*Trustable_2 joined #nim
19:10:30*Trustable quit (Ping timeout: 268 seconds)
19:12:43*xet7 quit (Read error: Connection timed out)
19:13:32*xet7 joined #nim
19:14:54*smt` quit (Read error: Connection reset by peer)
19:15:21*smt` joined #nim
19:21:40*Zevv left #nim (#nim)
19:23:53*sz0 joined #nim
19:26:38FromGitter<mratsim> Someone has a clever workaround for this? It’s blocking me to port loopfusion to arraymancer :/ and other custom types: https://github.com/nim-lang/Nim/issues/7737
19:39:42FromGitter<mratsim> Wooow this is awesome @brentp : https://academic.oup.com/bioinformatics/advance-article-abstract/doi/10.1093/bioinformatics/bty358/4990493?redirectedFrom=fulltext 👏
19:41:52*yglukhov_ joined #nim
19:43:52*yglukhov quit (Ping timeout: 256 seconds)
19:57:37*nixfreak joined #nim
19:57:50nixfreakhello going through this document http://nim-by-example.github.io/case/
19:58:09CodeVancewhat about it?
19:58:23nixfreakI am on the case statement without an else statement at the end but i get a compile error
19:58:35nixfreakI am using 0.18 version of nim
19:59:29CodeVancethe last example?
19:59:36CodeVancelet x = 2
19:59:36CodeVancecase (x and 0b11) + 7:
19:59:37CodeVance of 7: echo "A"
19:59:37CodeVance of 8: echo "B"
19:59:37CodeVance of 9: echo "C"
19:59:37CodeVance of 10: echo "D"
19:59:46*nsf quit (Quit: WeeChat 2.0.1)
20:00:43CodeVanceI guess we'll have to fix that... I'll make a PR
20:03:19*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:03:39nixfreakCodeVance yes
20:03:41nixfreakthank you
20:04:05CodeVanceI don't think thats the right definition of narrowed
20:04:21nixfreakalso does yield work like it does in python?
20:05:41CodeVancehttps://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implict-items-pairs-invocations
20:06:04CodeVanceI don't know. internally it doesn't
20:06:24CodeVancepython uses exception throwing black magic nim doesn't
20:07:54CodeVanceBut from the use point its almost the same
20:10:03*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:12:10nixfreakso is this referring to a pointer items* ?
20:12:29nixfreaksorry is items* referring to a pointer ?
20:12:52*Sembei joined #nim
20:16:06Araqnixfreak, no the star is an export marker
20:19:02nixfreakdoes nim have build in help yet ?
20:22:13Araqnah you need to print the PDFs or read the website or buy the book
20:22:30nixfreakok
20:29:35CodeVanceno
20:29:50CodeVancethe * is for export from the module
20:30:20CodeVancemeaning you want others that import the module to be able to use that thing
20:31:11*jrbrt quit (Quit: jrbrt)
20:31:14Araqwohoo travis is green
20:31:22Araqthat was hard lol
20:31:24CodeVancepointers (and more usually refrences) are done with ptr and ref (use ref for normal nim (with Garbage Collection) and ptr is used for C/C++ interoperability)
20:31:53CodeVancenixfreak, there's the docs/html folder
20:32:04CodeVanceGood job Araq
20:37:14CodeVancenim needs a mascot
20:37:32miranwhy?
20:38:56Araqwhy doesn't the crown count as a mascot?
20:38:57CodeVancewhat is "simple and adaptive"
20:39:31CodeVanceAraq, because its not cute And you can't make a plushy from it :|
20:39:50Araqwell you can try.
20:39:54CodeVancea crown is a symbol
20:40:09CodeVanceAnd it doesn't have eyes
20:40:13dom96IMO Lion is still the best mascot for Nim
20:40:25CodeVanceHow can it act cute if it doesn't have eyes.
20:40:33dom96Because lions are the kings of the jungle :)
20:40:35CodeVancedom96, I wanted to suggest that as well
20:41:15dom96Great, so we're in agreement. Lion confirmed :P
20:41:51CodeVanceI was looking at the /r/nim/ and it looked loney. no mascot in sight
20:41:58*salewski joined #nim
20:42:18*jrbrt joined #nim
20:43:25*jrbrt quit (Client Quit)
20:43:46CodeVanceWe need an alien or something
20:43:52FromDiscord<Generic> dom96: Lions don't live in the jungle
20:43:56FromDiscord<Generic> Tigers do
20:44:22CodeVanceA dragon then
20:44:23dom96Yeah, but the saying is "Lions are the kings of the jungle"
20:44:38CodeVanceTrounce all other langs
20:45:12dom96And Disney trumps all ;)
20:45:32dom96Crowns and lions go well together too
20:46:02FromGitter<brentp> @mratsim thanks!
20:48:17dom96We should probably do a poll for this at some point, the forum needs poll support :)
20:48:26FromDiscord<Generic> https://en.wikipedia.org/wiki/List_of_computing_mascots
20:48:33*jrbrt joined #nim
20:49:01salewskiAraq, we have getType and getTypeInst from module macros, which I used same time ago to get a type name as a string.
20:49:04salewskiIs it possible to get not only the type name, but also its module name? Something like "Tables.CountTable" when we pass a counttable instance to a macro?
20:49:29dom96Better yet: https://strawpoll.zendesk.com/hc/en-us/articles/219494768-How-to-embed-a-poll :D
20:49:37dom96Yep, that's going on my todo list for the forum
20:51:22*jrbrt quit (Client Quit)
20:51:58*jrbrt joined #nim
20:52:46Araqsalewski, dunno
20:53:10dom96Generic: That's a great list, thanks for the link :)
20:54:08dom96And apparently a lion isn't used anywhere else
20:54:23salewskiI would need module names for GTK builder: https://developer.gnome.org/gtk3/stable/ch01s03.html
20:54:56salewskito make gtk_builder_get_object () type safe.
20:56:18salewskiIt returns a plain GObject, and I had to verify the type of returned object.
20:57:05FromGitter<data-man> Combined variant - Sphinx. "In Greek mythology, a sphinx is represented as a monster with a head of a woman, the body of a lioness, the wings of an eagle, and a serpent-headed tail." :-D
20:57:34salewski(I do not intent to use GTK Builder myself, but some months ago someone asked about it.)
20:58:16miranmy idea for nim mascot: https://en.wikipedia.org/wiki/Sisyphus
20:58:49miranguy trying to push a rock on which it says v1.0
21:00:16*jrbrt quit (Quit: jrbrt)
21:02:13*Trustable_2 quit (Remote host closed the connection)
21:03:07yglukhov_Araq: i want to create a const array of int16, and call a compilerProc with it. how would i do that at transformation phase, when sem is done already...
21:03:33shashlickneed some macro help
21:03:52shashlicki'm working on adding test cases for math package for nimscript
21:03:55shashlickhttps://gist.github.com/genotrance/97aa4f2417165caa35779a9653b27111
21:04:13shashlicki've written mecho.nim which generates test cases - was wondering if there were a better way of doing this
21:04:30dom96data-man: oooh, that would be cool but it clashes with Python's doc gen: http://www.sphinx-doc.org/en/master/
21:04:39shashlickmecho.txt is the input - basically the output of grep proc math.nim
21:04:45dom96also there is no way you could make that look cute lol
21:05:14Araqyglukhov_, just create the AST but ensure every node has type
21:05:25shashlickoutput I get from mecho.nim is test.nims - i've commented out the procs that aren't yet present in nimscript and so don't work
21:06:05dom96shashlick: What do you need help with? Just cleanup?
21:06:25yglukhov_Araq: how do i create a proper array type?
21:06:32dom96shashlick: I guess you want to parse those proc types?
21:06:47yglukhov_array[N, int16]
21:06:50shashlickya a cleaner way to do this - i wanted to have mechoall() call another macro mecho() with pname as a param but not able to pass it in as a string
21:06:58dom96Why not just use parseExpr() on each line?
21:07:06dom96You might need to prefix those with 'proc' for that to work
21:07:11dom96well, or parseStmt
21:07:31Araqyglukhov_, will probably be messy... check the helpers in semdata.nim
21:07:38shashlickI'm using parseStmt() but if I get pname from the file in mechoall(), I cannot pass it into another macro since it won't be known at compile time as a string
21:07:46shashlickso having to do all of it in one macro
21:07:48*xet7 quit (Read error: Connection timed out)
21:08:02shashlickjust curious if it is even possible to pass pname (string) to another macro and use it there
21:08:09dom96I'm talking about replacing your parsing code in case it's not clear
21:08:18*xet7 joined #nim
21:09:03*dom96 isn't really sure why pname couldn't be passed to another macro
21:09:20shashlickok, no I'm just reading the proc names from the files, don't care for parsing it as proper nim
21:09:49shashlickdom96: what would `macro mecho(pname: ???)` be so that I can use pname in mecho?
21:09:58dom96string?
21:10:29*jrbrt joined #nim
21:11:06FromGitter<data-man> @dom96: I invented a new unique fictional creature: Nimphus
21:11:51shashlickok let me put that together and share
21:12:36*miran quit (Ping timeout: 268 seconds)
21:12:51*jrbrt quit (Client Quit)
21:13:30shashlickdom96: so if I have `macro mecho(pname, lval, hval: string): untyped =` then inside mecho, pname, lval and hval are treated as NimNodes
21:14:01shashlickError: type mismatch: got <string, array[0..2, NimNode]> when I try "$# $# $#" % [pname, lval, hval]
21:16:12dom96yeah, but they are string literal nodes, so you can get the string via strVal IIRC
21:16:21dom96This definitely needs better documentation
21:16:35dom96Alternatively you can also create a {.compileTime.} proc
21:16:36Araqthese words have lost all meaning by now
21:16:37shashlickif I use pname.strVal(), echo pname gives you "pname"
21:17:22yglukhov_which code is more efficient? "x == -1" or "x < 0"? :)
21:17:50Araqso what's the compiler developer gonna do? special case every error message into thousands of what-ifs, trying to guess what the developer meant? it's Nim, it has a macro system, you need to read how it works.
21:18:09Araqa NimNode is not a string.
21:18:25Araqhow much more information do you think the compiler can give you?
21:18:53shashlickwell I understand that the contents of the file are not known at compile time
21:19:06shashlickso using parseStmt, I could use it in the macro
21:19:36shashlickbut I just want to understand if it is possible to pass the string to another macro and have it known
21:22:21Araqsure, pass it.
21:26:21*jjido joined #nim
21:27:42shashlickIt is a Nim node in the macro, how do I get the value
21:28:21dom96Araq: I'm simply saying the macro documentation needs to explain this
21:28:30dom96We also need a tutorial for macros
21:28:49*jjido quit (Client Quit)
21:28:51dom96shashlick: pname.strVal() gives you "pname"?
21:31:03FromGitter<mratsim> @yglukhov compare to 0
21:32:09FromGitter<mratsim> comparing to zero is more efficient than anything else you can summon because you don’t need to LEA or MOV the value in the register
21:32:45shashlickYes it gives the name of the variable in the parent macro
21:33:03FromGitter<mratsim> but unless you call that 10 millions times per second I don’t think you will have any perf issue
21:34:27FromGitter<mratsim> also, this is always useful: http://www.agner.org/optimize/instruction_tables.pdf
21:38:00yglukhov_mratsim: thanks!
21:39:57dom96shashlick: then maybe you could use a compileTime proc instead?
21:42:32*Snircle joined #nim
21:43:50shashlickdom96: here's the update with the error message: https://gist.github.com/genotrance/97aa4f2417165caa35779a9653b27111#file-mecho2-nim
21:46:35shashlickhttps://pastebin.com/05ywye2h <= that's the simplest example of what I'm saying - it prints hello twice instead of hello and then world
21:50:32*jrbrt joined #nim
21:52:54*jrbrt quit (Client Quit)
21:53:37*jrbrt joined #nim
21:55:42*jrbrt quit (Client Quit)
21:59:58salewskiexit
22:00:05*salewski quit (Quit: WeeChat 2.0.1)
22:00:30*nixfreak quit (Ping timeout: 260 seconds)
22:02:14dom96shashlick: Yeah, I know what you mean. I thought strVal solves this.
22:02:23dom96But apparently not, and so I'm out of idea
22:02:27dom96*ideas
22:05:21*jrbrt joined #nim
22:09:00*jrbrt quit (Client Quit)
22:19:19*jrbrt joined #nim
22:20:13*jrbrt quit (Client Quit)
22:25:56*SenasOzys quit (Read error: Connection reset by peer)
22:33:58*Sentreen quit (Ping timeout: 264 seconds)
22:36:23*xet7 quit (Remote host closed the connection)
22:38:48*FromGitter quit (Ping timeout: 265 seconds)
22:39:00dom96Araq: https://github.com/flaviut/nim-by-example/pull/62 is that a regression?
22:46:24*darithorn joined #nim
22:48:02*Sentreen joined #nim
22:52:16*jrbrt joined #nim
22:52:33*MyMind joined #nim
22:54:05oprypinGitter <-> IRC bridge is down, seemingly because Gitter is down (at least in parts of Europe). It will be down for at least 8 more hours because I'm gonna sleep.
22:54:57*Sembei quit (Ping timeout: 248 seconds)
22:57:21*jrbrt quit (Quit: jrbrt)
22:59:04*darithorn quit (Remote host closed the connection)
22:59:46*darithorn joined #nim
23:00:38*noonien quit (Quit: Connection closed for inactivity)
23:00:55*jrbrt joined #nim
23:01:41*natrys quit (Quit: natrys)
23:10:15*kier quit (Read error: Connection reset by peer)
23:10:29*jrbrt quit (Quit: jrbrt)
23:10:58*jrbrt joined #nim
23:14:07dom96oprypin: thanks for the heads up
23:14:09*kier joined #nim
23:54:44*Pisuke joined #nim
23:55:13*MyMind quit (Ping timeout: 248 seconds)
23:58:29*yglukhov_ quit (Ping timeout: 260 seconds)