00:00:02 | * | junland quit (Quit: %ZNC Disconnected%) |
00:01:15 | * | junland joined #nim |
00:06:19 | * | lritter joined #nim |
00:11:39 | madprops | in regex101 i get 3 matches |
00:11:44 | madprops | but here i only get 1 |
00:13:28 | madprops | ohh |
00:13:36 | madprops | "Like ` find(...) <#proc-find>`_, but anchored to the start of the string. " |
00:35:38 | * | GordonBGood joined #nim |
00:37:56 | * | Hideki_ joined #nim |
00:41:03 | sealmove | Zevv you here? |
00:42:16 | * | Hideki_ quit (Ping timeout: 240 seconds) |
00:56:15 | * | krux02_ joined #nim |
00:59:02 | * | MarquisdeFalbala quit (Remote host closed the connection) |
01:00:02 | * | krux02 quit (Ping timeout: 246 seconds) |
01:02:00 | FromDiscord | <exelotl> if I want to link an object file, is --passL:"resources.o" the correct way to do it? |
01:05:59 | * | Hideki_ joined #nim |
01:08:32 | * | MarquisdeFalbala joined #nim |
01:13:42 | * | clyybber quit (Quit: WeeChat 2.6) |
01:21:05 | FromGitter | <Varriount> I believe so |
01:21:22 | FromGitter | <Varriount> There might also be a pragma too you can use |
01:21:59 | * | Hideki_ quit (Remote host closed the connection) |
01:22:45 | * | Kevin5 joined #nim |
01:23:19 | * | Hideki_ joined #nim |
01:23:52 | * | Mike[m]7 joined #nim |
01:28:08 | * | Hideki_ quit (Ping timeout: 265 seconds) |
01:30:04 | * | Kevin5 quit (Ping timeout: 265 seconds) |
01:31:34 | * | Hideki_ joined #nim |
01:38:57 | * | MarquisdeFalbala quit () |
01:42:01 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
01:51:27 | * | Hideki_ quit (Remote host closed the connection) |
01:52:22 | * | Hideki_ joined #nim |
01:57:05 | * | Hideki_ quit (Ping timeout: 276 seconds) |
02:04:47 | * | uu91 quit (Read error: Connection reset by peer) |
02:05:17 | * | uu91 joined #nim |
02:06:39 | * | Hideki_ joined #nim |
02:20:11 | madprops | any idea why 222 is never fired? https://play.nim-lang.org/#ix=221l |
02:21:06 | madprops | im calling from within another function with: discard textarea_delay() |
02:21:36 | madprops | it's like the async proc stops existing |
02:21:48 | madprops | or sleepAsync never finishes |
02:40:48 | FromDiscord | <madprops> đŹ đ |
02:42:34 | * | lritter quit (Ping timeout: 265 seconds) |
02:43:19 | * | lritter joined #nim |
02:44:20 | * | kungtotte quit (Ping timeout: 246 seconds) |
02:59:02 | FromGitter | <watzon> How would you go about unmarshaling a JSON object like this: â â ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dd0b775eeb63e1a83c8c4e5] |
02:59:28 | FromGitter | <watzon> In reality there are 780 possible types |
03:01:22 | * | kungtotte joined #nim |
03:13:13 | * | Hideki_ quit (Remote host closed the connection) |
03:13:59 | * | Hideki_ joined #nim |
03:17:35 | * | krux02_ quit (Remote host closed the connection) |
03:18:49 | * | Hideki_ quit (Ping timeout: 265 seconds) |
03:24:03 | * | sealmove quit (Quit: WeeChat 2.6) |
03:29:04 | FromGitter | <qqtop> @madprops , works here ! try with asyncCheck textarea_delay() |
03:30:41 | * | uu91 quit (Ping timeout: 276 seconds) |
03:30:52 | * | uu91 joined #nim |
03:31:27 | madprops | qqtop, this doesn't work for me https://play.nim-lang.org/#ix=221v |
03:32:22 | madprops | 222 is never called |
03:37:13 | FromGitter | <qqtop> Are you by any chance writing a nigui based app ? |
03:37:19 | madprops | yes |
03:38:31 | madprops | what i tried as an alternative was listening to keydown, on the window since keydown is broken on textarea |
03:38:40 | madprops | but then i couldn't do what i want because i need the linebreak operation to be done |
03:38:44 | madprops | so im stuck |
03:47:45 | FromGitter | <qqtop> yep I ran into similar issues before. try to end your app end with something like this â `runforever() # async loop â app.run() # nigui loop â ` [https://gitter.im/nim-lang/Nim?at=5dd0c2e1c26e8923c43b8fea] |
03:49:40 | FromGitter | <qqtop> keydown event seems fine here â â ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dd0c354fd6fe41fc09aacbc] |
03:57:07 | * | exelotl quit (Ping timeout: 250 seconds) |
04:02:04 | * | Hideki_ joined #nim |
04:06:39 | * | jwm224 quit (Ping timeout: 250 seconds) |
04:08:01 | * | nif quit (Quit: ...) |
04:08:18 | * | nif joined #nim |
04:09:01 | * | jwm224 joined #nim |
04:34:45 | * | vsantana quit (Remote host closed the connection) |
04:37:37 | * | vsantana joined #nim |
04:41:19 | * | chemist69 quit (Ping timeout: 250 seconds) |
04:43:02 | FromDiscord | <krab4t> i see here https://nim-lang.org/docs/httpclient.html#downloadFile%2CHttpClient%2Cstring%2Cstring it can raise SslError |
04:43:07 | FromDiscord | <krab4t> ho it works on windows? |
04:43:24 | FromDiscord | <krab4t> openssl? |
04:43:30 | * | chemist69 joined #nim |
04:50:14 | * | Hideki_ quit (Remote host closed the connection) |
04:50:57 | * | Hideki_ joined #nim |
04:55:17 | * | Hideki_ quit (Ping timeout: 240 seconds) |
04:59:12 | FromDiscord | <krab4t> > This requires the OpenSSL library, fortunately it's widely used and installed on many operating systems. |
04:59:12 | FromDiscord | <krab4t> i see |
05:12:47 | FromGitter | <watzon> Ok this is kind of cool. Reading the documentation for Julia right now, and it lets you define your own primitive types |
05:12:47 | FromGitter | <watzon> https://docs.julialang.org/en/v1/manual/types/#Primitive-Types-1 |
05:13:34 | FromGitter | <watzon> Don't know in what case I'd actually use that feature, but it's interesting |
05:13:44 | * | Hideki_ joined #nim |
05:22:24 | * | Jjp137 quit (Quit: Leaving) |
05:22:31 | * | Jjp137 joined #nim |
05:23:27 | Mike[m]7 | Hey, so has anyone played around with or know of any examples for getting a basic Vulkan renderer set up with Nim? |
05:24:10 | Mike[m]7 | I'm following along with this c++ tutorial, butting getting stuck on creating the swapchain: https://vulkan-tutorial.com/Introduction |
05:55:21 | * | uu91 quit (Read error: Connection reset by peer) |
05:55:34 | * | uu91 joined #nim |
05:58:17 | * | theelous3 joined #nim |
06:33:25 | FromGitter | <topcheese> @Mike[m]7 Not sure if this will work, but it says it has Vulcan bindings https://github.com/nimgl/nimgl |
06:36:18 | Mike[m]7 | Thanks, I've actually been using that for the vulkan bindings. The problem is that the examples in that repo just create a vulkan instance; they don't actually set up a renderer and draw something to the screen. |
06:36:31 | * | uu91 quit (Ping timeout: 252 seconds) |
06:37:52 | Mike[m]7 | I think I have all the dependencies and bindings in place. I'm just struggling to get through the 500+ lines of boilerplate code to actually get something on screen |
06:37:53 | Mike[m]7 | I'm using that ^ library in addition to the sdl2 bindings. |
06:38:37 | * | uu91 joined #nim |
06:39:30 | FromGitter | <topcheese> I haven't checked that library out yet,but I have played with Nimx and sdl2. |
06:41:49 | * | theelous3 quit (Ping timeout: 265 seconds) |
06:44:59 | FromGitter | <topcheese> Will the nim binding for bgfx work? https://github.com/zacharycarter/bgfx.nim |
06:45:32 | Mike[m]7 | Yeah I've been able to create a window and get input with SDL, so I'm that far at least |
06:46:46 | * | Hideki_ quit (Remote host closed the connection) |
06:47:29 | * | Hideki_ joined #nim |
06:49:51 | * | u9898287 joined #nim |
06:51:55 | * | Hideki_ quit (Ping timeout: 252 seconds) |
07:00:16 | * | noonien quit (Quit: Connection closed for inactivity) |
07:01:57 | * | nsf joined #nim |
07:10:22 | * | dddddd quit (Remote host closed the connection) |
07:21:09 | * | uu91 quit (Read error: Connection reset by peer) |
07:21:24 | * | uu91 joined #nim |
07:33:22 | * | solitudesf joined #nim |
07:38:39 | * | Hideki_ joined #nim |
07:45:48 | * | Hideki_ quit (Remote host closed the connection) |
07:46:18 | * | Hideki_ joined #nim |
07:51:55 | FromGitter | <topcheese> I forgot about the Diligent Engine. I might have to rethink my gui strategy. http://diligentgraphics.com/diligent-engine/ |
07:58:40 | * | lritter quit (Ping timeout: 265 seconds) |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:03:18 | * | lritter joined #nim |
08:05:22 | * | gmpreussner joined #nim |
08:06:15 | * | tane_ joined #nim |
08:12:26 | * | narimiran joined #nim |
08:23:11 | * | Hideki_ quit (Remote host closed the connection) |
08:23:58 | * | Hideki_ joined #nim |
08:27:13 | * | Hideki_ quit (Remote host closed the connection) |
08:27:29 | * | Hideki_ joined #nim |
08:39:40 | * | Jjp137 quit (Read error: Connection reset by peer) |
08:40:47 | * | Jjp137 joined #nim |
08:45:31 | * | Hideki_ quit (Remote host closed the connection) |
08:46:44 | * | Hideki_ joined #nim |
08:51:21 | * | Hideki_ quit (Ping timeout: 250 seconds) |
08:51:35 | * | Vladar joined #nim |
09:13:50 | * | filcuc joined #nim |
09:18:42 | * | nif quit (Quit: ...) |
09:18:52 | * | nif joined #nim |
09:25:51 | * | mal`` quit (Quit: Leaving) |
09:27:14 | * | filcuc quit (Ping timeout: 240 seconds) |
09:35:37 | * | filcuc joined #nim |
09:37:48 | * | mal`` joined #nim |
09:41:17 | * | filcuc quit (Ping timeout: 240 seconds) |
09:45:18 | * | krux02 joined #nim |
09:49:58 | * | jjido joined #nim |
10:05:27 | * | fredrik92 joined #nim |
10:09:06 | * | Hideki_ joined #nim |
10:18:37 | * | Hideki_ quit (Ping timeout: 240 seconds) |
10:21:13 | * | couven92 quit (Disconnected by services) |
10:21:17 | * | fredrik92 is now known as couven92 |
10:21:41 | * | fredrik92 joined #nim |
10:36:31 | * | couven92 quit (Read error: Connection reset by peer) |
10:37:08 | * | couven92 joined #nim |
10:51:33 | * | couven92 quit (Read error: Connection reset by peer) |
10:51:55 | * | couven92 joined #nim |
11:10:19 | * | u9898287 quit (Quit: u9898287) |
11:10:36 | * | u9898287 joined #nim |
11:14:25 | * | narimiran quit (Ping timeout: 265 seconds) |
11:25:26 | * | u9898287 quit (Quit: u9898287) |
11:25:44 | * | u9898287 joined #nim |
11:48:52 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzzâŚ) |
11:51:31 | * | ng0 joined #nim |
11:51:55 | * | letto_ joined #nim |
11:52:02 | * | letto quit (Ping timeout: 240 seconds) |
12:01:26 | * | jjido joined #nim |
12:01:43 | * | dom96 facepalms |
12:01:44 | dom96 | https://github.com/nim-lang/Nim/blob/61ea85687c2950bb40c23a1a7cd2c13473bd9662/compiler/scriptconfig.nim#L61 |
12:02:20 | dom96 | listFiles in nimscript has been broken since 2015 and no one noticed? |
12:02:36 | * | jjido quit (Client Quit) |
12:03:33 | dom96 | huh, no, this should work |
12:23:32 | * | njoseph quit (Ping timeout: 265 seconds) |
12:25:53 | * | njoseph joined #nim |
12:37:39 | * | jjido joined #nim |
12:40:54 | FromGitter | <sheerluck> readme.md says that MASTER BRANCH IS DEPRECATED. May I ask why, what was the rationale behind this decision |
13:00:56 | * | NimBot joined #nim |
13:11:19 | * | exelotl joined #nim |
13:26:39 | * | sealmove joined #nim |
13:28:43 | sealmove | ping Zevv |
13:34:08 | FromGitter | <mratsim> @sheerluck latest updates happen on devel, and then they are backported in version specific branches like 1.0.x |
13:34:35 | FromGitter | <mratsim> this allows having devlopment head ahead while having stable releases |
13:45:08 | * | dddddd joined #nim |
13:55:26 | * | u9898287 quit (Quit: u9898287) |
13:57:10 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzzâŚ) |
14:02:37 | * | GordonBGood quit (Ping timeout: 265 seconds) |
14:10:30 | Zevv | sealmove: oi |
14:10:51 | sealmove | oi, I found this: https://github.com/cierelabs/yaml_spirit/blob/master/doc/specs/yaml-peg.txt |
14:10:59 | sealmove | maybe we can adjust it to npeg syntax? |
14:11:22 | * | xet7_ joined #nim |
14:14:28 | * | xet7 quit (Ping timeout: 245 seconds) |
14:17:05 | * | jjido joined #nim |
14:17:39 | sealmove | <waiting for your opinion in agony> |
14:21:39 | disruptek | agony? |
14:22:37 | disruptek | that looks like it will work. |
14:30:15 | * | couven92 quit (Read error: Connection reset by peer) |
14:30:41 | * | couven92 joined #nim |
14:33:54 | * | narimiran joined #nim |
14:34:30 | Zevv | hm that should be ok |
14:34:38 | Zevv | what flavour is it now? |
14:34:58 | Zevv | I'd have to take a good look to see how they handled the indenting |
14:35:10 | Zevv | 455 lines |
14:35:37 | Zevv | compare with 20 for yson |
14:35:48 | Zevv | thus my opinion about yaml |
14:35:58 | * | couven92 quit (Read error: Connection reset by peer) |
14:36:26 | * | couven92 joined #nim |
14:37:17 | sealmove | it follows this spec: https://github.com/cierelabs/yaml_spirit/blob/master/doc/specs/yaml-spec.pdf |
14:38:26 | sealmove | hmm, in object variants it's annoying that you can't have same name for 2 fields of different branches |
14:38:32 | sealmove | anyone knows how to deal with that? |
14:38:40 | Zevv | oh right that's only 78 pages, how hard can it be |
14:38:44 | Zevv | bwaaah |
14:38:55 | Zevv | anyway, the peg is a good find, it should make life lots easier |
14:39:38 | Zevv | But what flavour of PEG is that, I have not seen it before |
14:39:53 | Zevv | it allows for inlide code, just like npeg, that is how they solve the indenting |
14:40:07 | Zevv | but it has these {- funny comment syntax -} |
14:40:09 | sealmove | ah PEG flavor, I thought you meant what YAML flavor |
14:40:54 | Zevv | be warned though: I've made a few pretty complicated NPEG grammars that blew up the Nim VM in interesting ways - I feel this is of a similar scale |
14:42:08 | FromGitter | <sheerluck> @mratsim yes but we can do same thing on master. It sounds like you are just using devel branch instead of master. What is the point of 1) creating devel branch 2) deprecating master branch 3) using devel branch as master branch. |
14:42:24 | disruptek | if you don't do it, i'll do it eventually. i hate having to convert to json. |
14:42:44 | disruptek | well, hate is too strong a word. but, it's pretty annoying. |
14:42:54 | sealmove | I think it's some C# library flavor |
14:43:07 | Zevv | it has some interesting extensions |
14:43:12 | FromGitter | <mratsim> @sheerluck not breaking other people scripts. We need to allow for a transition period |
14:47:06 | disruptek | yeah, we need to give people time to write new scripts to break. |
14:59:18 | * | clyybber joined #nim |
15:01:26 | * | vesper11 quit (Quit: ZNC 1.7.4 - https://znc.in) |
15:02:49 | * | vesper11 joined #nim |
15:17:23 | * | vesper11 quit (Read error: Connection reset by peer) |
15:19:41 | * | vesper11 joined #nim |
15:28:59 | * | couven92 quit (Read error: Connection reset by peer) |
15:29:24 | * | couven92 joined #nim |
15:38:14 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzzâŚ) |
15:40:02 | clyybber | Araq: Hi, can you explain why we need to pArg(arg[0]) when arg is nkCallKinds in your PR? |
15:40:52 | * | jjido joined #nim |
15:45:42 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzzâŚ) |
15:48:13 | * | couven92 quit (Ping timeout: 250 seconds) |
16:02:31 | * | leorize quit (Remote host closed the connection) |
16:03:07 | * | leorize joined #nim |
16:37:28 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
16:40:52 | * | xet7_ is now known as xet7 |
16:46:34 | FromDiscord | <kodkuce> gc:beohem for easy thread in nim ver 1.2 or when? |
16:51:28 | * | sealmove quit (Quit: WeeChat 2.6) |
16:59:29 | Yardanico | gc:boehm exists in nim since a long time ago :) |
17:24:57 | * | lritter quit (Quit: Leaving) |
17:37:20 | * | jjido joined #nim |
18:31:46 | * | vesper11 quit (Read error: Connection reset by peer) |
18:36:51 | * | vesper11 joined #nim |
18:47:35 | madprops | is there something to have a cli program get input from vim or nano? |
18:48:02 | madprops | ok found this https://www.reddit.com/r/nim/comments/9x641g/how_to_run_vim_and_get_output/ |
18:49:09 | disruptek | what are you trying to do? |
18:49:42 | madprops | well. initially i was building a gui program using NiGui, basically i just need to have a textarea with tab support. but i couldn't get it to work properly |
18:49:51 | madprops | so now im thinking just getting the input from a cli editor |
18:50:23 | madprops | i got the tabs working, but the text update replaces the whole thing, which looks glitchy |
18:51:28 | Yardanico | You want to embed vim or nano inside of a GUI program? |
18:51:32 | disruptek | i feel like getting one of the gui tools working makes the most sense. |
18:51:35 | madprops | no, now it would be a cli program |
18:51:44 | disruptek | but what about using something like zenity? |
18:52:09 | Yardanico | Well there are programs that just create a file in /tmp like /tmp/myfile, call the default $EDITOR on it, and after it closes they just read that file |
18:52:20 | Yardanico | That's pretty common in linux, for example the visudo command does that |
18:52:49 | madprops | yeah that's what im going to try |
18:52:56 | disruptek | if it's a cli program, i don't want it to leave my cli. so i'd do as Yardanico suggests. |
18:54:08 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzzâŚ) |
18:54:51 | * | uu91 quit (Ping timeout: 240 seconds) |
18:55:20 | * | uu91 joined #nim |
19:02:23 | Yardanico | madprops: something like this- https://play.nim-lang.org/#ix=225B |
19:05:32 | Yardanico | or, with $EDITOR path variable - https://play.nim-lang.org/#ix=225C |
19:07:44 | madprops | im doing this https://play.nim-lang.org/#ix=225D |
19:07:51 | * | thomasross_ joined #nim |
19:07:51 | * | thomasross is now known as Guest67087 |
19:07:51 | * | thomasross_ is now known as thomasross |
19:08:12 | Yardanico | execCmd wouldn't work here |
19:09:04 | madprops | it does |
19:09:09 | Yardanico | oh, nice :P |
19:09:38 | * | Guest67087 quit (Ping timeout: 240 seconds) |
19:11:20 | * | Vladar quit (Quit: Leaving) |
19:19:23 | * | vsantana quit (Remote host closed the connection) |
19:20:23 | * | vsantana joined #nim |
19:30:05 | * | vsantana quit (Remote host closed the connection) |
19:32:38 | * | vsantana joined #nim |
19:33:52 | FromGitter | <jason_koch_twitter> is anyone aware of a netlink binding for nim? |
19:34:16 | FromGitter | <jason_koch_twitter> at the moment i'm shelling out to `tc` but that is pretty inefficient |
19:34:40 | FromGitter | <jason_koch_twitter> (similar question for getting unix socket support in the http client) |
19:45:40 | * | nsf quit (Quit: WeeChat 2.6) |
19:55:03 | FromGitter | <zetashift> @jason_koch_twitter googling got me this https://github.com/zielmicha/morelinux/blob/master/morelinux/netlink.nim but it might be outdated |
20:00:40 | FromGitter | <jason_koch_twitter> oh thanks @zetashift i spent some time on google and nimble but didn't find that, will check it out |
20:09:12 | madprops | i find regex captures confusing |
20:09:31 | madprops | how can i fix this around line 15? https://play.nim-lang.org/#ix=2263 |
20:10:25 | * | GordonBGood joined #nim |
20:14:26 | * | GordonBGood quit (Ping timeout: 240 seconds) |
20:15:17 | disruptek | madprops: why don't you just use nre's replace()? |
20:26:23 | * | GordonBGood joined #nim |
20:28:47 | * | u9898287 joined #nim |
20:29:48 | * | ng0 joined #nim |
20:37:54 | FromDiscord | <funcmike> silly question ```proc elo(question: string): bool = |
20:37:54 | FromDiscord | <funcmike> echo "yolo: ", question``` why bool is this not compile error (return is false )? |
20:38:23 | FromDiscord | <funcmike> silly question ```proc elo(question: string): bool = |
20:38:23 | FromDiscord | <funcmike> echo "yolo: ", question``` why is this not compile error (return is false )? |
20:38:38 | FromGitter | <zetashift> hey funcmike can you paste your code using play.nim-lang.org? |
20:39:06 | FromGitter | <zetashift> https://play.nim-lang.org/ discord formatting is not shown correctly in gitter/irc |
20:39:54 | FromDiscord | <funcmike> https://play.nim-lang.org/#ix=226m |
20:40:46 | FromGitter | <zetashift> it's probably because of the implicit result variable that Nim has |
20:40:48 | Yardanico | @funcmike because default value for bool is false |
20:41:29 | * | jjido joined #nim |
20:41:36 | FromDiscord | <funcmike> ok implicit return i s fine but echo returns false? |
20:41:41 | FromDiscord | <funcmike> ok implicit return is fine but echo returns false? |
20:41:52 | FromGitter | <zetashift> no echo returns nothing it just prints to console |
20:42:03 | Yardanico | @funcmike result variable is always there, even if you don't define it |
20:42:15 | * | couven92 joined #nim |
20:42:21 | Yardanico | So your procedure already has a result variable which is set to false since that's the default bool value |
20:42:43 | FromDiscord | <funcmike> im not conviced |
20:42:43 | FromDiscord | <funcmike> https://play.nim-lang.org/#ix=226m |
20:42:50 | Yardanico | ?? |
20:42:51 | FromDiscord | <funcmike> sorry |
20:43:05 | FromDiscord | <funcmike> https://play.nim-lang.org/#ix=226q |
20:43:14 | FromDiscord | <funcmike> so why here is compile error |
20:43:27 | FromDiscord | <funcmike> if return is always there |
20:43:29 | Yardanico | because you're comparing string to bool |
20:43:35 | FromGitter | <zetashift> cause you're comparing a string to a bool |
20:43:42 | Yardanico | the error is on line 4, not in the proc |
20:43:45 | FromGitter | <zetashift> beat me to it :( |
20:43:51 | FromDiscord | <funcmike> ok |
20:44:01 | FromDiscord | <funcmike> if assert is "" it works |
20:44:17 | FromGitter | <zetashift> yes because string is initialized to an empty string |
20:44:57 | FromDiscord | <funcmike> weird decision too always return some value |
20:47:00 | FromDiscord | <funcmike> if someone just forget about it this could lead too unexpected behavior |
20:47:03 | disruptek | if you don't specify a return type, you won't return a value. |
20:47:34 | Yardanico | @funcmike it's not an unexpected behaviour since all of this is documented |
20:47:40 | disruptek | it's a feature most people grow to enjoy. |
20:47:43 | Yardanico | yeah |
20:48:19 | FromDiscord | <funcmike> how is that a feature i dont really see it |
20:48:21 | FromDiscord | <funcmike> ? |
20:49:04 | madprops | seems the terminal module doesn't have a method to go to an altscreen |
20:49:09 | FromDiscord | <funcmike> can you give some code example where this is usefull? |
20:49:09 | Yardanico | @funcmike what do you exactly mean? |
20:49:27 | Yardanico | No need to create your own "result" variable, you can just set the implicit one |
20:50:09 | Yardanico | https://nim-lang.org/docs/tut1.html#procedures-result-variable |
20:50:18 | FromDiscord | <funcmike> ok but this is doing more then implicit return like in some fp languages where last statetment is return |
20:50:24 | * | GordonBGood quit (Read error: Connection reset by peer) |
20:50:42 | Yardanico | @funcmike nim also has that feature |
20:50:46 | Yardanico | I mean "last statement is return" |
20:50:57 | madprops | mike, check this example https://play.nim-lang.org/#ix=226t |
20:51:19 | FromDiscord | <funcmike> ok this is ok |
20:51:44 | FromDiscord | <funcmike> but why it assumes if echo returns nothing i want to return false |
20:51:48 | FromDiscord | <funcmike> in my example? |
20:51:48 | disruptek | it's not implicitly returning, it's simply providing access to the memory set aside to hold the return value. |
20:51:54 | * | GordonBGood joined #nim |
20:52:09 | FromDiscord | <funcmike> your example is ok |
20:53:01 | disruptek | echo is the last statement in the procedure, so the procedure's return value /would be/ set to that statement, if that statement produced a return value. |
20:53:12 | Yardanico | @funcmike because last statement is used for return only if types match |
20:53:24 | disruptek | because it doesn't, the return value (result) isn't changed from the default of false, ie. 0 in memory. |
20:53:47 | Yardanico | actually sorry, it's just that if a procedure returns a variable, you must assign it or discard it explicitly |
20:54:05 | Yardanico | so if you don't discard or assign and it's the last statement in the proc, it's considered to be a return value of the proc |
20:54:45 | FromDiscord | <funcmike> ok but why compiler just cannot write error msg that return value (of echo) is not a bool? |
20:55:02 | Yardanico | because echo does not return anything |
20:55:06 | * | uu91 quit (Read error: Connection reset by peer) |
20:55:24 | FromDiscord | <funcmike> thats my point |
20:55:25 | * | uu91 joined #nim |
20:55:35 | FromDiscord | <funcmike> so return type does not match type |
20:55:44 | Yardanico | well, "void" is a special return type |
20:55:47 | FromGitter | <zetashift> you mean that in case a programmer forgets to set the value and doesn't get an error message? |
20:55:48 | Yardanico | it means that the proc doesn't return anything |
20:56:09 | FromDiscord | <funcmike> zetashift: yes i mean this |
20:56:41 | solitudesf | because once you know about this feature, it stops being a problem, sometimes its useful |
20:57:40 | FromGitter | <zetashift> yeah I get your worries but I have yet to see it as an issue |
20:59:18 | madprops | actually it would be weird that :bool can return void |
20:59:28 | Yardanico | well, but it can't :) |
20:59:32 | Yardanico | ah, nvm |
20:59:51 | FromDiscord | <funcmike> zetashift: i known it could easy be detected in unit tests, but i'm just curious where is this useful? |
21:00:42 | FromGitter | <zetashift> from `Nim by Example` : The result variable is a special variable that serves as an implicit return variable, which exists because the control flow semantics of the return statement are rarely needed |
21:00:49 | FromGitter | <zetashift> it's just a nice shortcut |
21:01:06 | FromGitter | <zetashift> you could also use return statement or the last expression is the return value |
21:02:00 | FromDiscord | <funcmike> but this is intended or just side effect of implicit return implementation of proc? |
21:02:38 | solitudesf | its intended side effect |
21:02:45 | FromDiscord | <funcmike> đ |
21:07:48 | lqdev[m] | it's not really a side effect, it's just a feature. |
21:15:50 | * | clyybber quit (Quit: WeeChat 2.6) |
21:17:08 | * | solitudesf quit (Ping timeout: 265 seconds) |
21:17:29 | madprops | is putting the main part of the program at the bottom, not inside a proc, incorrect? i've seen some isMain stuff but not sure what that is |
21:22:47 | disruptek | it's fine; `when isMainModule:` is a compile-time conditional. |
21:23:52 | FromDiscord | <funcmike> i see there is an Option[T] type, is something like Result[T,E] type for alternative error handling (instead of exceptions)? |
21:24:04 | disruptek | as a module, yes. |
21:24:13 | disruptek | ie 3rd party library. |
21:27:36 | FromDiscord | <funcmike> this one https://github.com/arnetheduck/nim-result ? |
21:34:06 | FromGitter | <zetashift> yes! |
21:34:06 | * | filcuc joined #nim |
21:34:29 | * | sealmove joined #nim |
21:40:27 | * | ltriant joined #nim |
21:46:56 | * | couven92 quit (Read error: Connection reset by peer) |
21:47:21 | * | couven92 joined #nim |
21:50:29 | * | narimiran quit (Ping timeout: 276 seconds) |
22:00:39 | * | tane_ quit (Quit: Leaving) |
22:08:07 | * | couven92 quit (Quit: Client Disconnecting) |
22:15:27 | * | oculux quit (Quit: blah) |
22:15:42 | * | oculux joined #nim |
22:17:21 | FromDiscord | <IanIAnIAN> yuck, C worked, where nim wrapper for C failed |
22:17:52 | Yardanico | ? |
22:23:10 | FromDiscord | <IanIAnIAN> just my intermittent stb_image woe. |
22:23:23 | Yardanico | what about https://github.com/define-private-public/stb_image-Nim ? |
22:25:10 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzzâŚ) |
22:27:35 | FromDiscord | <IanIAnIAN> Issue#8 |
22:27:38 | disbot | https://github.com/nim-lang/Nim/issues/8 |
22:27:38 | disbot | ^ 'index out of bounds' in httpserver.nim |
22:27:40 | disbot | ^ snippet at https://play.nim-lang.org/#ix=226X đ |
22:27:55 | Yardanico | lol |
22:28:33 | Yardanico | what do you mean by issue 8? std_image wrapper doesn't have it |
22:30:05 | madprops | had some fun with this https://github.com/madprops/dirfun |
22:30:50 | Yardanico | madprops: you can put releases into github releases, not into your git repo |
22:30:54 | Yardanico | to https://github.com/madprops/dirfun/releases |
22:31:36 | Yardanico | also, about example - you can use """ to create a multiline string, and since you don't change the value you can use "const" instead of "var" |
22:33:04 | Yardanico | Also, instead of "homerep" you can use expandTilde from `os` |
22:34:07 | Yardanico | and generally instead of regexes you can just use split and normal replace from strutils (not from re), or strscans for more complex cases |
22:37:35 | madprops | Yardanico: yeah i know. that's just like a dir used for the install script. i could have named it bin |
22:38:10 | madprops | ok nice tips |
22:38:13 | madprops | i'll check those |
22:47:29 | madprops | hmm multilines are giving me a problem with tabs |
22:47:36 | madprops | tabs are converted to spaces i think |
22:47:50 | Yardanico | tabs are \t |
22:47:57 | madprops | but with """ \t is raw |
22:48:01 | Yardanico | maybe your editor uses spaces by default |
22:54:03 | madprops | in indeed does |
22:54:17 | madprops | so not sure how to do this |
22:54:45 | madprops | i could replace each 2 spaces with a tab .. but hardcoding that is messy |
22:56:54 | * | ltriant_ joined #nim |
22:58:05 | * | ltriant quit (Ping timeout: 276 seconds) |
23:06:49 | madprops | made some fixes |
23:07:57 | * | filcuc quit (Quit: Konversation terminated!) |
23:09:48 | * | leorize quit (Ping timeout: 260 seconds) |
23:18:36 | madprops | actually i messed it up |
23:23:22 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
23:23:39 | * | pbb joined #nim |
23:28:46 | madprops | this is some weird indentation http://i.imgur.com/q2zE6tl.png |
23:29:57 | disruptek | https://github.com/johnnovak/illwill |
23:31:17 | madprops | this looks really cool |
23:36:38 | sealmove | disruptek: ksy is a small subset of yaml after all, I won't be writting a peg for yaml, sorry :| |
23:36:53 | disruptek | pfffbt |
23:41:20 | FromGitter | <Willyboar> just watching express framework for nim. Looks promising |
23:41:57 | FromGitter | <Willyboar> @ducdetronquito nice job |
23:49:04 | FromGitter | <Willyboar> But i strongly believe nim will be boosted with a Rails-Django like framework |
23:51:04 | FromGitter | <TensorTom> I'm looking for an example of a website login/authentication system in Nim. Anyone know of any? I know the nim website and forum was coded in Nim so it's been done before. I tried to use the `httpauth` module but it seems to have bugs since Nim1 and idk if I can get that working with the CGI module. |
23:51:52 | FromGitter | <TensorTom> i'd rather not code an auth/sessions system from the ground up if I can avoid it. |
23:52:44 | FromGitter | <Willyboar> well for that i know both the nim site and forum are open source |
23:53:17 | FromGitter | <Willyboar> you can see the code in the github |
23:53:43 | madprops | should i really learn vim this time? lol |
23:54:31 | madprops | i still have yet to see its power |
23:57:14 | FromGitter | <TensorTom> madprops, I think most people go for emacs though I don't use either of them. Too many keybaord shortcuts and commands to remember just to do what I can already do in GUI. who knows, maybe I'm missing out on something. |
23:58:04 | FromGitter | <Willyboar> I tried a lot but for some reason i stick with sublime text |
23:58:19 | madprops | is ST getting better? |
23:58:55 | FromGitter | <TensorTom> for writing code, I use Intellij IDEA. I've never seen any IDE better but he is talking about terminal-based editors though |