<< 06-07-2020 >>

00:19:43*fredrikhr quit (Ping timeout: 256 seconds)
00:25:05*ragouel joined #nim
00:25:58ragouelI'm trying to build a nim project but I get "Git/BROKEN/nimsynth-git/src/nimsynth/src/nico/nico/vec.nim(348, 17) Error: object constructor needs an object type" I ran nimble develop nico and then make
00:26:41ragouelmake basically runs nim -p:src
00:27:02ragouelI'm not familiar with nim
00:33:52FromDiscord<Varriount> ragouel: Can you post the source, vist gist or something?
00:33:58FromDiscord<Varriount> *via gist
00:35:01ragouelhttps://github.com/ftsf/nimsynth this is the software I'm trying to build, when I run make it asks for nico, so I ran nimble develop nico inside git root
00:35:14FromDiscord<Varriount> If it's an existing Nimble package, it sounds like it might either be broken, or incompatible with the current version of Nim (or at least, whatever version of Nim you are running).
00:36:16FromDiscord<Varriount> Uh, I don't know if develop is the right command. If it's looking for a missing package, would it be `nimble install nico`?
00:36:24ragouelah I see
00:36:30ragouelI'll try that then
00:36:53FromDiscord<Varriount> You'll have to delete whatever additional directories were created.
00:37:14FromDiscord<impbox> ragouel, nimsynth is pretty out of date
00:37:25FromDiscord<impbox> I might have a version that works with modern nim somewhere... let me check
00:37:27ragouelok, I deleted everything under ~/.nimble
00:37:33ragouelok
00:38:19FromDiscord<impbox> cool, well it compiles and runs \o/
00:38:30ragouelhmmm
00:38:39FromDiscord<impbox> i'll push it up in a branch
00:38:42FromDiscord<impbox> just a moment
00:39:11ragouelare you ftsf on github ?
00:39:15FromDiscord<impbox> yep
00:39:20ragouelah I see
00:39:44ragoueli'm trying to create a pkgbuild for your software for AUR
00:40:11ragouelAUR=Arch User Repo
00:40:52FromDiscord<Elegant Beef> Isnt it sorta redundant with nimble?
00:41:36FromDiscord<impbox> though nimsynth doesn't have a nimble package atm
00:41:51FromDiscord<impbox> ragouel I've pushed up a branch `nim1.2`
00:41:54FromDiscord<impbox> let me know if it works
00:42:00ragouelok, I will
00:42:08FromDiscord<impbox> i've done my testing on windows lately, hopefully it works on linux too
00:44:37FromDiscord<Varriount> @impbox I've been using Powershell recently. >:D
00:45:09FromDiscord<impbox> @Varriount hmm i haven't used it much, only for copypasta, i just use git bash in windows
00:45:33*endragor joined #nim
00:45:47FromDiscord<Varriount> Also, I wish that I could control Windows via keyboard more often. Or with my mind.
00:45:56FromDiscord<impbox> aye
00:46:07ragouellol
00:46:29ragouelok, it now compiles, if I run nimble install sndfile
00:46:31FromDiscord<Varriount> Oddly enough, I don't wish that as much for OSX. Which is odd, because it's not like it has any more keyboard control than Windows.
00:46:32FromDiscord<impbox> i miss my linux window manager keycombos
00:46:57FromDiscord<Varriount> (although keyboard shortcuts are more consisteent across applications)
00:47:06FromDiscord<Varriount> (edit) 'consisteent' => 'consistent'
00:47:13ragouelok, it runs too
00:47:19ragouelthanks for the help
00:47:52FromDiscord<Varriount> (maybe one day we will be able to control interfaces efficiently with our minds)
00:51:49*sagax quit (Quit: Konversation terminated!)
00:52:12FromDiscord<impbox> ragouel awesome\
00:52:13FromDiscord<impbox> (edit) 'awesome\' => 'awesome'
00:56:19ragouel@impbox what is nimsynth licensed under?
00:59:42*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:00:16*pbb joined #nim
01:00:33*mbuchel joined #nim
01:01:19FromDiscord<impbox> hmm it should probably have a LICENCE huh...
01:01:44mbuchelhello, are there any good interprocess communication packages in nim?
01:02:24FromGitter<ynfle> https://nim-lang.org/docs/channels.html?
01:04:05mbucheloh thank you
01:04:12mbucheli will look more into that one
01:04:40mbucheloh wait no sorry, that one seems to be for threads
01:05:04mbucheli am talking about running several distinct processes on the device and having them communicate with each other
01:06:32FromDiscord<impbox> ragouel gplv3 just added a LICENCE file
01:07:02mbuchelkindof like mmap
01:07:09ragouelyep, good enough. Let me know if you want me to transfer ownership if you're on AUR
01:07:53FromDiscord<impbox> nah, all good
01:07:59ragouelok
01:09:10ragouelhttps://aur.archlinux.org/packages/nimsynth-git/
01:10:47*ragouel quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
01:12:57*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:13:06*njoseph joined #nim
01:19:47*endragor quit (Remote host closed the connection)
01:20:13*endragor joined #nim
01:22:47*lritter quit (Quit: Leaving)
01:24:37*endragor quit (Ping timeout: 246 seconds)
01:35:50*laqq3 joined #nim
01:41:54*oddp quit (Ping timeout: 240 seconds)
01:41:57*chemist69 quit (Ping timeout: 260 seconds)
01:44:04*chemist69 joined #nim
01:44:20*endragor joined #nim
01:44:52*vr0n quit (Ping timeout: 260 seconds)
02:00:47disruptekmbuchel: which platform?
02:03:03*pangey quit (Read error: Connection reset by peer)
02:04:35mbucheldisrupteck: linux
02:07:00*pangey joined #nim
02:11:02*laqq3 quit (Ping timeout: 258 seconds)
02:13:07FromDiscord<Varriount> mbuchel: How performant does the communication need to be?
02:13:35FromDiscord<Varriount> You might consider just using something like protobuf or msgpack over a Unix socket
02:13:35disrupteki like dbus and unix sockets.
02:14:38disruptekif you really want speed, you can use the shared mem stuff exposed in posix, but i dunno if it supports linux lock extensions.
02:15:24disrupteki guess it should be fine.
02:19:13disruptek!repo deebus
02:19:13disbothttps://github.com/disruptek/deebus -- 9deebus: 11simple sugar over dbus 15 0⭐ 0🍴
02:19:16disruptek!repo dbus
02:19:17disbothttps://github.com/disruptek/deebus -- 9deebus: 11simple sugar over dbus 15 0⭐ 0🍴 7& 2 more...
02:19:24disruptek!repo swayipc
02:19:24disbothttps://github.com/disruptek/swayipc -- 9swayipc: 11swayipc (i3ipc) for Nim 15 4⭐ 0🍴
02:19:29disruptek^ demo of unix socket ipc
02:19:52disruptek!repo xs
02:19:52disbothttps://github.com/disruptek/xs -- 9xs: 11xstreamstartup.com 15 2⭐ 0🍴
02:19:56disruptek^ demo of dbus stuff
02:21:50mbucheli was previously using mqtt but had issues with licensing issues (EPL vs GPL)
02:22:16disruptekweird.
02:22:18disruptek!repo mqtt
02:22:19disbothttps://github.com/zevv/nmqtt -- 9nmqtt: 11Native Nim MQTT client library 15 18⭐ 3🍴 7& 5 more...
02:22:22mbuchelthank you will look into them
02:22:28mbuchelno i did not use zevvs
02:22:33mbuchelthere were issues with that one
02:22:44mbucheland i have not gotten around to fixing the ones i found
02:22:44disruptekreally?
02:22:56mbucheli just made a wrapper for libpaho
02:23:12disrupteki mean, that should be pretty performant.
02:23:29mbuchelit is but that would be EPL license
02:23:39mbucheland we have some GPL code in the codebase as well
02:23:56mbuchelGPL and EPL do not mix well from what i have been reading (legally speaking)
02:24:09disruptekno idea.
02:24:14mbucheli was debating releasing the wrapper for libpaho using MIT license
02:24:31mbucheland than i can use it in the derivative work of the GPL codebase
02:24:47disrupteki wonder why zevv doesn't have a LICENSE.
02:24:56mbuchelbut i want to know if there are better solutions to this
02:25:23*laqq3 joined #nim
02:25:37disruptekbetter how?
02:25:49disruptekthere's a stomp client iirc.
02:25:53disruptek!repo stomp
02:25:54disbothttps://github.com/Xe/waffle -- 9waffle: 11A simple STOMP library 15 4⭐ 0🍴 7& 3 more...
02:26:08disruptekfaster? safer?
02:26:39mbuchelit is supposed to go on an embedded device
02:26:49mbuchellibpaho requires mosquitto or another mqtt broker
02:26:54mbuchelto be hosted locally
02:27:14mbuchelthat seems to me like a waste of memory/processing power
02:27:35mbuchelif it is safer that would be even better
02:27:40disruptekit sounds like you are pretty close to ideal already.
02:27:56disruptekyou don't remember what's wrong with zevv's thing?
02:28:07mbuchelasync callbacks were not working
02:28:12mbucheli can check my notes
02:28:26disruptekyou need async?
02:28:32mbuchelthat would be ideal
02:28:41disruptek'cause, y'know, i don't recommend it.
02:29:00mbuchelbecause at least one of the programs that the device will be running will be reading from a secondary chip
02:29:09mbuchelthis secondary chip can send messages as well
02:29:35mbucheland i do not want to be stuck waiting for a message from mqtt while i am reading from the chip
02:29:52mbucheli would prefer the mqtt to be treated as an interrupt
02:30:15disruptekthat's not really a thing.
02:30:33mbuchel?
02:30:48disruptekthe dispatcher doesn't interrupt anything.
02:31:08disruptekyou realize this, i think.
02:31:15mbuchelis there any way that it can?
02:31:22mbucheli was under the impression it would
02:31:38mbuchelotherwise the callback function would be unnecessary
02:31:45*muffindrake quit (Ping timeout: 256 seconds)
02:32:16disruptekthe dispatcher chooses what to run whenever you await.
02:32:44disrupteki would recommend threads.
02:33:38mbuchelOH NEVERMIND
02:33:53mbucheli was looking at the wrong mqtt library that i looked into
02:33:58*muffindrake joined #nim
02:34:08mbucheli looked at nim-mqtt
02:34:11mbuchelnot nmqtt
02:34:24mbuchelok thank you will check nmqtt out
02:34:39disruptekthere's a new concurrency story in development.
02:34:55disruptekthe concurrency that nim deserves.
02:35:53mbuchelthat is great to hear
02:36:27disruptekyeah, it should blow the competition out of the water. i'm pretty excited about it.
02:37:42*ftsf joined #nim
02:41:00*BlameTheRoomba joined #nim
02:41:40mbuchelyep so far i been really happy with nim
02:42:08*BlameTheRoomba quit (Client Quit)
02:42:33mbucheli wonder if there is any form of logic programming support inside nim
02:42:44disrupteki dunno what that means.
02:43:00*videofile joined #nim
02:43:02mbucheli know there was some attempt at implementing the Z3 Proof Engine
02:43:11disrupteksure; it's call drnim.
02:43:16disruptek^called, too.
02:43:55FromDiscord<Elegant Beef> As a uneducated individual "Logic programming" sounds like "Programming programming" 😄
02:45:52mbucheldoes drnim have forall and exists yet?
02:46:02mbuchelor is that still being worked on?
02:46:11disruptekdunno, it was kinda backburnered in favor of fixing arc bugs.
02:46:26mbuchelfair enough
02:46:32mbuchelthank you
02:48:30*B4s1l3 joined #nim
02:48:39*B4s1l3 is now known as opDispatch
02:56:54*Tlongir joined #nim
03:04:33*mbuchel quit (Quit: WeeChat 2.8)
03:06:33FromDiscord<Elegant Beef> Yea yardanico, either i dont know how to use the htmlparser, or it doesnt like the nim searchable doc's html
03:11:02*krux02_ quit (Remote host closed the connection)
03:17:37FromDiscord<Elegant Beef> https://hatebin.com/hazjqchzzs
03:17:48FromDiscord<Varriount> Anyone know which compilers finish.exe supports scanning for?
03:18:14FromDiscord<Varriount> disruptek: What's the concurrency story?
03:20:53FromGitter<bung87> Elegant Beef using xmltree and htmlparser
03:21:04FromDiscord<Elegant Beef> Huh?
03:21:18FromDiscord<Elegant Beef> Yes i have both imported if that's what you mean
03:21:27FromDiscord<Elegant Beef> I tried both the std and fusion
03:21:34FromGitter<bung87> you want ouput the html source right?
03:21:49FromDiscord<Elegant Beef> That's what i'd expect, the inner html to be output
03:22:01FromDiscord<Elegant Beef> well innertext i guess
03:22:27FromGitter<bung87> I remenber `$` is coming from xmltree if you want ouput a node
03:22:55FromDiscord<Elegant Beef> Im not getting any of the data i expect
03:23:23FromDiscord<Elegant Beef> I'm attempting to get the modules from the nim index page, but cause of how the page is written i believe it causes the parser to not work properly
03:23:26FromDiscord<Elegant Beef> Or im a numpty
03:23:40FromDiscord<Elegant Beef> Latter is more likely
03:25:26FromGitter<bung87> something related to xnVerbatimText
03:27:57FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2qZD
03:28:06FromDiscord<Elegant Beef> This is what i think causes the problem
03:28:12FromDiscord<Elegant Beef> `<p />`
03:32:02FromGitter<bung87> https://play.nim-lang.org/#ix=2qZE
03:44:04*Tongir joined #nim
03:47:01*Tlongir quit (Ping timeout: 264 seconds)
03:59:54FromDiscord<Elegant Beef> Yep im too dumb to use the xmltree api
04:01:20FromDiscord<Elegant Beef> taking the entire `https://nim-lang.org/docs/theindex.html` website, i cannot for the life of me just get the `<p />` the modules are listed in
04:02:19FromDiscord<Elegant Beef> Tried navigating manuall using indicies, `findAll`, `child`
04:04:49*a_chou joined #nim
04:05:28*a_chou quit (Client Quit)
04:05:47*dddddd quit (Remote host closed the connection)
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:42*supakeen joined #nim
04:08:04FromDiscord<Elegant Beef> I should say i can get it very easily using regex, but not using the xml stuff
04:08:04*Tlanger joined #nim
04:10:21FromGitter<bung87> well , html not strictly follow xml, and browser allow html mistake
04:10:49*Tongir quit (Ping timeout: 256 seconds)
04:11:54FromDiscord<Elegant Beef> Yea, that's why i figured the way it was written was the issue, so i just used regex previously
04:12:06FromDiscord<Elegant Beef> (edit) 'why' => 'what'
04:12:44FromDiscord<Elegant Beef> I'd happily be proven wrong, but i atleast am giving up on using xml directly there
04:35:37*mipri joined #nim
04:42:22*videofile quit (Ping timeout: 246 seconds)
04:44:32*D_ quit (Ping timeout: 260 seconds)
04:47:37*Vladar joined #nim
04:48:15*D_ joined #nim
04:57:21*rockcavera quit (Remote host closed the connection)
05:00:12*marnix_ joined #nim
05:01:33*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
05:01:41*njoseph joined #nim
05:02:40*laqq3 quit (Ping timeout: 246 seconds)
05:03:54*njoseph quit (Client Quit)
05:04:01*njoseph joined #nim
05:06:26*njoseph quit (Client Quit)
05:06:33*njoseph joined #nim
05:07:04*njoseph quit (Client Quit)
05:07:10*njoseph joined #nim
05:09:02*waleee-cl quit (Quit: Connection closed for inactivity)
05:14:26*laqq3 joined #nim
05:39:07*hyiltiz quit (Ping timeout: 240 seconds)
05:39:22*hyiltiz_ quit (Ping timeout: 244 seconds)
05:40:24*laqq3 quit (Ping timeout: 272 seconds)
05:41:22*kenran joined #nim
05:43:31*solitudesf joined #nim
05:51:35*Tongir joined #nim
05:54:08*Tlanger quit (Ping timeout: 258 seconds)
05:54:38*notandinus quit (Quit: ERC (IRC client for Emacs 26.3))
05:58:06*andinus joined #nim
06:12:31*solitudesf- joined #nim
06:15:13*solitudesf quit (Ping timeout: 258 seconds)
06:45:01*solitudesf- is now known as solitudesf
07:08:05*NimBot joined #nim
07:28:18*maier joined #nim
07:46:30*letto quit (Quit: Konversation terminated!)
07:55:49*letto joined #nim
08:05:45*dddddd joined #nim
08:15:39*ssbr quit (Read error: Connection reset by peer)
08:16:07*ssbr joined #nim
08:16:07*Tongir quit (Remote host closed the connection)
08:16:33*Tongir joined #nim
08:27:15*fredrikhr joined #nim
08:31:31*crem joined #nim
09:05:42*synthmeat quit (Quit: WeeChat 2.8)
09:06:31Yardanicotweaked my neo4j query a bit (for whose who don't know, I updated my pkgraph a few days ago to emit cephyr instead of .dot) https://i.imgur.com/ev86AAK.png
09:06:45Yardanicoall packages made by 4raq or which depend on packages made by 4raq (with their authors) :P
09:08:14Yardanicosame for dom - https://i.imgur.com/qKVTJ0T.png
09:08:14*synthmeat joined #nim
09:08:35*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
09:08:38*vicfred_ joined #nim
09:09:37*synthmeat quit (Client Quit)
09:10:47*vicfred quit (Ping timeout: 240 seconds)
09:12:41*pbb joined #nim
09:12:52*synthmeat joined #nim
09:28:40*solitudesf quit (Remote host closed the connection)
09:31:27*solitudesf joined #nim
09:34:56*oddp joined #nim
09:57:16FromDiscord<dom96> Super shallow still
09:57:49Yardanico@dom96 wdym?
09:58:12FromDiscord<lqdev> now pick a random rust package
09:58:23FromDiscord<lqdev> I guarantee the tree is gonna be 1000x larger
09:58:28FromDiscord<dom96> yeah
09:58:39FromDiscord<dom96> I bet it'll be deeper as well
09:58:43FromDiscord<lqdev> yes
09:58:53FromDiscord<lqdev> because it's mostly transitive dependencies
09:59:24Yardanicoyeah I still didn't figure out how to also return authors of intermediate packages
09:59:36Yardanicobetween the current package and the target package (I use variable-length matching in neo4j)
10:00:06Yardanicotop 10 authors sorted by number of packages which directly or indirectly depend on their packages :P https://i.imgur.com/pjNfWAv.png
10:00:39Yardanicowait who's anonymous
10:00:41Yardanicowhat package is that
10:01:30YardanicoLOL it's apparently https://github.com/nim-lang/zip/blob/master/zip.nimble
10:05:36Yardanicomaybe anyone knows better tools/DBs/etc for making nice graphs out of data?
10:05:46Yardanicoit's not hard for me to output data in some other format than .dot or cypher
10:15:24FromGitter<bung87> I like .dot , so can pushlish graph instead binary image
10:15:31Yardanicowell you can do the same with cypher too
10:15:33Yardanicoand neo4j
10:15:38YardanicoI mean it's just a format
10:15:51Yardanicoright now I generate all create cypher statements to populate the graph db
10:17:25FromGitter<bung87> what is cypher havn't try it, I know neo4j as graph database
10:17:34Yardanicocypher is neo4j's query langauge
10:17:35Yardanicolanguage*
10:18:33FromGitter<bung87> oh, I prefer .dot if I only need some graph
10:18:42Yardanicowell in my case it's more complicated
10:18:49Yardanicosince with neo4j i can do all kinds of queries
10:19:59FromGitter<bung87> ah you need integrate to neo4j , that make sense.
10:20:06Yardanicowell cypher isn't exclusive to neo4j
10:20:09Yardanicoit's just a query language
10:20:15Yardanicoe.g. http://redisgraph.io/ uses it
10:23:14FromGitter<bung87> am wondering is it hard to implement graph database , if I dont need full featured
10:50:56Yardanicolol https://i.imgur.com/sGqdCiX.jpg
10:50:58Araqit's hard if you need transactions
10:51:04Yardanico(be careful, 12.5kx12.5k pixels :P)
10:51:09Yardanicoand some random icons based on the package license
10:51:15Yardaniconeed to find a way to export svg I guess
10:51:29Yardanicoalso no authors here, meh
10:51:54Araqso ... Yardanico
10:51:57Yardanicoyes?
10:52:26Araqyou are working on 'koch boot --gc:arc', right? you're not messing around with silly graphs all day long, are you
10:52:31Araq:P
10:52:44YardanicoI only messed with this yesterday's morning a bit and now :)
10:52:46Yardanicowell, and a few months ago
10:53:05FromDiscord<Rika> what are these dots w/ no name
10:53:11*Trustable joined #nim
10:53:16Yardanico@Rika authors :D
10:53:19Araqalso, somebody should really look into the produced asm for "binary trees"
10:53:44Araqthe C compiler still doesn't optimize it all that well, apparently
10:54:01FromGitter<bung87> good to know
10:55:05Yardanicooh seems like neo4j browser export is somewhat better
10:56:12Yardanicosry for truncated names - https://raw.githubusercontent.com/Yardanico/random-stuff/master/graph.svg
10:57:12YardanicoAraq: did you see my two arc regressions (after the scoped pr) ? just to make sure :P
10:57:22FromDiscord<Rika> why are there authors w/o packages and packages w/o authors?
10:57:30Yardanico@Rika are there?
10:57:36Yardanicooh yeah lol
10:57:48Yardanicomaybe they didn't get rendered or something
11:01:07AraqYardanico, no
11:01:37Yardanicothey're both related to templates :D https://github.com/nim-lang/Nim/issues/14899 and https://github.com/nim-lang/Nim/issues/14900
11:01:39disbot[ARC] Weird issue with if expressions and templates ; snippet at 12https://play.nim-lang.org/#ix=2r1a
11:05:04Yardanicoalso I had a stack overflow in DFA isFirstWrite nitter, although it got "fixed" when I raised the call depth limit, but then crashed in the c backend
11:05:09YardanicoI didn't minimize that one yet
11:05:19Yardanicoby nitter I mean the twitter one :)
11:08:56Araqok
11:12:15*Trustable quit (Remote host closed the connection)
11:12:16*rockcavera joined #nim
11:13:56*Senny joined #nim
11:25:33*tinga quit (Remote host closed the connection)
11:25:47*tinga joined #nim
11:30:02YardanicoGuys, you can buy Nim in Action at 50% off today (or any other book on manning)
11:30:19Yardanicoon https://www.manning.com/books/nim-in-action :)
11:40:43FromDiscord<MapleSyrup|TagMeIfReply> what other language has the notion of pragmas as in nim
11:40:57Yardanicowell, quite a lot of languages has some type of "annotations"
11:41:08Yardanicobut almost none of them are as flexible as nim's pragmas :)
11:41:11FromDiscord<MapleSyrup|TagMeIfReply> like type annotations from python? aren't those a bit different
11:41:13FromDiscord<Rika> python decorators 😛
11:41:13Yardanicowhich you can use almost everywhere
11:41:26FromDiscord<MapleSyrup|TagMeIfReply> yeah, it seems to change compiler behaviour quite a bit!
11:41:39Yardanicowell pragmas can be defined in your own code too
11:41:51FromDiscord<MapleSyrup|TagMeIfReply> WHAT
11:41:53Yardanico?
11:41:59FromDiscord<MapleSyrup|TagMeIfReply> that's crazy
11:42:09FromDiscord<Rika> ? macros can be pragmas
11:42:11FromDiscord<Rika> 🙂
11:42:14Yardanicohttps://nim-lang.org/docs/manual.html#userminusdefined-pragmas
11:42:58FromDiscord<--HA--> Nice, thanks Yardanico. I've been thinking whether to buy the book or not and this makes the decision easier. I assume dom96 will still get his full share?
11:43:08YardanicoI don't know :)
11:43:10Yardanico@dom96 ^
11:44:16FromGitter<bung87> I've seen someone write article about this book in recent nim version
11:45:53FromGitter<bung87> seems not much changes
11:52:40*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
11:53:24*mipri left #nim (#nim)
11:55:33*pbb joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:03*krux02 joined #nim
12:06:42*supakeen joined #nim
12:11:08*narimiran joined #nim
12:13:44FromDiscord<MapleSyrup|TagMeIfReply> if I have a C lib that I can call using FFI, is there any argument for a nim port?
12:14:07FromDiscord<MapleSyrup|TagMeIfReply> I'm assuming we'll have to deal with pointers and stuff if using ffi?
12:14:12Yardanicoyes
12:14:28FromDiscord<MapleSyrup|TagMeIfReply> uh yes for 1. or 2.? 🙂
12:14:34FromDiscord<MapleSyrup|TagMeIfReply> or both :hmm
12:14:37Yardanicoboth :D
12:14:56YardanicoI mean of course you wouldn't always want to rewrite a big C lib, that's understandable
12:15:15FromDiscord<MapleSyrup|TagMeIfReply> ah yes, thanks for clarifying; FFI *is* useful to have
12:15:21disruptekbung87: work on gram with me.
12:15:48disrupteki haven't begun graph functionality, really, so you can design it any way you want.
12:15:53FromGitter<bung87> ah? gram is what?
12:16:08disruptekare you on discord? gitter?
12:16:15disrupteki'm ignoring you somehow.
12:16:19solitudesfgitter
12:16:26FromGitter<bung87> gitter
12:16:30disruptek!repo gram
12:16:31disbothttps://github.com/disruptek/gram -- 9gram: 11Generic graphs in Nim 15 3⭐ 0🍴 7& 4 more...
12:16:56disruptekreally crude but lately i am thinking i may make it more of a proper db.
12:17:03disruptekjust as a learning exercise.
12:17:24FromDiscord<MapleSyrup|TagMeIfReply> db or an orm layer
12:17:35FromDiscord<MapleSyrup|TagMeIfReply> like sqlalchemy
12:17:40disruptekdb
12:17:47FromDiscord<MapleSyrup|TagMeIfReply> oh ok gl
12:18:14FromDiscord<MapleSyrup|TagMeIfReply> "...or if you're still using Nimble like it's 2012," is nimble no longer recommended?
12:18:22disrupteknot by me, no.
12:18:29Yardanico@Maple it's disruptek's opinion :)
12:18:38Yardanicobut you have to know that most people use nimble :P
12:18:48disrupteksheeple.
12:18:49FromDiscord<MapleSyrup|TagMeIfReply> ah okay, having multiple package managers is nice too
12:18:57FromDiscord<MapleSyrup|TagMeIfReply> sheeple is not nice tho 😦
12:19:09disruptekthese are my current installation instructions:
12:19:11disruptek!repo skiplists
12:19:11disbothttps://github.com/disruptek/skiplists -- 9skiplists: 11generic skip list implementations 15 1⭐ 0🍴
12:19:15FromGitter<bung87> disruptek I only see simalar code in a js graph lib, what can I do ?
12:19:29disrupteki don't understand the question.
12:19:48disruptekwhat can you do with gram?
12:20:11disruptekbasic graph traversal via edges, nodes, neighbors, etc.
12:20:15FromGitter<bung87> yeah, you said work on it with you
12:20:16disruptekthere are docs and examples.
12:20:34disruptekyou can add what you need and then 1+1+n people will benefit.
12:20:40FromDiscord<MapleSyrup|TagMeIfReply> Yardanico would you agree with nim being a high level language (but compiles to low level)?
12:20:51Yardaniconim doesn't have to compile to C btw
12:20:54Yardanicothere's an LLVM backend too
12:21:07FromDiscord<MapleSyrup|TagMeIfReply> not sure what that is, have heard a lot about it tho
12:21:11disrupteklabels aren't important.
12:21:12Yardanicoor with enough effort you can make a native asm backend, so it's just a normal high level language like others
12:21:33FromDiscord<MapleSyrup|TagMeIfReply> hmm wasm?!
12:21:45Yardanicono
12:21:48FromDiscord<MapleSyrup|TagMeIfReply> 😦
12:21:48Yardanicoassembly as in real assembly
12:21:59Yardanicobut there's no point in making an asm backend really
12:22:12FromDiscord<MapleSyrup|TagMeIfReply> fingers crossed for wasm because apparently it's the NEXT BIG THING^{tm}
12:22:24FromGitter<bung87> oh I'll keep eyes on it if I need some lib like it
12:22:30*dmi0 joined #nim
12:22:31Yardanico@Maple wasm already is there
12:22:31FromDiscord<MapleSyrup|TagMeIfReply> 😛
12:22:34Yardanicoemscripten or clang's wasm32
12:22:43disruptekthere's also this one, bung87:
12:22:44disruptek!repo grim
12:22:45disbothttps://github.com/ebran/grim -- 9grim: 11grim brings property graphs to the Nim language. Look around you: everything is a graph! 15 27⭐ 0🍴 7& 2 more...
12:22:57disrupteki tried it and then started gram.
12:25:06FromGitter<bung87> cool, so have a graph data struct and storage and query language combined can do something like neo4j
12:25:33disrupteksure, but i would use gremlin over cypher.
12:25:35FromDiscord<mratsim> @MapleSyrup|TagMeIfReply there are multiple ways for WASM in Nim
12:26:08FromDiscord<MapleSyrup|TagMeIfReply> ah, like those libraries Yardanico mentioned?
12:26:12FromGitter<bung87> interesting project.
12:26:13Yardanicothey're not libraries but yes
12:26:14FromDiscord<MapleSyrup|TagMeIfReply> or any other ways
12:26:20FromDiscord<mratsim> https://www.youtube.com/watch?v=QtsCwRjtbrQ
12:26:31FromDiscord<mratsim> WASM code-golfing in Nim, beating Rust on codesize 😉
12:26:47Yardanicoemscripten is a toolkit for compiling native C/C++ applications to wasm
12:26:53Yardanicoit even supports libraries like SDL2, OpenGL, etc
12:27:17YardanicoLLVM's (clang uses LLVM) wasm32 target compiles any LLVM IR to wasm32
12:27:42FromDiscord<MapleSyrup|TagMeIfReply> so the reason you can use wasm is because nim can be compiled to C?
12:27:51Yardanicoyes
12:27:57disruptekbung87: adding gremlin might be easier than you think.
12:27:59Yardanicobut there's an llvm backend (nlmv)
12:28:02Yardaniconlvm*
12:28:09Yardanicoand you can use llvm's wasm32 target with that
12:28:11Yardanicowithout the C step
12:28:15FromDiscord<mratsim> For the code-golfing we used LLVM
12:28:21Yardanicoyeah that makes sense
12:28:23FromDiscord<MapleSyrup|TagMeIfReply> oh I see!
12:28:29Yardanico@mratsim did you see https://github.com/yglukhov/wasmrt btw?
12:28:33YardanicoI played with it a bit too
12:28:39disruptekhttps://en.wikipedia.org/wiki/Gremlin_(query_language)#Gremlin_graph_traversal_machine
12:28:51FromDiscord<mratsim> well Yuriy and Arnetheduck were the one doing the codegolf
12:28:55Yardanicooh lol
12:29:06FromGitter<bung87> let me check, I have a toy redis-server in nim
12:30:01disruptekstorage could be redis, lmdb, bolt, rocks, etc.
12:35:19*ftsf quit (Quit: Leaving)
12:35:28FromGitter<bung87> hmm why all implementation in java, https://github.com/pokitdok/gremlin-python/tree/master/src/main/java/com/pokitdok/gremlin/python/jsr223
12:38:25*bung_ quit (Quit: Lost terminal)
12:38:55disruptekprobably for vm reasons.
12:39:07*Kaivo joined #nim
12:41:37FromGitter<bung87> am looking pure ts,js or python implementation, that's easy to me.
12:42:29*Senny quit (Ping timeout: 272 seconds)
12:42:41*bung joined #nim
12:48:01bungany alternative to .dot ? I'v thought use markdown table instead of html in .dot
12:48:45disruptekbut .dot is basically what you want.
12:49:02FromDiscord<mratsim> I use .dot, it has good integration with many tools
12:50:22bungyeah, it's good for show graph of project ,avoiding push image to repository
12:51:00bungonly the table part am not feeling well
12:51:13Yardanicowell I think that .dot is mostly for diagrams and graphs :)
12:53:04bungI used to use it represent database table structure
12:54:24bungbut I cant mark the column relations of tables
12:56:10disruptekthat's your graph application?
12:56:22disrupteki mean, modeling rdbms tables?
12:56:46bungrdbms tables , yes
12:57:35disrupteki would think that gram would work fine for that right now.
12:57:58disruptekwe're not talking about hundreds of thousands of tables, right?
13:01:32bunghttps://www.graphviz.org/Gallery/directed/datastruct.html this fit my needs
13:01:54*drewr quit (Quit: brb)
13:02:09disruptekcool.
13:02:51*drewr joined #nim
13:03:14disrupteki will add skiplists in when i get a chance to finish them. that will yield O(logn) value query on the graph.
13:03:17*bung_ joined #nim
13:03:33disruptekthen we just output dot and go from there.
13:06:22*bung quit (Ping timeout: 246 seconds)
13:06:47bung_en, that's one feature can be added to gram lib
13:07:10disrupteken?
13:07:35bung_haha ,chinese spell means yes
13:08:21disrupteki think zevv wrote some dot output in nim once.
13:09:27bung_https://github.com/QuinnFreedman/nimgraphviz
13:10:01disruptekthat probably solves all your needs.
13:12:01bung_yeah,think so
13:12:23FromGitter<cyberlis> I have a question. If i run this code https://play.nim-lang.org/#ix=2r1w ⏎ compiled with `nim c -d:release -r speed_test.nim` ⏎ I get this output ⏎ ⏎ ```List: (seconds: 0, nanosecond: 7643) ⏎ Table: (seconds: 0, nanosecond: 4523571)``` ... [https://gitter.im/nim-lang/Nim?at=5f032337bb149531edf21be9]
13:13:00FromGitter<cyberlis> maybe i am doing something wrong ?
13:13:30Yardanicobecause table obviously has more overhead than just a seq?
13:13:38Yardanicoand a table needs to calculate hash for each key too
13:13:49FromGitter<cyberlis> but
13:13:51FromDiscord<Rika> tables are complicated
13:13:56FromGitter<cyberlis> I see
13:13:57disrupteknot surprising to me.
13:14:30FromGitter<cyberlis> Than why we need tables if array search faster?
13:14:36FromDiscord<Rika> has key != contains too, anyway
13:14:49FromDiscord<Rika> because tables dont only accept integer keys?
13:15:01narimiranshit, we have tables for no reason
13:15:05FromDiscord<Rika> people usually use string keys
13:15:10narimirannobody noticed by now
13:15:31bung_everybody need tables right?
13:15:42FromDiscord<Rika> narimiran is making a joke
13:15:43narimirannot everybody
13:15:45FromDiscord<impbox> switch to lua
13:15:53disruptekat least no one stupidly implemented binary tables.
13:15:57FromDiscord<Rika> lua doesnt have arrays/lists at all 😛
13:16:01Yardanico@cyberlis for each hasKey the tables module needs to calculate a hash for the integer, it doesn't just use the integer keys as indexes
13:16:14narimiranYardanico: achtually.......
13:16:19Yardanico?
13:16:19disruptekthe hash for the int is the int.
13:16:22narimiran^
13:16:30Yardanicooh, but stil :)
13:16:32FromDiscord<impbox> lua has one container which is a table... but sometimes it's an array =)
13:16:34narimiranbut yeah, it still "calculates" its hash
13:16:41FromDiscord<impbox> or it has an array part + a table part
13:16:46FromDiscord<Rika> yes but its still technically a table
13:17:11FromDiscord<impbox> yeah, behaves like a table most of the time
13:17:15FromGitter<cyberlis> I know how tables work. That is why i'am interested why tables slower in this example. List search O(N), table search O(1)
13:17:16disruptekit's not that tables are expensive, it's that finding the first element in a seq is fast.
13:17:21FromDiscord<exelotl> Lua does so much with so little, it's really impressive
13:17:23Yardanico@cyberlis just FYI with LTO your "tables" part will be 4 times faster
13:17:45Yardanicoand holy sh*t arc for some reason makes this microbenchmark so much faster for the seq
13:17:52disruptektry searching for _ instead of 0.
13:18:04Yardanicooh right
13:18:06Yardanicolol
13:18:35Yardanicoit's still much faster with arc
13:18:35bung_that's the key,linear search
13:19:41Yardanico"list" with arc in this benchmark is ~20x faster than with refc lol
13:20:01*fanta1 joined #nim
13:20:04Yardanicoand with LTO and arc I get sub 100 nanosecond results
13:20:13disruptekcompare with markAndSweep for a fairer test.
13:20:17Yardanicomaybe the C compiler optimized too much stuff
13:20:29Yardanicodisruptek: 10 times slower than arc
13:20:42disrupteki don't think arc will free anything in this example.
13:20:46disruptekput it in a proc
13:20:49Yardanicoi already did
13:20:55disruptekcool.
13:21:02disruptekmaybe it's time for me to run some more benchmarks.
13:21:10Yardanicowell the scoped PR might've helped
13:22:08Yardanicoah nvm
13:22:14Yardanicoseems like the C compiler fully optimizes the first loop away lol
13:22:27disruptekgood.
13:22:43Yardanicothe time is literally the same as when just echoing time difference after getting the start time
13:22:47Yardanicowithout any loops
13:22:58FromGitter<cyberlis> And you still have no answer why linear search faster than constant search? ⏎ I can use array of tuple with first integer value as key and get better results then tables?
13:23:19disruptekno answer? how about the fact that it's not much of a "search"
13:23:35narimiranyeah you can do that
13:23:42disruptekit looks at the first element and, "hey! winner, winner, chicken dinner!"
13:23:59Yardanico@cyberlis your microbenchmark is flawed
13:24:09Yardanicoyou always "search" for the first element
13:24:26Yardanicoand that means the list will find it instantly since it'll start iterating by the items and the first one will already be the one it needs
13:24:40*nkoz joined #nim
13:24:42Yardanicoalso yeah, the C compiler seems to be optimizing it away
13:25:01FromDiscord<impbox> use bogosearch instead
13:25:19FromGitter<cyberlis> > > and that means the list will find it instantly since it'll start iterating by the items and the first one will already be the one it needs ⏎ I put elements in list in reverse order
13:25:19*arecaceae quit (Remote host closed the connection)
13:25:30FromGitter<cyberlis> 1 is last element
13:25:52*arecaceae joined #nim
13:26:17FromGitter<cyberlis> ```for i in countdown(1_000_000, 0): ⏎ myList.add(i)``` [https://gitter.im/nim-lang/Nim?at=5f0326783a0d3931fad6f785]
13:26:20FromGitter<cyberlis> coutdown
13:27:39disruptekthen it's because the compiler has optimized the search for 0.
13:28:01disruptekthat's my guess, anyway.
13:28:16disrupteki don't understand why you don't search for _. you need that complexity to perform a fair comparison.
13:28:46disruptekhttps://github.com/disruptek/criterion
13:29:03*hpyc9 quit (Quit: FREENODE IS FUCKING GAY)
13:29:03*blackbeard420 quit (Quit: ZNC 1.8.0 - https://znc.in)
13:29:27disruptekshashlick: i cannot build golden with nimterop-0.6.2:
13:29:35disruptek/home/adavidoff/.cache/nim/nimterop/toastCache/nimterop_622733778.nim(7, 16) Error: cannot open file: nimterop/types
13:33:02*blackbeard420 joined #nim
13:33:32*hpyc9 joined #nim
13:43:24*fanta1 quit (Ping timeout: 244 seconds)
13:43:24*mbuchel joined #nim
13:48:03*fanta1 joined #nim
13:48:34FromDiscord<Clyybber> > the hash for the int is the int.↵Actually not anymore
13:48:54FromDiscord<Clyybber> But theres a switch to use the identity hash
13:50:19*waleee-cl joined #nim
13:50:58mbucheldoes anyone know how to make a concept that can check the length of a string?
13:51:07YardanicoI think so
13:51:31Yardanicowait a sec
13:52:33Yardanicombuchel: you mean a concept which would match for objects which can check the length of the string?
13:53:02FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2r1I
13:53:04FromDiscord<lqdev> mbuchel: ↑
13:53:12Yardanicono string though
13:53:23ForumUpdaterBotNew thread by Cyberlis: Why Seq search is faster than Table search, see https://forum.nim-lang.org/t/6519
13:53:26Yardanicoor maybe I misunderstood
13:54:51Yardanicombuchel: do you mean something like that ? https://play.nim-lang.org/#ix=2r1K
13:54:55Yardanicoor maybe i misunderstood
13:55:20FromDiscord<Clyybber> cyberlis: I think its because seqs are very fast, since linear in memory
13:55:38mbuchelkindof like that but what i want is similar to this https://play.nim-lang.org/#ix=2r1L
13:55:55FromDiscord<Clyybber> If you increase the size/iteration amount the tables should get faster at some point
13:55:57Yardanicombuchel: concepts are compile-time only
13:56:07Yardanicothey don't exist at runtime so you can't add checks like that really
13:56:30FromDiscord<lqdev> you can use assertions for that
13:56:33mbuchelis there a different thing like this that can do it at runtime?
13:56:37FromDiscord<lqdev> `assert s.len < 10`
13:56:52FromDiscord<lqdev> or `doAssert` if you want the assertion to work on -d:release
13:56:57mbuchelyes i know about assertions and that is the way we are doing it
13:57:17FromDiscord<lqdev> well, this is the only way afaik
13:58:05mbuchelbut i want to know if there is a way that allows you to add it to the type and have nim generate the code for checking that it is handling the type correctly
13:58:12mbuchelor at least raise an error when it is not
13:58:46mbucheli was able to do it in a very bad way which worked but it treated string as alias
13:59:02mbucheland overwrote the $ for string
14:00:18FromDiscord<lqdev> there's no way of adding that to the type
14:03:44mbuchelis there a way to make a type to run a function before any assigning or modification
14:03:49Yardanicono
14:03:57Yardanicowe don't have "creation" hooks or something like that
14:04:07mbuchelah ok thank you
14:05:27*kenran quit (Quit: leaving)
14:11:21*flop joined #nim
14:13:09shashlick@disruptek I thought I had fixed that but it's a cache issue - please just clear nimcache/nimterop
14:13:56*laqq3 joined #nim
14:14:08shashlickBasically I removed the nimterop dependency from generated wrappers
14:14:59FromDiscord<Recruit_main707> nice
14:18:09shashlickI don't get it - wrapper path should depend on the file date of toast binary so if it was recompiled as part of an update, it should have changed and an old cached wrapper should have been discarded
14:34:14disruptekshashlick: that was the first thing i tried.
14:37:14shashlickWell that's nifty
14:38:28disruptekmbuchel: you can create a setter named `=whatever` for a `foo.whatever = ...` application.
14:38:45leorizeI'm pretty sure the `=` is on the other end
14:39:07disruptekyeah.
14:39:14disruptekwhatever.
14:41:14disruptekthere are a lot of examples in golden. i hate it.
14:41:14*Vladar quit (Quit: Leaving)
14:41:16disruptek!repo golden
14:41:16disbothttps://github.com/disruptek/golden -- 9golden: 11a benchmark for compile-time and/or runtime Nim 🏆 15 20⭐ 0🍴
14:42:30disruptekshashlick: http://ix.io/2r1S
14:59:46FromDiscord<julcz> What GUI framework can you recommend for Nim?
15:00:19Yardanicowell there are things like https://github.com/StefanSalewski/gintro and https://github.com/trustable-code/NiGui
15:01:01shashlickdisuptek: can you also paste the generated wrapper - /home/adavidoff/.cache/nim/nimterop/toastCache/nimterop_622733778.nim
15:02:28FromDiscord<julcz> Thanks, I'll check it out
15:02:58FromDiscord<julcz> What about Nimx? Any experience with it?
15:03:15Yardanicowell the people who made it use it in their apps :)
15:03:16FromDiscord<julcz> It works with mobile platforms and web too
15:03:20Yardanicobut it's a bit less documented I feel
15:04:10FromDiscord<julcz> Alright, thanks again 😄
15:05:41*natrys joined #nim
15:11:41mbucheldisruptek: thank you that works great
15:12:08disruptekcool.
15:13:08disruptekshashlick: http://ix.io/2r1W/nim
15:14:29*natrys_ joined #nim
15:14:44*natrys_ quit (Client Quit)
15:17:27*Vladar joined #nim
15:18:21*natrys quit (Ping timeout: 256 seconds)
15:19:25*maier quit (Ping timeout: 264 seconds)
15:36:57FromGitter<deech> Having some issues with closures and C/C++ interop, am I missing something about how `rawProc` and `rawEnv` work? https://github.com/nim-lang/Nim/issues/14920
15:37:00disbotPassing a function pointer + env to a class constructor fails but works if applied directly ; snippet at 12https://play.nim-lang.org/#ix=2r23
15:41:57*lritter joined #nim
15:43:43*nikita` joined #nim
15:47:09*marnix_ quit (Read error: Connection reset by peer)
15:47:50*marnix_ joined #nim
15:53:14*Jesin quit (Ping timeout: 260 seconds)
15:54:36*marnix joined #nim
15:57:27*marnix_ quit (Ping timeout: 256 seconds)
15:57:31*audiophile joined #nim
16:00:40*marnix_ joined #nim
16:02:38*nixfreak_work joined #nim
16:04:59nixfreak_workI'm starting an embedded project that uses FSR and RFID circuits , was thinking of using auduino or maybe something faster, would nim be a good language to program and interface with all of these circuits ?
16:05:31*enki_nam_shub joined #nim
16:05:52FromDiscord<Rika> sorry if this is rude or something but what makes a language bad for that case?
16:05:55enki_nam_shubsomeone come get their child, i dont appreciate the harassment https://mastodon.online/@holzwurst
16:05:58*enki_nam_shub quit (Client Quit)
16:06:22FromDiscord<Rika> enki_nam_shub what?
16:07:23*reversem3 joined #nim
16:07:40YardanicoLOL
16:07:42Yardanicohe left
16:08:05FromDiscord<Rika> i dont understand
16:08:08Yardaniconeither do I
16:08:10FromDiscord<Rika> what did they do
16:08:16FromDiscord<Rika> why was that posted
16:08:16FromDiscord<lqdev> uh?
16:08:21FromDiscord<Rika> who is that??
16:08:22Yardanicobut that name is probably related to The Incident
16:08:30YardanicoI'm almost 100% sure
16:08:39FromDiscord<lqdev> oh god no not that again
16:08:40Yardanicooh yeah
16:08:41narimirancan we just ignore this and not give it any attention?
16:08:41Yardanicohttps://mastodon.online/@holzwurst/with_replies see
16:08:53FromDiscord<Rika> ah i see
16:08:54FromDiscord<Rika> okay
16:08:58Yardanicosomeone started arguing with that person P
16:08:58FromDiscord<Rika> let's drop it now lol
16:09:29FromDiscord<lqdev> jesus fucking christ it's *them* again
16:09:51FromDiscord<Rika> rather the enki guy was prolly simula, anyway w/e theyre gone
16:09:57Yardanicoyes
16:10:06YardanicoThey joined, sent that message and immediately left
16:10:08FromDiscord<Rika> (w/e == whatever), for those who dont know
16:10:27Yardanicowait what
16:10:33Yardanicohttps://cybre.space/@simula/104467772660364644 ???????
16:10:38YardanicoI hope they don't think it's me
16:10:53YardanicoI actually considered the idea of making a Mastodon account for some talk about that, but didn't do it
16:11:08narimiranCAN WE STOP TALKING ABOUT IT PLEASE?
16:11:15YardanicoOKAY I'M REALLY SORRY
16:11:24Yardanicoyou can punish me
16:11:27Yardanicodaddy
16:11:45shashlickdisruptek: this looks like magic - there's no code in nimterop that writes `import nimterop/types` anymore
16:11:52*marnix quit (Ping timeout: 246 seconds)
16:12:43FromDiscord<Rika> yard wtf lewd
16:13:08Yardanicoit's not lewd if you say "no oxidizing"
16:13:18Yardanicooxidation*
16:13:27FromDiscord<Rika> lmao
16:15:18shashlickdisruptek: can you check if /home/adavidoff/git/golden/deps/pkgs/nimterop-0.6.2/nimterop really is 0.6.2
16:15:30shashlickor if it cloned an older code version
16:15:50shashlickand also can you check when toast in that directory was compiled?
16:16:43disruptekit's probably old. http://ix.io/2r2c
16:17:05disruptekit's always something. 😉
16:18:56mbuchelnixfreak_work: i used nim for an nfc project before
16:19:25mbuchelit is good enough, the hardest part is if it is embedded on a smaller microcontroller
16:19:34mbucheldepends on the specs of the processor you are using
16:20:45*bacterio quit (Ping timeout: 240 seconds)
16:21:11*NimBot joined #nim
16:24:05shashlickdisruptek: you trust nimph? 😄
16:24:40disrupteki think we have to bump gittyup to support 0.6.2.
16:25:10shashlickbut wrapper is generated at compile time
16:25:42shashlicknimgit2 is at 0.3.0
16:25:49disruptekone at a time...
16:25:50nixfreak_workmbuchel - ok what did you have to do any "special" like FFI or import libs ?
16:26:18*Vladar quit (Remote host closed the connection)
16:26:31nixfreak_workmbuchel - also how did you get started ?
16:26:54shashlicklooks like gittyup refers to git_strarray_free() which is not rendered in the wrapper
16:27:50shashlickah it's deprecated
16:28:29shashlickand I set GIT_DEPRECATE_HARD in nimgit2
16:28:43disruptekkinky.
16:28:54shashlickI can remove that from nimgit2 if you need
16:29:06disruptekwhat does it mean?
16:30:32shashlickhttps://github.com/genotrance/nimgit2/blob/master/nimgit2.nim#L43
16:31:47FromDiscord<mratsim> @nixfreak_work: AFAIK there was a talk at NimConf for running Nim to control light switches
16:32:05FromDiscord<mratsim> https://www.youtube.com/watch?v=eCCrkZI0rVU&list=PLxLdEZg8DRwTIEzUpfaIcBqhsj09mLWHx&index=8&t=0s
16:32:23disruptekshashlick: but what does it mean?
16:32:45audiophilesomeone here was talking about a book a couple months ago about writing interpreters and they were doing it in nim
16:32:51audiophileany idea who/what that book is?
16:32:51FromDiscord<mratsim> https://github.com/clj/nim-esp8266-examples
16:32:55disruptekwell, golden doesn't build due to an lmdb error, now.
16:33:02FromDiscord<mratsim> crafting interpreters by Nystrom?
16:33:07Yardanicoyes
16:33:10disruptekyep.
16:33:20FromDiscord<mratsim> yeet
16:33:22YardanicoI kinda stopped reading it (not dropped, just did other stuff :P)
16:33:38audiophileaka paused and thanks! :)
16:33:51Yardanicosee https://github.com/Yardanico/nim-lox/
16:34:00FromDiscord<mratsim> Nystrom is the one behind the Wren language
16:34:02Yardanicothe old branch is the java-based part of the book, and it's in Nim
16:34:08audiophileoooooh dammit
16:34:10YardanicoI didn't fully finish it though :P
16:34:11FromDiscord<mratsim> Vade Retro
16:34:14audiophileI knew the name sounded familiar
16:34:19Yardanicodidn't finish inheritance or stuff like that
16:34:19disruptekshashlick: afaik, cligen 1.0 breaks nimph.
16:34:27FromDiscord<mratsim> Java, how could you, you are dead to me
16:34:28Yardanicoand master is the C part of the book
16:34:29Yardanicostill in nim
16:34:34Yardanico@mratsim I did it in Nim
16:34:42Yardanicoso I had more work to do than just copy paste code from the book :P
16:34:45FromDiscord<mratsim> my eyes, they bleed
16:34:57FromDiscord<mratsim> set, get, set, get, Gang of 4
16:35:01YardanicoXD
16:35:14Yardanicoand there's also another implementation
16:35:14audiophilehow different is creating an interpreter from a compiler? is the parsing part the same
16:35:21Yardanicoaudiophile: I think so, yes
16:35:23audiophileexcuse my ignorance as I slept through my compilers class
16:35:32Yardanicointerpreter itself *is* a compiler usually
16:35:33audiophilewhat about this 'lexer'
16:35:35supakeenaudiophile: Nowadays the concepts have mostly merged together.
16:35:36audiophileoh
16:35:41Yardanicobecause it compiles source code into bytecode for the VM
16:35:47Yardanicosame for the Lox (the C part of the book)
16:35:50audiophilegreat! I've always wanted to write my own compiler but I guess I can just do an interpreter now
16:35:51supakeenAs in you see a lot of interpreters that will emit an intermediate code for the vm running the instructions.
16:35:59audiophileyeah python does .pyc
16:36:39shashlickdisruptek: okay let me know what i need to do if anything
16:36:41supakeenThere is really no good definition to make that holds for every setup (is java compiled? it makes bytecode and runs on a vm, so do a lot of other languages such as python, ruby, etc)
16:37:29shashlickhttps://github.com/libgit2/libgit2/blob/master/include/git2/deprecated.h#L42
16:37:35disruptekshashlick: i dunno, i cannot be bothered to look at the lmdb wrapper atm. i will be moving golden to use gram and gram to use frosty, once i figure out the frosty bug.
16:37:44audiophiledat feel when you go to add 'crafting interpreters' to your goodreads shelf and see it already added smh
16:38:38nixfreak_workmratsim - I saw that on the Nim2020 playlist , but I could of sworn that there was a better way to do it? , maybe not.
16:38:50disruptekshashlick: i am fine with deprecate-hard, i guess. i would rather "fix" that stuff in nim than in the wrapper.
16:38:58disruptekso that's good.
16:39:01shashlickokay cool
16:39:24shashlickbut i still don't see how nimterop 0.6.2 with an older nimgit2 renders a types.nim
16:39:26*GoJiRa123 joined #nim
16:39:35*GoJiRa123 quit (Remote host closed the connection)
16:40:12disruptekthere's something i don't understand, because invariably, i have to rebuild nimgit2 and nimterop like 10 times to fix these problems. i have a hard time reproducing solutions.
16:41:07shashlickhow do you tell nimph about a deps directory
16:41:17*endragor quit (Remote host closed the connection)
16:41:43*endragor joined #nim
16:41:53disrupteknimph is an auditor, it doesn't really /do/ anything itself.
16:41:54audiophilewill learning to create an interpreter help me understand core nim better?
16:42:12disruptek--nimblePath="deps"
16:42:24shashlickyou pass that to nimph?
16:42:29disruptekor whatever. i prefer --nimblePath="$config/deps/pkgs/" myself.
16:42:35disrupteki put it in a nim.cfg.
16:42:44disruptekthere's a demo on the repo.
16:42:46disruptek!repo nimph
16:42:47disbothttps://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 68⭐ 5🍴 7& 1 more...
16:44:18shashlickokay building latest nimph
16:44:54FromDiscord<Shucks> `proc readSeq*(p: Process, address: ByteAddress, size: SIZE_T, t: typedesc): seq[t]`
16:45:00FromDiscord<Shucks> should I use generics here?
16:45:11FromDiscord<Rika> you cant
16:45:38FromDiscord<lqdev> he can
16:45:42FromDiscord<Rika> ? how?
16:45:42*fanta1 quit (Quit: fanta1)
16:45:50FromDiscord<lqdev> he'll just have to specify the type directly each time the proc is called
16:45:59FromDiscord<Rika> no i dont think that would work either
16:46:10disrupteksure it would.
16:46:10*endragor quit (Ping timeout: 246 seconds)
16:46:14FromDiscord<Rika> well try it anyway
16:46:14FromDiscord<lqdev> `proc readSeq*[T](p: Process, address: ByteAddress, size: SizeT): seq[T]`
16:46:18disruptekhow do you think parseEnum works?
16:46:22FromDiscord<lqdev> and then `readSeq[int](…)`
16:46:48FromDiscord<Shucks> thank you!
16:46:59*endragor joined #nim
16:48:32*abm joined #nim
16:48:37audiophile"...The designer of Nimrod ended up renaming his language to “Nim” because too many people only remember that Bugs Bunny used “Nimrod” as an insult." wow really?
16:48:49audiophilenot even sure what insult that is but okay
16:48:49Yardanicowell, not just because of this, but yes
16:48:54Yardanicoit's an american thing
16:49:04audiophilewasn't nimrod a dude (from wiki)
16:49:54*waleee-cl quit (Quit: Connection closed for inactivity)
16:52:26mbuchelnixfreak_work: nothing really special, you just have to remember that nim allows you to set your cpu
16:52:34mbuchelit depends on what you want to do
16:52:46*Trustable joined #nim
16:53:38*endragor quit (Ping timeout: 272 seconds)
16:54:15shashlickdisruptek: cloned golden, setup nim.cfg for local deps and then ran nimph doctor
16:54:25shashlickError: unhandled exception: 'reference' is not accessible using discriminant 'kind' of type 'Release' [FieldDefect]
16:54:39shashlicksrc/nimph/dependency.nim(334) isSatisfiedBy
16:54:47shashlickold case objects?
16:55:49*nixfreak_work quit (Ping timeout: 256 seconds)
16:56:10disruptekdoesn't anyone test this shit?
16:56:26shashlicknope, compiling even with -d:nimOldCaseObjects doesn't help
16:56:33disruptekwell, it wouldn't.
16:56:52FromGitter<matrixbot> `David` Hey I'm having some issues with fmt crashing my program at runtime. During a resize event of my window this is called pretty much constantly: ⏎ ⏎ fmt("place {container.id} -x {container.x.value} -y {container.y.value} -width {container.width.value} -height {container.height.value}") ⏎ ⏎ I will eventually get an error in prepareDealloc with an Illegal storage access segfault. Removing fmt and just
16:56:52FromGitter... making the string normally does not crash the program. ... [https://gitter.im/nim-lang/Nim?at=5f0357d482f87b2ad70aed4b]
16:56:54disruptekthat error is because something is making an incorrect case assumption.
16:57:52shashlickI see
16:57:57disruptekdid you build toast?
16:58:02shashlickya
16:58:14disruptekkk, i am attempting a repro.
16:58:22shashlickcloned nimph
16:58:27shashlickcreate nim.cfg
16:58:40shashlickexport NIMBLE_DIR=deps and then nimble install -d
16:58:46shashlickcause i'm lazy
16:58:57FromDiscord<Rika> david: i think an issue is warranted
16:59:02shashlickthen nim c src/nimph
16:59:04FromDiscord<Rika> well
16:59:10disruptekwell, that's a weird way to do it. neither nim or nimph really use $NIMBLE_DIR.
16:59:18FromDiscord<Rika> it would be best maybe to show an code example first
16:59:21shashlickya only to get the deps down
16:59:25shashlickmaybe i could use your bootstrap
16:59:26disrupteknimph tries to work with it, but because it's not a compiler thing, i won't support it.
16:59:40shashlicki removed NIMBLE_DIR when using nimph
16:59:51shashlickjust using nim.cfg like you said above
16:59:55disruptekwell, it doesn't work for me, but for different reasons:
16:59:58disruptek/home/adavidoff/git/g/golden/deps/pkgs/gittyup-2.5.1/gittyup.nim(1018, 9) Error: undeclared identifier: 'git_strarray_free'
17:00:36disruptekremoving the cache doesn't help.
17:00:42disruptekthis is a fresh golden clone.
17:01:07shashlickthat's cause gittyup is using that proc when it is deprecated
17:01:46disruptekoh right, i didn't update golden's git version.
17:01:59shashlickit works for me cause I didn't pull a newer libgit2 in the cache
17:02:08disruptekrm nimterop cache again, switch to v1.0.1, try again...
17:02:08shashlicki'm still in July 2nd commit
17:02:22disrupteknow i repro the new lmdb error.
17:02:37disrupteknimph is working fine for me on golden, though.
17:02:53*natrys joined #nim
17:04:58shashlickHmm
17:05:29shashlickSo golden is compiling now?
17:05:44disruptekno, due to lmdb wrapper error.
17:05:52disruptekhttp://ix.io/2r2o
17:06:27*FromGitter quit (Ping timeout: 240 seconds)
17:07:24shashlickAh I didn't know that was also a wrapper
17:07:31*oprypin quit (Remote host closed the connection)
17:07:52disruptekit wasn't, originally, but them you made me one and i decided to use yours instead of federico's.
17:07:54shashlickIs it within golden? Or a separate package
17:08:01disruptekit's in golden.
17:08:07shashlickOh you want me to use my memory
17:08:23shashlickI only have up to l3 cache
17:08:31disrupteksee src/golden/lmdb.nim
17:09:31shashlickOk I'll check in a bit
17:09:35shashlickErrands time
17:09:46disruptekdanke.
17:10:00*FromGitter joined #nim
17:10:01disrupteki have some trolling to do in another channel.
17:10:08*oprypin joined #nim
17:10:39alehander92_hey
17:11:00alehander92_it's time to code?
17:11:21disrupteknah.
17:11:21*FromGitter quit (Read error: Connection reset by peer)
17:11:24*oprypin_ joined #nim
17:11:25*oprypin quit (Read error: Connection reset by peer)
17:11:36*FromGitter joined #nim
17:12:48*dmi0 quit (Read error: Connection reset by peer)
17:12:52*dmi00 joined #nim
17:13:25solitudesfdisruptek, leave crystal guys alone
17:14:14disruptekbut...
17:15:00solitudesfyou dont see them coming here and bashing our json parser, do you?
17:16:37alehander92_what are you fithigng
17:16:38alehander92_about
17:17:04disruptekshhh alehander is a crystal dork.
17:18:07*nixfreak_work joined #nim
17:18:10*oprypin_ is now known as oprypin
17:19:21Oddmongercan you tell me what is the repl used ? https://www.youtube.com/watch?v=Qa_9vut4TzQ&feature=youtu.be&t=199
17:19:41solitudesfits literally the name of the video
17:19:44disruptekit says "INim" at the top.
17:19:53Oddmongeroh
17:20:12Oddmongeri had read «nim is back»
17:20:34Oddmongerand i don't understand all he says
17:20:38FromDiscord<JackFly26> lol i accidentally programmed in nim like it was lazy
17:20:44FromDiscord<JackFly26> sent a code paste, see https://play.nim-lang.org/#ix=2r2q
17:20:46alehander92_i did write some crystal
17:20:51FromDiscord<JackFly26> got surprised when infinite recursion happened
17:20:56alehander92_i like it
17:28:44disruptekwe can't be friends.
17:33:35FromDiscord<Clyybber> we can
17:36:45FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2r2z
17:41:34shashlickdisruptek: did you have to change anything to fix that discriminator issue
17:41:47shashlickI still see that so not able to proceed on golden
17:44:10*vr0n joined #nim
17:45:19FromGitter<recloser> zachary carter: either drop the parameter and just do`importcpp: "Animation::TestTag<'0>()"`? or try something like this `importcpp: "decltype(#)::TestTag<'0>()"`
17:46:27*bacterio joined #nim
17:48:10*Senny joined #nim
17:50:26*Jesin joined #nim
17:51:08FromDiscord<Zachary Carter> thanks
17:51:50FromDiscord<Zachary Carter> the parameter is the instance of the class the member function belongs to though
17:51:53FromDiscord<Zachary Carter> so I don't think I can drop it
17:55:15*endragor joined #nim
17:59:12FromGitter<recloser> i'm guessing TestTag template exists in several classes and you want an overloaded Nim testTag proc for each of them?
18:00:23FromDiscord<Clyybber> @JackFly26 Doesn't your any just have to be lazy?
18:03:55*audiophile quit (Remote host closed the connection)
18:04:37*audiophile joined #nim
18:05:16*endragor quit (Ping timeout: 246 seconds)
18:05:51FromDiscord<Zachary Carter> recloser: not exactly - and my example C++ code had the wrong class name. It's defined here - https://github.com/guillaumeblanc/ozz-animation/blob/6ec66420abada9c1235fac25a8d9ff25936fc672/include/ozz/base/io/archive.h#L223
18:05:59FromDiscord<Zachary Carter> I actually think what I put in the Nim code is correct
18:06:05FromDiscord<Zachary Carter> I think I'm maybe invoking it incorrectly
18:06:13*marnix joined #nim
18:07:13*nixfreak_work quit (Ping timeout: 256 seconds)
18:07:55FromDiscord<Zachary Carter> np!
18:07:56*muffindrake quit (Ping timeout: 244 seconds)
18:10:39FromGitter<recloser> ah, nvm for some reason i thought that template was supposed to be a static member
18:12:13FromDiscord<Zachary Carter> np!
18:31:20FromDiscord<Varriount> Anyone know what timezone timotheecour is in?
18:31:40Yardanicoi think they're in USA at least
18:32:40FromDiscord<Shucks> does inline asm support x64? Afaik visual studio removed it from x64 projects for any reason.
18:32:56Yardanicoof course?
18:33:00FromDiscord<Varriount> Shucks: What do you mean by removed?
18:33:17Yardanico@Varriount seems like vc++ doesn't support inline assembly for x64 or arm
18:33:28Yardanico"Inline assembly is not supported on the ARM and x64 processors. "
18:33:30Yardanicohttps://github.com/MicrosoftDocs/cpp-docs/blob/master/docs/assembler/inline/inline-assembler.md
18:33:48FromDiscord<Shucks> yup
18:33:57Yardanicowell use clang or mingw :P
18:34:19FromDiscord<Varriount> Araq: Would you be ok with me reformatting/refactoring nimbase.h? I ran into an odd corner-case with clang+windows sdk that requires some changes, and that file looks badly in need of some love.
18:34:40FromDiscord<Shucks> im not using cpp at all. Was just wondering if nim as any limitations there
18:34:47Yardaniconim itself does not I think
18:34:51FromDiscord<Varriount> Shucks: Unfortunately then, it's not supported. Nim uses the underlying C/C++ compiler.
18:35:06FromDiscord<Varriount> At least for Visual studio.
18:35:57FromDiscord<Varriount> Inline ASM pretty much tells the Nim compiler, "place this text in the inline ASM statement for whatever C compiler is being used.
18:36:21FromDiscord<Varriount> The text isn't translated or analyzed at all, I don't think.
18:37:56FromDiscord<Shucks> Im confused. I'm not using visual studio to compile my nim code
18:38:12Yardanicodo you use visual studio's c compiler?
18:38:21FromDiscord<Shucks> im using mingw
18:38:27Yardanicothen you don't need to care about that x64 note
18:38:33YardanicoI think mingw would support x64 asm just fine
18:38:52FromDiscord<Shucks> Great
18:41:29*arecaceae quit (Remote host closed the connection)
18:42:29*arecaceae joined #nim
18:47:03Yardanico!status
18:47:04FromDiscordUptime - 3 days, 12 hours, and 29 minutes
18:47:33*maier joined #nim
18:48:34FromDiscord<Varriount> I'm weird, and attempting to use clang+windows sdk
18:48:57FromDiscord<Varriount> (although, I wonder if GCC would work with the Windows SDK... probably not)
18:49:11Yardanicowell mingw exists for that
18:49:31FromDiscord<Varriount> True, but Mingw uses reverse-engineered header files.
18:53:58*endragor joined #nim
18:59:01*endragor quit (Ping timeout: 264 seconds)
19:03:06*waleee-cl joined #nim
19:03:54FromDiscord<dom96> > Nice, thanks Yardanico. I've been thinking whether to buy the book or not and this makes the decision easier. I assume dom96 will still get his full share?↵@--HA-- @Yardanico if you want to support me in the best way possible then purchase via http://book.picheta.me
19:04:16Yardanicowell you didn't update the price today :P
19:04:19Yardanicoand it's $25 as I said
19:04:25Yardanicoall manning books are 50% off I think
19:04:36FromDiscord<dom96> yeah, I can't keep up with all their sales
19:05:06FromDiscord<dom96> You can also link via https://www.manning.com/books/nim-in-action?a_aid=niminaction&a_bid=78a27e81
19:05:20FromDiscord<dom96> (That's my affialiate code ;))
19:05:23Yardanicolol
19:05:24FromDiscord<dom96> (edit) 'affialiate' => 'affiliate'
19:12:44FromDiscord<Zachary Carter> hrm still need help with this importcpp C++ template stuff
19:20:01*marnix quit (Ping timeout: 264 seconds)
19:35:03*laqq3 quit (Ping timeout: 256 seconds)
19:41:05FromDiscord<treeform> I had a big C++ template mess, I just create a bloc of C++ code and made C-like interface for it. Then wrapped that in nim. Works!
19:41:48FromDiscord<treeform> Example here: https://github.com/treeform/steamworks/blob/master/src/steamworks.nim#L229
19:42:11FromDiscord<treeform> I could not make nim produce that exact C++ definition. So i just emit it.
19:45:06*laqq3 joined #nim
19:56:32FromDiscord<Zachary Carter> ooph - yeah I'd like to avoid that if I can possibly
19:56:42FromDiscord<Zachary Carter> let me throw together a gist of what i have
19:58:41FromDiscord<lqdev> how can I produce a doc comment AST?
19:59:02FromDiscord<lqdev> ah, I can just set the strVal
19:59:40FromDiscord<Zachary Carter> https://gist.github.com/zacharycarter/8e1ab668fa2295089ca49037d0e3ab7a
20:01:56*polypus74 joined #nim
20:03:20polypus74Is there a doc server or standard command for generating all installed (nimble) package docs?
20:07:53FromDiscord<treeform> What error do you get?
20:09:55FromDiscord<treeform> Hmm I don't get what `"ozz::io::IArchive(@)"` or `"#.TestTag<'*0>()"` do...
20:10:25disruptekshashlick: send me a paste?
20:10:36disruptek(i cannot repro it)
20:15:34FromDiscord<Zachary Carter> I pasted the error in the last part of the gist
20:15:40FromDiscord<Zachary Carter> `Error: cannot instantiate: 'T'`
20:16:06FromDiscord<Zachary Carter> oh maybe because I need to define the constructor for `Skeleton` I'll try that
20:27:47*endragor joined #nim
20:28:21FromDiscord<Zachary Carter> maybe I should just pass the type in as a parameter
20:32:27FromDiscord<Zachary Carter> yeah that worked
20:32:34*endragor quit (Ping timeout: 240 seconds)
20:32:38FromDiscord<Zachary Carter> `proc testTag*(a: Archive, b: typedesc): bool {.importcpp: "#.TestTag<'2>()", header: ozzIncludePath/"ozz/base/io/archive.h".}` generates the correct C++
20:32:48shashlickdisruptek: http://ix.io/2r3v
20:33:05shashlickwhen i setup deps with nimterop, i can compile but it fails with the undeclared identifier: 'git_strarray_free'
20:33:14shashlicknimble, not nimterop
20:37:20disruptekyeah, that means you've got the wrong version of libgit2.
20:37:39disrupteki fixed that today; issue `nimph fetch` and `nimph upgrade`.
20:38:30disruptekwhy can't the compiler parse your nim.cfg?
20:38:49disruptek--nimblePath:"$config/deps/pkgs"
20:38:54disruptektry s/:/=/
20:39:52disruptekalso, where did these deps come from? they aren't from git?
20:40:15disruptekput a --clearNimblePath in first if you're going to use local deps, right?
20:41:04disruptekthat's probably the key that i need to debug this.
20:42:08*dmi00 quit (Remote host closed the connection)
20:42:08disruptekhmm, that : syntax works fine for me. which compiler built your nimph?
20:42:33*narimiran quit (Quit: leaving)
20:44:20shashlickah okay - let me add clearNimblePath
20:45:00disruptekthe error is from npeg iirc. it's odd i can't even repro that.
20:46:15disruptekinstead of "not in git repo" it should probably provide the path to the nimble package.
20:46:19shashlickstarting with your bootstrap - Error: Cannot satisfy the dependency on cligen 1.0.0 and cligen 0.9.45
20:46:42disruptekyeah, because you require 1.0 in nimterop but it breaks nimph.
20:47:50disrupteki should give c-blake a bug report.
20:48:13*maier quit (Ping timeout: 264 seconds)
20:48:23shashlickokay i recompiled nimph after clearing nimterop cache
20:48:33shashlickran nimph on golden and run into same issue
20:49:08disruptekdoes your golden.nim.cfg have git2SetVer="v1.0.1"?
20:49:30disruptekie. it's commit 5f9b9e
20:49:53shashlickyes golden is up to date
20:49:57polypus74Is there a standard (easy) way of viewing all of the docs in one place globally and/or per nimble project like there is in some languages via a doc server, or just generating the doc locally?
20:50:02shashlicknimph is crashing tho
20:50:06disruptekwelcome to my world.
20:50:23disruptekpolypus74: only https://nimble.directory/ afaik
20:50:36shashlickthis is different
20:50:37disruptekyou can generate docs locally with `nim doc`.
20:50:39shashlickError: unhandled exception: /home/genotrance/programming/golden/deps/ is missing; can't run nimble [IOError]
20:51:50disruptekif the directory exists then that's a bug.
20:52:07shashlickit doesn't exist - it doesn't get created?
20:52:25shashlickokay i created it and nimph ran
20:52:28shashlicknow trying doctor
20:52:34disrupteknimph doesn't create any paths for you, because otherwise it'd be creating /opt/nimble all the fscking time.
20:52:43polypus74i want all the docs for all of the dependencies though, either that or just all installed packages. is there a tool? how do you guys view package docs?
20:53:09shashlickcould not parse /home/genotrance/programming/golden/nim.cfg naïvely:
20:53:13disrupteki just told you what i use. you could contribute your thoughts to the ndoc repo where i'm scheming a better solution.
20:53:17disruptek!repo ndoc
20:53:19disbothttps://github.com/nodeca/ndoc -- 9ndoc: 11js port of pdoc, with extentions 15 93⭐ 8🍴 7& 29 more...
20:53:57shashlicknimph adds paths but missed a newline - `--nimblePath="$config/deps/pkgs"--path="$config/deps/pkgs/terminaltables-#head/src/"`
20:54:10disruptekah, that's why it could not parse your nim.cfg.
20:54:21disruptekthat's an easy fix, cool. keep them coming.
20:54:30shashlickgolden version 3.0.14 lookin' good
20:55:34shashlickhmm, nimph didn't build toast
20:55:40shashlickgotta do that manually
20:55:58disruptekyeah, it doesn't do any nimble bullshit.
20:58:38shashlickhow about just compiling bin declarations
20:58:45*endragor joined #nim
20:58:59disruptekno point; i'm removing .nimble files.
21:01:23disruptekgah, i don't even know how to remove a trailing newline from my .cfg. 🤣
21:01:46FromDiscord<lqdev> this shit again. `internal error: environment misses: radius`
21:01:51FromDiscord<lqdev> when does this error arise?
21:02:04FromDiscord<lqdev> I'm trying to use a parameter's value in another parameter's default value
21:02:13disruptekthat's when.
21:02:16FromDiscord<lqdev> but I can't seem to reproduce the error in a standalone setting
21:02:28FromDiscord<lqdev> I changed my module layout and this started happening
21:05:07disruptekshashlick: there's code to test the config after nimph modifies it, so i guess that didn't work in your case. 🙁
21:06:58*endragor quit (Ping timeout: 272 seconds)
21:07:11FromDiscord<lqdev> just re-ran the compiler with koch temp to get a stack trace, this is what I got http://ix.io/2r3G
21:07:20FromDiscord<lqdev> any compiler folks around?
21:08:04disrupteklqdev: can i see the code?
21:08:13FromDiscord<lqdev> give me a sec, I'm pushing it
21:08:56FromDiscord<lqdev> disruptek: https://github.com/liquid600pgm/rapid/blob/version-2020/src/rapid/graphics/context.nim#L295
21:09:04shashlicki found your issue - MDBEnv is an importc object so you cannot `var e: MDBEnv`
21:09:09shashlicksize is unknown
21:09:27disruptekwell, it worked a month ago.
21:09:34shashlicklmdb api should be returning it to you, looking at the api
21:09:43shashlickthat's cause you used the old nimterop
21:09:45shashlickbackend
21:10:45shashlickit's now marked as an incompleteStruct
21:11:00disruptek0.8.10 has your two fixes in it.
21:11:59disrupteklqdev: i mean, i get it, but you're kinda asking a lot here (and needlessly).
21:12:25disruptekwhy not just `let points = ...` in the proc?
21:12:38FromDiscord<lqdev> because I want to make it user-controllable
21:12:57disruptekdoes it ever make sense to pass 0?
21:13:07FromDiscord<lqdev> also even if I remove this, it breaks in other places (line 394)
21:13:19FromDiscord<lqdev> disruptek: probably not, I need to change it to something else
21:13:43disruptekwell, that's a workaround. i'm not sure this isn't a bug though; at least the message is misleading.
21:14:22FromDiscord<lqdev> well what makes me confused is that it worked literally like, 10 minutes ago
21:14:34disruptekwhere are you using it?
21:14:39FromDiscord<lqdev> and it broke while I was doing some stuff with matrices
21:14:52FromDiscord<lqdev> here https://github.com/liquid600pgm/rapid/blob/version-2020/tests/tgfx.nim
21:15:45shashlickhow do i test golden
21:16:17disruptekgolden somebinary or golden some.nim
21:16:23FromDiscord<lqdev> I'm not sure what default param values have to do with lambda lifting though
21:16:28FromDiscord<Shucks> How would you guys read a sequence from internal memory? My approach: ```proc readSeq*(address: ByteAddress, size: SIZE_T, t: typedesc = byte): seq[t] =↵ var data = newSeq[t](size)↵ copyMem(data.addr, cast[pointer](address), size)↵ result = data```
21:16:47FromDiscord<lqdev> @Shucks yeah pretty much like that
21:17:32shashlick`var e: ptr MDBEnv; self.db = e`
21:17:50shashlickand `var txn: ptr MDB_Txn; result = txn`
21:18:16shashlickin lm.nim
21:18:46disrupteklqdev: it's trying to write the call and it needs to put the default points in because you didn't supply it.
21:19:15disruptekso it literally moves the exp outside the proc to prepare it for inclusion in the proc env.
21:19:33FromDiscord<lqdev> huh
21:19:39disrupteki dunno why it cannot find it, though.
21:19:57FromDiscord<lqdev> I mean, like I said, it worked a short while ago
21:20:07FromDiscord<lqdev> then I rearranged some stuff, added some type safety™ and it's broken
21:20:26FromDiscord<lqdev> let me try to remove the new import I added maybe it's the cause
21:21:09FromDiscord<lqdev> nope, no effect
21:21:43ForumUpdaterBotNew thread by Timothee: Difference between any and auto?, see https://forum.nim-lang.org/t/6520
21:22:13disrupteki've produced this error before but i don't recall the circumstances, so it's a useless experience. 😉
21:22:21shashlickdisruptek: here's a patch to get it to compile - http://ix.io/2r3L
21:22:34disruptekwell is your git broken?
21:22:41disruptekyou have push rights, don't you?
21:23:03disruptekoh, maybe not to golden. 😁
21:23:26FromDiscord<lqdev> the patch contains ANSI color codes
21:23:36disruptekhe's a wildman.
21:23:46shashlickdisruptek: till tests pass, patch doesn't mean anything
21:24:29shashlickit fails with --useVersion:1.0 though
21:24:35disruptekeverything does.
21:24:36shashlickso might not be related to the patch
21:24:43shashlicktoo lazy to fork around
21:24:45disruptek!issue useVersion author:disruptek
21:24:55disruptekdisbot: you awake?
21:24:55disbotyep. 😊
21:24:58disruptek!issue useVersion author:disruptek
21:24:58disbothttps://github.com/nim-lang/Nim/issues/14912 -- 3the --useVersion:1.0 no longer works in devel
21:25:55*endragor joined #nim
21:26:08disruptekso we need to require which version of nimterop, now?
21:26:18shashlick0.6.2 is latest
21:26:36disruptekthat's the first one with this, uh, "feature"?
21:26:47shashlickwhich feature
21:27:05FromDiscord<Recruit_main707> shashlick:ive seen a lot of improvements in nimterop recently, first of all congrats for it, secondly, I was wondering if static inline functions worked already
21:27:23shashlickyes if you use header, rather if you avoid --noHeader
21:28:07FromDiscord<Recruit_main707> Ok, might give it another try then
21:28:16shashlickcool
21:28:26shashlicksee the changelog to see what's changed - https://github.com/nimterop/nimterop/blob/types/CHANGES.md
21:29:10disruptekgolden fixed. thanks, shashlick. you are the man.
21:29:19disruptek3.0.15
21:29:27FromDiscord<Varriount> What's golden?
21:29:33disruptek!repo golden
21:29:35disbothttps://github.com/disruptek/golden -- 9golden: 11a benchmark for compile-time and/or runtime Nim 🏆 15 20⭐ 0🍴
21:30:37disruptekarc still 3.2s versus 2.5s for refc on json benchmark.
21:31:06FromDiscord<dom96> Any people with systemd knowledge here?
21:31:54disruptekwow, base64 benchmark is now 7s versus 1.35s for refc.
21:32:01disruptekwe're moving in the wrong direction, here.
21:32:19disruptekreally need zevv's bug fixed, at least.
21:33:29*endragor quit (Ping timeout: 256 seconds)
21:33:49*natrys quit (Quit: natrys)
21:34:43FromDiscord<lqdev> disruptek: I think I managed to find the culprit
21:34:59FromDiscord<lqdev> wrapping tgfx's code in a `proc main =` causes the error
21:35:13FromDiscord<lqdev> it works fine without a `proc main`
21:35:57*flop quit (Quit: WeeChat 2.8)
21:36:26disruptekis it lifting it outside the main? can i see the c?
21:36:37FromDiscord<lqdev> sure, give me a sec
21:36:57FromDiscord<lqdev> wait, does it still output C if compilation fails?
21:37:13disrupteki don't need a failure, i need success. hehe
21:37:22disrupteki just wanna see where it's lifting it.
21:38:13disruptekiirc it was in a block, so any c output will be good enough for me.
21:39:16*solitudesf quit (Ping timeout: 272 seconds)
21:39:23*sz0 quit (Quit: Connection closed for inactivity)
21:39:49FromDiscord<lqdev> will just @mtgfx.nim.c suffice, or do I need to upload any other files?
21:39:56disruptekno, just that one.
21:39:59FromDiscord<lqdev> anyways here it is http://ix.io/2r3O
21:40:44disruptekomg my vim thinks all files are binary now.
21:42:22*abm quit (Quit: Leaving)
21:44:17disruptekwell it's not lifting it past the while, so i don't think it's a lifting problem.
21:45:33FromDiscord<lqdev> well, you can't even know that because when it fails it doesn't output the c.
21:45:52disruptekwhy should it vary, though?
21:46:16FromDiscord<lqdev> because there's another proc involved now
21:46:20FromDiscord<lqdev> and it's `main()`
21:46:32disruptekmain?
21:46:37disruptekis that special?
21:46:40*sz0 joined #nim
21:46:42FromDiscord<lqdev> no.
21:46:43FromDiscord<lqdev> i made it.
21:46:52FromDiscord<lqdev> i said that it errors when i wrap the module in a main() proc
21:47:01disrupteki know. but, this is a bug.
21:47:14*Senny quit (Ping timeout: 240 seconds)
21:48:46FromDiscord<lqdev> well, but then it has to be doing something weird if it's main()ed.
21:49:28disruptekagree. but, i have to get back to moving. bbl.
21:49:48FromDiscord<lqdev> well, I'm off to bed so goodnight
21:55:58*Trustable quit (Remote host closed the connection)
22:01:15*sagax joined #nim
22:14:51shashlickdisruptek: gittyup still refers to `git_strarray_free`
22:15:48disruptekso?
22:18:10shashlickits deprecated remember
22:18:19disruptekoh, hard deprecation.
22:18:24disruptekyou are a naughty, naughty man.
22:18:43disruptekError: undeclared identifier: 'git_strarray_dispose'
22:18:51disruptekno what?
22:18:54disrupteknow what?
22:19:42disruptekdispose is only in HEAD. you're gonna have to turn off the hard deprecate.
22:19:58shashlickfair
22:20:06disruptekwait, maybe i can alias it somehow.
22:24:47shashlickbunch of stylistic duplicates man
22:24:48shashlickwhat a bore
22:25:05disruptekkinda makes sense though; they can cache the arrays in the lib.
22:25:16disruptekima template it i guess.
22:26:28*nikita` quit (Remote host closed the connection)
22:28:33shashlickthis is going to take forever
22:30:58ForumUpdaterBotNew thread by XxDiCaprioxX: How to set up/start a Project?, see https://forum.nim-lang.org/t/6521
22:31:28*polypus74 quit (Quit: WeeChat 2.8)
22:43:33FromDiscord<pan> sent a code paste, see https://play.nim-lang.org/#ix=2r43
22:44:03FromDiscord<pan> what would be the correct way to do this? my syntax here probably isnt correct but im unsure what this would look like
22:46:21FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=2r46
22:46:59FromDiscord<pan> oh, i wasnt aware `block` would be useful there, thanks
22:54:44FromDiscord<pan> thinking i could make it a bit cleaner by just having it run and then using a `continue` when it finds a factor already in the list, can i use a continue on the outer for loop of `for i in 1..limit:` when it would be inside of the `for prime in result:` block?
22:55:12FromDiscord<pan> im assuming i would need to name the outer for loop block somehow
22:55:44FromDiscord<Rika> outer?
22:56:13disruptekshashlick: what is?
22:57:31FromDiscord<pan> sent a code paste, see https://play.nim-lang.org/#ix=2r4b
22:58:15disruptekpro tip: continue is for wusses.
22:58:56disruptekpro tip: lookup the sieve of eratosthenes.
22:59:31FromDiscord<pan> if the logic in `for prime in result:` finds that `i mod prime == 0` then it needs to continue the outer loop `for i in 1..limit`
22:59:58disrupteksee named break statements.
23:00:02disruptek~manual
23:00:02disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
23:02:42shashlickpushing a newer nimgit2 with deprecated included
23:03:12FromDiscord<pan> i dont understand how i would use a named break here though, thats my issue
23:03:32disrupteksee the block: statement.
23:03:40shashlickv0.3.1 is out
23:03:49shashlickhopefully it passes tests, too bored to wait for the CI
23:03:52disruptekso we need to depend on it?
23:04:14shashlickideally
23:04:26disruptekokay; i'll bump everything.
23:04:57disruptekwhat did you do? i already patched gittyup and released it.
23:07:13shashlickhappy to revert, what do you prefer
23:07:37shashlickwhy would they deprecate in a release and then add the replacement to head
23:07:45shashlickwouldn't you do both together
23:08:00disrupteki dunno, seems like you did some other stuff?
23:08:19disrupteki wouldn't revert a release; does it work with current gittyup?
23:08:54disruptekisn't git_oid_iszero okay?
23:09:43disruptekwe'll just commit gittyup to see if it passes and we can bump it later if we need to.
23:10:00shashlicki just removed the #define HARD deprecated, and then removed proc which were stylistic duplicates in deprecated
23:10:24disruptekah; see i just fix that shit with templating.
23:10:54disrupteki didn't realize you were working on it or i'd have told you to skip it. 😉
23:12:35shashlicki can revert the commit - i think it is wiser to not include deprecated
23:12:41shashlicksince it could break if someone tried an older version
23:12:46shashlickwith missing skips
23:13:59disruptekit's confusing that i have to click on the committer to see the commits.
23:14:13disruptekespecially since hover tells me it'll only show me that person's commits, not all of them.
23:15:30disruptekyou can't even build gittyup with <1.0.0, y'know.
23:16:26shashlicki'm working on building v1.0.1 of libgit2 with julia
23:16:27disruptekalso, looks like 0.3.1 will pass tests.
23:16:34*oddp quit (Ping timeout: 260 seconds)
23:16:42shashlickthinking of posting the binaries elsewhere so that we have newer versions than what julia provides
23:16:47shashlickthey are gated by wrapper support too
23:16:57shashlickcross OS?
23:16:59disruptekwe can just add the binaries into gitnim.
23:17:20disruptekhttps://travis-ci.com/github/disruptek/gittyup/builds/174531936
23:17:26disruptekit's chewing on windows only, now.
23:17:53disruptekbbl
23:17:56shashlickhttps://travis-ci.org/github/genotrance/nimgit2
23:18:23shashlickmeh should have bumped to Nim 1.2.4
23:19:59*endragor joined #nim
23:26:55*endragor quit (Ping timeout: 246 seconds)
23:29:35*krux02_ joined #nim
23:31:53*krux02 quit (Ping timeout: 244 seconds)
23:42:34*endragor joined #nim
23:47:28*endragor quit (Ping timeout: 258 seconds)
23:55:32*FromDiscord quit (Remote host closed the connection)
23:55:45*FromDiscord joined #nim
23:58:22*muffindrake joined #nim