<< 03-08-2019 >>

00:00:03*lritter quit (Quit: Leaving)
00:15:03krux02telara{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:58FromGitter<bevo009> Is there a site or document that lists the emojis Nim can use?
00:49:22FromGitter<bevo009> like 👋
00:49:56FromGitter<bevo009> 👋
01:21:11*seni quit (Remote host closed the connection)
01:25:43*Mister_Magister quit (Ping timeout: 258 seconds)
01:32:21FromGitter<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:34leorize@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:46FromGitter<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:19FromGitter<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:38FromGitter<cark> but what i really want to do is write the file with data from memory
04:35:01zcarteralready compresed or uncompressed data?
04:35:17FromGitter<cark> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d450f05ee80d76164dc069c]
04:35:32FromGitter<cark> that's what i'm doing, and it works on linux
04:35:58FromGitter<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:19FromGitter<cark> but it doesn't on windows, i end up with a 200mb text file in my zip
04:36:47FromGitter<cark> @zcarter, in memory data is not compressed
04:37:15zcarterI 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:24zcarteryou have to create a file and then add sources to it from what I remember
04:37:55zcarterand the sources can be added via a pointer - so you can use what's already in memory
04:38:05FromGitter<cark> i'm using the zip/zipfiles interface provided byt the zip nimble package
04:38:09zcarterprobably want to read up here - https://libzip.org/documentation/
04:38:22FromGitter<cark> so go metal then =)
04:38:23zcarteroh - I don't know anything about that package
04:38:40zcarterwell - if someone has already wrapped it - I imagine you use their library in a similar way
04:38:50zcarterjust need to make sure you know how the API works
04:38:59FromGitter<bevo009> @Varriount does the new terminal preview support git-bash yet, or just wsl?
04:39:30FromGitter<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:46FromGitter<cark> the zip package is part of the nim project i think
04:40:13zcarteryeah - I just saw that - interesting
04:40:31zcarteryeah - I see the `addFile` that takes in a stream now hmm
04:41:08FromGitter<cark> shoul I maybe create an issue on github ? what's the preferred way to interract with maintainers ?
04:41:58disruptekgithub issues are best.
04:42:10FromGitter<cark> very nice, thanks guys !
04:42:24disruptekthanks 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:39FromGitter<alehander42> ooh zcarter new nick
06:12:10zacharycarterwell I'm finally using IRC again
06:12:33zacharycarteralthough 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:46FromGitter<alehander42> i had similar moves
06:12:53FromGitter<alehander42> with <alexander92> as irc account
06:14:58zacharycartergitter is so bad but also so convenient
06:20:53kungtotteIRC 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:55zacharycarterI don't disagree
06:32:47*jjido joined #nim
06:54:45Zevvzacharycarter: welcome to the dark side!
06:55:10Zevvnow I can at least properly tab-expand your nick!
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:19zacharycarter:P
07:00:24zacharycartermy irc client is very dark
07:00:30zacharycarterlike black
07:00:48zacharycarterI guess it's the default for irssi
07:04:33*gmpreussner joined #nim
07:08:50zacharycarterwith `-d:danger` my program crashes :/
07:08:54zacharycarterbut it runs fine with `-d:release`
07:19:48FromGitter<alehander42> i use weechat
07:19:57FromGitter<alehander42> but currently gitter again easier in firefox
07:34:46*nsf joined #nim
07:48:33Zevvzacharycarter: 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:31FromGitter<Riderfighter> Hello. everyone 👋
08:31:08Zevvoi riderfighter
08:32:27FromGitter<alehander42> hey
08:32:35FromGitter<alehander42> btw somebody used swift with gdb?
08:32:43FromGitter<alehander42> trying to test how it works on ubuntu
08:32:59FromGitter<alehander42> it seems it works fine with lldb + `-g`
08:34:07FromGitter<alehander42> hmm it works now with gdb but
08:36:18FromGitter<alehander42> ok
08:42:06*ng0 joined #nim
09:05:08*Vladar joined #nim
09:08:31krux02alehander42: this chat is for Nim not swift.
09:08:54*Trustable joined #nim
09:09:47krux02you 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:23FromGitter<alehander42> sorry, got offtopic
09:10:38krux02I don't think there is any interest for apple to improve gdb - swift usability.
09:11:10krux02I wouldn't be surprised if on macos "gdb" will becomen an alias for "lldb"
09:11:31FromGitter<alehander42> they're not so compatible at all
09:11:40FromGitter<alehander42> but yeah i also dislike their support
09:11:43FromGitter<alehander42> for those
09:12:06krux02it is not just tha lack of support that
09:12:26krux02bothers me, it is their interest to let those alternatives fail on their platform.
09:12:29FromGitter<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:41FromGitter<alehander42> but yeah, it seems typical from apple
09:12:52FromGitter<alehander42> to limit stuff to their approved software stacks
09:12:57FromGitter<alehander42> so not really surprised
09:13:36FromGitter<alehander42> look at objective-c/the whole ios thing/swift/their ui frameworks and ide-s/everything
09:13:41FromGitter<alehander42> that's just the way they do things
09:15:58FromGitter<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:51FromGitter<mratsim> Not only GDB, they invented co-invented OpenCL, promoted OpenGL, and created Webkit
09:18:18FromGitter<mratsim> Look at the state of those on MacOSX
09:18:51FromGitter<mratsim> OpenCL: deprecated, no Alternative. OpenGL: deprecated, Metal alternative (but why not Vulkan).
09:19:20*jjido joined #nim
09:20:12FromGitter<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:29FromGitter<mratsim> anyway
09:24:29*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:30:15FromGitter<mratsim> Can someone reproduce https://github.com/nim-lang/Nim/issues/11875 (compile with --threads:on)
09:32:15FromGitter<Riderfighter> Yeah it hangs
09:32:24FromGitter<Riderfighter> Doesn't seem to produce any threads either on macos
09:33:22FromGitter<Riderfighter> just kidding, we got 2 threads :D
09:34:07FromGitter<mratsim> thanks. mmmh I wonder why my machine doesn't hang
09:34:56FromGitter<Riderfighter> same :L
09:35:16FromGitter<Riderfighter> Technically the executable hasn't hung yet
09:36:26FromGitter<Riderfighter> its still doing stuff and therefore hasn't stopped responding, its just not doing what it's supposed to
09:42:37FromGitter<alehander42> @mratsim but what happens? does it finish
09:42:55FromGitter<mratsim> for me I get CLI control back
09:43:07FromGitter<mratsim> but according to bug report it always hangs
09:43:09FromGitter<alehander42> ah
09:43:13FromGitter<alehander42> it doesnt hang always
09:43:15FromGitter<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:00FromGitter<alehander42> those bugs are hard to reproduce
09:44:05*rayman22201 joined #nim
09:44:14*odc quit (Ping timeout: 252 seconds)
09:44:53FromGitter<mratsim> well non-determinism being hard to reproduce is a given ;)
09:44:59*nuxdie quit (Ping timeout: 252 seconds)
09:45:00FromGitter<alehander42> and i am not sure if rr can do it
09:45:18FromGitter<alehander42> i mean, it can reproduce that stuff in async programs easily
09:45:26FromGitter<alehander42> but not sure about multithreading
09:45:43*dashed joined #nim
09:45:59FromGitter<Riderfighter> On macOS the program definitely doesn't finish execution once it reaches sync(), but it doesn't actually hang
09:47:10FromGitter<alehander42> oh chaos mode does it!
09:47:24*odc joined #nim
09:47:27*nuxdie joined #nim
09:47:43FromGitter<alehander42> great, now i have a reproduction without debug symbols
09:47:44FromGitter<alehander42> :D
09:49:12*emery joined #nim
09:59:38*lritter joined #nim
10:16:05FromGitter<alehander42> @krux02 can we add
10:16:09FromGitter<alehander42> -O0 somehow to debug flags
10:16:23FromGitter<alehander42> -Og sometimes leads to optimized out variables
10:16:26FromGitter<alehander42> which is not good enough
10:16:44FromGitter<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:00FromGitter<alehander42> hm i think i fixed the issue @mratsim
10:58:21FromGitter<alehander42> but .. not sure if it makes sense, i logged and debugged and found out two things:
10:58:48FromGitter<alehander42> sync expects ready workers to be the first n of workersData which is not true always
10:59:31FromGitter<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:47FromGitter<alehander42> and the other thing is .. if you set minPoolSize to 1
10:59:58FromGitter<alehander42> 1) the count fix
11:00:05FromGitter<alehander42> it seems to work fine
11:00:06*laaron joined #nim
11:00:16FromGitter<alehander42> because often actually it uses 1 or 2 workers
11:00:26FromGitter<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:30FromGitter<alehander42> but probably it creates additional because of minPoolSize
11:00:35FromGitter<alehander42> so they stay "not ready"
11:00:39FromGitter<alehander42> which is not really true
11:00:58FromGitter<alehander42> but i have no idea what minPoolSize is, so maybe it has to be 4
11:01:09FromGitter<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:07livcdany 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:13goWhat am I doing wrong here? https://play.nim-lang.org/#ix=1Que
13:50:36gothe input is int, but expected int
13:50:40gosilly
13:55:31disruptekyou indicated that a, y are identical types, but you passed disparate types to the template.
13:57:01disruptekgo: ^
13:57:02goa, y are int or float32
13:57:24disruptekright; `or` means one or the other, not both.
13:57:24goor?
13:58:04disruptekif you don't want to type-check, use an `untyped` type argument, as in `x: untyped`.
13:58:26FromGitter<ahcm> what are the expectations on the js backend? Can one just run the .js?
13:58:40disruptekyes.
13:58:53livcdgo: try to pass just float32 or int
13:59:06FromGitter<ahcm> hmm, even File I/O and os args?
13:59:25livcdyou need nodejs for that
13:59:25FromGitter<ahcm> Because I get errors, like args is not supported on Switch ?!?
13:59:30goI dont understand, the input is int|float32, and so is the output
13:59:32disruptekthe js backend has no streams support, iirc.
13:59:53FromGitter<ahcm> gives: ReferenceError: fopen is not defined
14:00:11livcdgo: you can either pass int or float32 not a mix
14:00:24disruptekyou can mix them, but that's not what your code says is going to happen.
14:00:46FromGitter<ahcm> Error: Error: unhandled exception: paramCount is not implemented on Nintendo Switch [OSError]
14:00:57disruptekit 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:14livcddisruptek: ahh
14:01:34disruptekif you want to handle two different types, name two different generics.
14:02:18godisruptek, i want to mix the types, thats the point
14:02:20disruptekfoo[T: int, V: float32](t: T; v: V): T = (do something with an int and a float and return an int)
14:03:07disruptekthen use `untyped`.
14:04:54go`template pytagora[T: untyped](a, y: T): untyped = sqrt(a*a + b*b)` is the same error
14:06:08disruptekyes, well, that code uses a typed function call. ;-)
14:09:31FromGitter<Vindaar> @go: https://play.nim-lang.org/#ix=1Qul
14:10:30*ehmry quit (Remote host closed the connection)
14:10:56goughhh i see now
14:11:29goyou must define the type for EACH of the inputs
14:11:40gotnx :)
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:03FromGitter<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:50lqdev[m]@haxscramper_gitlab what do you get when you type in `nim` in your terminal?
14:43:30FromGitter<haxscramper_gitlab> Help message from compiler. `which nim` also works correctly as well as `exec-path` variable in emacs.
14:44:38FromGitter<haxscramper_gitlab> I'm able to compile files and install packages using nimble without any problems too.
14:46:41goI dont understand why you have to define T: float|int for every input
14:47:44goimagine you have T : int8|uint8|int16|uint16|int32|uint32|float32|float
14:47:55goand 6 input vars
14:47:59gohaha
14:50:06FromGitter<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:46go:)
14:54:09goI thouth a: int, b: int is same as a, b: int
14:54:15goapplies for T
14:57:21*laaron- joined #nim
15:00:36*laaron quit (Ping timeout: 260 seconds)
15:18:26zacharycarterZevv: 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:09lqdev[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:55FromDiscord_<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:14disruptekthe 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:45disruptekwhat version of C does nim compile to?
16:38:51solitudesfc89 i think
16:41:09FromGitter<haxscramper_gitlab> If anyone uses `nim-lsp`, could you please share your configuration?
16:44:43*aexoxea quit (Quit: Goodbye!)
16:46:37FromGitter<SolitudeSF> nimlsp doesnt have configuration. you probably want editor configuration?
16:47:21FromGitter<haxscramper_gitlab> Yes, emacs configuration of course
16:50:07*go quit (Ping timeout: 260 seconds)
16:50:16FromGitter<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:11leorizedisruptek: C99 last time I checked
17:00:12FromGitter<kayabaNerve> solitudesf: IIRC it tries to compile to C89, yet that isn't guaranteed.
17:00:36FromGitter<kayabaNerve> Araq doesn't like C((.
17:00:39FromGitter<kayabaNerve> (99
17:00:43FromGitter<kayabaNerve> **99
17:01:08disruptekmakes sense.
17:01:21FromGitter<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:40FromGitter<kayabaNerve> ... notable thing. Maybe not huge.
17:03:30Zevvmaybe 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:35FromGitter<kayabaNerve> https://irclogs.nim-lang.org/20-06-2018.html
17:04:05FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d45be857c87746165069054]
17:04:08disruptekturbo-c, those were the days.
17:04:17FromGitter<kayabaNerve> Underscores added to not ping everyone needlessly.
17:05:46FromGitter<kayabaNerve> Hope I helped
17:06:28FromGitter<SolitudeSF> gitter got you anyway
17:06:37FromGitter<SolitudeSF> *transformed it to codepaste
17:07:04FromGitter<kayabaNerve> I did that on purpose.
17:07:48FromGitter<kayabaNerve> Got that triple `
17:08:05disruptekdid 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:18leorizeI didn't manage to get nim working with gcc2, which only supports c89
17:10:33leorizeprobably the compiler uses some gcc > 3 features :P
17:11:55*chimez quit (Ping timeout: 246 seconds)
17:12:17FromGitter<kayabaNerve> I did not. Thanks for the info.
17:12:27FromGitter<kayabaNerve> ... why on earth would you try that
17:12:40disrupteki dunno, but it's handy.
17:12:56FromGitter<kayabaNerve> I meant GCC 2 :P
17:13:12leorizewell, gcc 2 is what haiku uses on 32bit x86 :P
17:13:35FromGitter<kayabaNerve> Horrific
17:13:41FromGitter<kayabaNerve> But a proper explanation
17:17:00FromGitter<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:04solitudesfnimlsp should be either compiled pointing to nim location, or it must be launched with nim location as an argument
17:21:58FromGitter<haxscramper_gitlab> I
17:25:12FromGitter<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:18solitudesfno, 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:58disruptekhaxscramper: are you able to build nim programs that use the stdlib?
17:30:19FromGitter<haxscramper_gitlab> Yes, no problem. Build programs/install packages using nimle
17:31:25disruptekso 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:25FromGitter<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:25disruptekwell, if you can build a program that uses the stdlib, that's one.
17:33:42disrupteki don't run nimsuggest directly and really don't know anything about it.
17:34:26disrupteki 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:36FromGitter<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:28disruptekokay, and `which nim` and `which nimsuggest` identify sibling nodes in the same directory?
17:37:19FromGitter<haxscramper_gitlab> Yes
17:37:31*chimez joined #nim
17:37:48disrupteki guess this is a good opportunity to switch to vim. :-P
17:37:50FromGitter<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:48disruptekyou could shim it and see how emacs is calling it, then debug the issue outside of emacs.
17:49:38FromGitter<Riderfighter> Hello disruptek :D
17:50:06disrupteksup 'fighter
17:50:22FromGitter<Riderfighter> working on anything cool today?
17:51:04disruptekopenapi; apparently, i have to do it in a macro because it's too big a pita to compose ast at runtime...(?)
17:51:14disruptekhow about you?
17:51:25FromGitter<Riderfighter> I'm making my own cryptolib atm
17:51:38FromGitter<Riderfighter> I've just finished porting evpKDF from openssl to nim :D
17:51:44disrupteknothing like homemade crypto.
17:51:48FromGitter<Riderfighter> haha
17:51:50FromGitter<Riderfighter> exactly
17:52:03zacharycarteranyone familiar enough with Nim's VM to help me figure out how to add a constant?
17:52:08disruptekwtf is evpKDF?
17:52:19FromGitter<Riderfighter> its openssls Key Derivative Function
17:52:25FromGitter<Riderfighter> its some weird thing they implemented
17:52:33*chimez quit (Ping timeout: 245 seconds)
17:52:35FromGitter<Riderfighter> let me send what it looks like in nim
17:52:44disruptekthose crazy hungarians...
17:52:48FromGitter<Riderfighter> ikr
17:52:50FromGitter<Riderfighter> https://dsh.re/1fe94
17:53:34disruptekyou bettah not let anyone else see that camelcase; they will shit a brick on here.
17:53:41FromGitter<Riderfighter> oh gosh
17:53:42disrupteker, snakecase, too.
17:53:47FromGitter<Riderfighter> noo
17:54:16zacharycarterI don't mind snake case
17:54:17FromGitter<Riderfighter> the only langs I code in use both snakecase/camelcase
17:54:47FromGitter<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:48disruptekguess it's time to cut python loose.
17:55:21disruptekwhy convert them to a letter? you knucklehead, you're the guy i have to go aroun' behind, turning singletons into words.
17:55:30FromGitter<Riderfighter> lmao
17:55:49FromGitter<Riderfighter> I was just kidding about the letter don't worry
17:56:02zacharycarterI really like prefixing private variable names with an underscore
17:56:13FromGitter<Riderfighter> same
17:56:17FromGitter<Riderfighter> I do it all the time in python
17:56:20disruptekZevv: did you end up transistioning to syntax highlighting?
17:56:46FromGitter<Riderfighter> lmao
17:56:52FromGitter<Riderfighter> firing shots left and right :P
17:57:45disrupteki've gotten so dependent upon it.
17:57:56*nsf quit (Quit: WeeChat 2.4)
17:58:42FromGitter<Riderfighter> my next goal for my homemade crypto lib is implementing a version of the Socialist millionaire protocol
17:59:03FromGitter<Riderfighter> comparing if you and another person have the same number without actually saying your number :P
18:03:18zacharycarterhmm - adding a proc to nimscript is easy enough - but I can't figure out how to define and expose a constant
18:06:44Zevvdisruptek: yes, I ded!
18:08:43ZevvThen I gradually tweaked and changed everything to my liking. Now it looks like this: http://zevv.nl/div/highlighting.png
18:22:14krux02that is some bare bones syntax highlighting
18:23:09zacharycarterkrux02: are you familiar with the VM at atll?
18:23:21krux02yes
18:23:30krux02the nimvm I know pretty well
18:23:41zacharycarterdo you know how I would add a constant?
18:23:51zacharycarterI know how to add vm hook callbacks
18:24:01zacharycarterbut I want to define a constant and expose it to nimscript
18:24:06krux02what do you mean with constant?
18:24:20zacharycartersp O
18:24:28zacharycartersorry - so I'm using https://github.com/Serenitor/embeddedNimScript
18:25:02zacharycarterand 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:20krux02hmm, I only work on nimvm used for macros.
18:25:26zacharycarterah okay
18:25:36krux02there you can just define a constant, and it just works.
18:26:08zacharycarterwell - 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:05krux02I don't understand where the problem is though.
18:27:12*MH026 quit (Remote host closed the connection)
18:27:19krux02what is holding you back from just using the constant?
18:28:13zacharycarterso basically I have a bunch of constants defined in a nimble library I'm importing
18:28:15krux02a constant has one big advantage, it is constant.
18:28:39zacharycarterbut whenever I try to import that module in my nimscript - I get an error about it not being found
18:28:43krux02That 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:52krux02You won't need to care for values changes.
18:29:22zacharycarterI have a feeling it's because it's not in the libpath of the vm context
18:29:47krux02I don't think the vm does have a vibpath or something equivalent.
18:29:56krux02The vm just loads code.
18:30:03zacharycarterhmm
18:30:45krux02all bytecode that the vm generates is temporary. As far as I know there is no storage for the bytecode.
18:31:49zacharycarterwell - 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:45krux02yea probably
18:38:11krux02then the vm im completely independent of what you have at compile time.
18:38:29krux02you havo only available what you explicitly bridge.
18:38:40krux02does the import of the module already fail?
18:38:54zacharycarteryeah - that's what I'm after I guess is how I would bridge the constant
18:39:14zacharycarterright now I'm trying to figure out if it's possible to add an implicit import to the vm's config
18:39:42zacharycarterI 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:49zacharycartergot it working :D
18:58:20*MH026 joined #nim
19:06:40FromGitter<Riderfighter> Congrats zacharycarter!
19:07:13*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
19:07:29zacharycarterthanks :)
19:07:46zacharycarterthis is turning out quite cool - using nimscript for my game's scripting language
19:07:53zacharycarterhot reload is nice
19:10:13shashlick@zacharycarter are you using threads?
19:11:02FromGitter<Riderfighter> I think its a must with nimscript
19:11:10zacharycarterwell to reload the nimscript yes
19:11:17FromGitter<Riderfighter> yeah haha
19:11:56*laaron joined #nim
19:12:53shashlickI thought nimrtl doesn't work with threads
19:15:37shashlickI'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:34zacharycarteryeah :/
19:18:47zacharycartershashlick: yeah - it is not great
19:18:58zacharycarterbut I'm not using nimrtl / hcr
19:19:11zacharycarterI'm basically embedding Nimscript into my program and using it that way
19:19:31*al_ joined #nim
19:19:48zacharycarterkrux02: 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:55zacharycarteris there anything similar to go the opposite way?
19:20:41zacharycarterlike instead of representing vmargs turn a Nim object into a representation of a PNode
19:22:19zacharycarteractually - 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:39krux02ok, i am happy i could be your rubber duck
19:32:19zacharycarter:)
19:32:23zacharycarterme too
19:38:35*abm joined #nim
19:44:03FromGitter<Riderfighter> Guys I'm really happy with my little implementation of this KDF
19:44:09FromGitter<Riderfighter> just wanted to share ;)
19:45:53FromGitter<alehander42> nicE
19:45:54FromGitter<alehander42> !
19:47:07Zevv 
19:47:07Zevv 
19:47:11FromGitter<Riderfighter> Hi zevv
19:47:13FromGitter<mratsim> yeah another crypto implementer in Nim :)
19:47:44Zevvoh sorry for the noise, my SSH stalled so I was just bashing my enter key
19:47:51FromGitter<Riderfighter> @mratsim I got inspired by cheatfate's lib and the lack of the algorithms I needed haha
19:48:27FromGitter<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:59FromGitter<Riderfighter> Sweet, I wasn't really planning on sleeping anyways
19:50:01Zevvthat'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:05FromGitter<Riderfighter> Oh I love this type of stuff!
19:50:18FromGitter<Riderfighter> If no decision can be made I can make one for all of us :P
19:50:54FromGitter<mratsim> The decision is that there is only one crypto implementation that will be audited for flaws in the future ;)
19:51:06kungtotteZevv: 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:10FromGitter<Riderfighter> I can definitely get behind that to be honest
19:51:57*al_ quit (Quit: al_)
19:52:13Zevvkungtotte: 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:23FromGitter<mratsim> but yeah across crypto, graphics, compression, serialization, I'd like people to use seq[byte] for binary blobs
19:52:32FromGitter<mratsim> and not string or seq[uint8]
19:52:39FromGitter<Riderfighter> I'd rather string tbh
19:53:05FromGitter<Riderfighter> But I wouldn't mind making a/two proc(s) that can handle both
19:53:15FromGitter<mratsim> string <-> seq[byte] conversion is zero copy
19:53:25FromGitter<Riderfighter> yeah for sure
19:53:29*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
19:53:33Zevvmratsim: so is the other way
19:53:40FromGitter<mratsim> yes
19:53:56FromGitter<Riderfighter> For the $ versus toHex, for crypto related things I'd expect $ to just call toHex lol
19:53:59FromGitter<mratsim> and AFAIK this is true also in the newruntime
19:54:19kungtotteZevv: we'd need a working group to discuss the proper RFC-policy-changing-RFC-procedure first though :P
19:54:25ZevvMy opinion: both strings and seqs have overhead, I propose working on raw memory addresses instead.
19:54:28Zevvkungtotte: right!
19:54:41kungtotteRust has tons of working groups and everybody loves that language, must be something there!
19:54:41FromGitter<Riderfighter> Zevv: I can get behind that
19:54:46FromGitter<Riderfighter> :P
19:54:49Zevvotherwise I'm forced to make a seq or a string for each operation.
19:54:55FromGitter<mratsim> @Zevv the ASM playground is here ;) https://gcc.godbolt.org/
19:54:56FromGitter<Riderfighter> you know what I need to make
19:55:06FromGitter<Riderfighter> a lib that can read/convert python pickle files
19:55:19ZevvEspecially with update/finalize you don't want to have to create a seq or string every time
19:55:22FromGitter<Riderfighter> not that I actually need it
19:55:40FromGitter<mratsim> nimcrypto doesn't allocate
19:55:45FromGitter<mratsim> can't allocate in crypto
19:55:58*laaron joined #nim
19:56:47Zevvmratsim: joking aside, I think it is a valid argument, and openarray[] is a way to do it
19:57:18FromGitter<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:49FromGitter<mratsim> in nimcrypto "digest" returns the raw bytes and `$` returns the hex representation
19:57:51FromGitter<Riderfighter> or one proc digest with a bool that flips between hex and straight string/array of bytes
19:58:00FromGitter<Riderfighter> huh makes sense
19:58:01ZevvRiderfighter: there is so much more to it.
19:58:21FromGitter<Riderfighter> yeah ik I'm justing thinking about it in the simplest of ways
19:58:23FromGitter<mratsim> I can't agree with `$` returning byte representation though
19:58:44Zevvtrue, but then again: some want hex, some want base64
19:59:02Zevvso better make that explicit - toHex(), toBase64()
19:59:06FromGitter<Riderfighter> ^
19:59:26Zevvbut getting a hash out is the trivial part: getting the data in efficient is the culprit
19:59:49FromGitter<mratsim> the low-level proc (finalize) take a var openarray or ptr + len
20:00:01FromGitter<mratsim> the high level (digest) outputs an array
20:00:17FromGitter<mratsim> which should get return value optimized
20:00:22FromGitter<mratsim> be*
20:00:39Zevvand I guess openarray is not flexible enough for all situations
20:00:39FromGitter<Riderfighter> that would make the most sense imo
20:01:38FromGitter<mratsim> mmmh, basically in case where data comes from a C library
20:02:06FromGitter<mratsim> or when you want to put it in a "lvalue"
20:03:22Zevvso, to the asm playground it is
20:03:27FromGitter<Riderfighter> hahah
20:03:46*Vladar quit (Remote host closed the connection)
20:05:17FromGitter<Riderfighter> I'm not going to lie, I find it rather sketchy that openssl and cryptojs both use evpKDF
20:07:36FromGitter<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:33zacharycarteranyone know if there's anything like `quote do` for the VM? something that produces PNodes instead of NimNodes?
20:47:07disruptekalehander42: 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:45zacharycarterfigured it out - `parser.parseString`
21:34:02zacharycarterthat 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:42Araqseq[uint8] is the same as seq[byte]
23:25:41*krux02_ joined #nim
23:28:51*krux02 quit (Ping timeout: 264 seconds)
23:36:10shashlicktrying out neovim-qt on windows with nvim.nim, crashes
23:38:14shashlickeven CLI mode crashes with autocomplete setup
23:38:26*lritter quit (Quit: Leaving)
23:43:16shashlicki 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