00:07:57 | rayman22201 | nvm. I think I figured it out |
00:22:32 | * | laaron quit (Remote host closed the connection) |
00:35:09 | * | paxis joined #nim |
00:44:48 | FromGitter | <zetashift> @Kiloneie yeah worked flawlessly on 1.0 for me, I had to use GCC instead of VCC (installed wth vs 2019) on windows 10 tho |
00:44:50 | FromGitter | <zetashift> not sure why |
00:45:40 | * | laaron joined #nim |
00:50:20 | * | laaron quit (Remote host closed the connection) |
01:08:08 | * | abm quit (Read error: Connection reset by peer) |
01:37:42 | * | krux02_ quit (Remote host closed the connection) |
02:00:43 | * | thomasross quit (Ping timeout: 245 seconds) |
02:00:48 | FromGitter | <iffy> I have a SharedList that appears full in one thread (1 item) and empty in another thread. Any guesses why? https://gist.github.com/iffy/c765521a411863e7e0035806f9561b4b |
02:03:49 | * | thomasross joined #nim |
02:30:43 | shashlick | it's a global var and not automatically shared, i think you need to pass a pointer to the other thread |
02:32:55 | FromGitter | <iffy> I don't have much control over the spawning of the other thread (this is in a library used by a NodeJS program). Is there no way for the second thread to reach out to some global *something* to get access to the list? |
02:35:20 | shashlick | well docs does say "Each thread has its own (garbage collected) heap and sharing of memory is restricted to global variables." |
02:43:31 | shashlick | @disruptek - you up? |
02:48:03 | FromGitter | <iffy> global Locks are shared, right? |
02:48:14 | FromGitter | <iffy> (otherwise, how could you use them) |
02:53:43 | rayman22201 | @iffy, how is nodejs starting the thread? Node has no way to know about Nim global code. |
02:54:53 | FromGitter | <iffy> https://nodejs.org/api/n-api.html#n_api_napi_create_async_work and the like |
02:55:01 | * | laaron joined #nim |
02:55:02 | FromGitter | <iffy> gtg, but anything you type, I'll look at later |
02:57:56 | * | laaron quit (Remote host closed the connection) |
02:59:43 | * | theelous3 joined #nim |
03:08:16 | * | lritter quit (Ping timeout: 240 seconds) |
03:09:22 | * | lritter joined #nim |
03:15:03 | * | snooptek joined #nim |
03:23:33 | rayman22201 | @iffy try this: https://gist.github.com/rayman22201/a3c136f20ff6b610bb5caeaae0390990 |
03:47:23 | * | chemist69 quit (Ping timeout: 252 seconds) |
03:49:27 | * | chemist69 joined #nim |
04:05:32 | * | Jjp137 quit (Read error: Connection reset by peer) |
04:06:01 | * | Jjp137 joined #nim |
04:30:09 | * | laaron joined #nim |
04:35:21 | * | theelous3 quit (Ping timeout: 265 seconds) |
04:55:14 | * | njoseph quit (Ping timeout: 240 seconds) |
05:13:11 | * | solitudesf joined #nim |
05:13:49 | * | narimiran joined #nim |
05:15:26 | * | njoseph joined #nim |
05:24:17 | * | lritter quit (Ping timeout: 240 seconds) |
05:26:42 | Zevv | rayman22201: not looking under the hood, but it runst stable now |
05:27:02 | * | Jjp137 quit (Read error: Connection reset by peer) |
05:27:46 | rayman22201 | Yay! Thanks for checking. |
05:27:48 | * | Jjp137 joined #nim |
05:36:39 | * | laaron quit (Remote host closed the connection) |
05:47:20 | * | rockcavera quit (Remote host closed the connection) |
05:49:29 | * | laaron joined #nim |
05:52:41 | * | solitudesf quit (Ping timeout: 265 seconds) |
05:53:04 | Zevv | disruptek: no specific version dependency. The test is crappy also because it compares apples and oranges |
06:21:20 | * | laaron quit (Remote host closed the connection) |
06:23:19 | * | laaron joined #nim |
06:25:36 | * | laaron quit (Remote host closed the connection) |
06:41:55 | * | laaron joined #nim |
06:49:05 | * | Vladar joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:52 | * | gmpreussner joined #nim |
07:09:10 | * | Trustable joined #nim |
07:15:32 | * | laaron quit (Remote host closed the connection) |
07:28:09 | * | laaron joined #nim |
07:31:42 | * | nsf joined #nim |
07:45:16 | * | laaron quit (Remote host closed the connection) |
07:48:20 | * | dddddd quit (Remote host closed the connection) |
07:52:22 | * | laaron joined #nim |
07:59:15 | * | PMunch joined #nim |
08:04:56 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
08:05:44 | * | laaron joined #nim |
08:14:43 | * | laaron quit (Remote host closed the connection) |
08:18:27 | * | swisscowbell[m] joined #nim |
08:21:10 | Zevv | aWhat is typically the problem if Nim can find my proc call like `foo(a, b)`, but not like `a.foo(b)`, and tells me `Error: attempting to call undeclared routine`? |
08:24:22 | * | Vladar quit (Remote host closed the connection) |
08:28:54 | * | laaron joined #nim |
08:35:04 | Araq | Zevv: some bug in template handling |
08:36:59 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
08:37:16 | * | laaron joined #nim |
08:39:30 | Zevv | bah |
08:42:05 | * | lf-araujo joined #nim |
08:45:47 | * | laaron quit (Remote host closed the connection) |
08:50:41 | FromGitter | <Bennyelg> Morning, |
08:50:59 | FromGitter | <Bennyelg> I have a ⏎ ⏎ ```var s: Option[seq[int]]``` [https://gitter.im/nim-lang/Nim?at=5d98597392920c36a115afca] |
08:51:11 | FromGitter | <Bennyelg> how do I append into it ? add not seems to work |
09:00:16 | FromGitter | <sheerluck> it would be nice if Nim had opearator '//' as div: 23/4 = 5.75; 23//4 = 5 |
09:00:36 | * | lf-araujo quit (Ping timeout: 240 seconds) |
09:06:08 | Zevv | !eval echo 23/%4 |
09:06:11 | NimBot | 5 |
09:06:16 | Zevv | sheerluck: ^ |
09:07:40 | Zevv | and if you don't like the /% you can do `template `//`[T](a, b: T): T = a /% b` |
09:07:45 | Zevv | to have your `//` instead |
09:08:48 | FromGitter | <sheerluck> oh thank you |
09:16:15 | * | lf-araujo joined #nim |
09:29:12 | * | absolutejam joined #nim |
09:29:16 | * | lf-araujo quit (Ping timeout: 240 seconds) |
09:35:21 | * | absolutejam quit (Ping timeout: 246 seconds) |
09:42:05 | * | PMunch quit (Remote host closed the connection) |
09:42:45 | * | nsf quit (Quit: WeeChat 2.5) |
09:53:05 | FromDiscord | <Rika> Bennyelg maybe try `s.isSome and s.get().add()` |
09:53:35 | FromDiscord | <Rika> Not sure, never used Option before |
09:57:20 | * | laaron joined #nim |
09:57:55 | leorize | Bennyelg: you can't, Option[T] is meant for read-only data |
10:00:26 | * | laaron quit (Client Quit) |
10:00:56 | * | laaron joined #nim |
10:01:31 | * | asymptotically joined #nim |
10:02:34 | * | krux02 joined #nim |
10:04:01 | * | laaron quit (Client Quit) |
10:04:28 | * | laaron joined #nim |
10:07:57 | * | narimiran quit (Ping timeout: 240 seconds) |
10:11:54 | * | Kaivo quit (Quit: WeeChat 2.6) |
10:18:57 | * | krux02 quit (Remote host closed the connection) |
10:21:18 | * | lf-araujo joined #nim |
10:26:01 | * | laaron quit (Remote host closed the connection) |
10:29:35 | * | laaron joined #nim |
10:35:00 | lqdev[m] | Zevv: wow, seeing all the neat changes done to npeg I want to try doing something with it again |
10:38:55 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
10:39:32 | * | laaron joined #nim |
10:44:53 | * | laaron quit (Remote host closed the connection) |
10:45:49 | * | clyybber joined #nim |
11:01:32 | * | lf-araujo quit (Ping timeout: 265 seconds) |
11:05:51 | * | laaron joined #nim |
11:06:45 | clyybber | Araq: Is genObjectInit the right place for default field initialization? |
11:08:21 | * | solitudesf joined #nim |
11:16:49 | * | shomodj joined #nim |
11:39:31 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
11:40:02 | * | laaron joined #nim |
11:44:53 | * | laaron quit (Remote host closed the connection) |
11:51:05 | FromDiscord | <arnetheduck> rayman22201, re "Implicit conversions for const behave correctly now, meaning that code like const SOMECONST = 0.int; procThatTakesInt32(SOMECONST) will be illegal now. Simply write const SOMECONST = 0 instead." - 0.uint32 is still useful if you want to make type inference based on the type: `proc a(x: auto) = when x is uint32: ...` |
11:51:49 | FromGitter | <alehander42> so |
11:51:55 | FromGitter | <alehander42> i think semver is just not |
11:52:00 | FromGitter | <alehander42> that good for prog languages |
11:52:05 | clyybber | yeah |
11:53:23 | FromGitter | <alehander42> i start to agree with "add new functions/types, fix unsoundness/bugs" in minor |
11:53:44 | FromGitter | <alehander42> without changing existing api types/functions if possible |
11:53:59 | FromGitter | <alehander42> btw |
12:00:43 | FromDiscord | <arnetheduck> fwiw, the difference between a patch and a minor in semver is that a patch/bugfix release changes neither of API or ABI, whereas the minor allows addtions to api. in nim's case, you can't do additions really without breaking stuff because global namespace, so it's less useful of a distinction |
12:02:01 | clyybber | yeah |
12:02:15 | FromDiscord | <arnetheduck> in other languages that are more explicit about namespacing and importing, you can make a common sense argument that adding stuff is fine for minor patches, even if in languages with complex name resoltion (like c++) that _might_ break some unusual code |
12:05:28 | FromDiscord | <arnetheduck> there are ways you can categorize the degree of breakage with greater detail if you want to have a serious discussion - ie gcc uses a more granular scale of "breaks-invalid", "breaks-valid" etc for describing the compatibility implications - having a consistent and sound language about compatibility is a good starting point to approaching it more systematically than simply haveing opinions |
12:14:24 | clyybber | Thats actually a great way of differentiating breakage |
12:31:41 | FromGitter | <alehander42> i agree |
12:31:46 | FromGitter | <alehander42> those should be defined precisely |
12:32:52 | * | ng0 joined #nim |
12:33:16 | FromGitter | <alehander42> that's why i hoped to categorize possible changes e.g. in "adding a new function , adding a new overload, changing an existing overload, adding a new warning, adding a new switch" etc and describe which of those is valid and not |
12:38:20 | * | nsf joined #nim |
12:47:55 | FromGitter | <iffy> @raymann22201 thanks for that code snippet (using ptrs to pass the SharedList between threads), but it has identical behavior to the original. LOG_FUNCTIONS is empty in the second thread. |
12:54:01 | planetis[m] | Hey nimmers check this out: https://github.com/b3liever/eminim |
12:54:11 | planetis[m] | new json to macro |
12:54:30 | planetis[m] | hope you like it, feedback very welcome |
12:58:18 | lqdev[m] | could you make it into a nimble package? |
12:59:27 | FromGitter | <iffy> Bah, I blame Node (again). If I create the threads in Nim, my original SharedList logger works, but if I let Node create the threads, it doesn't work. |
12:59:44 | lqdev[m] | also, it would be much more useful if it supported types like `Table` and `Option` |
12:59:55 | lqdev[m] | but it's a cool concept nonetheless |
13:00:46 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:04:40 | * | go|dfish quit (Ping timeout: 268 seconds) |
13:05:27 | planetis[m] | These can all be supported |
13:05:43 | * | leorize quit (Remote host closed the connection) |
13:05:50 | * | shomodj joined #nim |
13:06:04 | planetis[m] | case objects need some more work, but I dont use them |
13:06:15 | * | leorize joined #nim |
13:22:31 | FromGitter | <alehander42> imo case objects are very popular in some nim codebases |
13:22:41 | FromGitter | <alehander42> but i agree it depends on the authors |
13:22:47 | FromGitter | <alehander42> anyway, nice |
13:23:05 | FromGitter | <alehander42> does it work with ref object |
13:27:34 | FromGitter | <Bennyelg> (https://files.gitter.im/nim-lang/Nim/Jz2y/image.png) |
13:27:50 | FromGitter | <Bennyelg> but what if I want to populate something and it's not always arrived (in case it's not there) |
13:33:29 | * | dddddd joined #nim |
13:34:06 | FromGitter | <alehander42> please, copy messages and tag the people |
13:34:37 | FromGitter | <alehander42> images of chat probably cant be even viewed well by most people which are in irc |
13:34:54 | FromGitter | <alehander42> and they dont send a notification to the people you mention |
13:36:16 | FromGitter | <alehander42> hm, i didnt realize you cant modify options, good question |
13:36:16 | * | Vladar joined #nim |
13:40:33 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:47:52 | * | PMunch joined #nim |
13:50:01 | planetis[m] | alehander42, thanks i will add ref objects and tuples later :) |
13:52:41 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
13:53:40 | PMunch | Huh, someone is doing live programming in Nim for Ludum Dare 45, anyone know who it is? |
13:53:51 | PMunch | Can't say I recognise the nick |
13:55:14 | FromDiscord | <treeform> Are they doing a good job? |
13:55:43 | PMunch | Haven't started yet |
13:55:50 | PMunch | https://www.youtube.com/watch?v=jr3W2NCR0AM |
13:57:08 | FromGitter | <alehander42> https://www.reddit.com/r/nim/comments/dc474g/nim_error_about_assignment_stumped/ we have to improve this error |
13:57:29 | FromDiscord | <exelotl> I'll be doing ludum dare in Nim one of these days X) |
13:57:58 | lqdev[m] | hey, another game jammer jammin' in Nim |
13:59:29 | FromDiscord | <exelotl> Btw can anyone help with https://github.com/nim-lang/Nim/issues/12315 ? The PR is marked as showstopper but I don't really know what to do now |
14:00:33 | * | leorize quit (Remote host closed the connection) |
14:01:03 | * | leorize joined #nim |
14:05:53 | * | Trustable quit (Remote host closed the connection) |
14:07:08 | FromDiscord | <treeform> Does that bug also breaks filestream? |
14:14:38 | disruptek | Zevv: but, there's no way to specify a dev dependency, right? requirements doesn't require a version. |
14:15:35 | FromDiscord | <exelotl> @treeform doesn't seem like it, filesystem uses writebuffer instead of write |
14:15:48 | FromDiscord | <exelotl> *filestream |
14:15:54 | FromDiscord | <exelotl> Darn autocorrect |
14:17:16 | FromGitter | <Bennyelg> anyway to compile with --debug ? for more logs ? |
14:17:17 | disruptek | planetis[m]: please rename it from `to` to something more domain-specific. |
14:20:13 | disruptek | kingherring's previous video was creating a cdn in c++, fwiw. |
14:21:00 | FromDiscord | <Lunar> Trying to install Nim 1.0.0 on Linux Cinnamon. I get the error: https://pastebin.com/N8fLukwe |
14:21:25 | FromDiscord | <Lunar> I've tried installing it via ``make`` and ``build.sh`` |
14:24:06 | FromDiscord | <treeform> You probably need to install musl-dev. |
14:24:15 | disruptek | if you're using a git clone, then it's `sh build_all.sh`, but it looks like you have a dev include missing. |
14:24:17 | FromDiscord | <treeform> Does your Linux use musl? |
14:25:04 | FromDiscord | <Lunar> Fixed using ``sudo apt-get install python3-dev`` and ``dpkg -S limits.h | grep linux`` |
14:25:13 | FromDiscord | <Lunar> Just following <https://github.com/jupyterhub/the-littlest-jupyterhub/issues/321> |
14:25:42 | FromDiscord | <Lunar> This package was from <https://nim-lang.org/install_unix.html> after downloading the prebuilt binaries |
14:25:45 | FromDiscord | <Lunar> x64 version |
14:27:12 | FromDiscord | <Lunar> Correction, I'm using Linux **mint**, not Linux **cinnamon** |
14:27:20 | disruptek | i don't know anything about the prebuilt stuff, but if it's prebuilt, then you don't need to build anything. |
14:27:26 | disruptek | that's kinda the idea. |
14:27:48 | FromDiscord | <Lunar> That's what I thought too, however I keep getting the error that the package is misconfigured or something |
14:27:56 | FromDiscord | <Lunar> Let me get the error real quick |
14:28:21 | FromDiscord | <Lunar> Erm |
14:28:25 | FromDiscord | <Lunar> I can't get the error now |
14:28:31 | FromDiscord | <Lunar> Probably because I built it |
14:28:31 | FromDiscord | <Lunar> but |
14:28:43 | FromDiscord | <Lunar> Let me double check 😅 |
14:29:02 | disruptek | i recommend building from a git clone. |
14:30:39 | FromDiscord | <Lunar> Weird... Now I can't even get the error |
14:30:50 | FromDiscord | <Lunar> When installing Nim, does it require internet? |
14:30:56 | FromDiscord | <Lunar> *After* downloading of course |
14:30:57 | disruptek | nah. |
14:31:08 | FromDiscord | <Lunar> That's what I thought |
14:31:14 | FromDiscord | <Lunar> I'm at a loss then |
14:31:17 | FromDiscord | <Lunar> Sorry guys |
14:33:19 | disruptek | that's good news, right? |
14:34:11 | FromDiscord | <galen> Does anyone know what I'm doing wrong? After sucessfully compiling and running a program, the following compilation fails with "oserr.nim(94) raiseOSError |
14:34:11 | FromDiscord | <galen> Error: unhandled exception: The filename, directory name, or volume label syntax is incorrect. |
14:34:11 | FromDiscord | <galen> [OSError]". I'm on Windows 10 |
14:34:25 | disruptek | you need a later nightly build. |
14:34:39 | disruptek | sadly, the release build has a buglet on windows. the very one you ran into. |
14:42:58 | * | Romanson joined #nim |
14:44:07 | * | shomodj joined #nim |
14:46:35 | FromGitter | <Bennyelg> is it a bug?: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ ```/Users/benny/Downloads/Shani - check YIT - hebrew alt/Route.nim(155, 30) template/generic instantiation of `to` from here ... [https://gitter.im/nim-lang/Nim?at=5d98accb5173c33ca1727556] |
14:47:17 | FromGitter | <Bennyelg> can't I populate sub_trips with trips on a trip object ? |
14:47:31 | disruptek | i can't read gitter. can you use a pastebin? |
14:48:19 | Zevv | disruptek: not sure about the dependency versions |
14:49:07 | FromGitter | <Bennyelg> https://pastebin.com/8p79uyBK |
14:49:26 | disruptek | the versions don't matter, i was just wondering if there was a way to get dev deps installed upon `nimble develop`. sorry to waste you time; i annoyingly asked instead of doing my own research. |
14:49:29 | FromGitter | <Bennyelg> if I remove the sub_trips its working. |
14:49:44 | FromGitter | <Bennyelg> but i have subtrips which I want to assign too |
14:50:00 | FromGitter | <Bennyelg> it's a JsonNodes which Im trying to covert into objects |
14:50:06 | disruptek | the error message is accurate. |
14:50:08 | FromGitter | <Bennyelg> for trip in dataSetJson["trips"]: ⏎ ⏎ ``` var moduleTrip = trip.to(Trip)``` [https://gitter.im/nim-lang/Nim?at=5d98ad9f940b4c2fc07d43af] |
14:50:24 | disruptek | you will need to parse it manually if you want a self-referential object. |
14:50:31 | FromGitter | <Bennyelg> Bah |
14:50:32 | FromGitter | <Bennyelg> thanks |
14:50:57 | disruptek | you might try this: https://github.com/b3liever/eminim |
14:50:59 | disruptek | it's new. |
14:51:55 | FromGitter | <alehander42> i discussed the semver thing in some prog lang channel |
14:52:00 | FromGitter | <alehander42> it does seem to me most people |
14:52:17 | FromGitter | <alehander42> see additions as fine in minor |
14:52:21 | FromGitter | <alehander42> but some dont of course |
14:53:24 | disruptek | Zevv: i just ran into that same `foo.bar() versus bar(foo) in templates` bug. what's the deal with that? |
14:54:41 | PMunch | Not sure what bug you're talking about, but that sounds like the thing where foo would have to be type checked before figuring out which bar to call. But with bar(foo) it sees that bar takes an untyped argument |
14:54:48 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:54:49 | Zevv | I don't know, I've seen it before and worked around it, but I'm not sure what the cause is |
14:55:30 | disruptek | no, neither bar or foo is a template -- it's the UFCS inside a template. |
14:56:22 | FromGitter | <Bennyelg> I did it thanks. ⏎ Total Trips: 6857 ⏎ Total SubTrips: 9753 ⏎ Total Stops: 5101 ⏎ Total Routes: 441 ... [https://gitter.im/nim-lang/Nim?at=5d98af16940b4c2fc07d4b8f] |
14:56:44 | Zevv | PMunch, disruptek: I'll investigate a bit further, but it seems to work when calling from the same source file, not when imported |
14:56:53 | FromDiscord | <galen> thanks disruptek, what's the best way to update? |
14:57:16 | disruptek | galen: i'm sorry, but i really don't know much of anything about nim on windows. |
14:57:29 | FromDiscord | <galen> Ok! |
14:57:36 | disruptek | is there a link for a nightly? those work. |
14:57:43 | FromDiscord | <galen> Whats a buglet btw? |
14:57:57 | disruptek | a very small bug. |
14:58:00 | disruptek | like, a bugling. |
14:58:03 | FromDiscord | <galen> Right, makes sense |
15:00:05 | Zevv | disruptek: https://nim-lang.github.io/Nim/manual.html#templates-limitations-of-the-method-call-syntax? |
15:00:43 | Zevv | but for me it's not a template I'm invoking, just a proc |
15:01:06 | disruptek | me too. |
15:01:52 | Zevv | can you minimize? I have no clue where to start, I'm in over my elbows when this happens |
15:01:59 | disruptek | easily. |
15:02:57 | disruptek | the one i hit was: `template foo(bar: typed) = var s: string; json.toUgly(s, bar.turnItIntoJson)` |
15:03:12 | disruptek | turnItIntoJson is likely optional, but included for completeness. |
15:03:15 | FromDiscord | <Lunar> I'm currently trying to break apart a string (giving me a char), then convert the char to an int. Error: https://pastebin.com/WwQjJFHm, Code: https://pastebin.com/8JSL0uWM |
15:03:23 | FromDiscord | <Lunar> Not really sure what's going wrong |
15:03:39 | disruptek | (and it was clearly s.toUgly() but i had to indicate json) |
15:03:58 | Zevv | funny |
15:05:20 | Zevv | for me its using this trivial stack implementation in some cases: http://ix.io/1XGn |
15:05:34 | Zevv | pop() can be used in s.pop(), but push not as s.push(...) |
15:06:19 | disruptek | don't you mean s.frames[s.top-1].`field`? |
15:07:34 | Zevv | indeed. I don't mean s.frames[s.top-1].`field` |
15:07:43 | disruptek | okay. |
15:07:47 | Zevv | :) |
15:08:00 | Zevv | but still, I can use this in some cases, but not in others. |
15:08:05 | Zevv | not figured out yet what the difference is |
15:10:04 | disruptek | that's crazy. |
15:13:59 | disruptek | this makes absolutely no sense. |
15:17:46 | clyybber | Zevv: Is that the bug from yesterday? |
15:18:18 | disruptek | oh shoot clyybber on the case |
15:21:04 | Zevv | I can't make any sense of it yet, need more time |
15:21:51 | Araq | s.frames.setLen s.frames.len * 2 ? |
15:22:09 | Araq | seq has this logic for you builtin, no need to reimplement it |
15:22:27 | Araq | push is system.add |
15:22:34 | Araq | pop is system.pop, done |
15:22:47 | Araq | peek is s[^1] |
15:22:52 | clyybber | Araq: Hey u there? |
15:23:02 | disruptek | maybe this is his minimal repro. |
15:23:05 | Araq | obviously |
15:23:50 | clyybber | Araq: WDYT should I allow nkIdentDefs in semRecord? |
15:24:05 | Araq | yes |
15:24:08 | clyybber | k |
15:25:49 | Zevv | Araq: I forgot why I reimplemented it, but there was a good reason :) |
15:33:10 | disruptek | how to do https://play.nim-lang.org/#ix=1XGv |
15:35:54 | * | nsf quit (Quit: WeeChat 2.5) |
15:54:49 | Araq | disruptek: system.procCall |
15:55:05 | Zevv | Araq: I implemented stack because seq[] tries to shrink on pop, which is too much overhead |
15:55:08 | disruptek | oh right, thanks. 😀 |
15:55:41 | Araq | Zevv: it doesn't, all it does is it resets its internal length |
15:57:00 | Zevv | good point, I'll check why I did it then |
15:58:59 | disruptek | ah, procCall is in the multi-methods section. |
15:59:05 | disruptek | of the manual. |
16:00:02 | clyybber | Why shoould procCall be needed? |
16:00:43 | clyybber | Why is the conversion not sufficient? |
16:01:06 | disruptek | i dunno, but this isn't new. i just get bit by it every time. 😁 |
16:15:41 | shashlick | @disruptek what's your timeline for nimgit2 |
16:16:29 | disruptek | you decide. it can be used to automatically bisect a package to find the performance regression. |
16:16:55 | shashlick | I have it working on Linux but not yet tested on win osx |
16:17:09 | shashlick | Needs nimterop bug fixes |
16:17:38 | disruptek | oh, i don't expect to support !linux because i have no way to test it. 🤣 |
16:17:59 | shashlick | Sounds fair |
16:18:00 | disruptek | it provokes a bug? |
16:18:06 | * | PMunch quit (Remote host closed the connection) |
16:18:41 | shashlick | Well was super sluggish performance since regex search is slow in vm and libgit2 has 140k files |
16:19:18 | shashlick | So had to outsource to nimgrep and find but obviously nothing works on osx on first try |
16:19:36 | disruptek | wow. |
16:19:55 | shashlick | In the process I also broke nimarchive so yeah |
16:20:42 | disruptek | maybe i should just speak to git? |
16:22:05 | shashlick | Nah, this will work soon but no time this weekend |
16:22:52 | disruptek | that's awesome, thank you. |
16:23:06 | disruptek | excited to see what i can do with it. |
16:31:31 | * | thomasross quit (Ping timeout: 252 seconds) |
16:37:42 | * | thomasross joined #nim |
16:45:37 | lqdev[m] | anyone knows some very fast, dynamic texture packing algorithm? |
16:45:57 | lqdev[m] | dynamic = textures can be inserted at any point in time, not exactly preloaded |
16:47:51 | clyybber | lqdev[m]: I have a few, not sure what you mean with dynamic.. you mean the dimensions are not known beforehand? |
16:49:27 | lqdev[m] | I mean that I need to insert textures while the program's running, not ahead of time |
16:49:58 | clyybber | Hmm, nope. But I think that should be relatively easy, since you can't do that close to optimal anyways |
16:50:09 | clyybber | Just need some fast heuristic |
16:50:11 | lqdev[m] | I found one and sent it to #nim-offtopic, but it only works with textures known ahead of time |
16:50:58 | lqdev[m] | that's the problem. I tried but ended up with something that works rather poorly |
16:51:23 | clyybber | Poorly in terms of performance or in therms of packing ratio? |
16:52:33 | lqdev[m] | performance |
16:52:59 | lqdev[m] | I don't care that much about ratio; but it would be nice if that were good too (and it is) |
16:53:07 | lqdev[m] | this is my current code https://github.com/liquid600pgm/rapid/blob/master/src/rapid/gfx/texpack.nim#L43 |
16:54:30 | clyybber | lets continue in offtopic |
16:54:42 | lqdev[m] | OK |
16:55:49 | * | actuallybatman quit (Quit: leaving) |
16:57:12 | FromDiscord | <exelotl> sounds like it could be solved in a similar way to Object VRAM management on the GBA |
16:57:17 | FromDiscord | <exelotl> https://www.gamasutra.com/view/feature/131491/gameboy_advance_resource_management.php?page=2 |
17:04:01 | FromDiscord | <exelotl> lqdev[m] oh maybe you want like a quadtree or something |
17:05:04 | FromDiscord | <exelotl> your page could hold one 2048x2048 texture, or four 1024x1024 textures |
17:05:28 | FromDiscord | <exelotl> and each of those can hold one 1024x1024 or four 512x512 |
17:05:31 | FromDiscord | <exelotl> and so on |
17:11:19 | FromDiscord | <exelotl> I guess it does relate to the GBA article too. If you think in blocks of some minimum texture size (such as 8x8): when finding space for an 8x8 texture you can loop 1 block at a time. When finding space for a 16x16 texture you can loop 4 blocks at a time, etc. |
17:11:55 | FromDiscord | <exelotl> in order to avoid fragmentation |
17:12:51 | clyybber | exelotl: He doesn't have an upper bound for the width tho |
17:14:49 | FromDiscord | <exelotl> ah |
17:18:32 | clyybber | Araq: Is genObjectInit in cgen the right place for the default field initialization? |
17:19:46 | Araq | not quite |
17:20:07 | Araq | the usages of genObjectInit have code like: |
17:20:14 | Araq | linefmt(p, cpsStmts, "#nimZeroMem((void*)$1, sizeof($2));$n", ...) |
17:20:23 | Araq | linefmt(p, cpsStmts, "#genericReset((void*)$1, $2);$n", ...) |
17:20:31 | Araq | and that is what needs to be patched |
17:20:50 | Araq | and while you're at it, throw away 'genericReset', it's SLOW |
17:21:05 | clyybber | WDYM throw away? I know its slow :D |
17:21:21 | Araq | just expand the assignments |
17:21:37 | Araq | like x.fieldA = 0; x.fieldB = 0; x.fieldC = nullptr; |
17:21:54 | Araq | and then it's also clear when to use the overridden default value |
17:22:09 | clyybber | Ah, sure. |
17:22:20 | clyybber | When is genericReset used as opposed to nimZeroMem? |
17:24:37 | clyybber | Ah, I see. when it contains a gc ref |
17:27:31 | * | thomasross_ joined #nim |
17:27:31 | * | thomasross quit (Killed (adams.freenode.net (Nickname regained by services))) |
17:27:31 | * | thomasross_ is now known as thomasross |
17:29:02 | * | go|dfish joined #nim |
17:31:56 | Zevv | Ah, now I remember araq, my stack was because of the price of setLen |
17:33:06 | Zevv | I only update an int, setLengthSeqV2() is a bit more expensive |
17:33:10 | clyybber | Araq: What exact purpose genObjectInit then, when we do #nimZeroMem or #genericReset before it? |
17:37:42 | shashlick | @disruptek - https://github.com/genotrance/nimgit2 |
17:37:49 | Araq | clyybber: it sets the object's tag (aka runtime type info) |
17:38:19 | shashlick | you need to install nimterop@#head since 2.0 isn't out yet |
17:38:31 | clyybber | Araq: Aaah. |
17:38:48 | shashlick | you can install nimterop@#findspeed since it is much faster but it is broken on osx |
17:39:14 | shashlick | `nimble docs` will also generate docs for nimgit2 in build/htmldocs |
17:47:03 | * | narimiran joined #nim |
17:54:11 | * | Romanson quit (Quit: Connection closed for inactivity) |
17:56:19 | clyybber | Araq: Why does the compiler still use internalError instead of assert? |
17:56:46 | Araq | not "still", it's the preferred way |
17:57:14 | * | NimBot joined #nim |
18:07:14 | Araq | clyybber: you can attach line info to it, etc |
18:07:22 | Araq | it's simply better |
18:12:05 | clyybber | Ok |
18:13:13 | clyybber | Araq: How do I get the loc out of the field? For a linefmt to set the field to its default value? |
18:17:12 | Araq | it's complex crap, look at proc genRecordField |
18:17:32 | Araq | and vmgen.getNullValue |
18:18:22 | FromDiscord | <Kiloneie> Would it be correct if i were to say that "varargs" makes a container or an array, sequences temporarily ? |
18:19:17 | FromDiscord | <Kiloneie> i think it has to be a sequence... yay or nay ? |
18:20:20 | disruptek | hey that nim game is live: https://www.youtube.com/watch?v=jr3W2NCR0AM |
18:22:09 | clyybber | Kiloneie: No, its an array |
18:28:03 | * | nsf joined #nim |
18:43:01 | FromGitter | <alehander42> Araq |
18:43:24 | FromGitter | <alehander42> did you ever had a plan to have like prebuilt "objects" for nim |
18:43:57 | FromGitter | <alehander42> like, prebuilding a module (like in C) or a lib(like crates in rust) and directly loading type/const state info from it |
18:44:04 | FromGitter | <alehander42> when compiling things that depend on it |
18:44:09 | FromGitter | <alehander42> instead of recompiling it |
18:44:26 | FromGitter | <alehander42> like, this is a bit different than IC |
18:44:35 | FromGitter | <alehander42> as you can reuse it between programs |
18:44:40 | * | absolutejam joined #nim |
18:44:48 | FromGitter | <alehander42> i dont have idea if this makes sense, so i am asking? |
18:45:13 | Araq | yes? |
18:46:44 | * | traviss quit (Quit: Leaving) |
18:47:08 | * | traviss joined #nim |
18:49:42 | FromDiscord | <Kiloneie> So you can't give it a value during runtime ? only compile time ? |
18:51:40 | clyybber | Kiloneie: No, but the lenght is determined at compile time. |
18:51:55 | clyybber | You cant just pass a sequence to an vararg. |
18:51:56 | FromDiscord | <Kiloneie> yeah that's what i meant okay good |
18:52:05 | clyybber | cool |
18:53:02 | Araq | alehander42: I considered it but it seemed even more work and there is no way around it anyway, we *must* cache complex macro results |
18:56:33 | FromGitter | <alehander42> Araq yes |
18:56:36 | FromGitter | <alehander42> that was my question |
18:56:47 | FromGitter | <alehander42> because i imagine two usecases? |
18:57:19 | FromGitter | <alehander42> 1 big projects: much easier to iterate if dependencies are not changed and not recompiled: iirc IC kinda solves that maybe |
18:57:31 | FromGitter | <alehander42> 2 paralelising compilation |
18:57:56 | FromGitter | <alehander42> how often do "complex macro resutls" arise |
18:59:12 | Araq | it's Nim, Nim is about macros. it's also a super useful language without macros but still |
18:59:19 | FromGitter | <alehander42> isn't it possible to somehow save those cache results as well and load them (maybe even directly memory-map them without deserialization) |
18:59:34 | Araq | oh not this again |
18:59:50 | FromGitter | <alehander42> well just wondering how hard is this all on theory |
18:59:59 | FromGitter | <alehander42> obviously nobody's doing it |
19:00:12 | FromGitter | <alehander42> actually implementing something like this :D |
19:00:24 | Araq | memory-mapping solves nothing whatsoever, it's what you bring up when you have no clue, sorry to be blunt |
19:00:37 | * | lritter joined #nim |
19:00:40 | Araq | the hard part is getting the logic right |
19:00:58 | FromGitter | <alehander42> its not very important, i just meant it as a possible small optimization |
19:01:02 | FromGitter | <alehander42> the point is the same |
19:01:06 | Araq | and the logic needs to be able to do *partial* reloads |
19:01:08 | FromGitter | <alehander42> save it and load it again somehow |
19:01:38 | Araq | reloading everything when nothing changed it easy, no need to do anything then, just reuse the built binary |
19:02:06 | Araq | the problem is to reload the modules that didn't change and to compile the modules that did change |
19:02:48 | Araq | so if your data model is "wild sharing between modules" you're in world of pain |
19:02:49 | FromGitter | <alehander42> well yeah, in the beginning i imagined it could be easy to just prepass and calculate the full module dependency graph |
19:02:57 | FromGitter | <alehander42> but i forgot all the const time evaluation |
19:03:23 | clyybber | Araq: Dumb question probably, but why can handleConstExpr not deal with an nkIntLiteral? |
19:03:33 | clyybber | Is that intentional? |
19:03:37 | Araq | btw Nim's model is "wild sharing between modules" |
19:03:43 | Araq | ... |
19:04:22 | FromGitter | <alehander42> i imagined a much simpler world where a nim module maybe can't generate import / include from macros etc: only from simple const time define/switch checks |
19:04:32 | Araq | because Nim was written like you all write code, just 'ref's everywhere, we have a GC, no problems |
19:05:21 | Araq | "I don't want to think about memory management" |
19:05:24 | FromGitter | <alehander42> yeah, but i mean even if it was not |
19:05:30 | FromGitter | <alehander42> i dont even talk about memory management here |
19:05:43 | FromGitter | <alehander42> even if we imagine a totally new impl |
19:05:44 | * | thomasross quit (Ping timeout: 276 seconds) |
19:06:02 | FromGitter | <alehander42> i feel modules are still very interconnected on language level |
19:06:29 | Araq | but I do, because that's the root issue. you "don't want to think about X" but you'll never get awesome software with this attitude. |
19:06:43 | FromGitter | <alehander42> its like you can have a macro invoking a compile time proc reading a file somewhere in the middle of module B which generates an import for A |
19:07:11 | Araq | handleConstExpr delegates to 'expr' or 'genLiteral', clyybber |
19:07:13 | FromGitter | <alehander42> so you have to somehow start semchecking / running code in vm before you even know all the final dependencies of B |
19:07:26 | * | krux02 joined #nim |
19:07:53 | FromGitter | <alehander42> i am not saying this, i am saying that the problem i see doesnt have to do only with memory management, of course i care for that too |
19:07:57 | clyybber | Araq: Yeah, but it checks n.len and that crashes with nkIntLiteral |
19:10:06 | clyybber | I wonder which path nkIntLiterals normally take.. |
19:11:04 | FromGitter | <alehander42> the problem is that i imagine if i could quickly generate a full correct graph of module imports/includes ⏎ then i could start running a subcomponent which |
19:11:48 | Zevv | heu, my compilation fails with "Hint: quit() called [QuitCalled] |
19:12:08 | * | thomasross joined #nim |
19:12:27 | FromGitter | <alehander42> runs vm , semchecks and saves state/types of a single module ⏎ and run this component in parallel for all modules that dont depend on each other |
19:12:34 | FromGitter | <alehander42> and then on the next of their children |
19:12:34 | FromGitter | <alehander42> etc |
19:13:11 | FromGitter | <alehander42> and then maybe run DCE or other things which require children to propagadate info to their parent modules |
19:13:31 | FromGitter | <alehander42> and then run the gen / ->C part in parallel again |
19:14:26 | clyybber | Zevv: Lol, awesome error. Maybe you called quit in the VM? |
19:15:07 | FromGitter | <alehander42> maybe each module will maintain its own caches but on the other hand one would utilize all cores and those module caches would be small |
19:15:49 | * | Vladar quit (Remote host closed the connection) |
19:15:50 | Zevv | clyybber: No I didnt |
19:16:15 | * | thomasross quit (Killed (orwell.freenode.net (Nickname regained by services))) |
19:16:28 | Araq | clyybber: well it assumes an array/object/tuple |
19:16:46 | Araq | simple literals are not materialized |
19:16:56 | Zevv | clyybber: hm it happens inside a newLit where I try to access a variant field that's not accessible |
19:16:56 | * | thomasross_ joined #nim |
19:16:56 | * | thomasross_ is now known as thomasross |
19:16:59 | Zevv | funny |
19:18:04 | FromGitter | <alehander42> and yes i agree one can just not share wildly: just each module would save an self sufficient object with all of its exported defs and its children would load it |
19:18:19 | clyybber | Araq: Ah ok. So what should I use instead? |
19:19:19 | Araq | well you only deal with atoms |
19:19:52 | shashlick | @disruptek did you get to try? |
19:19:54 | Araq | you don't do: obj.a = [0, 0, 0], you do for (int i = 0; i < 3; ++i) obj.a[i] = 0; |
19:20:41 | disruptek | shashlick: no, did you push it somewhere? |
19:21:01 | clyybber | ah, initLocExpr works |
19:21:03 | disruptek | ah, i see it. will try it, thanks. |
19:21:18 | * | absolutejam quit (Ping timeout: 265 seconds) |
19:21:31 | clyybber | ((NI) 7) = oo.v; |
19:21:41 | clyybber | lol |
19:23:13 | FromGitter | <alehander42> and i guess part of the current wild sharing can be replaced with some kind of id-s e.g. unique module id instead of module object ref, function header hash etc |
19:24:35 | FromGitter | <alehander42> what am i saying is, if nim was written today, generating "prebuilt" stdlib or parallely compiling several imports would be easier or no? |
19:24:37 | disruptek | shashlick: seems that nimble cannot read this .nimble. |
19:25:57 | shashlick | What version of nimble? |
19:26:01 | shashlick | Need to update? |
19:27:10 | disruptek | did you not release nimterop 0.2.0? |
19:29:10 | disruptek | ... /home/adavidoff/git/nimgit2/nimgit2_23705.nims(23, 18) Error: cannot open file: nimterop/docs |
19:29:15 | * | absolutejam joined #nim |
19:30:50 | disruptek | oh, it's my local nimterop. my bad. |
19:31:51 | * | absolutejam quit (Read error: Connection reset by peer) |
19:31:57 | disruptek | you are a sneaky devil, shashlick. |
19:32:38 | FromGitter | <alehander42> nimble |
19:32:45 | FromGitter | <alehander42> gets a lot of activity lately |
19:33:45 | * | absolutejam joined #nim |
19:36:36 | Araq | alehander42: I would focus on the "Packed AST" idea and cache the hell out of it and I won't bother with multi-threading |
19:37:14 | FromGitter | <alehander42> i guess what i am imagining might be similar to "packed" ast |
19:37:24 | Araq | yeah. |
19:37:28 | FromGitter | <alehander42> but i dont even talk about multithreading |
19:37:54 | FromGitter | <alehander42> but like running several "nim_module_compiler" binaries |
19:37:56 | FromGitter | <alehander42> in the same time |
19:38:06 | FromGitter | <alehander42> and just loading their results after that |
19:38:08 | Araq | and it's related indeed, when you do it right, you can parallelise it too |
19:38:15 | FromGitter | <alehander42> yeah, exactly |
19:39:38 | * | thomasross quit (Ping timeout: 240 seconds) |
19:43:26 | FromGitter | <EngelsDev_twitter> Hey |
19:45:22 | * | thomasross joined #nim |
19:49:30 | clyybber | Hi |
19:53:09 | * | Jesin quit (Quit: Leaving) |
19:53:27 | shashlick | @disruptek I've merged to head but not tagged 0.2.0 yet |
19:53:42 | disruptek | seems that i can'get getHeader. |
19:56:18 | shashlick | nimble install nimterop@#findspeed |
19:56:48 | disruptek | do i need to -d: some stuff even when you passed args to getHeader()? |
20:00:06 | disruptek | ahh, it's git2 not nimgit2. 😁 |
20:04:27 | FromDiscord | <Huuskes> is there any documentation that lays down the differences between c and cpp backends (is C still preferred?) |
20:04:41 | clyybber | Nice, crude POC of default fields is working.. |
20:05:27 | clyybber | Araq: Can I remove the nkSym from the Object Record kinds and instead always use nkIdentDefs? |
20:06:06 | * | lf-araujo joined #nim |
20:06:07 | clyybber | Huuskes: cpp has better performance with exceptions |
20:08:01 | * | lf-araujo quit (Remote host closed the connection) |
20:11:32 | * | narimiran quit (Remote host closed the connection) |
20:11:53 | disruptek | i can't make a -d:foo=bar work in nim.cfg is it only supported on the cli? |
20:18:31 | shashlick | Should work on nim.cfg |
20:18:42 | shashlick | git2Git, git2DL |
20:18:57 | disruptek | i'm trying to -d:git2SetVer=0.28.3 but no luck. |
20:19:13 | shashlick | Download or git |
20:19:17 | disruptek | DL |
20:19:23 | disruptek | but that i can set just fine. |
20:19:55 | disruptek | it's working for me, the wrapper i mean, so thank you very much! |
20:20:03 | shashlick | Excellent |
20:20:07 | FromGitter | <alehander42> clyybber nice |
20:20:12 | disruptek | i just want to be able to force a version to code against. |
20:21:21 | FromGitter | <alehander42> clyybber |
20:21:32 | FromGitter | <alehander42> is there a spec? e.g. what kind of values can be given, only const? |
20:22:56 | * | shomodj joined #nim |
20:23:20 | shashlick | Dl is based on url |
20:23:25 | shashlick | See github releases |
20:23:48 | shashlick | Git is git tag |
20:24:09 | disruptek | i thought the DL url is composed with the version? |
20:24:19 | Araq | clyybber: hmmm, better use fieldSym.ast for the default? |
20:24:25 | shashlick | Yes |
20:24:31 | shashlick | What's the error |
20:24:49 | disruptek | well, if i don't provide a define for the version, then it cannot download that release. |
20:25:11 | disruptek | nimterop-0.2.0/nimterop/build.nim(553, 14) `version.len != 0` Need version for download url [AssertionError] |
20:32:27 | shashlick | Yes you need to use SetVer |
20:32:53 | disruptek | yes, but i cannot determine the syntax with which to specify it in nim.cfg. |
20:33:13 | shashlick | https://github.com/libgit2/libgit2/archive/v0.28.3.zip |
20:33:19 | shashlick | Try the command line first |
20:33:26 | disruptek | i did. that works perfectly. |
20:44:03 | shashlick | Ok remember the nim.cfg only loads for current module |
20:44:06 | shashlick | Not for imports |
20:47:12 | disruptek | this is nuts. i cannot specify a build flag without replacing all the nimble tasks to build my app? |
20:48:05 | shashlick | Can you share location of your config file |
20:48:39 | disruptek | well i haven't pushed anything, but it's the nim.cfg in the root of my golden package. |
20:48:41 | shashlick | There is also setDefines |
20:49:05 | * | solitudesf quit (Ping timeout: 276 seconds) |
20:50:31 | * | uvegbot joined #nim |
20:51:14 | * | zyklon quit (Ping timeout: 240 seconds) |
20:56:51 | FromGitter | <Lecale> Hello world |
20:57:10 | disruptek | !eval echo "howdy lecale" |
20:57:12 | * | patrick_ joined #nim |
20:57:14 | NimBot | howdy lecale |
20:57:20 | * | phero joined #nim |
20:57:25 | * | phero left #nim (#nim) |
20:57:32 | * | patrick_ is now known as radsoc |
20:58:17 | * | Jesin joined #nim |
21:07:10 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:10:16 | * | nsf quit (Quit: WeeChat 2.5) |
21:20:01 | * | radsoc left #nim ("Au revoir") |
21:20:13 | shashlick | Let me see |
21:20:34 | * | daddoo joined #nim |
21:20:59 | * | radsoc joined #nim |
21:21:21 | shashlick | Don't you need the leading - for the config commands |
21:22:06 | disruptek | no, and it doesn't help anyway. |
21:24:51 | * | radsoc quit (Quit: radsoc) |
21:27:20 | lqdev[m] | I'm not sure how I should deal with object construction in rod. I was thinking about a simple `new` keyword, that wouldn't be very difficult to implement for version 0.1.0 |
21:27:29 | lqdev[m] | then I could improve it in newer versions |
21:27:41 | lqdev[m] | what do you guys think? |
21:28:38 | Zevv | ooh 1.1 goes formal proving, go araq go! |
21:30:55 | shashlick | Ok I'll try later |
21:31:20 | shashlick | As long as you are unblocked |
21:31:31 | disruptek | i'm good for awhile, thanks |
21:33:32 | shashlick | Cool |
21:33:43 | shashlick | I still need to get nimterop out officially |
21:33:55 | shashlick | Libgit2 was a good test case |
21:34:01 | shashlick | Found some limitations |
21:34:16 | shashlick | Every wrapper prompts some more tuning |
21:34:40 | clyybber | alehander42: So far only constant values. It wouldn'nt be much harder to make runtime values possible too, but I'm not sure if thats a good idea. |
21:34:51 | disruptek | every new program gives me a new nimble criticism. |
21:35:35 | clyybber | Araq: Yeah, that was my original approach, but then I have to compare all nodes in fieldSym.ast with the fields of the object. |
21:37:30 | shashlick | What's bothering you off late on nimble |
21:38:57 | disruptek | well, i suddenly realized that after compiling it, it wasn't actually replacing the binary. |
21:39:06 | clyybber | Araq: Nevermind. I'll try that approach |
21:39:29 | disruptek | turns out it hid the binary elsewhere. then i removed the old binary and reinstalled the app and it didn't replace the binary in nimble's bin dir. |
21:39:48 | disruptek | now that i'm running the right binary, i realize that i'm not successfully initializing libgit. |
21:40:03 | * | daddoo left #nim ("Leaving") |
21:42:17 | shashlick | Are you using nimble build |
21:42:28 | shashlick | I typically do nimble develop and build |
21:42:38 | disruptek | no, because i have to build it manually so that i can specify the version of libgit2. |
21:42:55 | disruptek | kinda irrelevant. |
21:43:24 | * | absolutejam quit (Ping timeout: 265 seconds) |
21:51:12 | shashlick | Which file are you compiling |
21:51:15 | shashlick | Looking at your repo |
21:51:20 | disruptek | src/golden.nim |
21:51:21 | shashlick | And which dir |
21:55:07 | shashlick | And where is nimgit2 imported |
21:55:31 | disruptek | it's not, because i cannot make it work. |
21:56:19 | disruptek | ie. i can call git_libgit2_init() but it throws an error which i can only read with git_error_last(), but that symbol isn't in the wrapper somehow. |
21:57:33 | disruptek | i thought maybe i was binding to my system libgit2 but, nope. |
22:02:30 | * | nif quit (Quit: ...) |
22:02:40 | * | nif joined #nim |
22:05:52 | * | nif quit (Client Quit) |
22:06:03 | * | nif_ joined #nim |
22:11:04 | lqdev[m] | anyone has some suggestions about my object constructor problem? |
22:15:54 | clyybber | lqdev[m]: What problem? |
22:16:04 | clyybber | Oh, I see |
22:16:19 | disruptek | lqdev: your first impl doesn't need to be your last. |
22:16:35 | lqdev[m] | I was thinking about something similar to Nim, but I'm worried about syntax ambiguity |
22:16:43 | clyybber | Why dont just make every object have a function that shares the name and constructs the object? |
22:16:53 | lqdev[m] | hmm |
22:17:07 | lqdev[m] | because field order is annoying |
22:17:34 | clyybber | With optional names? |
22:18:00 | lqdev[m] | I want my first implementation to be simple, so that's sorta out of the question |
22:18:27 | lqdev[m] | I'll try doing what Nim does with `SomeObj(field1: 42, field2: "hello")` |
22:20:01 | lqdev[m] | though for implementation simplicity, I'll likely require all fields to be initialized |
22:20:02 | lqdev[m] | it can be improved upon later |
22:21:56 | FromDiscord | <Kiloneie> Here you go another tutorial video: https://youtu.be/THOQLLT9RJk |
22:21:56 | FromDiscord | <Kiloneie> Don't drink and drive people... or drink and make videos o,o. |
22:30:43 | * | thomasross quit (Ping timeout: 245 seconds) |
22:34:22 | * | thomasross joined #nim |
22:43:01 | clyybber | gn8 |
22:43:04 | * | clyybber quit (Quit: WeeChat 2.6) |
22:45:31 | disruptek | shashlick: https://github.com/disruptek/golden/releases/tag/1.1.2 -- provide a git2SetVer define and this will attempt to link and init it, etc. |
22:48:51 | * | asymptotically quit (Quit: Leaving) |
22:52:34 | * | actuallybatman joined #nim |
23:02:12 | * | Jjp137 quit (Read error: Connection reset by peer) |
23:04:25 | * | Jjp137 joined #nim |
23:10:57 | * | krux02_ joined #nim |
23:12:02 | shashlick | Note that git2Static doesn't work until you rebuild which means deleting build |
23:12:13 | shashlick | Cause their cmake only builds one or the other |
23:12:42 | disruptek | ah i just did that and now everything's different. |
23:12:55 | disruptek | got further but now i have a gcc error. |
23:13:21 | disruptek | still not recognizing git_error i guess. |
23:14:41 | * | krux02 quit (Ping timeout: 250 seconds) |
23:15:37 | shashlick | I think nimterop isn't wrapping it |
23:15:46 | shashlick | Just add it manually to cOverride for now |
23:15:52 | shashlick | If possible |
23:16:03 | disruptek | tried the static build and now i get link errors; i need to add ssl and maybe something else. |
23:17:27 | * | drewr quit (Ping timeout: 264 seconds) |
23:20:31 | disruptek | okay, static is a mistake. 😀 after i add git_error in cOverride, how can i flesh out the object? i guess i need to export fields? |
23:20:53 | disruptek | okay, that works. |
23:20:56 | shashlick | Ya need to add those to nimgit2 |
23:21:06 | shashlick | Depends what cmake finds |
23:21:36 | disruptek | segv when i try to access it, though. hmm. |
23:21:52 | disruptek | it might actually be null. |
23:22:56 | * | Jjp137 quit (Ping timeout: 240 seconds) |
23:30:22 | disruptek | omfg it's working. unlike all the other api methods, it returns the number of successful inits. a non-zero return is thus a signal of correctitude. |
23:30:32 | disruptek | unbelievable. no wonder there's no error. i'm an idiot. |
23:30:42 | disruptek | you did it, shashlick, thank you again. 😁 |
23:49:37 | * | actuallybatman quit (Quit: leaving) |
23:50:44 | * | actuallybatman joined #nim |