00:00:03 | * | lritter quit (Quit: Leaving) |
00:15:03 | krux02 | telara{a: those values are not equal, because floating point is slightly unprecise and non-deterministic. |
00:15:45 | * | krux02 quit (Remote host closed the connection) |
00:25:39 | * | Cthalupa quit (Ping timeout: 248 seconds) |
00:26:13 | * | Cthalupa joined #nim |
00:48:58 | FromGitter | <bevo009> Is there a site or document that lists the emojis Nim can use? |
00:49:22 | FromGitter | <bevo009> like 👋 |
00:49:56 | FromGitter | <bevo009> 👋 |
01:21:11 | * | seni quit (Remote host closed the connection) |
01:25:43 | * | Mister_Magister quit (Ping timeout: 258 seconds) |
01:32:21 | FromGitter | <genotrance> *Due to a high volume of activity, we are not displaying some messages sent by this application. • http://api.slack.com/docs/rate-limits* |
01:33:29 | * | shashlick joined #nim |
01:38:20 | * | Mister_Magister joined #nim |
02:09:34 | leorize | @bevo009: as long as they are UTF-8, they're supported |
02:27:45 | * | abm quit (Quit: Leaving) |
02:57:19 | * | laaron quit (Remote host closed the connection) |
03:01:19 | * | laaron joined #nim |
03:07:46 | FromGitter | <Varriount> Windows Users: https://devblogs.microsoft.com/commandline/windows-terminal-preview-v0-3-release/ |
03:37:13 | * | aexoxea joined #nim |
03:42:22 | * | dddddd quit (Remote host closed the connection) |
03:58:26 | * | laaron quit (Remote host closed the connection) |
04:00:11 | * | laaron joined #nim |
04:27:52 | * | snifftek joined #nim |
04:31:03 | * | zcarter joined #nim |
04:34:19 | FromGitter | <cark> I'm trying to write a zip file, it works well enough if i add an existing file to the archive (though i have to use {.passl: "-lz".}) |
04:34:38 | FromGitter | <cark> but what i really want to do is write the file with data from memory |
04:35:01 | zcarter | already compresed or uncompressed data? |
04:35:17 | FromGitter | <cark> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d450f05ee80d76164dc069c] |
04:35:32 | FromGitter | <cark> that's what i'm doing, and it works on linux |
04:35:58 | FromGitter | <bevo009> @leorize yeah but where do you guys copy these UTF-8 emojis from? ⏎ Do they have to be installed on your pc? ⏎ I'm on win10 using wsl ubuntu and vscode/vim ⏎ If I click <win-.> in vscode there is a small searchable window to insert one, but I'd rather just copy/paste from a list if it exists somewhere [https://gitter.im/nim-lang/Nim?at=5d450f2e7a151629e1147f63] |
04:36:19 | FromGitter | <cark> but it doesn't on windows, i end up with a 200mb text file in my zip |
04:36:47 | FromGitter | <cark> @zcarter, in memory data is not compressed |
04:37:15 | zcarter | I think you're going to have to become more familiar with the libzip interface cark - it's not as simple as just creating a file and writing it out |
04:37:24 | zcarter | you have to create a file and then add sources to it from what I remember |
04:37:55 | zcarter | and the sources can be added via a pointer - so you can use what's already in memory |
04:38:05 | FromGitter | <cark> i'm using the zip/zipfiles interface provided byt the zip nimble package |
04:38:09 | zcarter | probably want to read up here - https://libzip.org/documentation/ |
04:38:22 | FromGitter | <cark> so go metal then =) |
04:38:23 | zcarter | oh - I don't know anything about that package |
04:38:40 | zcarter | well - if someone has already wrapped it - I imagine you use their library in a similar way |
04:38:50 | zcarter | just need to make sure you know how the API works |
04:38:59 | FromGitter | <bevo009> @Varriount does the new terminal preview support git-bash yet, or just wsl? |
04:39:30 | FromGitter | <cark> well the addFile function seems to be doing that, and actually works on linux, so that's a windows bug i guess. |
04:39:46 | FromGitter | <cark> the zip package is part of the nim project i think |
04:40:13 | zcarter | yeah - I just saw that - interesting |
04:40:31 | zcarter | yeah - I see the `addFile` that takes in a stream now hmm |
04:41:08 | FromGitter | <cark> shoul I maybe create an issue on github ? what's the preferred way to interract with maintainers ? |
04:41:58 | disruptek | github issues are best. |
04:42:10 | FromGitter | <cark> very nice, thanks guys ! |
04:42:24 | disruptek | thanks for the testing. ;-/ |
04:47:37 | * | nsf joined #nim |
04:52:40 | * | zcarter is now known as zacharycarter |
04:54:10 | * | zacharycarter quit (Quit: leaving) |
04:56:36 | * | zacharycarter joined #nim |
05:02:31 | * | kungtotte quit (Quit: WeeChat 2.5) |
05:03:01 | * | kungtotte joined #nim |
05:25:22 | * | solitudesf joined #nim |
05:57:31 | * | laaron quit (Remote host closed the connection) |
06:00:06 | * | laaron joined #nim |
06:04:11 | * | nsf quit (Quit: WeeChat 2.4) |
06:04:39 | FromGitter | <alehander42> ooh zcarter new nick |
06:12:10 | zacharycarter | well I'm finally using IRC again |
06:12:33 | zacharycarter | although I always use IRC for like a week and then switch back to gitter - this time I'm going to try to make the move permanent |
06:12:46 | FromGitter | <alehander42> i had similar moves |
06:12:53 | FromGitter | <alehander42> with <alexander92> as irc account |
06:14:58 | zacharycarter | gitter is so bad but also so convenient |
06:20:53 | kungtotte | IRC is better though :) It's plain text, works anywhere, you can use any client you want. And right now weechat is using 33MB of RAM for me :) |
06:27:55 | zacharycarter | I don't disagree |
06:32:47 | * | jjido joined #nim |
06:54:45 | Zevv | zacharycarter: welcome to the dark side! |
06:55:10 | Zevv | now I can at least properly tab-expand your nick! |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:19 | zacharycarter | :P |
07:00:24 | zacharycarter | my irc client is very dark |
07:00:30 | zacharycarter | like black |
07:00:48 | zacharycarter | I guess it's the default for irssi |
07:04:33 | * | gmpreussner joined #nim |
07:08:50 | zacharycarter | with `-d:danger` my program crashes :/ |
07:08:54 | zacharycarter | but it runs fine with `-d:release` |
07:19:48 | FromGitter | <alehander42> i use weechat |
07:19:57 | FromGitter | <alehander42> but currently gitter again easier in firefox |
07:34:46 | * | nsf joined #nim |
07:48:33 | Zevv | zacharycarter: you see, that is why the call it 'danger'! |
07:49:19 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:14:21 | * | stefanos82 joined #nim |
08:14:39 | * | krux02 joined #nim |
08:15:08 | * | laaron quit (Remote host closed the connection) |
08:19:20 | * | laaron joined #nim |
08:22:09 | * | laaron quit (Client Quit) |
08:23:32 | * | laaron joined #nim |
08:30:31 | FromGitter | <Riderfighter> Hello. everyone 👋 |
08:31:08 | Zevv | oi riderfighter |
08:32:27 | FromGitter | <alehander42> hey |
08:32:35 | FromGitter | <alehander42> btw somebody used swift with gdb? |
08:32:43 | FromGitter | <alehander42> trying to test how it works on ubuntu |
08:32:59 | FromGitter | <alehander42> it seems it works fine with lldb + `-g` |
08:34:07 | FromGitter | <alehander42> hmm it works now with gdb but |
08:36:18 | FromGitter | <alehander42> ok |
08:42:06 | * | ng0 joined #nim |
09:05:08 | * | Vladar joined #nim |
09:08:31 | krux02 | alehander42: this chat is for Nim not swift. |
09:08:54 | * | Trustable joined #nim |
09:09:47 | krux02 | you are talking about a programming language from apple. A company that made "gcc" an alias for "clang" on their system and that ships with an ancient version of gdb, probably to show how superior lldb is compared to gdb. |
09:10:23 | FromGitter | <alehander42> sorry, got offtopic |
09:10:38 | krux02 | I don't think there is any interest for apple to improve gdb - swift usability. |
09:11:10 | krux02 | I wouldn't be surprised if on macos "gdb" will becomen an alias for "lldb" |
09:11:31 | FromGitter | <alehander42> they're not so compatible at all |
09:11:40 | FromGitter | <alehander42> but yeah i also dislike their support |
09:11:43 | FromGitter | <alehander42> for those |
09:12:06 | krux02 | it is not just tha lack of support that |
09:12:26 | krux02 | bothers me, it is their interest to let those alternatives fail on their platform. |
09:12:29 | FromGitter | <alehander42> to be clear(no confusion), the linux swift version did work fine under gdb, just took some time for me to figure it out |
09:12:41 | FromGitter | <alehander42> but yeah, it seems typical from apple |
09:12:52 | FromGitter | <alehander42> to limit stuff to their approved software stacks |
09:12:57 | FromGitter | <alehander42> so not really surprised |
09:13:36 | FromGitter | <alehander42> look at objective-c/the whole ios thing/swift/their ui frameworks and ide-s/everything |
09:13:41 | FromGitter | <alehander42> that's just the way they do things |
09:15:58 | FromGitter | <alehander42> back to nim: ill write later today quick issues for my async pr ideas |
09:17:04 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
09:17:45 | * | laaron joined #nim |
09:17:51 | FromGitter | <mratsim> Not only GDB, they invented co-invented OpenCL, promoted OpenGL, and created Webkit |
09:18:18 | FromGitter | <mratsim> Look at the state of those on MacOSX |
09:18:51 | FromGitter | <mratsim> OpenCL: deprecated, no Alternative. OpenGL: deprecated, Metal alternative (but why not Vulkan). |
09:19:20 | * | jjido joined #nim |
09:20:12 | FromGitter | <mratsim> Webkit, it's nice to have an alternative to the chrome engine (even Microsoft switched to Chrome) but Safari feels like a second class citizen in Apple portfolio even though people have their browser open like 100% of their time |
09:20:29 | FromGitter | <mratsim> anyway |
09:24:29 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:30:15 | FromGitter | <mratsim> Can someone reproduce https://github.com/nim-lang/Nim/issues/11875 (compile with --threads:on) |
09:32:15 | FromGitter | <Riderfighter> Yeah it hangs |
09:32:24 | FromGitter | <Riderfighter> Doesn't seem to produce any threads either on macos |
09:33:22 | FromGitter | <Riderfighter> just kidding, we got 2 threads :D |
09:34:07 | FromGitter | <mratsim> thanks. mmmh I wonder why my machine doesn't hang |
09:34:56 | FromGitter | <Riderfighter> same :L |
09:35:16 | FromGitter | <Riderfighter> Technically the executable hasn't hung yet |
09:36:26 | FromGitter | <Riderfighter> its still doing stuff and therefore hasn't stopped responding, its just not doing what it's supposed to |
09:42:37 | FromGitter | <alehander42> @mratsim but what happens? does it finish |
09:42:55 | FromGitter | <mratsim> for me I get CLI control back |
09:43:07 | FromGitter | <mratsim> but according to bug report it always hangs |
09:43:09 | FromGitter | <alehander42> ah |
09:43:13 | FromGitter | <alehander42> it doesnt hang always |
09:43:15 | FromGitter | <alehander42> but sometimes it does |
09:43:53 | * | rayman22201 quit (Ping timeout: 252 seconds) |
09:43:53 | * | dashed quit (Ping timeout: 252 seconds) |
09:44:00 | FromGitter | <alehander42> those bugs are hard to reproduce |
09:44:05 | * | rayman22201 joined #nim |
09:44:14 | * | odc quit (Ping timeout: 252 seconds) |
09:44:53 | FromGitter | <mratsim> well non-determinism being hard to reproduce is a given ;) |
09:44:59 | * | nuxdie quit (Ping timeout: 252 seconds) |
09:45:00 | FromGitter | <alehander42> and i am not sure if rr can do it |
09:45:18 | FromGitter | <alehander42> i mean, it can reproduce that stuff in async programs easily |
09:45:26 | FromGitter | <alehander42> but not sure about multithreading |
09:45:43 | * | dashed joined #nim |
09:45:59 | FromGitter | <Riderfighter> On macOS the program definitely doesn't finish execution once it reaches sync(), but it doesn't actually hang |
09:47:10 | FromGitter | <alehander42> oh chaos mode does it! |
09:47:24 | * | odc joined #nim |
09:47:27 | * | nuxdie joined #nim |
09:47:43 | FromGitter | <alehander42> great, now i have a reproduction without debug symbols |
09:47:44 | FromGitter | <alehander42> :D |
09:49:12 | * | emery joined #nim |
09:59:38 | * | lritter joined #nim |
10:16:05 | FromGitter | <alehander42> @krux02 can we add |
10:16:09 | FromGitter | <alehander42> -O0 somehow to debug flags |
10:16:23 | FromGitter | <alehander42> -Og sometimes leads to optimized out variables |
10:16:26 | FromGitter | <alehander42> which is not good enough |
10:16:44 | FromGitter | <alehander42> (i override it with cfg, but maybe its a good default) |
10:22:19 | * | laaron quit (Remote host closed the connection) |
10:25:17 | * | laaron joined #nim |
10:45:57 | * | laaron quit (Remote host closed the connection) |
10:46:48 | * | nsf quit (Quit: WeeChat 2.4) |
10:47:06 | * | emery quit (Quit: leaving) |
10:50:42 | * | laaron joined #nim |
10:52:27 | * | ehmry joined #nim |
10:58:00 | FromGitter | <alehander42> hm i think i fixed the issue @mratsim |
10:58:21 | FromGitter | <alehander42> but .. not sure if it makes sense, i logged and debugged and found out two things: |
10:58:48 | FromGitter | <alehander42> sync expects ready workers to be the first n of workersData which is not true always |
10:59:31 | FromGitter | <alehander42> so if you just count them , those cases seem to work fine (or maybe its a bug that there are gaps between ready workers? |
10:59:46 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
10:59:47 | FromGitter | <alehander42> and the other thing is .. if you set minPoolSize to 1 |
10:59:58 | FromGitter | <alehander42> 1) the count fix |
11:00:05 | FromGitter | <alehander42> it seems to work fine |
11:00:06 | * | laaron joined #nim |
11:00:16 | FromGitter | <alehander42> because often actually it uses 1 or 2 workers |
11:00:26 | FromGitter | <mratsim> I don't know the current threadpool impl well enough. Never used it because OpenMP was always enough for my use cases so far and easier to use. |
11:00:30 | FromGitter | <alehander42> but probably it creates additional because of minPoolSize |
11:00:35 | FromGitter | <alehander42> so they stay "not ready" |
11:00:39 | FromGitter | <alehander42> which is not really true |
11:00:58 | FromGitter | <alehander42> but i have no idea what minPoolSize is, so maybe it has to be 4 |
11:01:09 | FromGitter | <alehander42> me too : i just debugged it for some debugging experience |
11:14:27 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
11:18:58 | * | laaron joined #nim |
11:23:58 | * | sagax quit (Quit: Konversation terminated!) |
11:26:53 | * | dddddd joined #nim |
11:41:01 | * | MarderIII joined #nim |
11:43:07 | * | Warkruid joined #nim |
11:43:21 | * | Warkruid quit (Remote host closed the connection) |
11:47:07 | * | dgreen quit (Ping timeout: 245 seconds) |
11:47:57 | * | MarderIII quit (Read error: Connection reset by peer) |
11:49:12 | * | MarderIII joined #nim |
11:49:42 | * | krux02 quit (Remote host closed the connection) |
11:51:07 | livcd | any more controversy about d:danger and d:release that i missed ? |
11:56:33 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
12:00:14 | * | MarderIII quit (Remote host closed the connection) |
12:01:56 | * | laaron joined #nim |
12:11:10 | * | NimBot joined #nim |
12:21:04 | * | nsf joined #nim |
12:45:04 | * | Kaivo joined #nim |
12:55:58 | * | jjido joined #nim |
13:07:28 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
13:11:53 | * | laaron joined #nim |
13:24:38 | * | Kaivo quit (Remote host closed the connection) |
13:31:39 | * | nsf quit (Quit: WeeChat 2.4) |
13:32:39 | * | go|dfish joined #nim |
13:49:02 | * | go joined #nim |
13:50:13 | go | What am I doing wrong here? https://play.nim-lang.org/#ix=1Que |
13:50:36 | go | the input is int, but expected int |
13:50:40 | go | silly |
13:55:31 | disruptek | you indicated that a, y are identical types, but you passed disparate types to the template. |
13:57:01 | disruptek | go: ^ |
13:57:02 | go | a, y are int or float32 |
13:57:24 | disruptek | right; `or` means one or the other, not both. |
13:57:24 | go | or? |
13:58:04 | disruptek | if you don't want to type-check, use an `untyped` type argument, as in `x: untyped`. |
13:58:26 | FromGitter | <ahcm> what are the expectations on the js backend? Can one just run the .js? |
13:58:40 | disruptek | yes. |
13:58:53 | livcd | go: try to pass just float32 or int |
13:59:06 | FromGitter | <ahcm> hmm, even File I/O and os args? |
13:59:25 | livcd | you need nodejs for that |
13:59:25 | FromGitter | <ahcm> Because I get errors, like args is not supported on Switch ?!? |
13:59:30 | go | I dont understand, the input is int|float32, and so is the output |
13:59:32 | disruptek | the js backend has no streams support, iirc. |
13:59:53 | FromGitter | <ahcm> gives: ReferenceError: fopen is not defined |
14:00:11 | livcd | go: you can either pass int or float32 not a mix |
14:00:24 | disruptek | you can mix them, but that's not what your code says is going to happen. |
14:00:46 | FromGitter | <ahcm> Error: Error: unhandled exception: paramCount is not implemented on Nintendo Switch [OSError] |
14:00:57 | disruptek | it says, "hey, you'll get a type for this generic, T, which will be int or float32." the two args you receive will be of that type, too, as will the return type." |
14:01:14 | livcd | disruptek: ahh |
14:01:34 | disruptek | if you want to handle two different types, name two different generics. |
14:02:18 | go | disruptek, i want to mix the types, thats the point |
14:02:20 | disruptek | foo[T: int, V: float32](t: T; v: V): T = (do something with an int and a float and return an int) |
14:03:07 | disruptek | then use `untyped`. |
14:04:54 | go | `template pytagora[T: untyped](a, y: T): untyped = sqrt(a*a + b*b)` is the same error |
14:06:08 | disruptek | yes, well, that code uses a typed function call. ;-) |
14:09:31 | FromGitter | <Vindaar> @go: https://play.nim-lang.org/#ix=1Qul |
14:10:30 | * | ehmry quit (Remote host closed the connection) |
14:10:56 | go | ughhh i see now |
14:11:29 | go | you must define the type for EACH of the inputs |
14:11:40 | go | tnx :) |
14:11:58 | * | ehmry joined #nim |
14:17:20 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:34:28 | * | sagax joined #nim |
14:39:03 | FromGitter | <haxscramper_gitlab> Hello! Does anyone here use `nim-mode` for emacs? I'm trying to get started with it but `nimsuggest` keep dying with error `Cannot find Nim standard library: Nim compiler not in PATH [IOError]`. I installed nim using *choosenim* script. |
14:41:50 | lqdev[m] | @haxscramper_gitlab what do you get when you type in `nim` in your terminal? |
14:43:30 | FromGitter | <haxscramper_gitlab> Help message from compiler. `which nim` also works correctly as well as `exec-path` variable in emacs. |
14:44:38 | FromGitter | <haxscramper_gitlab> I'm able to compile files and install packages using nimble without any problems too. |
14:46:41 | go | I dont understand why you have to define T: float|int for every input |
14:47:44 | go | imagine you have T : int8|uint8|int16|uint16|int32|uint32|float32|float |
14:47:55 | go | and 6 input vars |
14:47:59 | go | haha |
14:50:06 | FromGitter | <Vindaar> then you define a type that represents those `or` types, like: https://nim-lang.github.io/Nim/system.html#SomeSignedInt ⏎ and if you have a proc that takes 6 parameters and for each you allow any number of different types, you should really rethink what you're trying to do |
14:51:46 | go | :) |
14:54:09 | go | I thouth a: int, b: int is same as a, b: int |
14:54:15 | go | applies for T |
14:57:21 | * | laaron- joined #nim |
15:00:36 | * | laaron quit (Ping timeout: 260 seconds) |
15:18:26 | zacharycarter | Zevv: I think my `-d:danger` issues is because I am using threads maybe |
15:23:28 | * | leorize quit (Ping timeout: 260 seconds) |
15:23:44 | * | EastByte_ quit (Ping timeout: 268 seconds) |
15:34:09 | lqdev[m] | is there a way of suppressing unused import warnings in #devel? I have a few modules which I import only for their side effects, and the unused import warnings really bother me |
15:34:09 | * | laaron- quit (Quit: ZNC 1.7.1 - https://znc.in) |
15:34:43 | * | laaron joined #nim |
15:37:37 | * | EastByte_ joined #nim |
15:38:24 | * | leorize joined #nim |
15:39:55 | FromDiscord_ | <treeform> I think your problem is "import only for their side effects", why not make a function that does the side effects and call it? |
15:50:40 | * | chimez joined #nim |
16:06:21 | * | krux02 joined #nim |
16:07:14 | disruptek | the unused import warnings are broken, so you're probably responding to a bug. |
16:10:05 | * | nsf joined #nim |
16:26:58 | * | jjido joined #nim |
16:31:45 | disruptek | what version of C does nim compile to? |
16:38:51 | solitudesf | c89 i think |
16:41:09 | FromGitter | <haxscramper_gitlab> If anyone uses `nim-lsp`, could you please share your configuration? |
16:44:43 | * | aexoxea quit (Quit: Goodbye!) |
16:46:37 | FromGitter | <SolitudeSF> nimlsp doesnt have configuration. you probably want editor configuration? |
16:47:21 | FromGitter | <haxscramper_gitlab> Yes, emacs configuration of course |
16:50:07 | * | go quit (Ping timeout: 260 seconds) |
16:50:16 | FromGitter | <SolitudeSF> https://github.com/search?l=Emacs+Lisp&q=nimlsp&type=Code there is not much, emacs users probably use nimsuggest or nothing. |
16:52:05 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
17:00:11 | leorize | disruptek: C99 last time I checked |
17:00:12 | FromGitter | <kayabaNerve> solitudesf: IIRC it tries to compile to C89, yet that isn't guaranteed. |
17:00:36 | FromGitter | <kayabaNerve> Araq doesn't like C((. |
17:00:39 | FromGitter | <kayabaNerve> (99 |
17:00:43 | FromGitter | <kayabaNerve> **99 |
17:01:08 | disruptek | makes sense. |
17:01:21 | FromGitter | <kayabaNerve> I remember this being a huge thing. Someone asked what spec to target, asked C99, Araq said he strongly disliked it, and liked C89. I believe he then said attempt C89, yet didn't enforce it. |
17:01:40 | FromGitter | <kayabaNerve> ... notable thing. Maybe not huge. |
17:03:30 | Zevv | maybe we can be just like lua. I always try the last releases on '89 turbo-C on dos, and it still works every time |
17:03:35 | FromGitter | <kayabaNerve> https://irclogs.nim-lang.org/20-06-2018.html |
17:04:05 | FromGitter | <kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d45be857c87746165069054] |
17:04:08 | disruptek | turbo-c, those were the days. |
17:04:17 | FromGitter | <kayabaNerve> Underscores added to not ping everyone needlessly. |
17:05:46 | FromGitter | <kayabaNerve> Hope I helped |
17:06:28 | FromGitter | <SolitudeSF> gitter got you anyway |
17:06:37 | FromGitter | <SolitudeSF> *transformed it to codepaste |
17:07:04 | FromGitter | <kayabaNerve> I did that on purpose. |
17:07:48 | FromGitter | <kayabaNerve> Got that triple ` |
17:08:05 | disruptek | did you know you can get this link: https://irclogs.nim-lang.org/20-06-2018.html#22:20:00 by clicking on the timestamp of the relevant line? |
17:10:18 | leorize | I didn't manage to get nim working with gcc2, which only supports c89 |
17:10:33 | leorize | probably the compiler uses some gcc > 3 features :P |
17:11:55 | * | chimez quit (Ping timeout: 246 seconds) |
17:12:17 | FromGitter | <kayabaNerve> I did not. Thanks for the info. |
17:12:27 | FromGitter | <kayabaNerve> ... why on earth would you try that |
17:12:40 | disruptek | i dunno, but it's handy. |
17:12:56 | FromGitter | <kayabaNerve> I meant GCC 2 :P |
17:13:12 | leorize | well, gcc 2 is what haiku uses on 32bit x86 :P |
17:13:35 | FromGitter | <kayabaNerve> Horrific |
17:13:41 | FromGitter | <kayabaNerve> But a proper explanation |
17:17:00 | FromGitter | <haxscramper_gitlab> @SolitudeSF Thanks a lot! That really helped. Although nimlsp dies immediately after start, but I suggest that it is related to my previous issue (`nimsuggest` when used with nim-mode dies because it can't find nim standart library) which is more likely to be an emacs issue rather than something related to nimlsp or nimsuggest. |
17:18:04 | solitudesf | nimlsp should be either compiled pointing to nim location, or it must be launched with nim location as an argument |
17:21:58 | FromGitter | <haxscramper_gitlab> I |
17:25:12 | FromGitter | <haxscramper_gitlab> I'm not using any unexpected locations for nim (or `~/.nimble/bin` is something out of ordinary? Considering I have `$PATH` correctly set up in shell and emacs). If I do `nimsuggest somefile.nim` everything works correctly. I only get the same error when I have `$PATH` absolutely empty, otherwise everything works fine. |
17:28:18 | solitudesf | no, not the binary location, the location of nim installation itself. the folder with lib/, bin/, config/. if you installed it with choosenim its in .choosenim/toolchains/ |
17:29:52 | * | MH026 joined #nim |
17:29:58 | disruptek | haxscramper: are you able to build nim programs that use the stdlib? |
17:30:19 | FromGitter | <haxscramper_gitlab> Yes, no problem. Build programs/install packages using nimle |
17:31:25 | disruptek | so you're certain that nim can find the stdlib but nimsuggest cannot? |
17:31:28 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
17:32:25 | FromGitter | <haxscramper_gitlab> I'm more or less certain, but if you tell me how I can test this for sure I will do it. |
17:32:58 | * | jjido quit (Read error: Connection reset by peer) |
17:33:25 | disruptek | well, if you can build a program that uses the stdlib, that's one. |
17:33:42 | disruptek | i don't run nimsuggest directly and really don't know anything about it. |
17:34:26 | disruptek | i just have a feeling that maybe you're not running the same nim as is adjacent to your nimsuggest binary. |
17:35:22 | * | laaron joined #nim |
17:35:36 | FromGitter | <haxscramper_gitlab> ```# cat test.nim ⏎ import os ⏎ echo getEnv("HOME") ⏎ # nim c test.nim ⏎ # ./test``` ⏎ ⏎ Something like this? Absolutely no problems whem building, everything work as expected [https://gitter.im/nim-lang/Nim?at=5d45c5e84635976e0423eb5c] |
17:36:28 | disruptek | okay, and `which nim` and `which nimsuggest` identify sibling nodes in the same directory? |
17:37:19 | FromGitter | <haxscramper_gitlab> Yes |
17:37:31 | * | chimez joined #nim |
17:37:48 | disruptek | i guess this is a good opportunity to switch to vim. :-P |
17:37:50 | FromGitter | <haxscramper_gitlab> Also `echo $PATH | tr ' ' \n | sort | uniq | xargs -i sh -c 'ls -1 {} | grep nim && echo {}'` shows that there is only one `nimsuggest` and `nim` in the whole path |
17:38:48 | disruptek | you could shim it and see how emacs is calling it, then debug the issue outside of emacs. |
17:49:38 | FromGitter | <Riderfighter> Hello disruptek :D |
17:50:06 | disruptek | sup 'fighter |
17:50:22 | FromGitter | <Riderfighter> working on anything cool today? |
17:51:04 | disruptek | openapi; apparently, i have to do it in a macro because it's too big a pita to compose ast at runtime...(?) |
17:51:14 | disruptek | how about you? |
17:51:25 | FromGitter | <Riderfighter> I'm making my own cryptolib atm |
17:51:38 | FromGitter | <Riderfighter> I've just finished porting evpKDF from openssl to nim :D |
17:51:44 | disruptek | nothing like homemade crypto. |
17:51:48 | FromGitter | <Riderfighter> haha |
17:51:50 | FromGitter | <Riderfighter> exactly |
17:52:03 | zacharycarter | anyone familiar enough with Nim's VM to help me figure out how to add a constant? |
17:52:08 | disruptek | wtf is evpKDF? |
17:52:19 | FromGitter | <Riderfighter> its openssls Key Derivative Function |
17:52:25 | FromGitter | <Riderfighter> its some weird thing they implemented |
17:52:33 | * | chimez quit (Ping timeout: 245 seconds) |
17:52:35 | FromGitter | <Riderfighter> let me send what it looks like in nim |
17:52:44 | disruptek | those crazy hungarians... |
17:52:48 | FromGitter | <Riderfighter> ikr |
17:52:50 | FromGitter | <Riderfighter> https://dsh.re/1fe94 |
17:53:34 | disruptek | you bettah not let anyone else see that camelcase; they will shit a brick on here. |
17:53:41 | FromGitter | <Riderfighter> oh gosh |
17:53:42 | disruptek | er, snakecase, too. |
17:53:47 | FromGitter | <Riderfighter> noo |
17:54:16 | zacharycarter | I don't mind snake case |
17:54:17 | FromGitter | <Riderfighter> the only langs I code in use both snakecase/camelcase |
17:54:47 | FromGitter | <Riderfighter> the only reason I opted out for snakecase in the snippet I sent is because I want to read my variables before I convert them to a letter in A..Z |
17:54:48 | disruptek | guess it's time to cut python loose. |
17:55:21 | disruptek | why convert them to a letter? you knucklehead, you're the guy i have to go aroun' behind, turning singletons into words. |
17:55:30 | FromGitter | <Riderfighter> lmao |
17:55:49 | FromGitter | <Riderfighter> I was just kidding about the letter don't worry |
17:56:02 | zacharycarter | I really like prefixing private variable names with an underscore |
17:56:13 | FromGitter | <Riderfighter> same |
17:56:17 | FromGitter | <Riderfighter> I do it all the time in python |
17:56:20 | disruptek | Zevv: did you end up transistioning to syntax highlighting? |
17:56:46 | FromGitter | <Riderfighter> lmao |
17:56:52 | FromGitter | <Riderfighter> firing shots left and right :P |
17:57:45 | disruptek | i've gotten so dependent upon it. |
17:57:56 | * | nsf quit (Quit: WeeChat 2.4) |
17:58:42 | FromGitter | <Riderfighter> my next goal for my homemade crypto lib is implementing a version of the Socialist millionaire protocol |
17:59:03 | FromGitter | <Riderfighter> comparing if you and another person have the same number without actually saying your number :P |
18:03:18 | zacharycarter | hmm - adding a proc to nimscript is easy enough - but I can't figure out how to define and expose a constant |
18:06:44 | Zevv | disruptek: yes, I ded! |
18:08:43 | Zevv | Then I gradually tweaked and changed everything to my liking. Now it looks like this: http://zevv.nl/div/highlighting.png |
18:22:14 | krux02 | that is some bare bones syntax highlighting |
18:23:09 | zacharycarter | krux02: are you familiar with the VM at atll? |
18:23:21 | krux02 | yes |
18:23:30 | krux02 | the nimvm I know pretty well |
18:23:41 | zacharycarter | do you know how I would add a constant? |
18:23:51 | zacharycarter | I know how to add vm hook callbacks |
18:24:01 | zacharycarter | but I want to define a constant and expose it to nimscript |
18:24:06 | krux02 | what do you mean with constant? |
18:24:20 | zacharycarter | sp O |
18:24:28 | zacharycarter | sorry - so I'm using https://github.com/Serenitor/embeddedNimScript |
18:25:02 | zacharycarter | and Araq helped me learn about astalgo and using the debug template to figure out how to create get / setResult for custom vm hooks |
18:25:20 | krux02 | hmm, I only work on nimvm used for macros. |
18:25:26 | zacharycarter | ah okay |
18:25:36 | krux02 | there you can just define a constant, and it just works. |
18:26:08 | zacharycarter | well - I'm having trouble importing a nim module from my nimscript module - there might be another way to approach this, I'll have to see |
18:27:05 | krux02 | I don't understand where the problem is though. |
18:27:12 | * | MH026 quit (Remote host closed the connection) |
18:27:19 | krux02 | what is holding you back from just using the constant? |
18:28:13 | zacharycarter | so basically I have a bunch of constants defined in a nimble library I'm importing |
18:28:15 | krux02 | a constant has one big advantage, it is constant. |
18:28:39 | zacharycarter | but whenever I try to import that module in my nimscript - I get an error about it not being found |
18:28:43 | krux02 | That means when you know at compile time the constant that you want to exposet to a script interpreter, you just have to duplicate the value for it. |
18:28:52 | krux02 | You won't need to care for values changes. |
18:29:22 | zacharycarter | I have a feeling it's because it's not in the libpath of the vm context |
18:29:47 | krux02 | I don't think the vm does have a vibpath or something equivalent. |
18:29:56 | krux02 | The vm just loads code. |
18:30:03 | zacharycarter | hmm |
18:30:45 | krux02 | all bytecode that the vm generates is temporary. As far as I know there is no storage for the bytecode. |
18:31:49 | zacharycarter | well - I'm not sure why it can't find the module then, but it's probably got something to do with the fact that I'm packaging the compiler and setting up the vm at runtime |
18:37:45 | krux02 | yea probably |
18:38:11 | krux02 | then the vm im completely independent of what you have at compile time. |
18:38:29 | krux02 | you havo only available what you explicitly bridge. |
18:38:40 | krux02 | does the import of the module already fail? |
18:38:54 | zacharycarter | yeah - that's what I'm after I guess is how I would bridge the constant |
18:39:14 | zacharycarter | right now I'm trying to figure out if it's possible to add an implicit import to the vm's config |
18:39:42 | zacharycarter | I just need to figure out what to pass to findModule for the last argument |
18:48:55 | * | krux02 quit (Remote host closed the connection) |
18:49:39 | * | krux02 joined #nim |
18:51:49 | zacharycarter | got it working :D |
18:58:20 | * | MH026 joined #nim |
19:06:40 | FromGitter | <Riderfighter> Congrats zacharycarter! |
19:07:13 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
19:07:29 | zacharycarter | thanks :) |
19:07:46 | zacharycarter | this is turning out quite cool - using nimscript for my game's scripting language |
19:07:53 | zacharycarter | hot reload is nice |
19:10:13 | shashlick | @zacharycarter are you using threads? |
19:11:02 | FromGitter | <Riderfighter> I think its a must with nimscript |
19:11:10 | zacharycarter | well to reload the nimscript yes |
19:11:17 | FromGitter | <Riderfighter> yeah haha |
19:11:56 | * | laaron joined #nim |
19:12:53 | shashlick | I thought nimrtl doesn't work with threads |
19:15:37 | shashlick | I've reached a dead end with my plugin system - Nim gc wreaks havoc cause each dll brings its own and nimrtl doesn't with with all the threads |
19:15:47 | * | zacharycarter quit (Ping timeout: 248 seconds) |
19:18:34 | * | zacharycarter joined #nim |
19:18:34 | zacharycarter | yeah :/ |
19:18:47 | zacharycarter | shashlick: yeah - it is not great |
19:18:58 | zacharycarter | but I'm not using nimrtl / hcr |
19:19:11 | zacharycarter | I'm basically embedding Nimscript into my program and using it that way |
19:19:31 | * | al_ joined #nim |
19:19:48 | zacharycarter | krux02: one more question if you have a moment - in astalgo there's the debug template for taking a PNode and getting a representation of it |
19:19:55 | zacharycarter | is there anything similar to go the opposite way? |
19:20:41 | zacharycarter | like instead of representing vmargs turn a Nim object into a representation of a PNode |
19:22:19 | zacharycarter | actually - I guess I can just pass in my object to a proc and use debug to get it that way - nevermind I'm being dumb |
19:27:39 | krux02 | ok, i am happy i could be your rubber duck |
19:32:19 | zacharycarter | :) |
19:32:23 | zacharycarter | me too |
19:38:35 | * | abm joined #nim |
19:44:03 | FromGitter | <Riderfighter> Guys I'm really happy with my little implementation of this KDF |
19:44:09 | FromGitter | <Riderfighter> just wanted to share ;) |
19:45:53 | FromGitter | <alehander42> nicE |
19:45:54 | FromGitter | <alehander42> ! |
19:47:07 | Zevv | |
19:47:07 | Zevv | |
19:47:11 | FromGitter | <Riderfighter> Hi zevv |
19:47:13 | FromGitter | <mratsim> yeah another crypto implementer in Nim :) |
19:47:44 | Zevv | oh sorry for the noise, my SSH stalled so I was just bashing my enter key |
19:47:51 | FromGitter | <Riderfighter> @mratsim I got inspired by cheatfate's lib and the lack of the algorithms I needed haha |
19:48:27 | FromGitter | <mratsim> if you're bored, here is a RFC that will take all your evening away :P https://github.com/nim-lang/RFCs/issues/32 |
19:48:59 | FromGitter | <Riderfighter> Sweet, I wasn't really planning on sleeping anyways |
19:50:01 | Zevv | that's the problem with RFC's, they have no end date. They just gather dust, no decisions are made and that's it |
19:50:05 | FromGitter | <Riderfighter> Oh I love this type of stuff! |
19:50:18 | FromGitter | <Riderfighter> If no decision can be made I can make one for all of us :P |
19:50:54 | FromGitter | <mratsim> The decision is that there is only one crypto implementation that will be audited for flaws in the future ;) |
19:51:06 | kungtotte | Zevv: that's a policy issue though. All it would take is some organisational decisions that RFC's can't live forever to push decision-making forward |
19:51:10 | FromGitter | <Riderfighter> I can definitely get behind that to be honest |
19:51:57 | * | al_ quit (Quit: al_) |
19:52:13 | Zevv | kungtotte: yes it is indeed political - maybe we should appoint some people to investigated what is needed to initiate a commission that could submit an RFC to discuss the process of decision-making on RFCs |
19:52:23 | FromGitter | <mratsim> but yeah across crypto, graphics, compression, serialization, I'd like people to use seq[byte] for binary blobs |
19:52:32 | FromGitter | <mratsim> and not string or seq[uint8] |
19:52:39 | FromGitter | <Riderfighter> I'd rather string tbh |
19:53:05 | FromGitter | <Riderfighter> But I wouldn't mind making a/two proc(s) that can handle both |
19:53:15 | FromGitter | <mratsim> string <-> seq[byte] conversion is zero copy |
19:53:25 | FromGitter | <Riderfighter> yeah for sure |
19:53:29 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
19:53:33 | Zevv | mratsim: so is the other way |
19:53:40 | FromGitter | <mratsim> yes |
19:53:56 | FromGitter | <Riderfighter> For the $ versus toHex, for crypto related things I'd expect $ to just call toHex lol |
19:53:59 | FromGitter | <mratsim> and AFAIK this is true also in the newruntime |
19:54:19 | kungtotte | Zevv: we'd need a working group to discuss the proper RFC-policy-changing-RFC-procedure first though :P |
19:54:25 | Zevv | My opinion: both strings and seqs have overhead, I propose working on raw memory addresses instead. |
19:54:28 | Zevv | kungtotte: right! |
19:54:41 | kungtotte | Rust has tons of working groups and everybody loves that language, must be something there! |
19:54:41 | FromGitter | <Riderfighter> Zevv: I can get behind that |
19:54:46 | FromGitter | <Riderfighter> :P |
19:54:49 | Zevv | otherwise I'm forced to make a seq or a string for each operation. |
19:54:55 | FromGitter | <mratsim> @Zevv the ASM playground is here ;) https://gcc.godbolt.org/ |
19:54:56 | FromGitter | <Riderfighter> you know what I need to make |
19:55:06 | FromGitter | <Riderfighter> a lib that can read/convert python pickle files |
19:55:19 | Zevv | Especially with update/finalize you don't want to have to create a seq or string every time |
19:55:22 | FromGitter | <Riderfighter> not that I actually need it |
19:55:40 | FromGitter | <mratsim> nimcrypto doesn't allocate |
19:55:45 | FromGitter | <mratsim> can't allocate in crypto |
19:55:58 | * | laaron joined #nim |
19:56:47 | Zevv | mratsim: joking aside, I think it is a valid argument, and openarray[] is a way to do it |
19:57:18 | FromGitter | <Riderfighter> I was thinking about the `$` or `toHex` thing and maybe each algorithm should just have two procs that return the final digest/result for either a raw string or hex aka hexdigest/digest |
19:57:49 | FromGitter | <mratsim> in nimcrypto "digest" returns the raw bytes and `$` returns the hex representation |
19:57:51 | FromGitter | <Riderfighter> or one proc digest with a bool that flips between hex and straight string/array of bytes |
19:58:00 | FromGitter | <Riderfighter> huh makes sense |
19:58:01 | Zevv | Riderfighter: there is so much more to it. |
19:58:21 | FromGitter | <Riderfighter> yeah ik I'm justing thinking about it in the simplest of ways |
19:58:23 | FromGitter | <mratsim> I can't agree with `$` returning byte representation though |
19:58:44 | Zevv | true, but then again: some want hex, some want base64 |
19:59:02 | Zevv | so better make that explicit - toHex(), toBase64() |
19:59:06 | FromGitter | <Riderfighter> ^ |
19:59:26 | Zevv | but getting a hash out is the trivial part: getting the data in efficient is the culprit |
19:59:49 | FromGitter | <mratsim> the low-level proc (finalize) take a var openarray or ptr + len |
20:00:01 | FromGitter | <mratsim> the high level (digest) outputs an array |
20:00:17 | FromGitter | <mratsim> which should get return value optimized |
20:00:22 | FromGitter | <mratsim> be* |
20:00:39 | Zevv | and I guess openarray is not flexible enough for all situations |
20:00:39 | FromGitter | <Riderfighter> that would make the most sense imo |
20:01:38 | FromGitter | <mratsim> mmmh, basically in case where data comes from a C library |
20:02:06 | FromGitter | <mratsim> or when you want to put it in a "lvalue" |
20:03:22 | Zevv | so, to the asm playground it is |
20:03:27 | FromGitter | <Riderfighter> hahah |
20:03:46 | * | Vladar quit (Remote host closed the connection) |
20:05:17 | FromGitter | <Riderfighter> I'm not going to lie, I find it rather sketchy that openssl and cryptojs both use evpKDF |
20:07:36 | FromGitter | <Riderfighter> Although I do like the way its used in cryptojs for their AES-CBC due it it only taking a passphrase instead of secret+salt |
20:16:37 | * | nsf joined #nim |
20:26:52 | * | zacharycarter quit (Ping timeout: 246 seconds) |
20:42:30 | * | zacharycarter joined #nim |
20:42:33 | zacharycarter | anyone know if there's anything like `quote do` for the VM? something that produces PNodes instead of NimNodes? |
20:47:07 | disruptek | alehander42: if you supply that pr for threadpool, then at least the op can test it as well. |
21:12:16 | * | nsf quit (Quit: WeeChat 2.4) |
21:33:07 | * | Trustable quit (Remote host closed the connection) |
21:33:45 | zacharycarter | figured it out - `parser.parseString` |
21:34:02 | zacharycarter | that should simplify things quite a bit - anyway time for sleep |
22:12:32 | * | solitudesf quit (Ping timeout: 245 seconds) |
22:23:59 | * | abm quit (Quit: Leaving) |
22:32:30 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
22:33:23 | * | laaron joined #nim |
23:10:03 | * | stefanos82 quit (Quit: Quitting for now...) |
23:21:42 | Araq | seq[uint8] is the same as seq[byte] |
23:25:41 | * | krux02_ joined #nim |
23:28:51 | * | krux02 quit (Ping timeout: 264 seconds) |
23:36:10 | shashlick | trying out neovim-qt on windows with nvim.nim, crashes |
23:38:14 | shashlick | even CLI mode crashes with autocomplete setup |
23:38:26 | * | lritter quit (Quit: Leaving) |
23:43:16 | shashlick | i guess i shouldn't be as pissed about my feud crashes, neovim also crashes, 64-bit doesn't even run on windows |
23:49:28 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
23:53:45 | * | laaron joined #nim |
23:58:05 | * | laaron quit (Client Quit) |
23:58:47 | * | laaron joined #nim |