00:05:52 | disruptek | i agree that configurability is generally overrated. |
00:06:51 | cloudber | but OTOH nim is style insensitive |
00:06:58 | cloudber | for good |
00:23:12 | * | tiorock joined #nim |
00:23:12 | * | tiorock quit (Changing host) |
00:23:12 | * | tiorock joined #nim |
00:23:12 | * | rockcavera is now known as Guest5300 |
00:23:12 | * | Guest5300 quit (Killed (cherryh.freenode.net (Nickname regained by services))) |
00:23:12 | * | tiorock is now known as rockcavera |
00:25:13 | * | cloudber quit (Quit: WeeChat 2.6) |
00:33:45 | * | Hideki_ joined #nim |
00:38:19 | * | krux02 quit (Remote host closed the connection) |
00:49:28 | * | ponyride1 quit (Ping timeout: 245 seconds) |
00:51:50 | * | Hideki_ quit (Remote host closed the connection) |
01:06:08 | * | rusua joined #nim |
01:17:07 | * | dwdv quit (Ping timeout: 268 seconds) |
01:57:49 | * | gmpreussner quit (Ping timeout: 268 seconds) |
02:04:36 | * | lritter quit (Ping timeout: 268 seconds) |
02:05:04 | * | lritter joined #nim |
02:20:15 | * | nif quit (Quit: ...) |
02:20:25 | * | nif joined #nim |
02:22:47 | disruptek | nimph and lockfiles doing their job: compiler-#1db21721ec816e01ef91633941e0295f7724e1f7 repository in invalid bisect state |
02:23:02 | disruptek | not confident enough to lock nimph-#d155fe5e3127c2998162b99ee153e780fc7b09b1 |
02:38:11 | rayman22201 | nimph has lockfiles now? you have been busy lol. |
02:38:45 | * | dchem quit (Ping timeout: 265 seconds) |
02:48:04 | disruptek | lockfiles is about 5% of the codebase, so i can't say i've spent much time on them. |
02:48:37 | disruptek | but it's nice to see them work, even it's only on writes. |
02:50:00 | rayman22201 | indeed. Even a proof of concept is nice! |
02:50:42 | disruptek | i'm learning things, yeah. |
02:51:02 | disruptek | i'm really glad i made this. it's been great. |
02:51:23 | FromDiscord | <yewpad> what's the purpose of lockfiles? i don't quite get it |
02:51:49 | disruptek | to make a record for reference regarding what combination of dependencies was used successfully. |
02:52:06 | FromDiscord | <yewpad> hm |
02:52:46 | disruptek | probably the right reaction, all things considered. |
02:53:59 | rayman22201 | this is a decent explanation from nodejs land: https://www.twilio.com/blog/lockfiles-nodejs |
02:55:30 | disruptek | just take a look at the data that's in there; it can answer certain questions... play jeopardy for a minute or two and you'll get the idea. |
02:55:56 | disruptek | really not something that should take more than an afternoon to implement, and indeed, it did not. |
03:05:36 | * | ponyrider joined #nim |
03:15:24 | * | rusua quit (Quit: Connection closed for inactivity) |
03:25:17 | * | lritter quit (Ping timeout: 240 seconds) |
03:42:32 | * | endragor joined #nim |
04:04:52 | * | nsf joined #nim |
04:05:09 | * | chemist69 quit (Ping timeout: 250 seconds) |
04:07:10 | * | chemist69 joined #nim |
04:14:00 | * | gmpreussner joined #nim |
04:45:58 | * | narimiran joined #nim |
05:03:13 | * | chemist69 quit (Ping timeout: 250 seconds) |
05:05:23 | * | chemist69 joined #nim |
05:20:59 | * | dddddd quit (Ping timeout: 250 seconds) |
05:23:15 | * | rockcavera quit (Remote host closed the connection) |
05:45:30 | * | njoseph quit (Ping timeout: 252 seconds) |
05:58:33 | FromDiscord | <Rika> orderedset has missing functionality it seems |
05:58:53 | FromDiscord | <Rika> how do i get an intersection while retaining insertion order? |
06:44:13 | * | kevinchau joined #nim |
06:44:23 | kevinchau | hi |
06:45:25 | * | solitudesf joined #nim |
06:45:29 | * | Sargun quit (Ping timeout: 276 seconds) |
06:49:59 | * | Sargun joined #nim |
06:59:40 | FromGitter | <cndkhuong> hi |
07:00:12 | kevinchau | exit |
07:00:16 | * | kevinchau quit (Quit: ERC (IRC client for Emacs 26.3)) |
07:01:47 | FromGitter | <cndkhuong> I'm trying with hotcodereloading but got issue : could not load: libnimhcr.so |
07:02:08 | FromGitter | <cndkhuong> someone had exp on it ? please help |
07:02:35 | * | njoseph joined #nim |
07:04:43 | Araq | you need to build libnimhcr.so first |
07:04:52 | Araq | have you read the 'hcr' article? |
07:05:51 | * | dwdv joined #nim |
07:06:05 | FromGitter | <cndkhuong> I'm reading this link https://nim-lang.org/docs/hcr.html |
07:06:27 | FromGitter | <cndkhuong> isn't it ? |
07:06:40 | FromGitter | <cndkhuong> sorry, I'm newbie |
07:08:17 | Araq | that's the article, yes |
07:08:55 | FromGitter | <cndkhuong> let me try, thank you |
07:09:07 | Araq | maybe you also need to add |
07:09:09 | Araq | --passL:-rpath --passL:@loader_path |
07:09:15 | Araq | to your compile commands, not sure |
07:09:41 | Araq | oh wait that's OSX specific (?) |
07:10:22 | FromGitter | <cndkhuong> it's linux (ubuntu distro) |
07:12:54 | Araq | set LD_LIBRARY_PATH on Ubuntu |
07:17:33 | * | njoseph quit (Ping timeout: 250 seconds) |
07:20:04 | * | njoseph joined #nim |
07:32:37 | * | solitudesf quit (Ping timeout: 240 seconds) |
07:40:04 | * | PMunch joined #nim |
07:40:26 | FromGitter | <cndkhuong> I still got same issue. What did I understand from article : write a module with hotcodereloading and invoke performCodeReload() after that I imported this module to main module and compile with option --hotcodereloading:on |
07:41:22 | FromGitter | <cndkhuong> ```#logic.nim ⏎ import hotcodereloading ⏎ proc init*() = ⏎ performCodeReload()``` [https://gitter.im/nim-lang/Nim?at=5dea06228e906a1c8d7b0ee2] |
07:42:15 | FromGitter | <cndkhuong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dea06571659720ca809e37c] |
07:43:17 | shashlick | You need to compile the hcr library and link to it during compile |
07:45:19 | FromGitter | <cndkhuong> do you have any link about that ? :'( |
07:47:57 | shashlick | nim c --app:lib nim/dir/lib/nimhcr |
07:48:06 | shashlick | On a phone, cannot verify |
07:48:16 | shashlick | Do the same for the nimrtl library as well |
07:48:46 | shashlick | Then export LD_LIBRARY_PATH=nim/dir/lib |
07:53:34 | FromDiscord | <Kaynato> is [] as an empty array going to allocate the overhead, or does it point to some singleton...? I want to make sure that giving this as the return type of `lent Enumerable[int]` won't cause memory issues |
07:54:43 | Araq | it doesn't allocate anymore but 'lent T' might cause trouble anyway |
07:54:58 | Araq | we're sorting it out |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:00:41 | FromGitter | <cndkhuong> Thanks shashlick & Araq , after I compiled nimrtl & nimhcr |
08:00:52 | FromGitter | <cndkhuong> but got another error : could not import: csuCmpIgnoreStyle |
08:02:42 | FromGitter | <cndkhuong> Nim Compiler Version 1.0.2 [Linux: amd64] ⏎ Compiled at 2019-10-22 |
08:03:29 | Araq | so don't use module strutils ;-) |
08:03:36 | Araq | but it's progress |
08:04:33 | * | gmpreussner joined #nim |
08:05:31 | FromDiscord | <Kaynato> got it, thank you! |
08:16:10 | * | wink left #nim ("https://quassel-irc.org - Chat comfortably. Anywhere.") |
08:17:37 | * | Vladar joined #nim |
08:39:04 | FromDiscord | <Kaynato> huh, interesting |
08:40:01 | FromDiscord | <Kaynato> with AnyGraph[V] = concept g, type G ... Enumerable[Paired[V]].toGraph is G , implementing func toGraph*[V](edges: Enumerable[Paired[int]]): IntGraph still does not satisfy the concept |
08:40:33 | * | FromGitter quit (Remote host closed the connection) |
08:40:52 | * | FromGitter joined #nim |
08:44:45 | FromDiscord | <Kaynato> So if I say I'm returning some Enumerable[int] from a function, and return possibly IntSet or the empty array, though the compiler doesn't complain, it then fails to satisfy the concept, |
08:46:26 | * | floppydh joined #nim |
08:47:03 | Araq | concepts are not interfaces |
08:47:56 | Araq | return a seq[int] from the function, Nim is not C# and Enumerable in C# has its own downsides. |
08:48:21 | Araq | like the fact that you don't know if len/Count is an O(1) operation |
08:50:05 | FromDiscord | <Kaynato> I guess returning empty seq[int] should be a safer bet (leaving it to the GC) than wondering if [] is Enumerable[sometype] |
08:51:42 | Araq | you can also offer an iterator x(): sometype if you're after laziness |
08:55:12 | Araq | shashlick, what's up with the choosenim problems? the tarballs don't have the execution flag set? |
08:55:27 | * | PMunch_ joined #nim |
08:55:55 | * | PMunch quit (Ping timeout: 268 seconds) |
09:06:18 | * | PMunch__ joined #nim |
09:08:48 | * | PMunch_ quit (Ping timeout: 265 seconds) |
09:10:46 | * | PMunch_ joined #nim |
09:13:15 | * | PMunch__ quit (Ping timeout: 250 seconds) |
09:18:47 | * | PMunch__ joined #nim |
09:19:03 | shashlick | I tested it and it worked fine |
09:19:33 | shashlick | But issue submitter is running choosenim stable instead of choosenim 1.0.4 so could be something different |
09:20:05 | shashlick | I'll take a look |
09:20:57 | * | PMunch_ quit (Ping timeout: 240 seconds) |
09:21:22 | shashlick | Also possible libarchive didn't find some dependency and doesn't retain flags but seems unlikely |
09:28:47 | FromGitter | <cndkhuong> someone can help me on 'csuCmpIgnoreStyle' error ? |
09:30:42 | Araq | as I said, try to *not* import strutils |
09:31:28 | FromGitter | <cndkhuong> hi Araq, I'm not using strutils in source codes |
09:31:50 | FromGitter | <cndkhuong> I used import asynchttpserver, asyncdispatch |
09:32:07 | FromGitter | <cndkhuong> and got this issue |
09:32:12 | Araq | oh my, you're in a world of trouble |
09:32:24 | FromGitter | <cndkhuong> :D |
09:32:29 | Araq | async hasn't been tested with hot code reloading |
09:32:40 | FromGitter | <cndkhuong> ok ok |
09:33:10 | FromGitter | <cndkhuong> if I remove web, it works |
09:33:20 | Araq | nor do you need it for servers, just use a load balancer |
09:33:56 | FromGitter | <cndkhuong> I just try a simple web server |
09:34:16 | FromGitter | <cndkhuong> maybe I switch to jester |
09:34:19 | * | krux02 joined #nim |
09:35:56 | Araq | anyway, here is how to fix it |
09:36:25 | Araq | edit nimrtl.nim and add 'cstrutils' to the import list |
09:38:08 | FromGitter | <cndkhuong> It works ! Thanks |
09:43:27 | Araq | and please create a PR for this... |
10:37:04 | FromGitter | <alehander92> is clyybber cloudber |
10:37:45 | FromGitter | <alehander92> life changes fast |
10:41:48 | PMunch__ | Hmm, first time I've seen a ".raise effects differ" error |
10:42:54 | * | Trustable joined #nim |
10:50:21 | FromDiscord | <Clyybber> @mratsim Did you report your compiler crash on github? |
10:50:32 | FromDiscord | <Clyybber> alehander92: only temporary |
10:50:53 | * | clyybber joined #nim |
11:01:18 | FromDiscord | <itmuckel> Hey guys! The assimp wrapper does this and relies on the "count" variables to access the arrays. So my code works only when I compile with "--boundChecks:off". Of course I don't want to disable boundChecks for my whole program. Can I temporarily disable them for a part of my code (with a pragma or something)? |
11:01:18 | FromDiscord | <itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/652464574934679562/unknown.png |
11:08:14 | FromGitter | <alehander92> {.push boundChecks:off.} |
11:08:33 | FromGitter | <alehander92> then you can {.pop.} after the code |
11:08:58 | Araq | itmuckel: fix the wrapper already to use UncheckedArray |
11:09:20 | Araq | system.UncheckedArray |
11:11:54 | FromDiscord | <itmuckel> @alehander92 thx that worked! |
11:12:08 | FromDiscord | <itmuckel> @Araq thx, that worked and is the better solution |
11:13:27 | FromDiscord | <itmuckel> @Araq once I got a model loaded with it and resolved all annoyances like this, I'll have an up-to-date and working fork |
11:23:35 | FromDiscord | <onelivesleft> is there a complicated language reason why `nimsuggest` doesn't find all instances of a token, or is it just a bug? If it's the latter then I was gonna have a look at fixing it, but if it's the former I'd probably be out of my depth. |
11:26:28 | Araq | ask Zevv or leorize when they around |
11:26:59 | FromDiscord | <onelivesleft> what timezone they in? |
11:26:59 | Araq | what do you mean "find all instances of a token"? nimsuggest doesn't deal with tokens much |
11:27:28 | FromDiscord | <onelivesleft> I mean, if you wanted to implement a variable rename refactor, you need to change every time that variable is referenced |
11:27:37 | FromDiscord | <onelivesleft> and right now `use` doesn't give them all |
11:28:07 | Araq | it does give them all |
11:28:42 | FromDiscord | <onelivesleft> 2 secs |
11:31:59 | FromDiscord | <onelivesleft> ok, if you look at: https://raw.githubusercontent.com/onelivesleft/simple_parseopt/master/src/simple_parseopt.nim |
11:32:13 | FromDiscord | <onelivesleft> and the const `options_instance_label` |
11:32:36 | FromDiscord | <onelivesleft> `nim use` will find the first three references to it, but not the bottom two |
11:33:13 | FromDiscord | <onelivesleft> the ones inside `template add_field_value_offset` |
11:34:15 | * | nsf quit (Quit: WeeChat 2.6) |
11:35:18 | Araq | sounds easy to fix |
11:36:17 | FromDiscord | <onelivesleft> kk |
11:40:47 | * | PMunch_ joined #nim |
11:41:54 | * | PMunch_ quit (Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) |
11:42:20 | * | PMunch_ joined #nim |
11:43:57 | * | PMunch__ quit (Ping timeout: 240 seconds) |
11:45:10 | * | tklohna joined #nim |
11:45:45 | PMunch_ | The schedule for our Minimilistic, Experimental, and Emerging Languages devroom for FOSDEM 2020 is out: https://fosdem.org/2020/schedule/track/minimalistic_experimental_and_emerging_languages/ |
11:45:56 | PMunch_ | And we have no less than four Nim talks this year! |
11:49:43 | Zevv | \o/ |
11:49:45 | * | PMunch_ is now known as PMunch |
11:50:53 | FromDiscord | <itmuckel> Haha, nice! |
11:59:05 | PMunch | Note that the talks are fairly late in the day, so if you plan on going don't book your return early :) |
12:00:16 | * | rockcavera joined #nim |
12:02:21 | FromDiscord | <mratsim> So multithreading in and tensors out 😉 |
12:04:02 | Zevv | wider audience for that I guess |
12:21:05 | PMunch | Hmm, when compiling for the Arduino and using a panicoverride file doAssert will fail because it tries to use the panic procedure defined there which uses C stuff |
12:21:16 | PMunch | So it gets an error about importc on compile-time |
12:21:32 | * | hylix joined #nim |
12:21:44 | * | hylix quit (Client Quit) |
12:22:11 | PMunch | mratsim, yeah the others picked what they thought looked most interesting, which I feel is a good idea since they probably represent a broader audience than I do :) |
12:24:10 | clyybber | mratsim: Did you report the compiler crash with the captures? |
12:46:24 | * | sz0 joined #nim |
12:52:28 | FromGitter | <zetashift> Really nice PMunch! |
12:53:00 | FromGitter | <zetashift> I was expecting a Zig talk there quite surprised. But 4 Nim talks is awesome |
12:54:34 | * | nsf joined #nim |
13:11:20 | * | solitudesf joined #nim |
13:18:14 | * | abm joined #nim |
13:26:09 | FromGitter | <alehander92> i think they couldn't send anyone for fosdem |
13:26:37 | FromGitter | <alehander92> as probably they're based in usa mostly and are just on some donations currently |
13:27:16 | FromGitter | <alehander92> i also hoped for more zig/pony/cone whatever talks |
13:27:29 | FromGitter | <alehander92> but on the other hand 4 nim talks is almost a miniconf! |
13:27:35 | FromGitter | <alehander92> niice! |
13:29:27 | * | lritter joined #nim |
13:31:57 | FromGitter | <alehander92> Pmunch whats your plan for your talk: one example "app" that uses all those environments? |
13:34:03 | FromGitter | <alehander92> one thing i really value is how one can *reuse* types/minilibs from microcontrollers to frontend: so e.g. you can easily serialize something on your rpi and send it somewhere and finally deserialize it in the browser + show it without any additional type schemas/models etc |
13:34:17 | PMunch | Yeah I think the Zig people wanted to hold one, but no-one could make the trip |
13:34:23 | PMunch | Or at least no-one who wanted to hold a talk |
13:35:03 | PMunch | I haven't actually thought too much about what I'll do for my talk |
13:35:29 | PMunch | But I was thinking about doing one super simple thing that runs in all the environments just as a demo at the end |
13:37:51 | FromDiscord | <itmuckel> Hey guys I take the addr() of a seq to point `glBufferData` to the data it should send to the graphics card. Now I noticed that "sometimes" it works, sometimes it doesn't. Is the memory layout not determined for sequences? 🤔 |
13:37:52 | FromDiscord | <itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/652503970635579433/unknown.png |
13:38:53 | PMunch | itmuckel, you definitely want to take the address to vertices[0] |
13:39:15 | FromDiscord | <itmuckel> Sometimes the compilation returns a valid program, sometimes compiling and running it yields "Illegal storage access" at glBufferData |
13:39:16 | PMunch | Sequences in memory store their size and capacity as two integers at the beginning |
13:39:34 | FromDiscord | <itmuckel> omg, that's definitely not what I want 😱 |
13:39:39 | PMunch | Haha :P |
13:40:06 | PMunch | But yeah, take the address of the first element instead. The others in the sequence should follow in order like a normal C array |
13:40:22 | * | endragor quit (Remote host closed the connection) |
13:40:37 | FromDiscord | <itmuckel> Nice, just compiled it 5 times in a row with no problems |
13:40:45 | FromDiscord | <itmuckel> thx! |
13:40:49 | PMunch | No problem |
13:40:58 | PMunch | Bit weird that it results in a compilation error though.. |
13:41:38 | FromDiscord | <itmuckel> No, not a compilation error, I always run the program after compilation and it is a runtime error |
13:41:49 | FromDiscord | <itmuckel> "Illegal Storage Access" is what opengl returns |
13:42:21 | FromDiscord | <itmuckel> C:\Users\Admin\.nimble\pkgs\opengl-1.2.3\opengl\private\errors.nim(22) glBufferData |
13:42:21 | FromDiscord | <itmuckel> SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
13:42:39 | Araq | call loadExtensions() |
13:43:18 | FromDiscord | <itmuckel> I did, otherwise the preceding gl-calls would fail as well |
13:43:27 | FromDiscord | <itmuckel> PMunch's tip solved it |
13:47:59 | FromGitter | <alehander92> PMunch gotcha |
13:48:05 | FromGitter | <alehander92> whatever you decide |
13:48:33 | FromGitter | <alehander92> but good work with fosdem ! |
13:50:06 | Araq | clyybber, https://github.com/nim-lang/Nim/pull/12823 |
13:50:07 | disbot | ➥ ARC: cycle detector 👑11Araq |
13:50:35 | Araq | untested :P |
13:50:51 | Araq | but I'm getting good at writing GCs |
13:51:45 | clyybber | Araq: Nice, hows the approach called that you do there? |
13:52:06 | Araq | key insight: moves cannot produce cycles so if you optimize for =sink over = you push the cycle detection's overhead into the noise level |
13:52:19 | clyybber | oh, just saw the comment |
13:52:28 | clyybber | that explains the approach |
13:52:42 | clyybber | *links to the paper |
13:52:51 | PMunch | alehander92, thanks :) |
13:53:05 | clyybber | Araq: Thats great |
13:53:50 | Araq | the jump stack changes the complexity from 3*N to 2*N where N is the side of the involved subgraph |
13:53:58 | clyybber | Araq: Another insight, dunno if you used that there, is that we only need to check for a cycle if some refcount decreases to more than zero |
13:54:01 | Araq | making it competetive with tracing |
13:54:33 | Araq | that's an old hat |
13:54:51 | Araq | and also implemented |
13:54:57 | clyybber | Nice |
13:55:12 | clyybber | so you hold up your part of the deal |
13:55:17 | clyybber | now its time for my part :) |
13:55:29 | Araq | well it's completely undebugged |
13:56:26 | Araq | but in theory it's sound. we also do non-atomic RC'ing and use the older .gcsafe mechanism to restrict sharing |
13:56:52 | Araq | the idea is that you can move graphs around between threads |
13:57:24 | Araq | but only one thread is allowed to access it really |
13:57:42 | Araq | again emphasizing the 'move' idea |
13:57:58 | * | Araq is writing a blog post... |
13:58:33 | * | clyybber is anticipating the blog post... |
14:00:48 | FromGitter | <alehander92> so i basically |
14:00:57 | FromGitter | <alehander92> want to call a nim method |
14:01:00 | FromGitter | <alehander92> with a jsobject |
14:01:08 | FromGitter | <alehander92> but to recognize what type should i cast it to |
14:01:44 | FromGitter | <alehander92> my best guess is to somehow find the overload through a macro |
14:01:56 | FromGitter | <alehander92> and maybe find the type of its arg |
14:02:06 | FromGitter | <alehander92> is there a simple way |
14:07:08 | FromGitter | <alehander92> i can just use function pointers i guess |
14:07:27 | FromGitter | <alehander92> because even with a macro i probably cant just |
14:07:44 | FromGitter | <alehander92> find the "only" overload of method m for type t |
14:09:01 | disruptek | alehander92: there's a lot of code that does stuff like that in openapi. |
14:09:10 | disruptek | !repo openapi |
14:09:11 | disbot | https://github.com/disruptek/openapi -- 9openapi: 11OpenAPI Code Generator for Nim 15 9⭐ 0🍴 7& 4 more... |
14:09:52 | disruptek | also there's this, but, y'know, yer not supposed to use it. |
14:10:02 | disruptek | !repo disruptek/jsonconvert |
14:10:02 | disbot | https://github.com/disruptek/jsonconvert -- 9jsonconvert: 11lazy json node conversion 15 0⭐ 0🍴 |
14:11:39 | FromGitter | <Willyboar> disruptek is nimph ready for use? |
14:11:58 | disruptek | depending on what you'd use it for, yes. |
14:12:30 | FromGitter | <Willyboar> simple things |
14:12:49 | FromGitter | <alehander92> disruptek yeah but i mostly want to |
14:13:09 | FromGitter | <alehander92> hm, do it based on methods defined in the same program |
14:13:15 | FromGitter | <alehander92> but i decied to just add type hints |
14:13:17 | FromGitter | <alehander92> to my dsl |
14:13:40 | clyybber | Araq: The test failures look nasty, but cosmetic :) |
14:13:56 | FromGitter | <alehander92> thanks! |
14:14:06 | FromGitter | <Willyboar> Ok. I will plaay with nimph tonight :D |
14:14:11 | disruptek | i'd be surprised and pleased if you could find a way to break it. |
14:14:14 | FromGitter | <alehander92> its probably something good, but i have to change a lot more |
14:15:27 | clyybber | disruptek: rm -f shuf -n1 -e ~/builds/nimph/* |
14:15:47 | disruptek | i will add installation instructions today. there are apparently some bugs in nimterop/nimble that make it harder than it should be. |
14:15:48 | * | nsf quit (Quit: WeeChat 2.6) |
14:16:34 | disruptek | clyybber: it should be fine with that. 😜 |
14:16:36 | clyybber | disruptek: Curious; do you actually need to ship nimterop with it? Can't you include the wrappers generated by nimterop? |
14:16:40 | clyybber | disruptek: Really? |
14:16:59 | disruptek | yeah, it knows about changes to your repos and will prevent you from locking if they are corrupted. |
14:17:35 | disruptek | i depend upon nimgit2, which depends upon nimterop. too much work to do it any other way. |
14:18:29 | clyybber | afaik shashlick said there is a way to make nimterop spit out the wrapper for standalone usage |
14:18:34 | disruptek | the idea is that it adds value to any project. it should work with normal nimble workflow, too, by design. |
14:19:04 | disruptek | it makes very, very few assumptions. |
14:20:48 | shashlick | It will get better with use |
14:21:07 | shashlick | Can fix more issues as it becomes more prevalent |
14:22:02 | disruptek | shashlick did a lot of work just to get nimgit2 going. |
14:27:37 | * | tklohna quit (Ping timeout: 240 seconds) |
14:28:52 | * | ehmry is now known as ehmry_ |
14:31:12 | * | ehmery joined #nim |
14:31:14 | * | ehmry_ left #nim (#nim) |
14:41:17 | shashlick | disruptek please open issues as you find them |
14:44:49 | disruptek | well, nimterop isn't blocking nimble install of nimph anymore. or, nimble is also blocking it, so you're off the hook. 😁 |
14:55:24 | * | sz0 quit (Quit: Connection closed for inactivity) |
14:57:46 | * | PMunch quit (Quit: Leaving) |
14:57:54 | disruptek | Tip: 540 messages have been suppressed, use --verbose to show them. |
14:58:25 | clyybber | use --verbose to open pandoras box |
14:59:52 | FromGitter | <alehander92> woww |
15:01:35 | disruptek | when i try to pass nimble a --passNim statement, it gets rewritten and then i'm told it's an unknown option. |
15:01:42 | disruptek | does that feature work? |
15:03:06 | disruptek | Error: Unknown option: --path:/home/adavidoff/nimph/src |
15:20:35 | * | Kaivo quit (Read error: Connection reset by peer) |
15:20:39 | * | narimiran quit (Quit: leaving) |
15:26:55 | disruptek | ahh, you can't use a space with nimble long-options. |
15:30:46 | * | Ven`` joined #nim |
15:31:16 | * | clyybber quit (Quit: WeeChat 2.6) |
15:39:59 | * | dddddd joined #nim |
15:44:30 | * | tklohna joined #nim |
15:45:36 | * | krux02 quit (Remote host closed the connection) |
15:52:31 | disruptek | https://github.com/nim-lang/nimble/issues/748 |
15:52:32 | disbot | ➥ permission denied to ~/.nimble/pkgs is fatal 🧚11disruptek |
15:52:38 | disruptek | happy, shashlick? 😛 |
16:01:02 | * | floppydh quit (Quit: WeeChat 2.6) |
16:10:50 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:14:01 | * | Ven`` joined #nim |
16:34:23 | FromGitter | <kayabaNerve> Should C constants still be imported via importcpp? |
16:38:05 | FromDiscord | <mratsim> usually I hardcode them as const and on debug mode I load them via importc and assert that those are equal |
16:38:34 | FromGitter | <kayabaNerve> Can you load `#define`s via importc? |
16:38:41 | FromDiscord | <mratsim> see: https://github.com/numforge/laser/blob/master/laser/photon_jit/photon_osalloc.nim#L63-L76 |
16:38:51 | FromDiscord | <mratsim> yes you can |
16:38:56 | FromGitter | <kayabaNerve> I can't find anything about it in the manual and a 2016-2017 issue said use importcpp |
16:38:57 | FromGitter | <kayabaNerve> oh |
16:39:07 | FromGitter | <kayabaNerve> Thank you |
16:39:25 | FromDiscord | <mratsim> see: https://github.com/mratsim/weave/blob/master/experiments/e04_channel_based_work_stealing/primitives/coz.nim#L21 |
16:39:46 | FromDiscord | <mratsim> and the defined is here: https://github.com/mratsim/weave/blob/master/experiments/e04_channel_based_work_stealing/primitives/coz.h#L79 |
16:43:10 | FromGitter | <kayabaNerve> Thanks. |
16:50:09 | * | nsf joined #nim |
17:43:56 | * | tklohna quit (Ping timeout: 276 seconds) |
18:01:43 | * | nsf quit (Quit: WeeChat 2.6) |
18:13:45 | * | xet7 quit (Quit: Leaving) |
18:16:43 | * | xet7 joined #nim |
18:25:34 | Zevv | sealmove: no pull for us on pullrequest friday I guess :/ |
18:37:07 | FromDiscord | <treeform> disruptek, lol your jsonconvert looks like mine ... no one has time to fix broken json sent from some one else... |
18:37:21 | disruptek | yeah, pretty much. |
18:37:53 | FromDiscord | <treeform> mine does objects too though |
18:38:02 | FromDiscord | <treeform> it tries to be supper loose though |
18:38:09 | disruptek | i'm starting to not care about making my json parsing legible. |
18:38:24 | FromDiscord | <treeform> if it fits it sits, if it not fits it not sits... |
18:38:28 | disruptek | i just figure, if you're in there, you probably know it's a clusterfuck. |
18:41:58 | Araq | Zevv, sorry, no PR friday today |
18:42:11 | Araq | I'm having to much fun with cycle detection. |
18:43:09 | Zevv | http://zevv.nl/div/detect.jpg |
18:43:14 | Zevv | not *that* hard, is it? |
18:44:23 | disruptek | that looks like way more than 45% of a bike. |
18:45:14 | Zevv | well, 50% is because it looks like a bike from *this* side, but you can't tell the other side |
18:45:42 | disruptek | fair enough. |
18:45:44 | Zevv | the leftover 5% is the bad cropping |
19:04:13 | disruptek | Zevv: npeg head, seems like maybe P[0..1] "matches P m+1 to n+1 times" maybe? or 0-n+1? |
19:12:08 | Zevv | oh I never thought of 0 in there... |
19:12:57 | Zevv | but otoh, doesnt it just work, 0 or 1 times? |
19:13:34 | Zevv | i dont thin |
19:13:36 | disruptek | no, it works up to two times for me. |
19:13:48 | Zevv | bwah no way |
19:13:59 | Zevv | ill check when i get home! |
19:14:11 | disruptek | i will commit a test to nimph. |
19:14:24 | disruptek | oh, i already did. |
19:14:51 | disruptek | see the end of tests/tpackage.nim |
19:14:54 | Zevv | dang youre right, how could my tests have missed that. its just obviously stupid |
19:15:09 | disruptek | just change the docs 😉 |
19:15:39 | Zevv | https://github.com/zevv/npeg/blob/master/src/npeg/patt.nim#L217 |
19:15:41 | disruptek | but srsly, i do wish it worked 0..1x for 0..1 values. |
19:15:48 | Zevv | it just adds P, and then some |
19:16:06 | disruptek | heh |
19:16:14 | Zevv | Ill fix it |
19:16:38 | Zevv | thanks dude |
19:16:43 | disruptek | thanks 👍 |
19:16:58 | Zevv | look at us being friendly again. we _can_ do it |
19:17:05 | disruptek | i don't believe it. |
19:17:24 | disruptek | wait, this doesn't mean you got over the rainbow thing, does it? |
19:17:32 | disruptek | !pull author:zevv |
19:17:34 | disbot | https://github.com/nim-lang/Nim/pull/12777 -- 3Increased TInstr field sizes: allow long jumps and 65535 VM registers 🌈11zevv 7& 28 more... |
19:17:52 | disruptek | 'cause that's pretty bad. |
19:18:26 | Zevv | i love it |
19:18:36 | Zevv | because its just a little green square |
19:18:41 | disruptek | lol |
19:19:16 | disruptek | on non-emoji i think it's just like a bunch of pixelated streaks. |
19:20:30 | FromDiscord | <kodkuce> anyone played with pose estamination, i want to buy some under 100$ ai hoping it can run pose estamination at least 10fps, just pose no fingers or face featurs, was hoping OrangePi 4 can meybe do it |
19:20:50 | Zevv | no wait what, it is correct |
19:21:08 | disruptek | is it? |
19:21:25 | Zevv | no it is not! |
19:22:35 | * | nif quit (Quit: ...) |
19:22:45 | * | nif joined #nim |
19:26:47 | Zevv | disruptek: 0.21.3 is there, just for you |
19:26:53 | disruptek | w00t danke. |
19:27:05 | Zevv | it was an off by one, `m..n` -> `m..<n` |
19:27:36 | disruptek | confirmed: 0.21.3 breaks my tests 😁 |
19:28:23 | Zevv | good! |
19:41:15 | * | tklohna joined #nim |
20:01:10 | Zevv | I just earned myself I beer |
20:01:28 | * | NimBot joined #nim |
20:22:14 | * | Vladar quit (Quit: Leaving) |
20:30:47 | * | kungtotte joined #nim |
20:53:03 | * | tklohna quit (Ping timeout: 246 seconds) |
20:59:46 | * | Trustable quit (Remote host closed the connection) |
21:00:54 | * | abm quit (Read error: Connection reset by peer) |
21:02:08 | FromDiscord | <treeform> Does any one know if a site like this? https://godbolt.org/ but it does nim too? |
21:02:31 | disruptek | i thought godbolt did nim. |
21:02:47 | FromDiscord | <treeform> It was never added: https://github.com/mattgodbolt/compiler-explorer/issues/206 |
21:02:48 | disbot | ➥ Nim Language Support @11Varriount |
21:03:12 | FromDiscord | <treeform> But i remember seeing some place, but could it have been a dream? |
21:04:53 | FromDiscord | <treeform> could it have been a feature of https://play.nim-lang.org/ ? |
21:05:04 | disruptek | what are you looking to do? |
21:05:15 | FromDiscord | <treeform> see asm output |
21:05:24 | disruptek | i think you can do that in the playground. |
21:05:42 | FromDiscord | <treeform> how? |
21:06:50 | disruptek | i dunno. |
21:07:14 | disruptek | maybe there's a commit that explains it, or explains that it doesn't exist. 😉 |
21:09:37 | * | donpdonp joined #nim |
21:10:22 | donpdonp | https://play.nim-lang.org/#ix=23IO internal error |
21:12:52 | FromGitter | <Willyboar> https://play.nim-lang.org/#ix=23IP |
21:13:32 | disruptek | donpdonp: that should be reported. |
21:15:10 | donpdonp | disruptek: any ideas where to report it? |
21:15:34 | disruptek | https://github.com/nim-lang/Nim/issues |
21:15:44 | donpdonp | thx |
21:17:52 | * | Ven`` quit (Quit: Textual IRC Client: www.textualapp.com) |
21:18:26 | FromDiscord | <Fern & Simula (They/Them)> how can i properly use locks without having a global lock variable? |
21:19:32 | FromDiscord | <Fern & Simula (They/Them)> im sure that's a really dumb question but for some reason it's just evading me |
21:22:46 | disruptek | sorry, no experience with threads in nim. |
21:28:07 | * | donpdonp left #nim ("WeeChat 2.6") |
21:33:18 | Araq | with a global lock variable. |
21:33:56 | Araq | i doesn't have to be global, but usually if one asks this question one is not ready for anything else |
21:34:27 | FromDiscord | <Fern & Simula (They/Them)> alright. i'm not planning on using it, i was just curious |
21:47:13 | * | tiorock joined #nim |
21:47:13 | * | rockcavera is now known as Guest59385 |
21:47:13 | * | tiorock quit (Changing host) |
21:47:13 | * | tiorock joined #nim |
21:47:13 | * | Guest59385 quit (Killed (cherryh.freenode.net (Nickname regained by services))) |
21:47:13 | * | tiorock is now known as rockcavera |
22:23:42 | rayman22201 | sadly, still no Godbolt support for Nim. I started working on it again again a while back, but got distracted with other things. (story of my life) |
22:24:03 | rayman22201 | on my list of things to get back to eventually... |
22:31:30 | FromDiscord | <treeform> rayman22201, thats ok, life is more important |
22:35:16 | * | kotrcka joined #nim |
22:38:03 | * | clyybber joined #nim |
22:39:23 | FromDiscord | <mratsim> @Fern & Simula (They/Them) either a global or a "var foo {.global.]: Lock" |
22:39:37 | FromDiscord | <mratsim> so that it's actually global but only visible in the scope of a proc |
22:40:05 | FromDiscord | <mratsim> or in an object if it's to protect potentially shared field |
22:41:45 | FromDiscord | <mratsim> @Araq, @Clyybber, here is the syntax for captures I ended up with: https://github.com/mratsim/weave/blob/master/benchmarks/matrix_transposition/weave_transposes.nim#L74-L103 |
22:43:35 | FromDiscord | <treeform> @mratsim what are your thoughts on: https://github.com/genotrance/shared |
22:45:29 | FromDiscord | <mratsim> I think you would use shared strings and shared seq only for proof-of-concepts or when you expect very very few concurrent accesses. This is true whether you would use locks or more fancy atomics strategy. |
22:45:53 | FromDiscord | <mratsim> The issue with multithreading is that the best way to do multithreading is for thread to work in its own corner |
22:46:01 | FromDiscord | <mratsim> every thread* |
22:46:11 | FromDiscord | <treeform> no shared memory of any kind? |
22:46:31 | FromDiscord | <mratsim> only at very few synchronization points |
22:46:44 | Yardanico | @mratsim can your weave library be used for simple multithreading (for example to process 10000 entries from a sequence by a proc in parallel, with a maximum of 500 threads?) |
22:46:56 | Yardanico | I just didn't find a lot of simple examples :P |
22:47:06 | FromDiscord | <mratsim> for example, in my multithreading runtime: every thread has its memory manager, its caches, its scheduling loop |
22:47:26 | * | krux02 joined #nim |
22:47:28 | FromDiscord | <treeform> @mratsim what are your thoughts on MPI? https://www.open-mpi.org/ |
22:47:52 | FromDiscord | <mratsim> they only communicate with very simple channels: https://github.com/mratsim/weave/blob/master/weave/channels/channels_spsc_single_object.nim#L81-L103 |
22:48:33 | FromDiscord | <mratsim> I didn't try MPI yet, given how old it is I guess it has issues with legacy API that were misguided but people manage to overcome that one way or another since it's still alive 😛 |
22:49:00 | FromDiscord | <mratsim> also since it's message passing based I can probably adapt MPI channel to transport weave, so I don't have to redo a bunch of things for starter |
22:49:37 | FromDiscord | <mratsim> @Yardanico isn't that simple? https://github.com/mratsim/weave/blob/master/benchmarks/matrix_transposition/weave_transposes.nim#L69-L81 |
22:49:49 | Yardanico | oh thanks! :P |
22:50:01 | FromDiscord | <mratsim> or this? https://github.com/mratsim/weave/blob/master/benchmarks/fibonacci/weave_fib.nim#L9-L17 |
22:50:22 | Yardanico | weave_fib is exactly what I need, thanks again :) |
22:50:43 | FromDiscord | <mratsim> the API is very simple: https://github.com/mratsim/weave/blob/master/weave.nim#L13-L18 |
22:51:20 | FromDiscord | <mratsim> Very important caveat |
22:51:29 | FromDiscord | <mratsim> There is absolutely 0 test |
22:51:37 | FromDiscord | <treeform> mratsim, mpi is very odd I only learned about it a few days ago. |
22:52:20 | FromDiscord | <mratsim> Actually I should add that as a disclaimer |
22:52:26 | FromDiscord | <treeform> @mratsim, they have their own C compiler. It can work to message between threads, between processes, or even between machines across the net. |
22:52:49 | FromDiscord | <treeform> OpenAI uses it heavily. |
22:53:13 | FromDiscord | <treeform> And many other science labs, from biology to physics. |
22:54:54 | FromDiscord | <treeform> @mratsim I was trying to design a system for nim based on this diagram: |
22:54:55 | FromDiscord | <treeform> |
22:54:55 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/652644169021652995/unknown.png |
22:55:08 | FromDiscord | <treeform> I felt overwhelmed though. |
22:58:09 | FromDiscord | <mratsim> for IO tasks, you can look into the couple of papers I put there: https://github.com/mratsim/weave/issues/22 |
22:58:11 | disbot | ➥ Research on IO-bound tasks ⚫11mratsim |
22:58:42 | FromDiscord | <mratsim> especially the Go slides |
22:59:29 | FromDiscord | <mratsim> libmill or anything with "work-stealing" + fibers also |
22:59:39 | FromDiscord | <mratsim> and Tokio from Rust |
23:00:29 | * | solitudesf quit (Ping timeout: 250 seconds) |
23:00:39 | FromDiscord | <treeform> "Rust coupled both IO and a task parallelism" What do you think you will do? |
23:01:01 | FromDiscord | <treeform> "However even for compute bound tasks we will have to deal with IO latencies for example in a distributed system or cluster." - This is a really good point! |
23:05:09 | FromDiscord | <mratsim> For now I think I'll play well with asyncdispatch and Chronos |
23:05:49 | FromDiscord | <mratsim> My main goal with weave was solving my issues with nested OpenMP parallelism, or OpenMP tasks being really flaky with GCC |
23:06:11 | FromDiscord | <mratsim> because for my ML compiler project I will create a lot of nested for loops |
23:06:16 | * | kotrcka left #nim (#nim) |
23:06:24 | FromDiscord | <mratsim> and I solved that a hour ago 🙂 |
23:07:09 | FromDiscord | <treeform> congrats on solving it |
23:08:00 | FromDiscord | <mratsim> so now I have 2 choices: |
23:08:01 | FromDiscord | <mratsim> - publish the library on Nimble, call it a day and work on my compiler |
23:08:01 | FromDiscord | <mratsim> - or polish the internals so that they are actually maintainable (even I get lost in the control flow). My idea is to create a macro that generates a state machine and transform the internal into different state described by "current state", "input", "transition" |
23:08:08 | FromDiscord | <treeform> ML compiler project - machine learning compiler project? |
23:08:11 | FromDiscord | <mratsim> yes |
23:08:30 | FromDiscord | <treeform> compiler that uses ML? or compiler used by ML? |
23:08:38 | FromDiscord | <mratsim> This: https://github.com/numforge/laser/tree/master/laser/lux_compiler |
23:08:38 | FromDiscord | <mratsim> See details in the markdown files here: https://github.com/numforge/laser/tree/master/laser/lux_compiler/core |
23:08:50 | FromDiscord | <mratsim> used for ML |
23:09:44 | FromDiscord | <treeform> how is this related to https://github.com/mratsim/Arraymancer ? |
23:11:34 | FromDiscord | <mratsim> It will be the new backend of Arraymancer |
23:12:10 | FromDiscord | <mratsim> well I planned that a year ago with nothing to show so ... |
23:13:00 | FromDiscord | <treeform> What kind of ML are you doing? |
23:13:07 | * | sealmove joined #nim |
23:13:07 | FromDiscord | <mratsim> The idea is that once it's working it would be much easier to develop complex machine learning algorithm that are actually fast because I have been struggling with that |
23:13:14 | FromDiscord | <mratsim> And supporting GPUs |
23:14:02 | FromDiscord | <mratsim> The worse is deriving matrix formulas by hand |
23:14:20 | FromDiscord | <mratsim> see: https://people.csail.mit.edu/tzumao/gradient_halide/ for the difference between Hlide (my inspiration) and handcoded Cuda |
23:14:20 | FromDiscord | <treeform> oh no the flashbacks ... |
23:15:06 | disruptek | laser is the future. |
23:15:12 | FromDiscord | <mratsim> All kind, computer vision and NLP |
23:15:15 | FromDiscord | <treeform> Halide is your version? |
23:15:29 | FromDiscord | <mratsim> no Halide is my inspiration, it's an existing library in C++ |
23:16:00 | FromDiscord | <mratsim> however it's a bit of a pain to deploy, you need to compile it, then pass your C++ code in Halide, then link it in your actual code |
23:16:09 | FromDiscord | <treeform> is Halide faster than hand-rolled Cuda? |
23:16:22 | FromDiscord | <mratsim> some I'm building a Halide-like compiler in Nim macros |
23:16:44 | FromDiscord | <treeform> cool, and thats laser, that you will use in array manser |
23:16:55 | FromDiscord | <mratsim> no, but it's 100x faster to experiments various parallel schedules in Halide without introducing bugs |
23:17:09 | FromDiscord | <mratsim> let's see if I can find an example |
23:18:33 | FromDiscord | <treeform> So many people use PyTorch .. and some use TenserFlow... I hear nothing else. |
23:18:59 | FromDiscord | <mratsim> 3 examples of a blur kernel |
23:18:59 | FromDiscord | <mratsim> https://cdn.discordapp.com/attachments/371759389889003532/652650225500160030/unknown.png |
23:19:18 | FromDiscord | <treeform> blury |
23:19:22 | FromDiscord | <treeform> Is that nim? |
23:19:38 | FromDiscord | <mratsim> if you look at the "h.compute_root()", you see that after it you have vectorize or another interleaving |
23:19:45 | FromDiscord | <mratsim> no that's not, it's a DSL |
23:19:54 | FromDiscord | <treeform> this is your DSL? |
23:19:59 | FromDiscord | <mratsim> you could add "parallelize" or various other things |
23:20:11 | FromDiscord | <mratsim> and the compiler will automatically adjust the generated code |
23:20:19 | FromDiscord | <mratsim> while keeping the algorithm the same |
23:20:38 | FromDiscord | <mratsim> so you can experiments very fast on different parallelization of vectorization strategy |
23:21:09 | FromDiscord | <mratsim> no it's not mine, it's halide, I have a couple of issues with it so I will be changing it a bit |
23:21:20 | FromDiscord | <treeform> I see. |
23:21:47 | FromDiscord | <mratsim> example in Nim: https://github.com/numforge/laser/blob/master/laser/lux_compiler/lux_dsl.nim#L43-L55 |
23:22:33 | FromDiscord | <treeform> looks cool |
23:23:01 | FromDiscord | <mratsim> one big advantage is that you can have 2 people working on the same code as well: |
23:23:01 | FromDiscord | <mratsim> - 1 researcher who knows the algorithm |
23:23:01 | FromDiscord | <mratsim> - 1engineer who knows how to optimize stuff |
23:23:19 | FromDiscord | <mratsim> when training a model takes 1000+ GPU/year that's very valuable |
23:23:26 | FromDiscord | <mratsim> today you basically need to know both |
23:23:37 | rayman22201 | @mratsim, I know your focus is compute bound problems, but I just want to say that I appreciate you looking at the IO bound aspeccts (weave #22). As a person who has done a lot of work with asyncdispatch, long running and IO bound tasks are very important to me :-P |
23:23:38 | disbot | https://github.com/nim-lang/Nim/pull/22 -- 6Added documentation for implicit conversions @11reactormonk |
23:24:01 | rayman22201 | I had a feeling disbot would get that wrong lol |
23:25:44 | disruptek | yeah. 😁 |
23:26:08 | disruptek | we probably should have a shorthand for outside repos. |
23:27:45 | rayman22201 | ;-) feature request |
23:30:58 | disruptek | you can search them, it just doesn't do the expansion that github does by default. |
23:31:19 | disruptek | but, we can add that. |
23:32:58 | disruptek | it's surprisingly difficult to find 22. |
23:33:13 | rayman22201 | magic number? |
23:33:25 | rayman22201 | not quite 42 but close enough :-P |
23:56:12 | * | gmpreussner quit (Ping timeout: 265 seconds) |
23:57:20 | FromGitter | <Obround> Hey guys! I was wondering if there was a way to run nim code without creating a new file and including? Something like a proc maybe? |
23:57:36 | Yardanico | what do you exactly mean? |
23:57:50 | Yardanico | you mean a REPL? |
23:58:04 | FromGitter | <Obround> Yeah, but able to do it from the code |
23:58:23 | FromGitter | <Obround> Like `execNimCode("echo 2+2")` |
23:58:55 | Yardanico | well, you want to execute nim code at your program's runtime? |
23:59:29 | FromGitter | <Obround> Basically. |
23:59:32 | Yardanico | the code provided by the third-party (like the user)? then I think you should look into embedding NimScript into your program (although be aware that NimScript doesn't support all Nim features and is quite slower) |
23:59:48 | Yardanico | that's because Nim is fully statically compiled without any VM, you can't eval like in Python |