00:30:58 | Prestige | hm is there no way to get an entry of an OrderedTable by index? Or at least just the first element, without iterating then breaking? |
00:31:13 | leorize | yea, that's not a thing the api supports |
00:31:22 | Prestige | Okay, thanks for the info |
00:35:58 | * | livcd quit (Ping timeout: 260 seconds) |
00:36:06 | * | livcd joined #nim |
00:40:37 | * | exelotl quit (Ping timeout: 272 seconds) |
00:44:58 | * | couven92 quit (Ping timeout: 246 seconds) |
00:51:23 | Prestige | Hm I'm not quite sure what this error is about https://0x0.st/ieu4.png Says it's expecting an OrderedTableRef instead of an OrderedTable? Just trying to use `[]=` to add an entry |
00:52:15 | * | gangstacat joined #nim |
00:54:14 | * | Hideki_ joined #nim |
00:55:30 | nid | <flywind> you should use `var tabTable = OrderTable[Tag, ]`. |
01:06:10 | Prestige | Seems to have gotten rid of that error but now nimsuggest is complaining about.. something? On the same line: https://0x0.st/ieuU.png |
01:07:32 | * | Hideki_ quit (Remote host closed the connection) |
01:08:11 | * | Hideki_ joined #nim |
01:08:24 | * | xet7 quit (Quit: Leaving) |
01:11:19 | * | xet7 joined #nim |
01:12:46 | * | Hideki_ quit (Ping timeout: 260 seconds) |
01:15:01 | * | xcm is now known as Guest51059 |
01:15:01 | * | Guest51059 quit (Killed (verne.freenode.net (Nickname regained by services))) |
01:16:49 | * | xcm joined #nim |
01:17:20 | * | zacharyc1rter joined #nim |
01:17:20 | * | zacharycarter joined #nim |
01:34:41 | FromGitter | <danielecook> Does anyone have trouble getting `terminal.isatty(stdin)` to work on macos? |
01:35:09 | FromGitter | <danielecook> specifically, I'm trying to test whether there is input from stdin |
01:35:24 | * | NimBot joined #nim |
01:49:22 | * | krux02_ quit (Remote host closed the connection) |
01:52:08 | * | chemist69_ joined #nim |
01:55:18 | * | chemist69 quit (Ping timeout: 260 seconds) |
01:55:32 | FromGitter | <danielecook> To be more specific, `isatty` works fine when I'm working interactively locally, but it fails when I run it within a continuous integration system |
01:55:50 | FromGitter | <danielecook> so My guess is there is something about it being non-interactive |
01:59:12 | Prestige | ah when trying to compile from the cli I'm seeing more of the error. Hashing issue |
02:01:52 | nid | <flywind> User-defined object should define `hash` proc. |
02:02:00 | nid | <flywind> https://nim-lang.org/docs/hashes.html |
02:02:25 | nid | <flywind> https://nim-lang.org/docs/tables.html#basic-usage-hashing |
02:02:47 | Prestige | Thanks, was just reading that :) |
02:08:39 | * | Guest94252 quit (Ping timeout: 265 seconds) |
02:19:48 | * | dadada joined #nim |
02:20:11 | * | dadada is now known as Guest27711 |
02:28:13 | * | Guest27711 quit (Ping timeout: 246 seconds) |
02:29:45 | * | yuxael joined #nim |
02:30:06 | * | muffindrake quit (Ping timeout: 265 seconds) |
02:31:50 | * | muffindrake joined #nim |
02:35:21 | * | madpata_ joined #nim |
02:35:42 | Prestige | Is there a way to define an object as, Foo or any object that extends Foo? I might need to just show all the code to explain my situation |
02:37:45 | Prestige | If anyone is willing to take a look (oop issue), https://github.com/avahe-kellenberger/nimdow/blob/masterstack/src/nimdowpkg/windowmanager.nim#L75 |
02:37:59 | Prestige | I'm getting an error on that line: https://0x0.st/ieSq.png |
02:38:22 | * | madpata quit (Ping timeout: 246 seconds) |
02:39:00 | Prestige | If you look at tag.nim, it has a layout: Layout property. I'm attempting to have "Layout" be somewhat of an interface or base class |
02:39:41 | * | Senketsu joined #nim |
02:40:11 | * | dadada_ joined #nim |
02:41:24 | * | Senketsu quit (Client Quit) |
02:46:58 | * | dadada_ quit (Ping timeout: 244 seconds) |
02:58:18 | * | zacharycarter quit (Ping timeout: 260 seconds) |
02:58:46 | * | zacharyc1rter quit (Ping timeout: 260 seconds) |
03:04:06 | * | dadada joined #nim |
03:04:31 | * | dadada is now known as Guest34812 |
03:07:43 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:10:24 | * | Senketsu joined #nim |
03:26:39 | * | arecaceae quit (Remote host closed the connection) |
03:27:02 | * | arecaceae joined #nim |
03:29:09 | * | zacharyc1rter joined #nim |
03:29:09 | * | zacharycarter joined #nim |
03:31:33 | nid | <Elegant Beef> I could be wrong but i think in nim it makes more sense to have a proc in the base class that you assign on instantiation to the proc you want |
03:32:44 | Prestige | Hm maybe I'll try that, I was attempting to follow this example of oop: https://nim-by-example.github.io/oop/ |
03:33:19 | * | zacharycarter quit (Ping timeout: 246 seconds) |
03:33:21 | disruptek | please no. |
03:33:23 | nid | <Elegant Beef> ah that indicates im wrong |
03:33:41 | * | zacharyc1rter quit (Ping timeout: 246 seconds) |
03:33:43 | nid | <Elegant Beef> Please no who? |
03:33:51 | disruptek | please no oop. |
03:34:24 | nid | <Elegant Beef> Dont worry disrupt my objects are all data holders more or less |
03:34:36 | nid | <Elegant Beef> 😛 |
03:34:44 | nid | <Technicae Circuit> Why no oop? |
03:35:09 | nid | <Elegant Beef> inb4 "OOP was a mistake" |
03:35:10 | * | Senketsu quit (Quit: WeeChat 2.8) |
03:35:27 | Prestige | I am not sure another way to implement this than oop, although I pretty much have only done oop in the past |
03:36:25 | nid | <Elegant Beef> not making your layouts objects would me a way of not using OOP |
03:36:34 | nid | <Elegant Beef> Considering the layouts just a proc really |
03:38:40 | Prestige | I was making them objects so I could also track the other properties of the layout |
03:39:35 | nid | <Elegant Beef> Properties of the layout like what? |
03:40:01 | nid | <Technicae Circuit> I wonder if someone will implement a more Python-like class system 🤔 |
03:40:03 | Prestige | borderWidth, gaps, number of windows in master, etc |
03:40:36 | nid | <Elegant Beef> Well those can all be declared inside the body of the nim fille and set by your config |
03:40:50 | nid | <Elegant Beef> Idk i generally think globally configured settings make more sense |
03:41:34 | nid | <Elegant Beef> I dont see why a layout needs to have gaps and border widths dependant on the object to implement them |
03:41:38 | nid | <Elegant Beef> Seems like it's a global state |
03:42:12 | Prestige | some are layout dependent and at runtime, like the number of allowed master windows in a master/stack layout |
03:42:56 | nid | <Elegant Beef> Yea idk that doesnt seem like a per layout thing to me but im crazy so |
03:43:02 | Prestige | but yeah gaps and borders may be configured globally |
03:43:22 | Prestige | eh well actually it all should be per layout |
03:43:29 | Prestige | or per tag rather |
03:43:42 | nid | <Elegant Beef> Eh, that's weird imo, but im also weird 😛 |
03:44:28 | Prestige | Anyway I thought there'd be a way to do this with oop, but am not sure what the error is about |
03:44:58 | nid | <Elegant Beef> Seems it could be attempting to call the method for the intended type without casting it |
03:47:22 | Prestige | yeah it doesn't infer the type of this.selectedTag.layout |
03:47:32 | Prestige | but I didn't think it would have to |
03:51:14 | Prestige | disruptek: Is there a way I could track the properties and the doLayout function without using objects? |
03:51:37 | disruptek | just use a type for the layout and then run some code on it. |
03:53:46 | Prestige | How would I have mutliple layouts conforming to the same function signature? Each Tag has to have a layout with some properties |
03:56:16 | disruptek | use variant objects. |
03:57:31 | nid | <KingDarBoja> That's Nim strength |
03:58:18 | nid | <KingDarBoja> OOP is a headache on Nim 😄 You can make it work but need to be careful |
03:58:24 | * | nid <KingDarBoja> very careful |
03:59:53 | disruptek | it's never worthwhile. |
04:00:06 | Prestige | Oh that's very interesting, thanks |
04:02:43 | disruptek | i'd say the strengths in data structures are case objs, enums, and sets. |
04:03:11 | disruptek | they all compose together nicely. |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:41 | * | supakeen joined #nim |
04:07:27 | * | zacharycarter joined #nim |
04:07:28 | * | zacharyc1rter joined #nim |
04:09:02 | FromGitter | <bung87> ``` echo s.readAll ⏎ echo s.data``` ⏎ ⏎ the StringStream readAll return empty? [https://gitter.im/nim-lang/Nim?at=5ea7ac5d40f3430813c6673f] |
04:11:45 | * | zacharyc1rter quit (Ping timeout: 240 seconds) |
04:11:45 | * | zacharycarter quit (Ping timeout: 240 seconds) |
04:19:42 | * | Romanson joined #nim |
04:22:38 | * | yuxael quit (Quit: Leaving) |
04:31:20 | * | rockcavera quit (Remote host closed the connection) |
04:56:07 | nid | <Technicae Circuit> How do I cross compile Nim? |
04:57:56 | * | nsf joined #nim |
05:05:16 | * | yuxael joined #nim |
05:06:09 | * | yuxael quit (Remote host closed the connection) |
05:06:56 | * | yuxael joined #nim |
05:11:58 | * | xcm quit (Killed (karatkievich.freenode.net (Nickname regained by services))) |
05:13:46 | * | xcm joined #nim |
05:23:58 | * | Jjp137 quit (Read error: Connection reset by peer) |
05:31:14 | * | kungtotte quit (Read error: Connection reset by peer) |
05:32:44 | * | kungtotte joined #nim |
05:36:02 | * | Cthalupa quit (Ping timeout: 260 seconds) |
05:36:50 | * | Cthalupa joined #nim |
05:38:22 | * | narimiran joined #nim |
05:40:37 | FromGitter | <awr1> elaborate |
05:40:55 | FromGitter | <awr1> cross compile the Nim compiler? |
05:40:59 | FromGitter | <awr1> or some nim code? |
05:41:25 | FromGitter | <awr1> https://nim-lang.org/docs/nimc.html#cross-compilation |
05:42:23 | FromGitter | <awr1> alternatively if you want the simple way of doing things, consider installing zig and using nim's new `zig cc` backend |
05:42:35 | FromGitter | <awr1> https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html |
05:42:46 | FromGitter | <awr1> https://github.com/nim-lang/Nim/pull/13757 |
05:44:32 | FromGitter | <awr1> @danielecook try `isatty` from the posix module instead of the terminal one and see if any diff |
05:45:33 | FromGitter | <awr1> if there is no diff your assumption is probably correct |
05:50:09 | FromGitter | <awr1> nim OOP philosophy is to not design your programs around OOP in general but rather to use OOP as a tool only where most appropriate |
05:56:11 | nid | <Technicae Circuit> Thanks |
06:01:45 | * | martinium quit (Ping timeout: 240 seconds) |
06:16:32 | * | yuxael quit (Quit: Leaving) |
06:16:48 | * | yuxael joined #nim |
06:16:58 | * | solitudesf joined #nim |
06:22:05 | * | yuxael quit (Quit: Leaving) |
06:22:21 | * | yuxael joined #nim |
06:23:51 | * | yuxael quit (Client Quit) |
06:23:59 | * | yuxael_ joined #nim |
06:24:47 | * | yuxael_ quit (Remote host closed the connection) |
06:25:06 | * | yuxael joined #nim |
06:33:16 | * | letto_ quit (Quit: Konversation terminated!) |
06:34:05 | * | letto joined #nim |
06:45:16 | nid | <cgarciae> Hey, I am new to nim coming from Python! |
06:45:16 | nid | <cgarciae> Try to do some basic integration using nimpy but I get this error afters `i|port nimpy` saying that the `pyInitLibPath` when I do |
06:45:16 | nid | <cgarciae> |
06:45:17 | nid | <cgarciae> ``` |
06:45:17 | nid | <cgarciae> import nimpy |
06:45:17 | nid | <cgarciae> pyInitLibPath("some/path") |
06:45:19 | nid | <cgarciae> ``` |
06:45:19 | nid | <cgarciae> |
06:45:21 | nid | <cgarciae> but its clearly in the repo: https://github.com/yglukhov/nimpy/blob/90ae3899c269643f0cb5ca968869500afe617b7e/nimpy/py_lib.nim#L459 |
06:45:22 | nid | <cgarciae> |
06:45:24 | nid | <cgarciae> |
06:45:25 | nid | <cgarciae> I added nimpy to the .nimble file like this: |
06:45:27 | nid | <cgarciae> |
06:45:28 | nid | <cgarciae> ``` |
06:45:30 | nid | <cgarciae> requires "https://github.com/yglukhov/nimpy" |
06:45:31 | nid | <cgarciae> ``` |
06:45:32 | nid | <cgarciae> |
06:45:34 | nid | <cgarciae> Is it possible its using and older version of nimpy? |
06:46:49 | nid | <cgarciae> Hey, I am new to nim coming from Python! |
06:46:49 | nid | <cgarciae> Try to do some basic integration using nimpy but I get this error afters `import nimpy` saying that the `pyInitLibPath` when I do |
06:46:49 | nid | <cgarciae> |
06:46:49 | nid | <cgarciae> ``` |
06:46:50 | nid | <cgarciae> import nimpy |
06:46:50 | nid | <cgarciae> pyInitLibPath("some/path") |
06:46:51 | nid | <cgarciae> ``` |
06:46:51 | nid | <cgarciae> |
06:46:54 | nid | <cgarciae> but its clearly in the repo: https://github.com/yglukhov/nimpy/ version of nimpy? |
06:48:13 | nid | <cgarciae> Hey, I am new to nim coming from Python! |
06:48:13 | nid | <cgarciae> Try to do some basic integration using nimpy but I get this error afters `import nimpy` saying that the `pyInitLibPath` when I do |
06:48:13 | nid | <cgarciae> |
06:48:13 | nid | <cgarciae> ``` |
06:48:13 | nid | <cgarciae> import nimpy |
06:48:14 | nid | <cgarciae> pyInitLibPath("some/path") |
06:48:15 | nid | <cgarciae> ``` |
06:48:15 | nid | <cgarciae> |
06:48:17 | nid | <cgarciae> but its clearly in the repo: https://github.com/yglukhov/nimpy/ |
06:48:18 | nid | <cgarciae> |
06:48:20 | nid | <cgarciae> Is it possible its using an older version of nimpy? Does nimble use a cache? |
06:50:22 | nid | <cgarciae> Hey, I am new to nim coming from Python! |
06:50:22 | nid | <cgarciae> I'm trying to do some basic integration using nimpy but I get this error afters `import nimpy` saying that the `pyInitLibPath` doesn't exists. When I do |
06:50:23 | nid | <cgarciae> |
06:50:25 | nid | <cgarciae> ``` |
06:50:26 | nid | <cgarciae> import nimpy |
06:50:27 | nid | <cgarciae> pyInitLibPath("some/path") |
06:50:29 | nid | <cgarciae> ``` |
06:50:30 | nid | <cgarciae> |
06:50:32 | nid | <cgarciae> ts clearly in the repo: https://github.com/yglukhov/nimpy/ |
06:50:33 | nid | <cgarciae> |
06:50:35 | nid | <cgarciae> Is it possible its using an older version of nimpy? Does nimble use a cache? |
06:53:01 | solitudesf | please, dont edit long messages on discord, this is how it looks for people in irc http://ix.io/2jRZ |
06:56:32 | * | couven92 joined #nim |
06:58:14 | * | PMunch joined #nim |
06:58:18 | nid | <Technicae Circuit> Oof |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:57 | * | gmpreussner joined #nim |
07:05:36 | * | vqrs_ quit (Ping timeout: 265 seconds) |
07:06:27 | FromGitter | <awr1> doesn't look like `pyInitLibPath` is exposed in the main nimpy module |
07:06:58 | FromGitter | <awr1> try `import nimpy / py_lib` |
07:08:44 | * | vqrs joined #nim |
07:08:45 | FromGitter | <awr1> @cgarciae |
07:14:22 | * | thomasross quit (Read error: Connection reset by peer) |
07:14:51 | * | thomasross joined #nim |
07:15:32 | nid | <Technicae Circuit> ^^ @cgarciae ^^ |
07:22:08 | * | Jjp137 joined #nim |
07:30:45 | * | vqrs quit (Ping timeout: 240 seconds) |
07:31:15 | * | vqrs joined #nim |
07:52:45 | * | Romanson quit (Quit: Connection closed for inactivity) |
08:02:50 | * | fredrik92 joined #nim |
08:04:27 | FromGitter | <Vindaar> @pigmej Sorry, wasn't around anymore yesterday. Not sure how much of that is due to how its set up, but you may be right |
08:06:11 | PMunch | Wait, is nid the new Discord bot? |
08:06:48 | PMunch | Hmm, feature request: copy the bold username feature of the Gitter bot. Makes it easier to distinguish what the message is |
08:07:08 | PMunch | Doesn't have to be bold, but just something else than normal text |
08:12:17 | Araq | https://forum.nim-lang.org/t/5734#38665 |
08:16:03 | leorize[m] | PMunch: it's not new, Yardanico just renamed it |
08:16:18 | PMunch | Oh, so it's still the old FromDiscord? |
08:16:27 | PMunch | And not the new one he'se been working on? |
08:16:47 | leorize | that one is nl, and it's running offtopic |
08:16:53 | PMunch | Right |
08:17:07 | PMunch | Araq, "shipping in 1.2" isn't that the current release? |
08:17:29 | leorize | I don't know why we switched to short names like this :P |
08:18:30 | leorize | PMunch: yea, arc and sink inference is in 1.2 |
08:18:48 | PMunch | leorize, someone mentioned the names got a bit long on mobile |
08:18:50 | leorize | the new orc that actually works is not in 1.2 though |
08:19:41 | PMunch | I guess I was just confused by the -ing |
08:19:46 | * | fredrik92 quit (Ping timeout: 260 seconds) |
08:22:05 | leorize[m] | now we just need some numbers from orc vs arc vs refc :) |
08:23:32 | leorize[m] | if orc is working well then maybe it's the ultimate solution to nimsuggest leaking problems |
08:24:35 | Araq | leorize[m], I doubt it, nimsuggest has logical leaks that no GC can help you with |
08:24:54 | Araq | I could be wrong though, we should try --gc:boehm for nimsuggest |
08:25:30 | PMunch | Ugh, I'm so annoyed about all these Corona tracking apps. Like FFS, it wouldn't be that hard to create an app that just records the data and keeps it locally on the phone. |
08:25:48 | Araq | I can give you my 'havlak' benchmark numbers, it's 0.7s for --gc:arc vs 1.0s for --gc:orc |
08:25:56 | Araq | all the other GCs are slower |
08:26:07 | Araq | (all about 1.4s) |
08:26:07 | PMunch | Slower? Neat! |
08:26:42 | * | yuxael quit (Quit: Leaving) |
08:26:45 | Araq | but --gc:arc never frees the cycles and the other GCs are forced via GC_fullCollect |
08:26:56 | Araq | so --gc:arc is cheating |
08:27:22 | leorize[m] | what happens if you use thinout w arc? |
08:27:28 | PMunch | Wait, you run --gc:arc and then manually start another GC at the same time? |
08:27:58 | leorize[m] | if that's slower than orc then orc is the next default? |
08:27:59 | Araq | leorize[m], didn't try but it should be about 0.75s - 0.8s with thinout |
08:31:00 | leorize[m] | what will {.acyclic.} do with orc? is it gonna turn off cycle collecting for that type? |
08:31:58 | Araq | yes |
08:32:12 | Araq | (already implemented) |
08:33:16 | leorize[m] | can it be inferred for simple objects? I wouldn't want to add acyclic to 90% of my ref objects? :p |
08:34:13 | Araq | it is inferred too but 'ref's design throws in a spanner |
08:34:46 | Araq | type Node = ref object le, ri: Node # cyclic in principle |
08:37:14 | leorize[m] | sounds like orc can be the reasonable default |
08:38:08 | Araq | I still think that --gc:arc is what the library ecosystem should focus on and --gc:orc is for applications |
08:39:51 | leorize[m] | so are we ever gonna see thinout() hints? :p |
08:40:42 | Araq | thinout doesn't work with async and requires the same =trace proc generation mechanism |
08:41:00 | Araq | so far it's not a winning design |
08:41:48 | * | Vladar joined #nim |
08:44:04 | Araq | anyhow to improve the performance in the realworld further we need "scope based destruction" |
08:44:19 | Araq | it's the biggest Todo on my list |
08:44:40 | Zevv | yeah, that one was also trivial I heard |
08:47:27 | Araq | it isn't :P |
08:47:52 | Araq | but maybe if I implement it via another separate optimization pass |
08:58:24 | Araq | narimiran, do not backport https://github.com/nim-lang/Nim/pull/14147 I made a mistake |
08:58:36 | narimiran | ok |
09:11:35 | * | solitudesf quit (Remote host closed the connection) |
09:13:45 | * | lritter joined #nim |
09:17:49 | * | solitudesf joined #nim |
09:29:12 | * | solitudesf quit (Remote host closed the connection) |
09:31:14 | * | solitudesf joined #nim |
09:34:01 | * | liblq-dev joined #nim |
09:41:54 | * | couven92 quit (Ping timeout: 260 seconds) |
10:02:08 | * | Senketsu joined #nim |
10:02:13 | * | hoijui joined #nim |
10:03:00 | * | Carce joined #nim |
10:10:16 | * | Carce quit (Quit: Connection closed) |
10:11:49 | * | tane joined #nim |
10:13:00 | PMunch | Hmm, is there any reason why "choosenim devel" doesn't have this PR in it? https://github.com/nim-lang/Nim/pull/14137 |
10:14:32 | FromGitter | <Vindaar> @PMunch: for some reason choosenim doesn't always give you the most recent devel. I noticed that the other day on travis |
10:16:45 | PMunch | Hmm, well that's annoying.. |
10:17:19 | PMunch | Oh right: "Updates to the most recent nightly build of Nim." |
10:17:29 | PMunch | And: The '--latest' flag updates and builds the latest commit in the devel branch |
10:18:18 | narimiran | PMunch: i think it gives you the latest nightly release |
10:18:34 | narimiran | oh, you already answered it yourself :) |
10:21:19 | PMunch | Okay, so I'm doing a docker container, and currently I need that PR so I do `RUN CHOOSENIM_CHOOSE_VERSION="devel --latest" ./choosenim-init.sh` is there a better way to easily install a specific version of Nim? |
10:21:31 | PMunch | Without pulling in too much stuff that must be cleaned out afterwards? |
10:32:43 | * | literal quit (Ping timeout: 256 seconds) |
10:32:43 | * | leorize quit (Ping timeout: 240 seconds) |
10:33:46 | * | literal joined #nim |
10:34:34 | * | leorize joined #nim |
10:35:47 | narimiran | btw, PMunch, if you want to add more packages to the playground: https://github.com/nim-lang/Nim/commit/e1dab59d469bc74b719cdaf90f89c08268e3d979 |
10:41:06 | * | CcxWrk_ joined #nim |
10:41:07 | * | CcxWrk quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
10:41:07 | * | CcxWrk_ is now known as CcxWrk |
10:46:46 | * | narimiran quit (Ping timeout: 260 seconds) |
10:49:41 | PMunch | narimiran, care to make a PR? |
10:52:19 | * | krux02 joined #nim |
10:59:28 | * | Vladar quit (Quit: Leaving) |
11:00:49 | * | xcm quit (Read error: Connection reset by peer) |
11:02:42 | * | xcm joined #nim |
11:16:38 | * | Guest34812 quit (Ping timeout: 260 seconds) |
11:17:47 | * | dadada joined #nim |
11:18:11 | * | dadada is now known as Guest68929 |
11:18:41 | * | couven92 joined #nim |
11:18:48 | * | Romanson joined #nim |
11:23:34 | * | livcd quit (Changing host) |
11:23:34 | * | livcd joined #nim |
11:30:13 | nid | <arnetheduck> @Araq - https://github.com/nim-lang/Nim/pull/13908 ? |
11:32:51 | Araq | I hoped to see more up-/downvotes, I'm fine with doing what the majority says in this case |
11:34:25 | nid | <Varriount> Araq: I'll comment later today. |
11:39:10 | * | exelotl joined #nim |
11:40:57 | PMunch | With what timotheecour suggests, what would happen if I use a library that depends on an error being catchable, but I define it as a panic? |
11:41:14 | PMunch | Is that a compile-time error, or will it just never throw and crash instead? |
11:43:28 | * | Vladar joined #nim |
11:56:44 | * | madpata_ quit (Quit: Lost terminal) |
11:58:51 | * | ftsf quit (Remote host closed the connection) |
11:59:20 | * | ftsf joined #nim |
11:59:47 | * | dddddd joined #nim |
12:00:34 | * | hoijui quit (Ping timeout: 260 seconds) |
12:03:25 | dom96 | PMunch, does choosenim not make that clear in the messages? that it's installing latest nightly? |
12:03:45 | PMunch | Haha, it does, as soon as I read the --help :P |
12:04:09 | PMunch | Has it always been that way though? I seem to remember it always pulling the latest commit before |
12:04:28 | dom96 | no, it should say when using `update devel` |
12:04:54 | dom96 | something like "Warning: latest commit hasn't been built yet, if you want to compile it yourself us --latest" |
12:05:13 | dom96 | no, it hasn't. This is new behaviour since choosenim started using nightly builds |
12:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:43 | * | supakeen joined #nim |
12:06:56 | PMunch | Ah right, so this will only affect people who are used to old versions, not a big issue. And it probably did say that, but it got lost in the long log from Docker |
12:07:34 | PMunch | Again, just an issue with me assuming that I knew how choosenim worked, not something that needs to be fixed really :) |
12:09:24 | * | Senketsu quit (Quit: WeeChat 2.8) |
12:09:45 | Araq | PMunch: it's neither but it should 'crash' instead |
12:10:26 | * | Senketsu joined #nim |
12:10:28 | PMunch | Well yeah, but if that is some odd seldom event that the library "guarantee" will never crash your program |
12:10:32 | livcd | Are there any serious streamers on Twitch? Besides disruptek that is |
12:10:46 | PMunch | livcd, define serious streamer? |
12:11:10 | livcd | PMunch: like a less evil version of disruptek |
12:11:39 | dom96 | PMunch, well if you get confused, it's likely others will too. This is on me though, shashlick wanted a different command for installing the nightlies. I didn't consider the Travis use case (from a user perspective a slightly old nightly shouldn't make much of a difference) |
12:12:07 | dom96 | livcd, hahha, you can follow me d0m96. Although I haven't streamed in a long time |
12:12:48 | livcd | dom96: were not you the one encouraging him? :P https://www.twitch.tv/videos/599327882 |
12:13:11 | dom96 | hrm? |
12:14:18 | livcd | to visit other channels and ask about building adobe premiere :D |
12:14:43 | * | Senketsu quit (Client Quit) |
12:14:50 | dom96 | what? I don't recall doing that |
12:15:32 | PMunch | dom96, I mean it's a super edge-case where running a nightly vs. the latest commit would make much of a difference |
12:16:20 | PMunch | And the only people affected are those who have used choosenim in the past and is not aware of the change (otherwise they would read the --help message to make sure they did it right). |
12:17:34 | PMunch | livcd, I've also streamed a bit. But I haven't done any either lately |
12:17:44 | PMunch | Might stream some WM development soon though |
12:17:48 | nid | <arnetheduck> @Araq I see 6 upvotes but no downvotes - just don't want to go on a refactoring bout if it's not going to get merged |
12:18:14 | nid | <arnetheduck> well, you didn't vote so 😉 |
12:18:45 | nid | <arnetheduck> and naming them is the least bad solution I can think of |
12:19:15 | dom96 | oh, is nid the new bridge |
12:19:34 | dom96 | Why such an obscure name? Yardanico? |
12:19:59 | nid | <arnetheduck> on a different note, we'll be doing a security audit of nimbus at some point in the not too distant future - got an eta for 1.2.2 ? |
12:20:02 | livcd | dom96: because it read better on mobile with a short nickname |
12:20:06 | Yardanico | @dom96 it's not the new bridge yet :P |
12:20:08 | livcd | it reads( |
12:20:47 | dom96 | IRC on mobile is poor anyway |
12:20:54 | dom96 | I'd rather know where the messages are coming from :) |
12:21:04 | * | narimiran joined #nim |
12:21:45 | * | rockcavera joined #nim |
12:23:11 | * | leorize quit (Remote host closed the connection) |
12:24:02 | nid | <mratsim> Note that for 1.2.2 we should make sure that this devel regression doesn't happen https://github.com/nim-lang/Nim/issues/14136 |
12:24:45 | nid | <mratsim> Though I don't see any 1.2.x backport branch? |
12:25:17 | Yardanico | it's https://github.com/nim-lang/Nim/tree/version-1-2 ? |
12:25:43 | * | leorize joined #nim |
12:29:14 | nid | <mratsim> Ah, I didn't see backport on the commits |
12:31:53 | * | zacharyc1rter joined #nim |
12:31:53 | * | zacharycarter joined #nim |
12:32:14 | narimiran | leorize, leorize[m] ping |
12:37:21 | * | Hideki_ joined #nim |
12:38:04 | * | Hideki_ quit (Remote host closed the connection) |
12:38:28 | * | Hideki_ joined #nim |
12:41:05 | * | kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in) |
12:41:07 | l1x | hi folks, how do I read into a buffer in nim using asyncnet? |
12:41:21 | * | kitech1 joined #nim |
12:41:44 | PMunch | https://nim-lang.org/docs/asyncnet.html#recvInto%2CAsyncSocket%2Cpointer%2Cint |
12:41:51 | PMunch | l1x ^ |
12:42:56 | * | Senketsu joined #nim |
12:44:09 | * | hoijui joined #nim |
12:50:52 | l1x | PMunch: thanks |
12:51:01 | l1x | i guess i am not sure about the syntax |
12:51:56 | l1x | if you have server = newSocket(..) and i want to server.sendTo(...) i get Error: expression 'sendTo(server, address, Port(port), "A")' has no type (or is ambiguous) |
12:52:26 | l1x | if I type hint all the parameters than i get type mismatch: got <Socket> |
12:52:27 | l1x | but expected one of: proc sendTo(socket: Socket; address: string; port: Port; data: string) |
12:52:27 | l1x | proc sendTo.... |
12:52:41 | Yardanico | are you calling sendTo in some other proc? |
12:52:50 | Yardanico | and if no, do you use "discard" for it? |
12:53:13 | l1x | https://gist.github.com/l1x/d5114a14a4d256d939c6f1ab61270a62 |
12:53:27 | Yardanico | no "discard" for sendTo |
12:53:35 | Yardanico | also that's now how you specify arguments |
12:54:22 | * | Hideki_ quit (Remote host closed the connection) |
12:54:31 | PMunch | The problem is that sendTo doesn't return anything |
12:54:37 | Yardanico | l1x: https://play.nim-lang.org/#ix=2jTg |
12:54:39 | PMunch | So you try to discard nothing, which doesn't work |
12:55:04 | * | Senketsu quit (Quit: WeeChat 2.8) |
12:56:09 | * | Hideki_ joined #nim |
12:57:22 | l1x | ahh, makes sense |
12:57:28 | l1x | Yardanico: thanks! |
12:58:06 | * | Hideki_ quit (Remote host closed the connection) |
12:58:40 | * | Hideki_ joined #nim |
12:59:21 | Yardanico | l1x: also in your program you're using the synchronous version of net, not the async one |
12:59:43 | l1x | Yardanico: one step at a time, i am just learning the syntax for now :) |
12:59:51 | Yardanico | ah ok, there's a simple example here https://nim-lang.org/docs/asyncnet.html#examples-chat-server |
13:00:50 | * | Senketsu joined #nim |
13:01:02 | * | Hideki_ quit (Remote host closed the connection) |
13:01:18 | * | Hideki_ joined #nim |
13:06:16 | * | vesper11 quit (Ping timeout: 256 seconds) |
13:06:24 | * | vesper joined #nim |
13:06:46 | dom96 | PMunch> https://nim-lang.org/docs/asyncnet.html#recvInto%2CAsyncSocket%2Cpointer%2Cint |
13:06:50 | dom96 | please don't recommend these APIs |
13:06:53 | dom96 | they're dangerous |
13:07:04 | dom96 | avoid `pointer` as much as you can |
13:07:21 | dom96 | I'm fighting to deprecate these |
13:07:41 | PMunch | Well, he asked how to read into a buffer |
13:08:13 | PMunch | But yeah, l1x please don't do that if you can avoid it |
13:09:04 | l1x | ok |
13:09:15 | l1x | what should you read into then? |
13:09:46 | dom96 | what's the protocol? |
13:09:51 | l1x | lets say you want to implement a DNS server, the requests are 512b data, what is the type you would ideally use for that |
13:10:13 | dom96 | you can put binary data into `string` |
13:10:25 | dom96 | just use https://nim-lang.org/docs/asyncnet.html#recv%2CAsyncSocket%2Cint |
13:10:26 | PMunch | Hmm, is there a way to read a maximum? |
13:10:27 | * | Hideki_ quit (Remote host closed the connection) |
13:10:35 | PMunch | Ah.. |
13:10:42 | l1x | i bet i can, but that is the proper way of doing that? |
13:10:50 | dom96 | yes |
13:11:05 | l1x | in erlang i would describe the dns protocol with binary matching |
13:11:13 | PMunch | You can do that afterwards |
13:11:36 | PMunch | I mean you could cast it to an object of the right size |
13:11:52 | PMunch | But you probably shouldn't do that either :P |
13:11:54 | l1x | #dns_rec{header=#dns_header{},qdlist=[#dns_query{domain=Domain,type=ptr,class=in}]} |
13:11:59 | l1x | something like that |
13:12:16 | l1x | or even call our the raw binary version |
13:12:18 | PMunch | Ah, maybe binaryparse could help you? |
13:12:40 | * | Hideki_ joined #nim |
13:13:02 | dom96 | maybe you could write a nice library that emulates the erlang behaviour? :D |
13:13:10 | * | hoijui quit (Ping timeout: 244 seconds) |
13:14:17 | FromGitter | <alehander92> binary matching is very cool |
13:14:21 | * | Hideki_ quit (Remote host closed the connection) |
13:14:25 | FromGitter | <alehander92> but i think one can indeed write a macro library |
13:14:33 | FromGitter | <alehander92> or extend a pattern matching library to do it |
13:14:58 | * | Hideki_ joined #nim |
13:15:46 | FromGitter | <alehander92> or yeah `binaryparse` does look like a different version of that concept |
13:16:02 | l1x | dom96: alright, i thought you have something like that in Nim already |
13:16:16 | FromGitter | <alehander92> https://github.com/PMunch/binaryparse or also https://github.com/OpenSystemsLab/struct.nim (if its something like python's struct) |
13:16:23 | dom96 | there are likely packages for this kind of thing |
13:16:56 | * | Senketsu quit (Quit: WeeChat 2.8) |
13:17:17 | PMunch | Pretty much the exact thing I wrote binaryparse for: https://github.com/PMunch/binaryparse/blob/master/binaryparse.nim#L687 |
13:17:42 | FromGitter | <alehander92> PMunch you really need to put some short examples in the readme |
13:17:48 | PMunch | Yeah I know.. |
13:18:09 | Yardanico | also there's nesm |
13:18:12 | FromGitter | <alehander92> api + docs is very useful, but its much much slower to understand |
13:18:16 | * | waleee-cl joined #nim |
13:19:22 | * | Hideki_ quit (Ping timeout: 260 seconds) |
13:19:31 | Yardanico | weird now bold messages suddenly work :D |
13:19:36 | Yardanico | (I'm testing in #nim-test) |
13:21:12 | l1x | alexander92: thanks! |
13:21:31 | l1x | PMunch: thanks too! |
13:24:23 | * | Hideki_ joined #nim |
13:27:16 | * | Hideki_ quit (Read error: Connection reset by peer) |
13:27:21 | * | Hideki__ joined #nim |
13:27:49 | FromGitter | <alehander92> https://news.ycombinator.com/item?id=22995466 disruptek Araq |
13:27:55 | FromGitter | <alehander92> it might be interesting to compare |
13:28:27 | FromGitter | <alehander92> rust-analyzer's approaches for IC to the nim ones (it seems they also tried different stuff starting from RLS until getting to here) |
13:28:42 | * | Hideki__ quit (Remote host closed the connection) |
13:32:00 | * | Hideki_ joined #nim |
13:32:59 | * | fredrik92 joined #nim |
13:34:34 | * | couven92 quit (Disconnected by services) |
13:34:39 | * | fredrik92 is now known as couven92 |
13:36:41 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
13:37:31 | * | Senketsu joined #nim |
13:38:35 | * | Romanson quit (Quit: Connection closed for inactivity) |
13:39:36 | * | liblq-dev joined #nim |
13:41:30 | * | martinium joined #nim |
13:43:24 | * | martinium quit (Changing host) |
13:43:25 | * | martinium joined #nim |
13:51:32 | * | Senketsu quit (Quit: WeeChat 2.8) |
13:51:37 | * | Hideki_ quit (Remote host closed the connection) |
13:52:35 | * | Hideki_ joined #nim |
13:54:10 | * | exelotl_ joined #nim |
13:55:17 | * | Hideki_ quit (Remote host closed the connection) |
13:58:22 | * | exelotl quit (Ping timeout: 265 seconds) |
14:01:18 | * | Hideki_ joined #nim |
14:01:28 | zacharycarter | I'm still trying to figure out why my program is getting hung up at `popSafePoint()` at the end of my thread's execution |
14:01:31 | FromGitter | <iffy> Does the `times` module include a way to get the hour value of a DateTime as an int/natural number? or am I stuck with `x.format("h").parseInt()` |
14:04:57 | narimiran | https://nim-lang.github.io/Nim/times.html#DateTime |
14:05:09 | narimiran | `myDateTime.hour` doesn't work? |
14:05:21 | * | Hideki_ quit (Ping timeout: 244 seconds) |
14:05:37 | nid | <Recruit_main707> how can i make an string readonly but public in an object? |
14:11:26 | * | PMunch quit (Quit: leaving) |
14:11:37 | * | fdsms joined #nim |
14:13:35 | * | Hideki_ joined #nim |
14:14:44 | * | fdsms quit (Remote host closed the connection) |
14:16:54 | * | hoijui joined #nim |
14:17:18 | * | liblq-dev quit (Ping timeout: 260 seconds) |
14:22:55 | nid | <mratsim> make the object a "let" |
14:23:22 | nid | <Recruit_main707> but the other fields should not be readonly |
14:24:03 | dom96 | leave the field private and create an accessor proc |
14:24:32 | nid | <Recruit_main707> ok |
14:27:02 | * | hoijui quit (Ping timeout: 260 seconds) |
14:57:10 | zacharycarter | so I've isolated the issue in my program to context switching on a non-main thread |
14:58:05 | zacharycarter | seems to work fine on the main thread though |
14:58:12 | * | Hideki_ quit (Remote host closed the connection) |
14:58:43 | zacharycarter | I guess I can try just using pthread functions and not use Nim's threads |
14:58:48 | zacharycarter | and see if that fixes the issue |
14:59:46 | * | liblq-dev joined #nim |
15:00:16 | zacharycarter | I wonder though if Araq might have any idea why this is the case though |
15:10:02 | * | ftsf quit (Ping timeout: 260 seconds) |
15:16:21 | Yardanico | is there a way to make a template accept optiona openArray[tuple[k, v: string]] ? |
15:16:51 | Yardanico | optional* |
15:18:06 | disruptek | two templates? |
15:18:11 | Yardanico | I guess so |
15:18:46 | * | hoijui joined #nim |
15:19:13 | disruptek | i'm trying to get my nvidia card to do the stream encoding but i guess it's just too ambitious. |
15:19:21 | Yardanico | it's actually pretty easy |
15:19:39 | Yardanico | if you mean nvenc |
15:20:52 | disruptek | i'm trying to record from a radeon and encode on an nvidia. |
15:21:07 | Yardanico | oh |
15:21:12 | Yardanico | good luck |
15:27:21 | FromGitter | <iffy> narimiran: thank you! I forgot to look at the type def (I was scrolling through the procs only) |
15:27:46 | narimiran | np :) |
15:31:32 | nid | <Recruit_main707> should this code work? also with arc i get a c compile error and without it i get it at nim compile error: |
15:31:32 | nid | <Recruit_main707> https://play.nim-lang.org/#ix=2jUk |
15:33:06 | * | Winterfury joined #nim |
15:33:46 | shashlick | fixed the nimterop bug that was bothering non-nimble users |
15:33:52 | shashlick | any takes for testing? |
15:35:32 | nid | <clyybber> oh nice |
15:35:52 | disruptek | i will mess with it today; nim.cfg branch still? |
15:36:12 | shashlick | yes |
15:36:21 | shashlick | fixed it for wrappers and toast standalone |
15:36:27 | disruptek | awesome. |
15:36:31 | disruptek | good job, dude. |
15:36:42 | shashlick | it will detect the cfg and works for v1.2.0+ |
15:36:52 | disruptek | not 1.0? |
15:37:02 | shashlick | since before that, there's no `std/compilesettings` nor sufficient info in `nim dump` |
15:37:18 | disruptek | that pr needs backporting. |
15:37:20 | FromGitter | <kaushalmodi> shashlick: Does it require creating a `nim.cfg`? What should that file contain? |
15:37:26 | shashlick | for 1.0, nimcache works, and any explicit `--parth` |
15:37:28 | FromGitter | <kaushalmodi> Where should that file be placed? |
15:37:42 | shashlick | kaushalmodi - just per usual how your project needs, if at all |
15:37:51 | FromGitter | <kaushalmodi> I don't use any nim.cfg |
15:38:25 | shashlick | then if you are using cli flags, those will get picked up by the wrapper and forwarded |
15:38:43 | shashlick | only nimcache, nimblePath and --path are covered |
15:39:48 | FromGitter | <kaushalmodi> I do `nim --clearNimblePath --NimblePath:/custom/nimble/dir/ some_wrapper_doing_nimterop_cimport.nim` |
15:40:04 | shashlick | will work |
15:40:06 | FromGitter | <kaushalmodi> So that case should Just Work? |
15:40:08 | FromGitter | <kaushalmodi> awesome |
15:40:11 | shashlick | please try though |
15:40:17 | FromGitter | <kaushalmodi> will do |
15:41:23 | nid | <Yardanico> @Recruit_main707 "type ClientThreadArgs = tuple[packet: var string, response: var string]" I don't know if this is supposed to be valid |
15:41:30 | shashlick | also while you are here @kaushalmodi, please test your wrappers with -f:ast2 - new backend |
15:41:51 | nid | <Recruit_main707> @Yardanico it seems like its not, im trying with pointers |
15:41:59 | Yardanico | yeah you need pointers for threads |
15:43:35 | Yardanico | and on 1.2.0 arc doesn't have some thread fixes it does on devel |
15:43:39 | Yardanico | I'll try to adapt it for arc |
15:43:55 | FromGitter | <kaushalmodi> shashlick: I git pulled, switched branch, `nimble install` and got: ⏎ ⏎ > /home/kmodi/sandbox/nim/nimterop/nimterop/getters.nim(5, 16) Error: cannot open file: compiler/ast |
15:44:32 | shashlick | what version of nim |
15:44:35 | FromGitter | <kaushalmodi> Should I revisit the nimterop README on how to build from git? |
15:44:38 | shashlick | OS |
15:44:41 | FromGitter | <kaushalmodi> nim 1.3.1 |
15:44:44 | FromGitter | <kaushalmodi> RHEL 6.8 |
15:44:48 | shashlick | that should work |
15:44:53 | FromGitter | <kaushalmodi> hmm .. |
15:44:58 | shashlick | does the config.nims have --path:"$nim" |
15:46:00 | FromGitter | <kaushalmodi> full trace: http://ix.io/2jUn/text |
15:47:01 | shashlick | do you have a `compiler` directory in your Nim folder |
15:48:45 | FromGitter | <kaushalmodi> duh :facepalm: of course not |
15:48:49 | FromGitter | <kaushalmodi> ```./ ⏎ ├── bin/ ⏎ ├── config/ ⏎ ├── doc/ ⏎ └── lib/``` [https://gitter.im/nim-lang/Nim?at=5ea85061d898fe7a3751fc7f] |
15:49:08 | FromGitter | <kaushalmodi> so far, my locally deployment of nim had just these and it worked fine |
15:49:20 | FromGitter | <kaushalmodi> .. will deploy compiler too |
15:51:03 | shashlick | ya don't deny us of the compiler code 😄 |
15:53:45 | * | crem quit (Ping timeout: 252 seconds) |
15:54:02 | * | crem joined #nim |
15:55:38 | FromGitter | <kaushalmodi> +1 ⏎ ⏎ > Success: nimterop installed successfully. |
15:56:41 | * | endragor quit (Remote host closed the connection) |
15:56:55 | shashlick | peace, step 2 |
15:57:26 | * | endragor joined #nim |
16:00:08 | disruptek | shashlick: i cannot `nimble build` or `nimble test` in ~nimterop. |
16:00:39 | disruptek | ~stream |
16:00:40 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
16:00:40 | shashlick | what's the error |
16:00:56 | shashlick | not able to join now 😞 |
16:00:56 | disruptek | oserr.nim(94) raiseOSError |
16:00:56 | disruptek | Error: unhandled exception: Permission denied |
16:00:57 | disruptek | Additional info: "/home/adavidoff/.nimble/pkgs" [OSError] |
16:01:21 | disruptek | today only: lua embedding fails. |
16:01:48 | shashlick | uhh, not enough info there |
16:02:26 | disruptek | it wants to do something to pkgs. |
16:02:34 | disruptek | not enough permissions to do so. |
16:02:41 | shashlick | how about just `nim c nimterop/toast` |
16:02:42 | * | endragor quit (Ping timeout: 260 seconds) |
16:02:54 | shashlick | that's cause of nimble wanting to setup deps probably |
16:03:48 | shashlick | you need to put deps somewhere and then `nim c --nimblePath:deps nimterop/toast` |
16:04:17 | shashlick | or `mkdir deps` then `nimble install -d --nimblePath:deps` |
16:04:21 | disruptek | i'm in a deps folder, so that should be fine. |
16:05:38 | FromGitter | <kaushalmodi> shashlick: I will continue with step 2 later today because to reproduce the issue I posted earlier, I need to locally undo the hacks in Makefile I deploy at work |
16:05:51 | shashlick | okay no problem, thanks |
16:06:04 | narimiran | shashlick: regarding https://github.com/nim-lang/Nim/pull/12860 - yeah, i already fixed one package, and i think it might affect nimterop too |
16:06:05 | disbot | ➥ Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims |
16:06:47 | narimiran | (or some other package of yours, i don't remember exactly) |
16:06:51 | disruptek | shashlick: http://ix.io/2jRr |
16:07:00 | shashlick | narimiran: yes i made a fix to docs.nim - https://github.com/nimterop/nimterop/blob/nimcfg/nimterop/docs.nim#L5 |
16:07:19 | disruptek | http://ix.io/2jUv/nim |
16:07:46 | shashlick | same as before - somehow the plugin isn't getting compiled but execAction doesn't fail |
16:07:57 | shashlick | can you find the plugin error you found earlier |
16:08:06 | shashlick | could try a manual compile and see what the output is |
16:08:42 | disruptek | that /is/ a manual compile. |
16:08:51 | disruptek | not sure what you mean, i guess. |
16:09:11 | shashlick | last time you had sent another paste with the plugin script filename |
16:09:16 | shashlick | and the cfg file that was generated |
16:09:29 | disruptek | the second link i sent is the plugin script. |
16:09:40 | disruptek | where do i find the nim.cfg that was generated? |
16:09:58 | shashlick | same temp plugin filename + ".cfg" |
16:10:16 | disruptek | http://ix.io/2jRu/cfg |
16:10:18 | shashlick | can you try compiling - nim c --app:lib /path/to/plugin.nim |
16:10:42 | shashlick | before that |
16:10:48 | shashlick | can you check if libplugfilename.so exists |
16:10:54 | shashlick | at the same location |
16:11:21 | disruptek | nope. |
16:11:53 | disruptek | that built. |
16:12:36 | shashlick | hmm |
16:12:44 | shashlick | can you edit nimterop/getters.nim |
16:12:45 | shashlick | https://github.com/nimterop/nimterop/blob/nimcfg/nimterop/getters.nim#L735 |
16:12:51 | shashlick | just echo the output of execAction |
16:12:56 | shashlick | wondering what's going on |
16:13:07 | shashlick | and delete the cache or run with -f |
16:13:21 | disruptek | nimble cannot parse your .nimble |
16:14:25 | shashlick | you on devel? |
16:15:30 | shashlick | if you are seeing a paramStr/Count error and are on devel, need to recompile koch and then koch tools |
16:15:36 | shashlick | same link narimiran just sent above |
16:15:48 | shashlick | issue is fixed in this branch but need nimble fix as well |
16:16:16 | narimiran | shashlick, disruptek: i think i've hit that issue when trying to test `nimph` |
16:16:42 | narimiran | i don't know exactly anymore cause in last 2 days i've tested lots of packages, and it all got mixed up |
16:17:39 | disruptek | i'm not on /that/ recent of a devel. |
16:26:51 | * | xet7 quit (Ping timeout: 240 seconds) |
16:27:41 | * | xet7 joined #nim |
16:43:20 | FromGitter | <kaushalmodi> shashlick: ⏎ ⏎ In `nimterop.nimble`: ⏎ ⏎ > requires "nim >= 0.20.2", "regex#v0.13.1", "cligen >= 0.9.43" [https://gitter.im/nim-lang/Nim?at=5ea85d28b6dd230697919a6b] |
16:43:40 | nid | <arnetheduck> shashlick btw - you did some callback handling updates based on ast2 - is that gonna make it into a release? |
16:43:41 | FromGitter | <kaushalmodi> can you change the regex dependency to `regex >= 0.13.1` |
16:44:13 | FromGitter | <kaushalmodi> I was curious why that one package installed in a dir with `#` in its name |
16:49:26 | shashlick | @kaushalmodi - had a bug in regex, got fixed, i should update the dep |
16:50:09 | shashlick | @arnetheduck: what do you mean by callback handling? |
16:53:14 | FromGitter | <kaushalmodi> shashlick: I was just commenting on the fact that if you have `regex >= 0.13.1` instead of `regex#v0.13.1`, I won't get a dir name with `#` char in it |
16:56:35 | nid | <arnetheduck> shasklick, the `proc`-as-parameter fix (for sqlite for example) |
16:59:10 | nid | <arnetheduck> Araq - https://github.com/nim-lang/Nim/pull/13908 looks ready to me except for some weird macos ssl build thing |
16:59:11 | disbot | ➥ Error -> Defect for defects |
17:01:10 | * | endragor joined #nim |
17:03:03 | * | pippo joined #nim |
17:03:31 | pippo | !list |
17:05:20 | * | pippo quit (Remote host closed the connection) |
17:06:13 | * | endragor quit (Ping timeout: 264 seconds) |
17:06:43 | * | constatinus joined #nim |
17:07:36 | * | jwm224 quit (Read error: Connection reset by peer) |
17:08:43 | shashlick | @arnetheduck - oh the one marked as fixed - https://github.com/nimterop/nimterop/issues/156 |
17:08:45 | disbot | ➥ Pointer to function pointer is not handled correctly |
17:08:47 | shashlick | yes it is fixed in ast2 |
17:09:11 | * | jwm224 joined #nim |
17:10:48 | nid | <arnetheduck> yeah, but 0.4.4 doesn't include that fix (I'm using a locked release version in an attempt to get at least some of the code at a fixed version, even if nimble screws that up) |
17:13:35 | shashlick | yes I haven't tagged a release yet since i'm still fixing various issues |
17:14:09 | shashlick | its in #head for now but i hope to get a release out in a next few days, if not weeks |
17:27:42 | * | ptdel joined #nim |
17:35:04 | FromGitter | <keslerm> could anyone point me in how to read lines from a constant pipe? it's multiple lines and for each line i need to do some work on it |
17:35:16 | FromGitter | <keslerm> i've tried a couple things but can't get it to do more than 1 line and then stop |
17:37:02 | Yardanico | wdym by "constant pipe? |
17:37:17 | FromGitter | <keslerm> sorry, i'm piping from a program that outputs a line every 10 seconds or so |
17:37:24 | FromGitter | <keslerm> but it doesnt terminate, just keeps outputting data |
17:37:48 | FromGitter | <keslerm> so it needs to read the line, process then wait for the next one |
17:46:01 | * | Trustable joined #nim |
17:58:41 | * | Trustable quit (Remote host closed the connection) |
17:59:48 | * | Trustable joined #nim |
18:01:18 | FromGitter | <keslerm> you know what, my code was fine - it looks like httpclient is blocking when posting to influxdb |
18:03:51 | Yardanico | well unless you use async version of httpclient, it will block of course |
18:03:59 | Yardanico | until the request is finished |
18:05:14 | FromGitter | <keslerm> it should complete, wireshark shows a 204 response from influx |
18:06:52 | Yardanico | can you share code? maybe you're blocking somewhere else |
18:08:18 | FromGitter | <keslerm> https://gist.github.com/keslerm/078b0e02bc8ade1166df50362a4a9e90 |
18:12:02 | Yardanico | so it blocks on client.request or what? |
18:12:14 | Yardanico | can you add some "echo" statements before and after client.request |
18:12:28 | FromGitter | <keslerm> it blocks on client.request |
18:13:01 | * | constatinus quit (Quit: leaving) |
18:13:05 | FromGitter | <keslerm> i updated the gist with the stacktrace nim outputs when i hit ctrl+c |
18:13:38 | FromGitter | <keslerm> which is it sitting around readIntoBuf/uniRecv |
18:14:25 | leorize[m] | httpclient is blocking |
18:14:35 | leorize[m] | you need to use asynchttpclient |
18:14:39 | Yardanico | leorize[m]: well in kase of @keslerm for him it hangs |
18:14:40 | leorize[m] | (it's in the same module) |
18:15:03 | Yardanico | in wireshark the server returns a 204 response but client.request is still active |
18:15:14 | FromGitter | <keslerm> it should block in this case, but it should also be complete, influx is returning a 204 |
18:15:19 | Yardanico | does httpclient handle 204 correctly btw? hm |
18:16:16 | FromGitter | <keslerm> when i route the httpclient through charles http proxy it seems to complete the request fine |
18:17:46 | FromGitter | <keslerm> i added the raw header i see in charles to the gist |
18:20:57 | leorize | do we have a thread safe ring buffer in nim? |
18:22:23 | * | nixfreak quit (Ping timeout: 260 seconds) |
18:22:31 | Yardanico | cool, https://github.com/nim-lang/Nim/pull/13908 got merged |
18:22:32 | disbot | ➥ Error -> Defect for defects |
18:26:36 | nid | <Rika> so is that gonna be slated for nim 2? |
18:26:45 | nid | <Rika> it looks like a big breaking change |
18:26:47 | Yardanico | no? |
18:26:51 | Yardanico | it's not a breaking change at all |
18:26:56 | Yardanico | you can still use the deprecated error names |
18:27:04 | Yardanico | Defects were around for much longer |
18:27:18 | nid | <Rika> ah, okay |
18:27:25 | nid | <Rika> i thought the older names were totally removed |
18:28:45 | Yardanico | nah |
18:28:56 | Yardanico | even before 1.0 it was really really rare for something to get straight up "removed" |
18:29:14 | Yardanico | there always was some deprecation |
18:29:27 | Yardanico | you can still find some deprecated stuff from years ago |
18:29:27 | nid | <Rika> so 1.4? |
18:29:35 | Yardanico | 1.2.2 maybe |
18:29:38 | Yardanico | but probably 1.4 |
18:36:10 | nid | <Yardanico> and about uncommon modules - @Rika did you know https://nim-lang.org/docs/strmisc.html exists? 😄 |
18:37:00 | nid | <Yardanico> or https://nim-lang.org/docs/smtp.html (although I wonder why this is in stdlib, I agree with dom that modules like this and the FTP module shouldn't be in stdlib) |
18:37:26 | nid | <Rika> yes about strmisc |
18:37:30 | nid | <Rika> no about smtp |
18:37:40 | nid | <Yardanico> asyncftpclient |
18:37:50 | nid | <Yardanico> https://nim-lang.org/docs/colors.html |
18:37:57 | nid | <Rika> why'd you ping me over this, but i appreciate it, i like learning about std modules i dont know of |
18:38:00 | nid | <Rika> i know that too |
18:38:05 | nid | <Rika> colors i know but havent learned |
18:40:02 | FromGitter | <keslerm> looks like influx is not returning Connection: keep-alive, i think maybe it has something to do with casing since going through charles sets it to `keep-alive` but nim uses `Keep-Alive` |
18:40:23 | FromGitter | <keslerm> setting `Connection: close` seems to resolve it anyway |
18:40:59 | Yardanico | hmm maybe a regression of https://github.com/nim-lang/Nim/pull/13968 ? |
18:41:00 | disbot | ➥ Add the ability to pass title case headers to an HTTP server |
18:41:04 | Yardanico | ah wait you're on 1.2 so no |
18:43:58 | FromGitter | <keslerm> yeah actually it doesnt look like influx returns connection at all, i think charles was putting it in (and not the first time charles has "fixed" the issue transparently with something) |
18:48:22 | * | nsf quit (Quit: WeeChat 2.8) |
18:54:17 | nid | <cgarciae> Hey, I am new to nim. I am amazed by the parallel and spawn primitives, so simple compared to Python! |
18:54:17 | nid | <cgarciae> I've noticed there is the threadpool and weave modules, which one is the most recommended right now? |
18:56:03 | zacharycarter | I don't think threadpool has any load balancing |
18:56:10 | zacharycarter | weave is an entire runtime and isn't just a threadpool |
18:56:18 | zacharycarter | also weave doesn't yet work with `--gc:arc` |
18:58:01 | Araq | what's required to make it work with --gc:arc? |
18:58:26 | nid | <cgarciae> Seems weave is new and has more features but sounded as if it was still experimental. |
18:58:53 | nid | <cgarciae> So I wanted to know what the community is using. |
19:00:00 | zacharycarter | Araq: 1) the bugs reported related to exceptions, threads and `--gc:arc` |
19:00:52 | leorize[m] | cgarciae: weave is better than threadpool in every aspect |
19:01:27 | Araq | zacharycarter, issue number? |
19:01:32 | zacharycarter | 2) something about pointers and I don't remember what - mratsim: can you fill us in here? |
19:02:09 | leorize[m] | Araq: mratsim tagged them all |
19:02:15 | leorize[m] | just search by label |
19:02:30 | zacharycarter | https://github.com/nim-lang/Nim/issues/13936 |
19:02:31 | disbot | ➥ Simple channels with --gc:arc |
19:10:14 | nid | <cgarciae> Thanks! |
19:10:14 | nid | <cgarciae> Side note: weave reminds me of erlang /elixir, any benchmarks? |
19:10:15 | nid | <cgarciae> Side note 2: just saw in 0.13 there was an actors module, is this still a thing? |
19:15:59 | Yardanico | see https://github.com/mratsim/weave/tree/master/benchmarks for benchmarks maybe? |
19:21:25 | leorize | cgarciae: we phased actors out |
19:25:05 | nid | <Chiqqum_Ngbata> Wonder if it's possible to represent this monstrosity in nim https://github.com/torvalds/linux/blob/481ed297d900af0ce395f6ca8975903b76a5a59e/include/uapi/linux/io_uring.h#L17-L61 |
19:25:29 | leorize | yes |
19:26:26 | nid | <Chiqqum_Ngbata> How do you deal with the anonymous unions? |
19:26:41 | leorize | create non anonymous versions of them |
19:26:55 | leorize | then refer to them in the main object |
19:27:06 | Yardanico | yeah, c2nim usually generated INNER_UNION_XXX objects for anonymous unions like that |
19:27:55 | nid | <Chiqqum_Ngbata> I've tried that and, predictably `attempting to call undeclared routine: 'off=` |
19:27:59 | shashlick | yay nested structs |
19:28:10 | leorize | now with type section macros we can make it look kinda nice too |
19:28:25 | leorize | Chiqqum_Ngbata: yea you'll have to define some templates |
19:33:58 | leorize | Araq: do you have any tips for implementing a thread-safe buffer for files/pipes? |
19:35:05 | nid | <Recruit_main707> params.response[][0] != "!" |
19:35:05 | nid | <Recruit_main707> how can i convert that len 1 string into a char? |
19:35:11 | Yardanico | '!' |
19:35:22 | leorize | well compare it with a char :P |
19:35:41 | Yardanico | in most compiled languages chars are single quotes, strings are double-quotes AFAIK |
19:35:58 | Yardanico | actually not just compiled, most languages which have a distinction between an ascii character and a string |
19:37:30 | nid | <Recruit_main707> right, a bit tricky imo, i guess thats what happens when you come from python |
19:37:45 | leorize | not that tricky, though I can understand |
19:38:31 | leorize | in the strongly typed land pascal is an example of not having this distinction |
19:39:09 | Yardanico | I wonder if there's an easy way to compare two types for equality? |
19:39:13 | Yardanico | like "typeof(multiply(u1, u2)) == U[3]" |
19:39:16 | leorize | `is` |
19:39:18 | Yardanico | ah, is |
19:39:18 | Yardanico | right |
20:04:24 | shashlick | Yardanico: any plans of consolidating the two discord bots? |
20:04:36 | shashlick | don't want to add two rules for nick renaming |
20:04:42 | Yardanico | shashlick: wdym? there are plans to make ircord the default of course |
20:05:03 | Yardanico | the one in #nim-offtopic is the new one, when it's completed it'll either use "nid" or "nl", not sure which one to choose though |
20:05:20 | shashlick | right now there's nl and nid and i only have a rule for nl right now |
20:05:23 | shashlick | so nid shows up here |
20:05:37 | Yardanico | well nl is #nim-offtopic, nid is here |
20:05:57 | supakeen | I vote for 'bottymcbotface' |
20:06:00 | shashlick | okay which one is going away |
20:06:40 | Yardanico | I honestly don't know, need opinion from other people :D |
20:07:17 | supakeen | I like nid more. |
20:07:25 | Yardanico | yeah I think I will keep that one |
20:07:25 | supakeen | nl seems like it's the country code for the netherlands |
20:07:34 | Yardanico | ok nid it is :P |
20:07:55 | supakeen | Also easier to pronounce :) |
20:07:58 | nid | <Chiqqum_Ngbata> disrod |
20:08:02 | Yardanico | lol |
20:08:08 | Yardanico | we have disbot already |
20:08:11 | Yardanico | a bit confusing :P |
20:10:24 | nid | <Chiqqum_Ngbata> leorize: Do you mean I'll have to emit C to interact with it or |
20:10:57 | dom96 | Why not FromDiscord again? |
20:11:58 | leorize | Chiqqum_Ngbata: no, use a template to access the internal objects |
20:12:17 | Yardanico | @dom96 well some people said that it's a bit too long |
20:12:21 | Yardanico | FromDisc? :P |
20:12:29 | dom96 | who? |
20:12:34 | leorize | Chiqqum_Ngbata: ie `off(t: IoUring): int` |
20:12:45 | dom96 | We've had it for months if not years and nobody complained |
20:12:50 | * | narimiran quit (Ping timeout: 260 seconds) |
20:13:23 | Yardanico | so should I return the FromDiscord one? |
20:13:59 | dom96 | I would prefer it, it's clear where it's coming from that way |
20:14:23 | Yardanico | ok, i'll restart the bridge now, expect some seconds of downtime :P |
20:14:26 | * | nid quit (Remote host closed the connection) |
20:15:41 | Yardanico | uh apparently FromDiscord wasn't even registered on freenode before |
20:16:15 | * | FromDiscord joined #nim |
20:16:16 | Yardanico | now it is |
20:16:26 | dom96 | it might have been, they cleared old unused nickname registrations |
20:16:35 | Yardanico | well but FromDiscord is active every day |
20:17:19 | * | blackbeard420 quit (Remote host closed the connection) |
20:17:40 | * | blackbeard420 joined #nim |
20:18:44 | * | fredrik92 joined #nim |
20:20:15 | disruptek | !last axiom |
20:20:15 | disbot | axiom never seen. |
20:20:18 | disruptek | !last axion |
20:20:19 | disbot | axion quit 79 days ago and last spoke 4 weeks ago |
20:20:22 | Yardanico | also @dom96 I think we might want to apply for discord verification so we could have a nice discord server url like discord.gg/nim-lang (e.g. discord.gg/rust-lang or discord.gg/vlang), although from what I've read the server owner should be also an official representative of the project. Right now their verification queue is closed, but when it opens maybe we'll need to find a way so I can transfer server ownerhip to you so you |
20:20:22 | Yardanico | would do that :P |
20:20:39 | Yardanico | well I'm not entirely sure now, I'll email them again when they have that queue open |
20:20:53 | dom96 | sure, gimme a ping when that's available |
20:21:15 | Yardanico | we'll also get a "verified" checkmark on the server :P |
20:22:02 | leorize | also verify our github org too :) |
20:22:10 | leorize | or at least verify the link :P |
20:22:30 | Yardanico | Ah yeah this would be cool too |
20:22:45 | Yardanico | https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/verifying-your-organizations-domain |
20:23:03 | Yardanico | it's really simple, but need to have access to nim-lang.org's DNS records :P |
20:23:35 | supakeen | And Twitter! (does nim have a twitter?) |
20:24:09 | Yardanico | yes |
20:24:16 | Yardanico | https://twitter.com/nim_lang |
20:24:21 | * | couven92 quit (Disconnected by services) |
20:24:25 | * | fredrik92 is now known as couven92 |
20:24:26 | supakeen | But we haven't stolen nimlang even if it belongs to an 84-year old who likes chicken? |
20:24:44 | Yardanico | why not steal twitter.com/nim then |
20:24:50 | supakeen | Oh right. |
20:25:02 | * | Vladar quit (Quit: Leaving) |
20:25:50 | * | fredrik92 joined #nim |
20:34:55 | * | hoijui quit (Ping timeout: 244 seconds) |
20:36:24 | Araq | leorize, give it a lock? |
20:48:22 | FromDiscord | <Rika> disruptek: axion gave up on nim quite a while back, why the !last? |
20:49:06 | leorize | wait he did? |
20:49:22 | FromDiscord | <Rika> he messaged me about it yes |
20:49:55 | FromDiscord | <Rika> he didnt like how basically every new feature was left experimental; i dont know if it's insensitive to talk about it more |
20:50:33 | leorize | Araq: yea, that's a way, though I don't know if lock contention should be something I need to be worried about |
20:52:02 | leorize | Rika: well maybe he will return after looking at all the other languages :P |
20:52:07 | leorize | or maybe he'd just get back to lis |
20:52:10 | leorize | lisp* |
20:54:08 | FromDiscord | <Rika> he went back to lisp |
20:55:49 | FromDiscord | <Broadwell> https://play.nim-lang.org/#ix=2jWP |
20:56:02 | * | letto quit (Ping timeout: 256 seconds) |
20:57:40 | leorize | Broadwell: typedesc is not a valid runtime value |
20:57:59 | FromDiscord | <Broadwell> Oops |
21:00:25 | FromDiscord | <Joshua S. Grant> @Rika He (if I'm remembering right and axion is mfiano), left the Lisp-Discord a lil bit ago as-well; Not sure where he really stands -- but is still doing semi-regular commits to his game-engine and related depends |
21:01:14 | zacharycarter | yeah he is - I talk to him on a semi-frequent basis in another IRC chat |
21:01:18 | zacharycarter | related to roguelike development |
21:01:44 | FromGitter | <Bennyelg> Happy independence day Israel even dow in |
21:01:46 | zacharycarter | I don't think he was a big fan of Nim - but he also doesn't love CL anymore so maybe he'll go to Rust or Zig or something |
21:01:50 | FromGitter | <Bennyelg> quarantine |
21:02:05 | FromDiscord | <Rika> he liked cl for its macros so i doubt rust |
21:02:12 | zacharycarter | true |
21:02:23 | FromDiscord | <Rika> zig, im not familiar with |
21:02:29 | FromDiscord | <Rika> if it has good macros then maybe |
21:02:36 | leorize | zig don't have that |
21:02:37 | zacharycarter | it does not |
21:02:37 | FromDiscord | <Rika> he legitimately liked lisps macros a lot |
21:02:48 | leorize | like not having syntax sugar is the point of zig |
21:02:58 | leorize | no "surprises" |
21:03:04 | FromDiscord | <Rika> so zig is almost the anti-nim no? |
21:03:16 | leorize | yes :p |
21:03:17 | FromDiscord | <Rika> nim is literally built on sugar haha |
21:03:43 | FromDiscord | <Rika> you get expression but also surprises -- if you dont read code |
21:03:48 | FromDiscord | <Joshua S. Grant> Well, he's a very taleneted guy and hope he falls into another fever-pitch even if it doesn't happen to be Nim, ultimately |
21:03:57 | FromDiscord | <Rika> though i do understand, reading code takes a lot of time |
21:04:14 | FromDiscord | <Rika> yeah, i dont mean him any harm, its just sad he didnt like nim that much |
21:04:42 | FromDiscord | <Rika> if i were skilled enough i'd strive to improve it enough for him to reconsider 😛 |
21:04:47 | leorize | he will like nim once nim v2 is out :p |
21:04:56 | leorize | just try :p |
21:05:01 | leorize | you can't be skilled if you don't do it |
21:05:23 | FromDiscord | <Rika> you can though? |
21:05:26 | FromDiscord | <Rika> education exists |
21:05:31 | FromDiscord | <Rika> i dont have a college education yet |
21:05:37 | FromDiscord | <Rika> ill try out once i do |
21:05:46 | leorize | college is overrated |
21:05:55 | leorize | experience trumps all |
21:06:04 | FromDiscord | <Joshua S. Grant> I selfishly want him here, because now that I've started to make a commitment to the ecosystem -- I want to see more game-engineers about. :^) Though we seemed to of bagged oakes for the time being ... so hey! |
21:06:34 | FromDiscord | <Rika> are you a close friend of his? |
21:07:47 | FromDiscord | <Joshua S. Grant> Assuming you're talking about mfiano; Nah, we've talked a few times -- and I've actively bugged him with reorganizing my Github enough that he's took notice and dm'd me to basically 'chill' lol -- But really appreciate his body of work, and how readable / clear his CL is |
21:14:49 | * | letto joined #nim |
21:23:24 | FromDiscord | <Elegant Beef> *wait people have college education* 😄 |
21:23:40 | FromDiscord | <Elegant Beef> I prefer collage education myself it's more hands on |
21:24:45 | * | hax-scramper quit (Read error: Connection reset by peer) |
21:25:01 | * | hax-scramper joined #nim |
21:26:18 | leorize | can't really relate on that :P |
21:34:00 | * | lritter quit (Quit: Leaving) |
21:40:07 | leorize[m] | > `lpCommandLine`: The maximum length of this string is 32,768 characters, including the Unicode terminating null character. |
21:40:14 | leorize[m] | so they built windows on top of uint16 or something |
21:41:24 | * | Trustable quit (Remote host closed the connection) |
21:45:25 | FromDiscord | <KingDarBoja> Who is axi0n? |
21:47:00 | leorize | axion was our fellow lisper |
21:48:35 | FromDiscord | <KingDarBoja> By Lisper you mean Lisp Advocate? |
21:49:34 | leorize | he is a common lisp user looking to switch |
21:49:39 | * | liblq-dev quit (Read error: No route to host) |
21:50:00 | FromDiscord | <KingDarBoja> I have never met a Lisp developer |
21:50:16 | FromDiscord | <KingDarBoja> Only heard of the parenthesis meme |
21:50:35 | leorize | he said if you actually write lisp you won't see them |
21:50:46 | leorize | the editor abstracts them out of you |
21:50:47 | FromDiscord | <KingDarBoja> Loool |
21:50:47 | * | liblq-dev joined #nim |
21:53:49 | * | tane quit (Quit: Leaving) |
21:54:11 | FromDiscord | <KingDarBoja> I was able to overcome my unicode issues on the graphql lexer module, just making the last fixes, hooray |
21:54:19 | leorize | \o/ |
21:54:23 | FromDiscord | <KingDarBoja> That's what happen when u come from Python |
21:54:31 | FromDiscord | <KingDarBoja> Unicodeplus was helpful indeed |
21:54:59 | FromDiscord | <KingDarBoja> And I find comfortable comparing runes with runes instead of Char with char |
22:00:34 | * | solitudesf quit (Ping timeout: 256 seconds) |
22:03:00 | krux02 | as far as I know we lost axion back to lisp. |
22:03:09 | krux02 | The language just had too many bugs. |
22:03:17 | krux02 | with the language I mean Nim. |
22:04:14 | krux02 | leorize, regarding the parenthesis, they are after all just syntax. you get used to them as you get used to other syntaxes. |
22:05:02 | FromDiscord | <Rika> i said that above |
22:05:49 | leorize | I don't doubt that, touch macros a bit and you might make the compiler implodes |
22:05:52 | krux02 | yea I didn't read everything |
22:06:18 | Prestige | Is there any way to get an i'th item from an OrderedSet without using an iterator? |
22:06:56 | krux02 | Prestige, maybe you can get declare your own [] operator to do that. |
22:07:35 | krux02 | But as far as I know ordered sets are internally linked data structures that require O(n) access time |
22:07:43 | krux02 | if you go by index |
22:08:35 | Prestige | looks like it's a sequence underneath |
22:09:25 | Prestige | Only really had one place where I wanted to grab the first element so it's nbd, was just curious |
22:12:12 | * | couven92 quit (Quit: Disconnecting) |
22:13:21 | * | xcm quit (Remote host closed the connection) |
22:14:36 | * | fredrik92 is now known as couven92 |
22:15:33 | * | xcm joined #nim |
22:19:21 | * | NimBot joined #nim |
22:26:50 | * | couven92 quit (Ping timeout: 260 seconds) |
22:33:30 | disruptek | i can't build disbot under orc, but it builds under arc. |
22:33:36 | leorize | ping Zevv |
22:34:58 | shashlick | what's the best package to measure how long my nimterop tests are taking individually |
22:34:59 | disruptek | !last zevv |
22:35:12 | disruptek | !last zevv |
22:35:13 | disbot | Zevv spoke in 12#nim 33 hours ago |
22:35:37 | disruptek | the bot binary is also much larger under arc. |
22:35:44 | disruptek | >+50% |
22:35:59 | federico3 | urgh |
22:47:19 | FromDiscord | <codic> How od I run a ssytem command in nim? |
22:47:21 | FromDiscord | <codic> *do |
22:52:05 | leorize | os.execShellCmd |
22:52:23 | leorize | though I'm not sure what you mean |
22:53:17 | FromDiscord | <codic> have a string (eg `"ls"`), run it through a system call, and return the output |
22:53:25 | FromDiscord | <codic> I want a function that does that, does it exist? |
22:53:54 | Yardanico | disruptek: maybe due to a lot of destroy/etc calls? |
22:54:38 | FromDiscord | <Yardanico> @codic https://nim-lang.org/docs/osproc.html#execProcess%2Cstring%2Cstring%2CopenArray%5Bstring%5D%2CStringTableRef%2Cset%5BProcessOption%5D |
22:55:27 | Yardanico | import osproc; echo execProcess("ls") |
22:55:43 | FromDiscord | <codic> So if I had `import osproc; echo execProcess("ls -al")` it would output the output? |
22:55:49 | FromDiscord | <codic> ya beat me to it, great ;p |
22:55:55 | Yardanico | yes |
22:56:40 | Yardanico | lol |
22:57:11 | Yardanico | leorize: so I tested this simple example with and without -d:useMalloc with both --gc:arc and default gc |
22:57:24 | FromDiscord | <codic> I've also noticed that some examples in the docs use `$variable` instead of `variable` as an aside. for example `var t="o"; echo $t`. Why is this? |
22:57:29 | Yardanico | ah wait wrong chat |
22:57:42 | leorize | I'm in both :P |
22:57:49 | leorize | stop chatting on topic on off topic :P |
22:58:27 | FromDiscord | <codic> haha |
22:59:22 | Yardanico | @codic maybe a remnant of the past or just to be explicit |
22:59:30 | Yardanico | echo converts all arguments to string with $ implicitly, yeah |
22:59:47 | Yardanico | although $ is no-op for strings so it won't cost performance or memory to do "echo $stuff" |
23:02:53 | FromDiscord | <codic> But `$` is useless to put in front of a variable? |
23:02:56 | FromDiscord | <codic> in modern nim |
23:03:55 | FromDiscord | <codic> also, another quick question. assuming I had a library thing, `import thing` would pollute everything in thing to the global namespace. How could I put it all in a namespace like python, so that I do thing.whatever() instead of whatever() (assuming the library thing has a function whatever)? |
23:06:09 | FromDiscord | <Rika> from module import nil |
23:06:39 | FromDiscord | <codic> then i can do module.thing()? |
23:06:43 | FromDiscord | <Rika> Yes |
23:07:11 | FromDiscord | <codic> yay |
23:07:41 | leorize | please don't do that unless you have a good reason to |
23:08:51 | FromDiscord | <Rika> Nims "global namespace pollution" is just like lisps parenthesis hell I think |
23:09:02 | FromDiscord | <Rika> Editors make it much more bearable to use |
23:09:39 | FromDiscord | <Rika> E.g. You can hover over the proc in vs code and it will show what module it's from |
23:10:24 | FromDiscord | <Rika> So yeah, there's a reason we don't have it on by default, also because UFCS fails to work with it |
23:10:36 | leorize | that's not the reason |
23:10:46 | FromDiscord | <Rika> Never said it was |
23:10:52 | FromDiscord | <Rika> But I guess it's implied |
23:11:00 | FromDiscord | <Rika> Well, I didn't mean to imply that |
23:11:38 | leorize | it's not like you can easily see where something came from in python anyway :P |
23:11:57 | leorize | put on some classes and you will need ides |
23:13:31 | FromDiscord | <codic> Does nim even have a dedicated ide? |
23:13:34 | FromDiscord | <codic> vscode works great for me |
23:15:01 | leorize | no we don't |
23:17:33 | FromDiscord | <codic> i remember there was one written in nim but it's dead |
23:18:14 | leorize | yea, the alternatives just worked better |
23:18:53 | dom96 | no, the alternatives had the support of big companies |
23:20:56 | leorize | not much big companies but users |
23:22:12 | federico3 | namespace pollution is a bit annoying tho |
23:22:22 | Prestige | I'm using neovim w/nimlsp and alaviss/nim.nvim, it works pretty decently codic |
23:22:27 | federico3 | especially when librarie export meaningless proc names |
23:22:54 | federico3 | Prestige: nimisp? |
23:23:08 | Prestige | LSP |
23:23:29 | Prestige | https://github.com/PMunch/nimlsp |
23:24:05 | federico3 | what is it doing? |
23:24:09 | Prestige | sometimes if I'm refactoring something and the syntax is very messed up, alaviss/nim.nvim crashes tho |
23:24:17 | Yardanico | federico3: language server in Nim |
23:24:18 | Yardanico | for Nim |
23:24:18 | leorize | not a setup I'd recommend, but feel free to use it, it works |
23:24:32 | federico3 | Yardanico: yep, but what is it for? |
23:24:35 | Yardanico | any editor which supports LSP could be configured to use nimlsp |
23:24:42 | Yardanico | and nimlsp provides access to nimsuggest and stuff |
23:24:55 | Yardanico | so you can get suggestions and go to definition and stuff in any editor with LSP support :P |
23:24:58 | federico3 | nim.nvim uses nimsuggest already |
23:25:11 | federico3 | (hence my question) |
23:25:20 | Yardanico | well there are more editors than just nvim :D |
23:25:24 | leorize | Prestige would like to use the LSP ecosystem |
23:25:56 | Prestige | Yeah, I use lsp for all languages I work with |
23:26:02 | federico3 | Prestige: sounds like you are using them together |
23:26:31 | Prestige | mostly for the syntax highlighting |
23:26:39 | Prestige | nim.nvim I mean |
23:26:56 | leorize | once PMunch got that working in nimlsp I'll toss in a switch to let you turn nimsuggest integration off |
23:27:08 | FromGitter | <bung87> ```code paste, see link``` ⏎ ⏎ anyone can help me with this? [https://gitter.im/nim-lang/Nim?at=5ea8bbcc347bd616304217ba] |
23:27:43 | Prestige | I'll probably be contributing to nimlsp once I've gotten my current project to a decent state |
23:28:12 | FromGitter | <bung87> I'm tring to create zip archive from cstring it gives error code 19 |
23:28:27 | FromGitter | <Yardanico> why are you using unSafeAddr? |
23:28:35 | FromGitter | <Yardanico> and did you look into nimarchive? |
23:28:45 | FromGitter | <bung87> `data: cstring` |
23:29:06 | FromGitter | <Yardanico> yes, you can just use ".addr" if it's a "var", you shouldn't get address of "let" variable (hence it's unsafeAddr) |
23:29:51 | FromGitter | <bung87> I have not try nimarchive, I modify the std libzip add new func import from c |
23:31:01 | FromGitter | <bung87> `var cstring` still same problem. |
23:31:13 | shashlick | back to FromDiscord? |
23:31:31 | Yardanico | shashlick: well yeah sorry |
23:32:02 | leorize[m] | bung87: remove the addr and the cast |
23:32:11 | Yardanico | leorize: would it work without that? |
23:32:14 | Yardanico | he's calling into raw C functions |
23:32:30 | leorize[m] | his data is a cstring |
23:32:34 | * | zacharyc1rter quit (Ping timeout: 260 seconds) |
23:32:50 | FromGitter | <bung87> ok , just cstring |
23:33:17 | FromGitter | <Bennyelg> sporadic error when trying to execute multiple deletes on over sqlite connection ⏎ Error: unhandled exception: index 1 not in 0 .. 0 [IndexError] |
23:33:30 | * | zacharycarter quit (Ping timeout: 260 seconds) |
23:33:56 | FromGitter | <bung87> am I main logic wrong? |
23:33:59 | shashlick | leorize[m]: was https://github.com/nimterop/nimterop/issues/151 your concern as well with nimterop? |
23:34:18 | FromGitter | <bung87> ```code paste, see link``` ⏎ ⏎ I'm try porting these cpp code [https://gitter.im/nim-lang/Nim?at=5ea8bd7ab6dd230697929adc] |
23:34:26 | * | azed joined #nim |
23:35:55 | leorize[m] | shashlick: yea |
23:36:49 | leorize[m] | bung87: remove cast and addr and it should just work |
23:37:10 | shashlick | okay it should be fixed in #head now |
23:37:37 | FromGitter | <bung87> I removed still `19 ZIP_ER_NOZIP` |
23:40:36 | FromGitter | <bung87> `zip_source_buffer_create(const void *data, zip_uint64_t len, int freep, zip_error_t *error);` |
23:41:14 | FromGitter | <bung87> am I doing right? |
23:46:59 | * | endragor joined #nim |
23:48:27 | FromDiscord | <codic> is nim's `ui` good for small dialogs? is there an example just showing text and two buttons under it? |
23:50:59 | FromDiscord | <codic> that's all i need |
23:51:01 | * | krux02_ joined #nim |
23:51:10 | FromDiscord | <codic> (one closes the app, the other spawns a system process) |
23:51:36 | leorize[m] | codic: yea it's pretty decent for that |
23:51:42 | * | endragor quit (Ping timeout: 260 seconds) |
23:52:24 | FromDiscord | <codic> oo matrix |
23:52:35 | leorize[m] | bung87: that code should be the same as the c++ code. I can't be 100% certain with a runnable example though |
23:52:37 | FromDiscord | <codic> is there an example for that then? |
23:53:15 | * | krux02 quit (Ping timeout: 240 seconds) |
23:53:29 | codic | now I must use matrix |
23:53:34 | codic | :) |
23:54:10 | shashlick | meh, cannot benchmark in nimscript, no time functions available |
23:55:20 | FromDiscord | <codic> or is there any other library with a similar example? |
23:58:23 | * | zacharyc1rter joined #nim |
23:58:24 | * | zacharycarter joined #nim |