<< 02-02-2020 >>

00:00:03*junland quit (Quit: %ZNC Disconnected%)
00:01:52*junland joined #nim
00:04:26leorizegreenfork: look for `m<magic name>` in the compiler source
00:10:56greenforkleorize: yes, it's defined in compiler/ast.nim, used for error condition in compiler/jsgen.nim and calls genBinaryABCD proc in compiler/vmgen.nim. genBinaryABCD does some vm register related things which I don't understand
00:12:55leorize@inv what is the full path to the file that didn't work?
00:13:09leorizefwiw nimsuggest can't process paths with quotation marks in it
00:13:18leorizekinda an oversight in the api
00:14:13leorizegreenfork: search for opcGorge
00:15:11leorizefound it: opGorge
00:15:16leorize^ search for that
00:17:24greenforkleorize: yes, thanks!
00:21:33*ptdel quit (Ping timeout: 245 seconds)
00:28:36*ptdel joined #nim
00:43:35nisstyreanyone tried writing a uwsgi plugin in Nim? I expect it wouldn't be too difficult since it supports C...
01:21:56FromDiscord_<Clyybber> should be possible
01:22:04FromDiscord_<Clyybber> afaik noone has tried yet tho
01:27:15*Hideki_ quit (Remote host closed the connection)
01:28:18*Hideki_ joined #nim
01:33:13*Hideki_ quit (Ping timeout: 265 seconds)
01:58:50*Hideki_ joined #nim
02:23:38*lritter quit (Ping timeout: 268 seconds)
02:29:10*muffindrake quit (Quit: muffindrake)
02:32:16*muffindrake joined #nim
02:32:26*muffindrake quit (Client Quit)
02:32:36*chemist69 quit (Ping timeout: 248 seconds)
02:34:24*muffindrake joined #nim
02:34:26*muffindrake quit (Client Quit)
02:34:53*chemist69 joined #nim
02:35:35*sqfrgtf joined #nim
02:35:43sqfrgtfhi
02:35:51sqfrgtfWhat do you think about Crystal ?
02:36:13*muffindrake joined #nim
02:36:36*muffindrake quit (Client Quit)
02:48:52*sqfrgtf quit (Remote host closed the connection)
03:01:28*Hideki_ quit (Ping timeout: 265 seconds)
03:03:28skrylarllvm compilers always seem so clunky is what i thought
03:03:54skrylarmaybe crystal is better but getting rust to work on alpine was full of issues because of some linker and llvm stuff
03:18:50*thomasross quit (Ping timeout: 240 seconds)
03:20:28*thomasross joined #nim
03:28:34*thomasross quit (Ping timeout: 268 seconds)
03:33:43*thomasross joined #nim
03:43:53*thomasross quit (Ping timeout: 265 seconds)
03:45:07*thomasross joined #nim
03:48:36*Hideki_ joined #nim
03:50:40*ftsf joined #nim
04:39:47*marmotini_ joined #nim
04:40:02*muffindrake joined #nim
05:01:02*nsf joined #nim
05:10:26skrylarring looks like such a bizzare scripting language
05:24:43*marmotini_ quit (Remote host closed the connection)
05:26:30*theelous3 quit (Read error: Connection reset by peer)
05:52:31FromGitter<Varriount> Ring?
05:52:56*NimBot joined #nim
05:54:55FromGitter<Varriount> I can't seem to find documentation that actually explains the syntax
06:05:15*Hideki_ quit (Remote host closed the connection)
06:06:03*Hideki_ joined #nim
06:06:26FromDiscord_<Rika> http://ring-lang.sourceforge.net/doc1.12/faq.html#why-is-ring-weakly-typed
06:06:32FromDiscord_<Rika> Varriount
06:07:50*Hideki_ quit (Remote host closed the connection)
06:08:06*Hideki_ joined #nim
06:08:20leorizehas the nim talks happened yet?
06:10:56skrylar@Varriount ring is supposedly the inspiration for QML's syntax so i've been looking at it very lightly. it does have a c api so bindings are possible... tho i've been binding janet because lisp :b
06:12:50leorizeah 2 more hours
06:23:33FromGitter<Varriount> Rika: That just gives a reason for design choices... I was thinking something along the lines of Nim's manual
06:28:26skrylar@Varriount there isn't a lot of syntax http://ring-lang.sourceforge.net/doc1.12/languagedesign.html
06:28:59FromDiscord_<Rhett> what is the difference between point and ptr/ref?
06:29:03FromDiscord_<Rhett> what is the difference between pointer and ptr/ref?
06:29:19skrylarpointer is untyped, ptr and ref are typed, ptr is a typed pointer, ref is a reference
06:29:36FromDiscord_<Rhett> gotcha, thanks
06:29:41skrylartyped pointer is manual memory management, typed reference is <<underlying gc selected>>
06:30:04skrylarcast[pointer](ptr sometype) is perfectly fine for instance
06:30:36*FromGitter quit (Remote host closed the connection)
06:30:54*FromGitter joined #nim
06:31:16skrylardistinct pointer is nice if you need to deal with some external api tho because the type system will try to help you not mix them up
06:31:30FromDiscord_<Rhett> I see
06:32:06skrylaryou can do stuff like blah = distinct gluint and then have the api for texture binding return this distinct texture id and it will have the type system slap you if you were to give that handle to a vbo for instance
06:32:21skrylarbut otherwise they are just uints
06:42:53*narimiran joined #nim
06:55:07ZevvVarriount: No you didn't! Please tell me how impressive the railroad diagrams are in NPeg's readme!
06:56:43*greenfork quit (Ping timeout: 260 seconds)
07:06:32FromDiscord_<treeform> shashlick, i also started to use vscode remote recently. Working great so far.
07:07:11*thomasross quit (Remote host closed the connection)
07:07:28*thomasross joined #nim
07:12:56*Hideki_ quit (Remote host closed the connection)
07:13:49*Hideki_ joined #nim
07:15:33*hax-scramper joined #nim
07:18:35*Hideki_ quit (Ping timeout: 268 seconds)
07:25:18shashlickYa I am really liking it
07:25:36shashlickJust need to wait for osx support though
07:41:41*skrylar quit (Ping timeout: 272 seconds)
07:42:52FromDiscord_<Rika> Also regarding crystal, call me when windows support is stable
07:50:01*Hideki_ joined #nim
07:50:49*ptdel quit (Remote host closed the connection)
08:00:00*gmpreussner quit (Quit: kthxbye)
08:01:20*solitudesf joined #nim
08:05:00*gmpreussner joined #nim
08:06:56*Hideki_ quit (Ping timeout: 265 seconds)
08:10:59*Hideki_ joined #nim
08:19:16*greenfork joined #nim
08:20:44*PMunch joined #nim
08:23:12FromGitter<Varriount> Zevv: They are very impressive and make understanding the flow of things easier
08:34:34Zevv\o/ :)
08:34:52ZevvThat's kind of the idea behind them, so glad it works for you
08:35:55ZevvI sometimes run `nim c -d:npegGraph tests/tests.nim` just because I can
08:37:54Zevvhttps://asciinema.org/a/Gjy2tNWODfuB6to2RXZMvhRja
08:37:56Zevvwheeeee
08:44:59*skrylar joined #nim
08:55:13*nixfreak quit (Ping timeout: 268 seconds)
09:00:39*Hideki_ quit (Remote host closed the connection)
09:02:22*Hideki_ joined #nim
09:07:14*Hideki_ quit (Ping timeout: 265 seconds)
09:14:20*dddddd quit (Ping timeout: 268 seconds)
09:21:54*letto_ quit (Read error: Connection reset by peer)
09:24:21*greenfor` joined #nim
09:25:07*greenfork quit (Ping timeout: 265 seconds)
09:26:38*letto joined #nim
09:41:00*thomasross quit (Remote host closed the connection)
09:41:53*thomasross joined #nim
09:43:03*thomasross quit (Remote host closed the connection)
09:45:11*letto quit (Quit: Konversation terminated!)
09:47:35*letto joined #nim
09:50:08*Hideki_ joined #nim
09:57:37*skrylar quit (Quit: WeeChat 2.6)
10:07:58*ftsf quit (Ping timeout: 265 seconds)
10:10:58*Hideki_ quit (Ping timeout: 260 seconds)
10:13:21FromGitter<Varriount> I should generate a diagram of Commandant's grammar. It's probably fairly large
10:13:56*narimiran quit (Ping timeout: 265 seconds)
10:19:35FromDiscord_<Recruit_main_70007> is it emacs a good editor for nim?
10:22:40PMunchI use Vim and it works great, I'm guessing emacs would give a similar experience if you manage to set it up for it
10:23:36FromDiscord_<Recruit_main_70007> ok
10:31:11*nsf quit (Quit: WeeChat 2.7)
10:35:43*Hideki_ joined #nim
10:37:05*PMunch left #nim ("Leaving")
10:40:14*Hideki_ quit (Ping timeout: 268 seconds)
10:44:06FromDiscord_<Recruit_main_70007> how have you installed the nim plugin?
10:52:10FromDiscord_<Rika> Vim has a different plugin system from emacs
10:52:49FromDiscord_<Recruit_main_70007> but how then?
10:52:49FromDiscord_<Recruit_main_70007> i have no idea
10:59:42lqdev[m]vim-plug I suppose?
11:09:21kungtotteFollow the installation instructions for vim-plug at: https://github.com/junegunn/vim-plug
11:10:34kungtotteThen getting the neovim plugin is as easy as putting Plug 'alaviss/nim.nvim' inside the plug#begin/plug#end calls inside your init.vim and installing using the :PlugInstall command.
11:14:44lqdev[m]don't forget to reload your init.vim using :so % before running :PlugInstall.
11:46:26*nsf joined #nim
11:52:38FromDiscord_<itmuckel> Hey guys! I'm using nimterop to generate a wrapper for librg. It outputs something containing an object of type "CRITICAL_SECTION", which is a kind of mutex as far as I understand. In nim it's not defined of course. What would I use instead?
11:52:38FromDiscord_<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/673495989813772323/unknown.png
11:54:09FromDiscord_<itmuckel> I already added "--threads:on" as compiler option and found "TRTL_CRITICAL_SECTION" in an old version of nim in its Windows module, but in the current winlean version, there is no such thing. So with what would I wrap a CRITICAL_SECTION? šŸ¤”
11:54:23Yardanicothere's oldwinapi module in nimble
11:54:40Yardanicoalso in winim (it's better to use winim)
11:54:43*ftsf joined #nim
11:54:47Yardanicohttps://github.com/khchen/winim/blob/005c3cbd7887f901eb51db1a1fd4bd5de31bf13f/winim/inc/winbase.nim#L126
11:58:38FromDiscord_<itmuckel> perfect, thank you!
12:03:23*hax-scramper quit (Quit: Quit)
12:04:03*hax-scramper joined #nim
12:23:21*Hideki_ joined #nim
12:29:59*xet7 joined #nim
12:51:47*Vladar joined #nim
13:08:06*dddddd joined #nim
13:44:57*seerix joined #nim
13:57:11leorizeNim talks coming soon on fosdem :p
13:59:57*akitoshi joined #nim
14:00:43*akitoshi55 joined #nim
14:05:56*ftsf quit (Ping timeout: 265 seconds)
14:06:49livcdtoday?!
14:07:56Yardanicolivcd: yes today is 2nd feb :P
14:08:47Yardanicofirst nim talk should start in 10 minutes I think
14:10:09livcdoh cool
14:10:13livcdthere's no stream right?
14:10:14akitoshi55hi, why varargs[typedesc] doesn't work?
14:10:18akitoshi55proc test(args:varargs[typedesc])=discardtest(int,string)
14:10:34akitoshi55Error: type mismatchfirst type mismatch at position: 2required type for args: varargs[typedesc]but expression 'string' is of type: type string
14:10:42Yardanicolivcd: i think there's not, but they will be recorded
14:10:54Yardanicohttps://video.fosdem.org/2020/
14:10:59akitoshi55proc test(args:varargs[typedesc])=discard
14:11:05Yardanicoroom AW1.125 for nim talks
14:11:05akitoshi55test(int,string)
14:14:28leorizelivcd: https://live.fosdem.org/watch/aw1125
14:14:33leorizein a few minutes
14:14:34Yardanicoleorize: wow
14:17:03leorizeakitoshi55: can you file an issue?
14:18:55*akitoshi55 quit (Remote host closed the connection)
14:20:03leorizefirst talk coming up
14:20:05Yardanicoyay
14:20:13Yardanicoim gonna watch the whole thing even if it's on stream :P
14:20:16Yardanicoall 4 talks
14:21:31FromDiscord_<Rika> how long is it? it's late where i live
14:21:41Yardanico4 talks, each talk is 30 minutes
14:21:58FromDiscord_<Rika> lord thats long
14:22:01Yardanicowell actually sorry
14:22:07Yardanicotwo talks are 3 minutes and two are 20 minutes
14:22:08FromDiscord_<Rika> i dont think i can watch it, will there be archives?
14:22:14FromDiscord_<Rika> 3 minutes šŸ‘€
14:22:19Yardanico30*
14:22:33leorize@Rika, yes they will be recorded
14:23:03FromDiscord_<Rika> nice, ill watch those instead
14:25:32*nsf quit (Quit: WeeChat 2.7)
14:28:39lqdev[m]how do I make `nim doc` generate documentation to the `gh-pages` branch of my github repo?
14:30:42akitoshileorize: not sure if it is an issue, Iā€™m new to nim
14:31:38leorizeI'm pretty sure it's an issue
14:32:36FromDiscord_<Fern & Simula (They/Them)> lqdev[m]: git subtree might be useful. it's what i use for my jekyll site. jekyll code is in master and dev branches, then i build and push the _site dir to a specific branch with subtree
14:33:49FromDiscord_<Fern & Simula (They/Them)> here's the script i use so i don't need to remember the subtree commands https://github.com/3n-k1/namshub.club/blob/master/build.sh
14:34:41lqdev[m]let me see
14:37:33*abm joined #nim
14:39:55FromDiscord_<itmuckel> Hey guys! How would I convert the union type from C to nim? In the manual it talks about a `union` pragma, but there is no example how to use it. šŸ¤”
14:39:55FromDiscord_<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/673538084780113920/unknown.png
14:41:31lqdev[m]create another type called `zpl_opts_entry_sub` or something similar and attach the {.union.} pragma to it. then fill out its fields and add it as a regular field into your main object
14:44:11*lritter joined #nim
14:45:52lqdev[m]@fern does git subtree require you to commit to master first?
14:47:33FromDiscord_<Fern & Simula (They/Them)> i don't believe so. here's the article i used to set it up https://www.atlassian.com/git/tutorials/git-subtree
14:47:58*narimiran joined #nim
14:48:46leorizeAraq's presentation is going live: https://live.fosdem.org/watch/aw1125
14:48:51Yardanicoyayyyy
14:49:16FromDiscord_<Rika> decided to just watch it
14:49:21FromDiscord_<Rika> fuck time, ill watch this shit
14:49:42FromDiscord_<itmuckel> @lqdev thanks! That seems to have worked!
14:51:23*Trustable joined #nim
14:51:39*seerix quit (Ping timeout: 268 seconds)
14:58:33Yardanicosome code doesn't fit on the display sadly :(
14:59:28akitoshihttps://play.nim-lang.org/#ix=28ZA
15:03:19akitoshidisbot: issue #13317
15:03:20disbothttps://github.com/nim-lang/Nim/issues/13317 -- 3varargs[typedesc] doesn't work in both proc and template
15:03:30Yardanicoit also works with just #13317
15:03:31disbothttps://github.com/nim-lang/Nim/issues/13317 -- 3varargs[typedesc] doesn't work in both proc and template
15:04:40akitoshiGot,thanks
15:09:08*letto_ joined #nim
15:10:32*letto quit (Ping timeout: 265 seconds)
15:17:06*PMunch joined #nim
15:17:12YardanicoPMunch: nice talk :)
15:18:00shashlickšŸ‘
15:18:55*hax-scramper quit (Ping timeout: 265 seconds)
15:21:23PMunchYardanico, thanks :) I just hope the slides came through on the stream/recording, it didn't show them when I looked in the video control interface right after the talk
15:21:39YardanicoPMunch: yeah, it was good on the stream
15:22:12livcdoh leorize thanks
15:22:17livcdAm i watching mratsim now?!
15:22:20Yardanicoyes
15:22:29livcdah yeah looks like it
15:22:29PMunchYardanico, okay perfect
15:23:14FromDiscord_<Rika> oh no ;; the accent is too thick for me to understand clearly enough
15:23:26Yardanicoit's kinda okay for me :)
15:23:41*FromGitter quit (Remote host closed the connection)
15:23:59*FromGitter joined #nim
15:24:16FromDiscord_<Rika> perhaps you live in europe? maybe you're used to it because of such
15:24:31*hax-scramper joined #nim
15:24:35Yardanicowell I live in Russia, i almost don't hear english in real life, only on the internet :P
15:24:55FromDiscord_<Rika> the talk sounds so engaging though
15:25:34Yardanicodamn mr*tsim and d*m96 only have 20 minutes for their talks :(
15:25:34leorizeI could hear it :P but I also listen to most of my english on the 'net
15:26:37FromDiscord_<Rika> also some words are pronounced differently to what i usually hear D:
15:26:38FromDiscord_<Rika> it's fine
15:26:39FromDiscord_<Rika> i'll bear
15:26:54Yardanicoyou'll probably enjoy d*m96 talk, he's british :P
15:27:05PMunchYardanico, yeah I got a little extra to explain Nim for those who didn't know it. And Araq got a bit more because the other voted for it
15:27:23YardanicoPMunch: ah, okay
15:27:26FromDiscord_<Rika> ah great ;; the talk i might not be able to listen to ;;
15:27:44PMunchIn general the talks were meant to be 15m with 5m questions/handover
15:27:56Yardanicoi'm pretty excited about the fact that Ar*q has some plans with LLVM :)
15:28:09FromDiscord_<Rika> i didnt hear that what
15:28:18FromDiscord_<Rika> sounbds nice tho
15:28:35YardanicoPMunch got asked a question about LLVM, and Ar*q said that it's in their plans if I understood correctly
15:28:48Yardanicowe already have https://github.com/arnetheduck/nlvm so it's probably based on that
15:28:56FromDiscord_<Rika> "now we can say nim is compiled without someone butting in saying "ISNT IT TRANSPILED?!?!?!"
15:29:12Yardanicowe could already say that for quite a while
15:29:14Yardaniconlvm is not that new
15:29:16*Hideki_ quit (Remote host closed the connection)
15:29:42Yardanicofirst code commits in jan 2016
15:30:02*Hideki_ joined #nim
15:30:10FromDiscord_<Rika> what if someone says "BUT THATS THIRD PARTYYYYYYYY"
15:30:17Yardanico@Rika if someone says that, say to them that there was Cfront which was the first C++ compiler
15:30:20Yardanicoand it used C as a backend
15:30:28PMunchThen we say "what? you don't like parties?"
15:30:34Yardanicoand it is a compiler written by Bjarne Stroustrup
15:30:43FromDiscord_<Rika> nice, good points \
15:30:49Yardanicoword "transpile" didn't exist back then anyway lol
15:30:55Yardanicoin relation to compilation
15:32:26*Hideki_ quit (Remote host closed the connection)
15:32:41*Hideki_ joined #nim
15:32:55FromDiscord_<Rika> "5 minutes left? let's go fast"
15:33:00FromDiscord_<Rika> I AM SPEED engaged
15:33:04Yardanicogotta go fast :D
15:33:39Yardanicolast talk is about "Async await in Nim" so im pretty interested in that too
15:38:23FromDiscord_<Rika> time ;;
15:38:33Yardanicono time for questions :(
15:38:35Yardanicosadly
15:38:58PMunchSHould have time for a few :)
15:39:32YardanicošŸ‘šŸ‘šŸ‘
15:39:49FromDiscord_<Rika> šŸ‘ šŸ‘ šŸ‘
15:39:58FromDiscord_<Rika> i wanna clap ;;
15:40:06FromDiscord_<Rika> good talk
15:40:49YardanicoPMunch: pls convince others to take a collective nim dev photo :P
15:40:50Yardanicoxd
15:41:03Yardanico(kinda a joke, it might be hard to do because of schedules and stuff)
15:41:39PMunchWell we're all here already, so it should be doable
15:42:30FromDiscord_<Rika> nice
15:46:49FromGitter<deech> mratsim, great job!
15:50:08FromDiscord_<Rika> F, internet slowed so i cant watch the stream anymore
15:50:41Yardanicowell you'll be able to watch them from https://video.fosdem.org/2020/AW1.125/
15:50:46YardanicoI hope they'll get uploaded today/tomorrow
15:51:34PMunchLast year it took a while before they got uploaded unfortunately
15:52:23PMunchMy talk from last year was uploaded to YouTube on the 12th of February
15:53:09Yardanicoalmost no time left for d*m96 too :(
15:53:17Yardanicofor the talk itself I mean
15:55:24*nsf joined #nim
15:55:35PMunchCool idea to have playground links in the presentation
15:57:00FromDiscord_<Rika> internet pls let me watch aaaaaaaaaaaaa
15:58:07YardanicošŸ‘šŸ‘šŸ‘
15:59:56*Hideki_ quit (Remote host closed the connection)
16:00:39Yardanicovery interesting talks, thanks for making them for us nim plebs :P
16:00:51*Hideki_ joined #nim
16:02:04shashlickWatched intermittently, hope to see the full videos soon
16:02:45*PMunch quit (Quit: Leaving)
16:05:38*Hideki_ quit (Ping timeout: 265 seconds)
16:05:54leorizeguess that's all of the talks
16:05:58Yardanicoyeah
16:06:08greenfor`hey, I've been trying to solve #9176 and posted a comment there asking for help. Should I just wait or is it okay to also repost it here like I just did?
16:06:10disbothttps://github.com/nim-lang/Nim/issues/9176 -- 3`echo gorgeEx("unexistant") != const a = gorgeEx("unexistant"); echo a` ; snippet at 12https://play.nim-lang.org/#ix=290c
16:07:04leorizeit's fine to repost, just don't overdo it :)
16:07:13leorizemost of the devs are at fosdem rn
16:07:35greenfor`yeah, I also watched the talks
16:08:06Yardanicothe stream is still going lol
16:09:21YardanicoPMunch (i think) talking with someone
16:12:45Yardanicohttps://twitter.com/pvaneynd/status/1223666035036913664
16:14:46Yardanicook stream ended
16:15:35YardanicoAbout video recordings - seems like they're uploading them selectively (?) for example RaptorJIT recording is already up
16:18:32*uvegbot joined #nim
16:20:52*zyklon quit (Ping timeout: 248 seconds)
16:31:38*greenfor` quit (Remote host closed the connection)
16:32:06Yardanicocreated https://forum.nim-lang.org/t/5878 because some guy on telegram got confused that defined(release) isn't true with "-d:danger" :P
16:32:21Yardanicoi'm not really sure myself of what's supposed the right way of using -d:danger
16:33:40leorizethis is why I never design things around -d:release :P
16:34:32Yardanicoleorize: well, it's just a 1-line change to do "define: release" in nim config, I just wonder if current behaviour is correct or not
16:34:46YardanicoI mean to do "define: release" when "danger" is defined
16:35:09leorizelooks like we should do that, given how -d:danger is marketed as the old -d:release
16:35:43Yardanicoyeah, and there's some code in third-party libs and even in stdlib which relies in defined(release)
16:36:03Yardanico*on
16:36:49Yardanicoah, actually in stdlib it's mostly used in asyncfutures
16:38:26*Hideki_ joined #nim
16:43:49*greenfork joined #nim
16:44:56*ptdel joined #nim
16:52:12*Hideki_ quit (Ping timeout: 265 seconds)
16:55:03Zevv~i
16:55:03disbotno footnotes for `i`. šŸ™
17:07:48*greenfork quit (Remote host closed the connection)
17:07:55*greenfork joined #nim
17:26:52*sagax quit (Remote host closed the connection)
17:40:12*greenfor` joined #nim
17:41:10Yardanicoresult of running "genDepend" on compiler/nim.nim :P https://i.imgur.com/jBaxrnr.png
17:41:18Yardanico(warning - 8k x 8k png file)
17:42:06*greenfork quit (Ping timeout: 265 seconds)
17:43:45*narimiran quit (Ping timeout: 265 seconds)
17:49:01*marmotini_ joined #nim
17:49:56*marmotini_ quit (Remote host closed the connection)
17:51:17*hax-scramper quit (Ping timeout: 265 seconds)
17:55:47*narimiran joined #nim
17:56:58nisstyreHow do I build re-usable components with Karax? (I'm using it for server side html)
17:57:06nisstyrethe docs aren't really much help
17:57:21FromGitter<Varriount> Yardanico: If you can colorize it, I could get it printed as a piece of abstract art
17:57:23nisstyrelike I can make a proc that returns a VNode, but I have no idea how to re-use it with buildHtml
17:57:38Yardanico@Varriount well I tried a few options to colorize the directions but didn't succeed
17:58:09FromGitter<Varriount> "The Compiler's Web" it could be called
17:58:15YardanicoI used "sfdp -Gpack=false -Gdefaultdist=25.0 ~/.nim/compiler/nim.dot -Gfixedsize=shape -Gmode=maxent -Goverlap=scale -Gsplines=ortho -Tpng > out.png"
17:58:31Yardanicoit takes quite a while (like 1-1.5 minutes) to render
17:58:56Yardanico@Varriount you mean colours for directions (edges) or nodes?
18:01:12*marmotini_ joined #nim
18:08:25nisstyrenvm I figured it out
18:09:58FromGitter<Varriount> Yardanico: Edges primarily. Or both
18:10:14Yardanico@Varriount seems like I'll have to do a little bit of scripting for that, but ok :P
18:10:21Yardanicographviz doesn't seem to support random colours for edges
18:10:30Yardanicoit's not that hard
18:26:11Yardanico@Varriount how about https://i.imgur.com/nETUyzK.png ? probably need to change node color to fill it I guess, or not?
18:26:15Yardanicoor change the background of the image
18:26:22*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
18:27:45FromDiscord_<itmuckel> Sorry for bugging you again, but I never worked with much C. How would you wrap this for nim: `typedef struct zpl_atomic_ptr { void *volatile value; } zpl_atomic_ptr;`
18:28:35*hax-scramper joined #nim
18:31:34FromDiscord_<itmuckel> What I have so far is this, but I don't know if that's right
18:31:34FromDiscord_<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/673596386154905610/unknown.png
18:32:29FromDiscord_<Recruit_main_70007> Yaradinco: whats that?
18:32:37FromDiscord_<Recruit_main_70007> @itmuckel no idea, sorry
18:32:50Yardaniconim genDepend generates a .dot and a .png file for how nim modules depend on each other
18:33:14YardanicoI also tweaked the dot file with sfdp, after that with nim file to add random colors to edges and again with sfdp to generate a .png
18:33:36Yardanico"genDepend generate a DOT file containing the module dependency graph"
18:34:53FromDiscord_<Recruit_main_70007> cool!
18:35:39Yardanicoalthough it might be better to use the same color for all edges going from the same node, although that'll require mode than just some string replaces
18:37:00*Trustable quit (Remote host closed the connection)
18:38:59*Pqzcih5 joined #nim
18:46:42FromGitter<Varriount> Yardanico: Something like that
18:48:38YardanicoI'll try to make it with a darker background
18:49:36*akitoshi quit (Quit: Connection closed for inactivity)
18:49:40Yardanicohttps://i.imgur.com/E894vhX.png idk if this is any better though
18:50:07Yardanicooh wait it's using the wrong overlap method
18:52:02Yardanicothis is with "scale" overlap https://i.imgur.com/J2XjRwT.png
18:52:09Yardanicoit makes the image bigger so all nodes fit and don't overlap
19:01:31FromGitter<kayabaNerve> When constructing a new async socket, it sometimes fails due to an OSError when calling setBlocking (on Linux right now). Anyone here know why this happens?
19:01:52FromGitter<kayabaNerve> I've never seen a socket fail to construct before so I'm a bit lost.
19:06:02leorize@kayabaNerve: what's the error message?
19:13:25FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e371f54594a0517c2623eaf]
19:14:02FromGitter<kayabaNerve> My assumption would be the socket is closed... except I'm creating the socket.
19:14:20Yardanicomaybe you've run out of file descriptors?
19:15:57FromGitter<kayabaNerve> ... I do have some egregious socket handling. I'm pretty sure I spawn 6 connections every two minutes, yet do close them almost immediately. I don't leave them lingering.
19:16:21FromGitter<kayabaNerve> I've also triggered ulimit thanks to using too many AsyncFDs but that looks different.
19:18:16FromGitter<kayabaNerve> https://stackoverflow.com/questions/651665/how-many-socket-connections-possible āŽ āŽ Shouldn't be the problem.
19:43:37FromGitter<Varriount> Anyone have a recording of the FOSDEM talk?
19:43:50Yardanico@Varriount it'll be uploaded to https://video.fosdem.org/2020/AW1.125/
19:45:30*nsf quit (Quit: WeeChat 2.7)
19:45:45Zevvinterstingly enough evertything is up there but the nim talks. and the beer is strong and good. correlation or causation, you tell me
19:47:08Zevvvarriount: and it's plural, there were 4 of them
19:47:13*marmotini_ quit (Ping timeout: 268 seconds)
20:24:28*arecaceae quit (Remote host closed the connection)
20:24:51*arecaceae joined #nim
20:33:29*narimiran quit (Quit: leaving)
20:33:43*sagax joined #nim
20:42:06*abm quit (Quit: Leaving)
20:48:05FromDiscord_<Elegant Beef> when you write an extension method in C# just cause you've been spoiled with the nim procs being accesible by `a.Name()` I think I have been corrupted by nim
20:49:13*Hideki_ joined #nim
20:53:38*Hideki_ quit (Ping timeout: 240 seconds)
20:58:25*matti quit ()
20:58:42FromDiscord_<itmuckel> Hey guys! Is this even representable in nim as a wrapper? I know it would work with ref objects, but if a c_method returns a zpl_json_object it would be wrapped incorrectly I think. Currently I get a recursion error of course, because the union references its enclosing object šŸ¤”
20:58:42FromDiscord_<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/673633413072420884/unknown.png
20:59:14*matti joined #nim
21:00:53FromDiscord_<itmuckel> Okay, I just wrapped `nodes` in an `UncheckedArray[zpl_json_object]`, with a ptr I can get away. I'll see what happens if I actually use it. šŸ˜‰
21:03:54FromDiscord_<exelotl> when I was doing maxmod bindings I just handled anonymous unions like this:
21:03:54FromDiscord_<exelotl> https://cdn.discordapp.com/attachments/371759389889003532/673634720545767483/unknown.png
21:06:25shashlick@itmuckel - just declare in sequence instead of nested - put them in the same `type` declaration and it won't matter
21:09:06FromDiscord_<itmuckel> I did. If I change that from `ptr x` to `UncheckedArray[x]` then I get a recursion error. Maybe I'm mixing up stuff now.
21:09:06FromDiscord_<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/673636026966867968/unknown.png
21:10:31FromDiscord_<Elegant Beef> Is the a list of all nims collections/namespaces somewhere?
21:10:35FromDiscord_<Elegant Beef> there*
21:10:59shashlickhttps://nim-lang.org/docs/lib.html#pure-libraries-collections
21:11:18FromDiscord_<Elegant Beef> Thanks
21:12:25shashlick@itmuckel - cause you are saying that an object is inside an object
21:12:35shashlickit is actually an array of pointers to the object
21:14:31FromDiscord_<itmuckel> No, it's just a pointer to the object, `x * nodes;` so nodes is either a pointer to an x, but in C it can also be treated like an array, right? šŸ˜•
21:14:50FromDiscord_<exelotl> @itmuckel you can use `ptr UncheckedArray` instead of just `UncheckedArray`
21:15:12shashlickyes but you will still say `UncheckedArray[ptr zpl_json_object]`
21:16:04FromDiscord_<itmuckel> Aaaah, yeah, both makes sense. šŸ˜„ Is there a difference between the two? ptr UncheckedArray and UncheckedArray[ptr] ?
21:16:23shashlicki think it is the latter
21:16:29FromDiscord_<exelotl> I think it's the former xD
21:16:35FromDiscord_<itmuckel> Dayumn
21:17:20FromDiscord_<itmuckel> I'll just use the latter and try to avoid using json in this library šŸ˜„
21:18:17shashlickya it might be the former
21:18:42FromDiscord_<itmuckel> But well, it depends, I'll see what works when I get to use it. Right now I'm still moving from one `nimterop` to the next and hope I get a working wrapper in the end. šŸ™‚
21:18:43shashlickcause the UncheckedArray is where the memory block is, and in the structure, it is being pointed to
21:19:13FromDiscord_<exelotl> Arrays in Nim have different semantics to C. In Nim they are passed by value. If you have `var a: array[5, int]` then `addr a` will give you the same address as `addr a[0]` (though the types will be different)
21:19:50shashlickso it is `ptr UncheckedArray[ptr zpl_json_object]`
21:21:05FromDiscord_<itmuckel> Wait, why is it an array of pointers now? šŸ˜•
21:21:20*Vladar quit (Quit: Leaving)
21:21:28FromDiscord_<exelotl> shashlick: that would be the case if the field was `struct zpl_json_object **nodes`
21:22:13FromDiscord_<exelotl> it's not an array of pointers, so it should just be `ptr UncheckedArray[zpl_json_object]`
21:22:36FromDiscord_<itmuckel> Yeah, that's what I got now
21:22:36FromDiscord_<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/673639425179123722/unknown.png
21:23:31FromDiscord_<itmuckel> Still don't know how to translate the initializers for the u8's. Never seen that in C before.
21:23:31FromDiscord_<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/673639656633401384/unknown.png
21:24:00shashlickCool
21:24:11FromDiscord_<exelotl> ah you wanna use {.bitsize.}: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-bitsize-pragma
21:24:46FromDiscord_<itmuckel> Aaaaaah, thx!
21:26:49FromDiscord_<exelotl> I'm so used to doing bindings to libraries where the header files are always available lol
21:27:45FromDiscord_<exelotl> I guess you're binding a dynamic library?
21:28:26FromDiscord_<itmuckel> Not really, it's a header only library
21:28:40FromDiscord_<itmuckel> https://github.com/zpl-c/librg
21:29:34FromDiscord_<exelotl> oh that's pretty awesome
21:30:02FromDiscord_<itmuckel> It depends on zpl and enet (also header only) and I threw all headers into one directory and try to generate a wrapper for it.
21:30:45FromDiscord_<itmuckel> Yeah, what I read is that you just write your handler functions and the library does the job of syncing client's objects with the server. šŸ‘Œ
21:32:46FromDiscord_<itmuckel> https://gitlab.com/itmuckel/nimrg <-- Here's what I've got so far. Have to continue tomorrow. šŸ’¤
21:33:03FromDiscord_<itmuckel> Goodbye and thanks for your help!
21:33:27FromDiscord_<exelotl> np, cya o/
22:22:13*ltriant joined #nim
22:33:45*solitudesf quit (Ping timeout: 265 seconds)
22:39:53*letto_ quit (Ping timeout: 268 seconds)
22:40:27*letto_ joined #nim
22:41:55*abm joined #nim
22:48:40shashlickis it possible to convert an existing socket which is in sync mode to an async socket
22:58:05*ftsf joined #nim
23:00:02*opal quit (Remote host closed the connection)
23:00:21*opal joined #nim
23:06:39*onionhammer quit (Quit: WeeChat 2.6)
23:26:32nisstyreshashlick: I doubt it
23:35:18shashlickya abandoned that idea
23:44:27*abm quit (Quit: Leaving)
23:53:23*Hideki_ joined #nim