<< 02-09-2020 >>

00:00:25*tiorock joined #nim
00:00:25*tiorock quit (Changing host)
00:00:25*tiorock joined #nim
00:00:25*rockcavera quit (Killed (card.freenode.net (Nickname regained by services)))
00:00:25*tiorock is now known as rockcavera
00:00:27disruptek'cause you're too poor?
00:01:24FromDiscord<Hearthstone> OOF-
00:01:41FromDiscord<Hearthstone> You fucking killed him dude-
00:02:30disruptekwell, that's why the bank won't let me login any more.
00:02:57FromDiscord<Hearthstone> Oof
00:03:25*gmaggior quit (Ping timeout: 240 seconds)
00:10:36*gmaggior joined #nim
00:16:14*endragor joined #nim
00:24:48*audiofile quit (Quit: Default Quit Message)
00:25:39FromDiscord<Rebel> could anyone explain why this does not this cast does not result in y being 0? https://play.nim-lang.org/#ix=2vVf
00:25:51FromDiscord<Rebel> (edit) removed 'this does not'
00:26:36disruptekrtfm div operator.
00:26:58*vicfred quit (Quit: Leaving)
00:28:33*vicfred joined #nim
00:29:28FromDiscord<Elegant Beef> Well you're casting a float, which just reinterprets the bits as a int, you want `x.int or int(x)`
00:29:42FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2vVg
00:30:33FromDiscord<Elegant Beef> Coming from C# the `cast` name got me aswell 😄
00:34:43FromDiscord<Elegant Beef> @Rebel this also explains why https://play.nim-lang.org/#ix=2vVi
00:34:59disruptekrtfm div operator.
00:35:24FromDiscord<Elegant Beef> the div operator doesnt explain why the `cast[int](x)` doesnt return 0
00:35:47disruptekof course it does.
00:36:01FromDiscord<Elegant Beef> Not it doesnt, the issue is they think `cast` is how to do type conversion
00:36:27FromDiscord<Elegant Beef> if you read what they say they're asking "Why is y non-zero" not "Why is 2 /100 a float"
00:36:28disrupteknot my problem.
00:39:14FromDiscord<Rebel> ohhh thanks I see the problem coming from C# as well lol trying to convert this atm (https://dotnetfiddle.net/dOT9bg) should be simple now that I know how to do type conversions properly lol
00:40:09FromDiscord<Elegant Beef> Ah yes, C# -> Nim was fun, tons of features I feel like I'm missing when writting C# though
00:40:31FromDiscord<Elegant Beef> Metaprogramming/Compile time evaluation being the big two
00:41:14FromDiscord<Elegant Beef> Also worth noting that `int` is dependant on the OS, so it can be 32bit or 64bit depending what bit the OS is
00:43:39disrupteki will find you.
00:48:15*gmaggior quit (Quit: Leaving)
00:48:48FromDiscord<Elegant Beef> Come at me
00:49:02FromDiscord<Elegant Beef> Im hiding in the div operator part of the manual
00:51:25*endragor quit (Ping timeout: 240 seconds)
01:06:29*endragor joined #nim
01:09:12*awe00 quit (Ping timeout: 256 seconds)
01:18:05*maier joined #nim
01:22:55*maier quit (Ping timeout: 240 seconds)
01:23:21*Tlanger joined #nim
01:25:45*a_chou quit (Ping timeout: 240 seconds)
01:26:08*Tlangir quit (Ping timeout: 260 seconds)
01:29:27FromGitter<gogolxdong> Huawei proposed its own programming language named Char (仓颉,an ancient in Chinese hisotry who invented characters.)
01:30:32*apahl_ joined #nim
01:33:43*apahl quit (Ping timeout: 260 seconds)
01:35:05*a_chou joined #nim
01:42:19FromDiscord<Rosen> does it use cangjie instead of english?
01:42:39FromDiscord<Rosen> latin alphabet not english i guess
01:43:41FromGitter<gogolxdong> It uses Char instead pinyin cangjie.
01:44:25FromGitter<gogolxdong> of
01:50:24disruptekrichard keil got nothin' on me.
01:59:12ForumUpdaterBotNew thread by Archnim: What about simplifying if-else statements ?, see https://forum.nim-lang.org/t/6759
02:17:25*muffindrake quit (Ping timeout: 240 seconds)
02:19:51*muffindrake joined #nim
03:18:57*maier joined #nim
03:23:58*maier quit (Ping timeout: 260 seconds)
03:30:43*arecacea1 quit (Remote host closed the connection)
03:31:07*arecacea1 joined #nim
03:53:05*Zevv quit (Ping timeout: 240 seconds)
03:54:36*Zevv joined #nim
03:54:36*Zevv quit (Changing host)
03:54:36*Zevv joined #nim
03:55:20FromDiscord<iWonderAboutTuatara> I've been banging my head against the macro system for a not insignificant part of today
03:55:44FromDiscord<iWonderAboutTuatara> Has anyone tried sbcl?
03:55:50FromDiscord<iWonderAboutTuatara> How does it compare to Nim?
04:04:34FromDiscord<Elegant Beef> Macros are weird but using treedump explains how to use them imo
04:04:40FromDiscord<Elegant Beef> dumptree 😄
04:05:37FromDiscord<iWonderAboutTuatara> How do you use dumptree?
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:11FromDiscord<Elegant Beef> ```↵dumptree:↵ if(true):echo "heh"↵```
04:06:38*supakeen joined #nim
04:06:48FromDiscord<Elegant Beef> Shows the AST of human written code
04:06:55FromDiscord<Elegant Beef> that and .repr/.treerepr
04:12:41FromDiscord<Elegant Beef> The homoiconicity of nim means that you're just a manual macro writer 😄
04:27:30FromDiscord<Rosen> dumptree is so fun
04:27:39FromDiscord<Rosen> it's like you're looking backstage
04:37:05*waleee-cl quit (Quit: Connection closed for inactivity)
04:40:08FromDiscord<iWonderAboutTuatara> Wait you drop a thing in a dumptree block and it echoes the AST?
04:40:47FromDiscord<iWonderAboutTuatara> So let's say I was trying to do equivalent of go's := (declare and set equal to) using macros
04:41:03FromDiscord<iWonderAboutTuatara> (I know this is possible with templates, doing for learning purposes)
04:41:28FromDiscord<iWonderAboutTuatara> So when I call that, do I just put it in a dumptree?
04:41:58FromDiscord<iWonderAboutTuatara> ie ↵'''nim↵dumptree:↵ a := "hellus o"
04:42:08FromDiscord<iWonderAboutTuatara> Will dump the AST of that?
04:42:13FromDiscord<iWonderAboutTuatara> (edit) 'o"' => 'o"```'
04:42:27FromDiscord<iWonderAboutTuatara> (edit) '↵'''nim↵dumptree:↵' => '↵```nim↵dumptree:↵'
04:42:50FromDiscord<Elegant Beef> if it's valid Nim code
04:45:56FromDiscord<Elegant Beef> But i mean in your case it's a rather simple thing to make https://play.nim-lang.org/#ix=2vVN
04:46:36FromDiscord<Elegant Beef> I honestly didnt expect the `:=` to work, so went and tested it myself
04:49:09FromDiscord<Elegant Beef> Suffice to say i fucking love macros
04:52:31*vikfret joined #nim
04:52:59FromDiscord<iWonderAboutTuatara> newVarStmt()?
04:53:12FromDiscord<iWonderAboutTuatara> Can you try doing that Inna quote do block
04:53:27FromDiscord<iWonderAboutTuatara> I'm not quite at the level where I understand this stuff yet
04:53:41FromDiscord<lqdev> it literally produces a var statement
04:53:45FromDiscord<Elegant Beef> the newVarStmt retuns the AST of declaring a varstatment
04:54:07FromDiscord<iWonderAboutTuatara> Oh I see
04:54:48FromDiscord<Elegant Beef> The quote method https://play.nim-lang.org/#ix=2vVO
04:55:02FromDiscord<Elegant Beef> *Atleast i think that works*
04:55:05FromDiscord<iWonderAboutTuatara> I tried putting that in a dump tree block
04:55:09FromDiscord<iWonderAboutTuatara> It didn't print anything tho
04:55:21FromDiscord<iWonderAboutTuatara> That worked
04:55:37FromDiscord<Elegant Beef> dumptree doesnt magically generate code
04:55:38FromDiscord<iWonderAboutTuatara> Let's say I wanted to print the AST of one of those
04:55:43FromDiscord<iWonderAboutTuatara> How would I do that with 2 args?
04:56:08FromDiscord<iWonderAboutTuatara> One of those being a a := b
04:56:27FromDiscord<Elegant Beef> You need to replicate this https://play.nim-lang.org/#ix=2vVP
04:56:45FromDiscord<Elegant Beef> *if you hit run then show debug you can see the AST*
04:57:06FromDiscord<iWonderAboutTuatara> Oh I see
04:57:31FromDiscord<Elegant Beef> That's typically how i write any macros that dont use `quote do` i write them out in a dumptree as i want them then reimplement it
04:58:45FromDiscord<iWonderAboutTuatara> I see
04:58:50FromDiscord<iWonderAboutTuatara> That makes a lot of sense
04:58:56FromDiscord<iWonderAboutTuatara> This is actually pretty clean
04:59:10FromDiscord<iWonderAboutTuatara> Take the puzzle pieces and put them where they need to go
04:59:50FromDiscord<Elegant Beef> Inside the macro you can use `.repr` and `.treerepr` on the nodes to see what you have/are going to
05:00:35FromDiscord<Elegant Beef> For instance you can see the actual output nim code with `.repr` here
05:18:51*solitudesf joined #nim
05:19:51*maier joined #nim
05:25:10*maier quit (Ping timeout: 265 seconds)
05:33:58*narimiran joined #nim
05:42:09FromDiscord<Varriount> Hey @Elegant Beef , how are things?
05:42:56FromDiscord<Elegant Beef> Fine, you?
05:46:26*Zevv left #nim (#nim)
05:46:42*Zevv joined #nim
05:48:58*maier joined #nim
06:01:27*fowl_ quit (Ping timeout: 260 seconds)
06:01:32*sirn quit (Ping timeout: 246 seconds)
06:01:55*kwilczynski quit (Ping timeout: 240 seconds)
06:02:56*sirn joined #nim
06:02:59*kwilczynski joined #nim
06:04:30*fowl_ joined #nim
06:10:06*Zevv quit (Ping timeout: 256 seconds)
06:19:00FromDiscord<Varriount> @Elegant Beef I finally have some free time
06:19:51FromDiscord<Varriount> Araq: Posted my comment on the serialization RFC
06:20:09*kwilczynski quit (Ping timeout: 272 seconds)
06:21:42*kwilczynski joined #nim
06:24:22*PMunch joined #nim
06:24:34*vicfred quit (Quit: Leaving)
06:24:59FromDiscord<19> noob question: is there a way for flatten a sequence of multiple arrays?
06:25:39FromDiscord<19> to flatten*
06:26:25*Zevv joined #nim
06:26:25*Zevv quit (Changing host)
06:26:25*Zevv joined #nim
06:27:16FromDiscord<19> @[[0,1,2],[0,1,2]]↵to↵@[0,1,2,0,1,2]
06:29:04narimiran@19 `itertools.chain`? https://narimiran.github.io/itertools/#chain.i%2Cvarargs[seq[T]]
06:29:32narimiran(you need to install this package, it is not built-in)
06:29:56*a_chou quit (Remote host closed the connection)
06:30:04FromDiscord<19> nice! same as py
06:31:10narimiranyeah, i've written it based on the functionality of python's package of the same name ;)
06:31:44narimiran(now i see i should put that in the docs too, not just in the readme)
06:32:20FromDiscord<19> wicked sick ;)
06:37:14*Zevv quit (Read error: Connection reset by peer)
06:41:46*mipri joined #nim
06:42:08*rokups joined #nim
06:54:41*Sgeo quit (Read error: Connection reset by peer)
06:55:46ForumUpdaterBotNew thread by Skaruts: How to get my nim procs in a lua table, see https://forum.nim-lang.org/t/6761
07:12:07*vikfret quit (Quit: Leaving)
07:13:12*pietroppeter joined #nim
07:28:25*WilhelmVonWeiner quit (Ping timeout: 264 seconds)
07:41:19PMunchYay, found and fixed my AVR set bug from the other day :)
07:41:22PMunchhttps://github.com/nim-lang/Nim/pull/15258
07:41:23disbotFix sets for architectures with default integers smaller than 32 bits
07:42:41FromGitter<alehander92> huh
07:42:47FromGitter<alehander92> how would cyclic work
07:48:39FromDiscord<haxscramper> If I want to write test for nim `compiler/parser` (for the nim test suite) how do I import it in the test? If I do `import ../../compiler/parser` it fails because it cannot find `std/private/miscdollars` I haven't' found any kind of `--addImportDir` flag that I can put in test configuration? If I understand correctly testament uses whole compiler, but it takes noticeable amount of time to build even for relatively simple change.
07:54:12*Zevv joined #nim
07:54:25Araqping alehander92
08:02:51FromDiscord<flywind> I think `expandFilename` can also expand the path of the dir. Maybe the name of this function is a bit confusing?
08:05:37PMunchHi Zevv, I fixed my set issue: https://github.com/nim-lang/Nim/pull/15258 :)
08:05:38disbotFix sets for architectures with default integers smaller than 32 bits
08:15:07Zevvthat was very wrong indeed
08:15:24Zevvit's a wonder that did not break more things
08:19:15*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:19:50Araqflywind: others remarked the same thing :-)
08:20:08*krux02 joined #nim
08:20:27PMunchZevv, well I guess sets haven't been that much used on AVR yet :P
08:20:39PMunchI mean, nothing has been very much used on AVR yet it seems
08:21:53ZevvWell, it takes a masochist to still do anything on an AVR in 2020 :)
08:22:16PMunchGive me a better option and I'm all ears
08:22:31AraqRaspberry Pie?
08:22:37AraqI have no idea :-)
08:23:02PMunchRPi is great for a lot of stuff, but totally overkill in many cases
08:23:34PMunchMost of the stuff people do with RPis I can do with a $1 chip
08:25:17lbartPMunch: +1 :)
08:25:22krux02it's not just that, sometimes you don't want an OS.
08:25:53PMunchTrue, that as well
08:26:00Araqso use the RPi chip without an OS but I can understand
08:26:24Araqthat might not be as simple as an AVR chip
08:27:05krux02yes
08:28:03krux02the RPi is multicore, that makes things already more complicated than necessary.
08:29:02*awe00 joined #nim
08:29:04PMunchI mean the RPi is an actual computer, programming directly against that "chip" is essentially the same as programming directly against the CPU in your machine :P
08:32:50krux02I used an AVR chip a long time ago, what was really helpful, was the tooling around that chip and the debugger interface. With the press of a single button I could redeploy my program on the chip run it and debug it.
08:33:17krux02As far as I am aware of it , the RPi isn't made for such a workflow.
08:34:07krux02(if you want to program the CPU directly)
08:34:29PMunchYeah, that is part of what makes them so easy to work with. You can fit all the code that runs on the thing on a single screen most of time. Hit a button and the microcontroller will reflash itself with your code
08:38:24ZevvPMunch: There's tons of "little" ARM boards for no money these days.
08:38:47ZevvYou get a tens KBs of RAM, 100's of flash, lots of IO, and a proper core running fast and wide
08:39:10PMunchHmm, that sounds interesting
08:39:21ZevvI had this nice chip having a Cortex M0 and M4 dual
08:39:58ZevvI made a software synthesizer on that. The M0 did management, SD card loading etc. It loads code from SD card and then boots the M4 that runs the sound engine
08:40:12Zevvall pretty simple to run from scratch on silicon
08:42:05*awe00_ joined #nim
08:44:56*awe00__ joined #nim
08:45:04*awe00 quit (Ping timeout: 246 seconds)
08:48:13*awe00_ quit (Ping timeout: 264 seconds)
08:52:38PMunchHuh, that does indeed sound like a cool chip
08:55:56FromDiscord<dom96> yo, since we're discussing chips and hardware. Any of you know what the displays used in train departure boards/buses are? For example https://c8.alamy.com/comp/DXRER1/electronic-departures-board-displaying-train-times-at-railway-station-DXRER1.jpg
08:56:35FromDiscord<dom96> I have a feeling that it's one of the LUMEX displays but I haven't ones as big as that.
08:56:41FromDiscord<dom96> (edit) 'I have a feeling that it's one of the LUMEX displays but I haven't ... ones' => 'I have a feeling that it's one of the LUMEX displays but I haven'tfound'
08:58:16*tsujp joined #nim
09:00:21PMunch@dom96, something like this? https://uktronix.co.uk/?product=p4-large-led-board
09:01:58Zevvit's likely to be a custom built from something modular
09:02:45ZevvPMunch: https://github.com/zevv/modular
09:03:12FromDiscord<dom96> PMunch: yes, but that's already a full package. I guess I could buy it and see what the display in there is used.
09:03:19FromDiscord<dom96> but £300, ouch
09:03:34ZevvPMunch: and https://web.archive.org/web/20190920140135/http://zevv.nl/play/modular/
09:06:13PMunch@dom96, I mean you can always pick up something from here: https://www.aliexpress.com/wholesale?SearchText=led+matrix+display
09:07:13PMunchZevv, aren't you maintaining your links :o
09:07:21FromDiscord<dom96> yes, well, there is a lot of crap on aliexpress
09:07:33FromDiscord<dom96> I ideally would like model numbers/brands that I can search
09:07:48PMunchZevv, but that's a cool project
09:08:03ZevvUnfortunately it's before my Nim time. Otherwise this would be *sooo* nim
09:08:11Zevvand of course I abandoned it halfway again. It worked. Then it got boring
09:08:51Zevvyeah I migrated webservers some time ago and didn't copy everything over
09:08:52Zevvlet me fix that
09:10:53Zevvooh right that was php which I don't want on my new server
09:12:26ZevvOooh I found this in my archives: http://zevv.nl/play/binary_bingo.pdf. It's bingo with only ones and zeroes
09:16:24PMunchMy server still runs a traditional LAMP stack <_<
09:17:08FromDiscord<Elegant Beef> Your server runs on wifi enabled light bulbs?
09:17:46PMunchSure, running it on an IoT botnet has really cut down my server costs :P
09:18:27FromDiscord<Elegant Beef> Dont remind me that IoT is common place
09:31:48*Vladar joined #nim
09:32:18*endragor quit (Quit: Leaving...)
09:37:26PMunchHmm, would adding a feature to nimsuggest to warn it that you're using different cases for a variable be a good idea?
09:42:44Zevvthat's already done in the compiler, isn't it? So it should be in nimsuggest as well?
09:43:17Zevv--styleCheck:off|hint|error
09:44:08Zevv@leorize[m] Oy! How can one pass custom arguments to nimsuggest?
10:03:07*maier quit (Ping timeout: 246 seconds)
10:11:54*rokups quit (Quit: Connection closed for inactivity)
10:40:53*narimiran quit (Ping timeout: 260 seconds)
10:41:55PMunchYeah, nimsuggest really don't have a lot of options..
10:48:47*maier joined #nim
10:50:12PMunchDoes nimble have any kind of project scaffolding feature?
10:50:36PMunchI'm thinking about how to make getting started with Nim on Arduboy have as little friction as possible
10:55:38*pangey quit (Ping timeout: 256 seconds)
10:57:48FromDiscord<Varriount> What do you mean by scaffolding?
11:00:50*pangey joined #nim
11:00:58PMunchWell since the Arduboy is an Arduino device it requires a nim.cfg and panicoverride.nim. It would be nice if you could do something like "nimble install arduboy; nimble scaffold arduboy" to set up a "arduboy" project
11:08:21*Vladar quit (Remote host closed the connection)
11:14:04*Vladar joined #nim
11:15:30*audiofile joined #nim
11:16:35stisa[m]PMunch you could make your own, just have a file eg `arduboy.nim` with a when isMainModule and tell nimble to build it with bin, then if `.nimble/bin` is in path you can run it
11:16:51FromDiscord<dom96> yep
11:17:15FromDiscord<dom96> you can even call `nimble init` from your binary
11:18:15PMunchHmm, I guess that would be the best way of doing it
11:18:30PMunchSo it would be "nimble install arduboy; arduboy scaffold" or something similar
11:18:38FromDiscord<Varriount> Yeah
11:19:05FromDiscord<Varriount> I won't say it's a convention, but other language tools do this
11:19:30FromDiscord<Varriount> *language's tools
11:22:52*MyMind joined #nim
11:22:55*Sembei quit (Ping timeout: 240 seconds)
11:37:58*dddddd quit (Ping timeout: 246 seconds)
11:42:47*dddddd joined #nim
11:47:00*abm joined #nim
11:53:55*arecacea1 quit (Remote host closed the connection)
11:54:23*arecacea1 joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:34*supakeen joined #nim
12:14:42FromDiscord<Pixeye> hi guys:) is there a way to define compile variables ( values ) in cfg ?
12:16:51*xet7 quit (Remote host closed the connection)
12:17:27FromGitter<ynfle> As in `-d:<something>`?
12:17:49FromGitter<ynfle> Does `nim check` ensure that the file an compile?
12:24:37FromDiscord<Recruit_main707> i think you can
12:24:49FromDiscord<Recruit_main707> but im not sure
12:26:37*jken quit (Ping timeout: 264 seconds)
12:26:46*jken joined #nim
12:28:46PMunch@Pixeye, yes, just do "define = whatever"
12:30:55FromGitter<ynfle> Is there any difference between `nim c` and `nim check` for checking whether a file compiles?
12:35:37FromDiscord<Rika> Nim c compiles it
12:35:40FromDiscord<Rika> Check doesn't
12:35:42FromDiscord<Recruit_main707> nim c compiles the code, and displays the first error iirc, nim check shows all
12:45:21FromDiscord<Pixeye> I need to define like "Amount=10_000" is it possible ?
12:45:36FromDiscord<Pixeye> so I can use it as a const or something inside the code
12:46:45FromDiscord<Rika> @Pixeye https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-time-define-pragmas ?
12:48:00*lritter joined #nim
12:48:04FromDiscord<Pixeye> @Rika thanks 🙂
12:48:13FromDiscord<Pixeye> exactly what I need
13:00:10FromDiscord<vieru> quick way to check for internet connection ?
13:02:46FromDiscord<lqdev> @ynfle nim c is better because it also checks whether the backend (eg. C compiler) errors out
13:03:12FromDiscord<lqdev> `nim c -o:/dev/null file` can be thought of as a better nim check
13:04:22FromDiscord<lqdev> @vieru `ping google.com`
13:04:54FromDiscord<vieru> does nim have a native way ?
13:05:09FromDiscord<vieru> (edit) 'does nim have a native way ... ?' => 'does nim have a native wayof doing it'
13:05:48FromDiscord<lqdev> sockets?
13:06:16FromDiscord<vieru> idk how to use them
13:15:39*agent0x00 joined #nim
13:24:22FromDiscord<dom96> just use httpclient to request google.com or something
13:31:14Araqping Clyybber
13:32:01*maier quit (Ping timeout: 264 seconds)
13:34:08*Kaivo quit (Ping timeout: 260 seconds)
13:36:10*Kaivo joined #nim
13:45:50*maier joined #nim
13:50:30*waleee-cl joined #nim
13:50:54*maier quit (Ping timeout: 258 seconds)
13:57:36*arecacea1 quit (Remote host closed the connection)
13:58:00*arecacea1 joined #nim
13:58:37*Perkol joined #nim
14:00:30*PMunch quit (Quit: Leaving)
14:04:24*vicfred joined #nim
14:14:38*Perkol quit (Remote host closed the connection)
14:16:32*Vladar quit (Remote host closed the connection)
14:24:22*Vladar joined #nim
14:52:51disruptekwhat's cookin', kids?
14:52:57disruptektell me something good.
14:56:18solitudesfit gets better
14:58:58disruptekthat's it?
15:02:02shashlickfixing nimble issues
15:07:55*awe00__ quit (Ping timeout: 240 seconds)
15:08:21disruptekhow can i make nimble display color for my ci?
15:20:35*awe00__ joined #nim
15:20:40*letto quit (Quit: Konversation terminated!)
15:21:42shashlickneed to check the code - there's a noColor option but probably code in there that checks for tty and disables color too so a color:on might be good like nim
15:22:13disruptekokay, never mind, then.
15:23:13*letto joined #nim
15:24:14FromDiscord<Clyybber> pong Araq
15:26:20shashlickdisruptek: ya by default, color is set by isatty
15:27:18Araqwait a sec
15:27:29AraqI'm preparing a snippet
15:27:58disruptekshashlick: arguably it's a bug that my testes don't respect it.
15:28:09disruptekmy testes are known to be disrespectful.
15:30:32shashlicklet me know if we need a --color:on
15:30:35shashlickto force it on
15:30:39*sunwukong joined #nim
15:31:05disruptekit would make it easier to grok the logs but it just doesn't seem that important to me.
15:31:55disruptekbtw, i am close to moving package management functionality into a library.
15:32:11disrupteki need it for a lot of stuff and i just don't know if i want to rely on people being able to build toast.
15:32:24disruptekwould like to know your thoughts...
15:32:55FromGitter<alehander92> what is toast
15:33:07disruptekit's like dirty stale bread.
15:33:23shashlicknimterop cli tool
15:33:24FromGitter<alehander92> great with tea
15:33:29AraqClyybber: https://gist.github.com/Araq/35dbc6bc70b15f6e256f0493f05ef899
15:33:46shashlickwhat's the user experience with the lib - what are they using it for
15:33:57Araqthe goal is to propagate exception raises information
15:34:03Araqwith Nim's async
15:34:40Araqthat's my idea, we cannot query for the exceptions but we can have an 'awaitE' that checks the given effects
15:34:45FromGitter<alehander92> is this a good time to ask about possible relation with cancellation
15:34:48disrupteki'm the user and i'm using it to provide functions i use in other packages; loading of configs, path handling, maybe integrated nimscript parsing, this sort of thing.
15:34:50shashlickdisruptek: is toast not building? we can always ship binaries
15:35:13FromGitter<alehander92> i have implemented cancellation based on exceptions in our company's fork
15:35:46FromGitter<alehander92> but it kinda clashes with people using naively try/catch and wondered if it makes any sense to try to upstream it later
15:35:58shashlickdisruptek: why do you need toast for that - libgit2 doesn't sound relevant for those
15:36:35disruptekit's not, but it's basically nimph functionality that i want to include elsewhere.
15:36:41disruptekhttps://github.com/disruptek/nimph/blob/denimble/nimph/paths.nim
15:37:15disruptekhttps://github.com/disruptek/nimph/blob/denimble/nimph/config.nim
15:38:18Araqclyybber: the basic question is if you have better ideas
15:38:22FromDiscord<juan_carlos> I miss Disruptek streams.
15:38:34disrupteksorry man.
15:38:46FromGitter<alehander92> yeah what happened with those
15:39:03AraqCorona
15:39:05disrupteki have 1mbit upload.
15:39:29*bouzu_ joined #nim
15:39:39Araqdisruptek, check your Telegram, it's urgent
15:39:53disruptekimpossible.
15:40:42disruptekif i manage to move, i will be on 3g internet.
15:41:13disruptekbut also 20-30 meters from a lake. 🤷
15:42:08*sunwukong quit (Quit: ERC (IRC client for Emacs 27.1))
15:44:04*kinkinkijkin quit (Ping timeout: 244 seconds)
15:46:23*hnOsmium0001 joined #nim
15:46:46*maier joined #nim
15:51:26shashlickdisruptek: are you still facing toast issues
15:52:03*maier quit (Ping timeout: 265 seconds)
15:56:57*Trustable joined #nim
15:57:08ForumUpdaterBotNew thread by Adricoin2010: [windows] Nim fails to compile with a Lua pkg., see https://forum.nim-lang.org/t/6762
16:12:33FromDiscord<exelotl> Wow so much Nim + Lua activitt
16:12:40FromDiscord<exelotl> (edit) 'activitt' => 'activity'
16:14:23disruptekshashlick: no, and i don't wanna.
16:14:33disruptekwhat nim + lua activity?
16:15:23FromDiscord<exelotl> I mean we had 3 forum posts about Lua this week already
16:15:29shashlickOnly way is to generate and cache wrappers for all your target platforms
16:15:39shashlickUser still needs to get libgit2 installed
16:15:55FromDiscord<exelotl> (not complaining, I like Lua a lot and it seems like it goes well with Nim)
16:15:55disruptekyes, this is why it makes more sense to move pm code into a library.
16:15:59FromDiscord<dom96> > that's my idea, we cannot query for the exceptions but we can have an 'awaitE' that checks the given effects↵wtf
16:16:04disruptekthen the pm code has no deps.
16:16:23disruptekthe forum doesn't count afaic because i don't read it.
16:16:30shashlickWhat about libgit2 - you can cache a static binary also for every platform
16:16:46disruptekwhy would i care about libgit2 in dust?
16:17:07disrupteki want to use this code in my testes. i don't want a libgit2 dependency there.
16:17:08shashlickThen why does toast even come into play
16:17:09disrupteket cetera.
16:17:24disruptekbecause currently, the code i want is in nimph.
16:17:32disruptekcurrently, the only way to import it is to add a nimph dep.
16:17:37disruptekcurrently, that demands a toast dep.
16:17:46shashlickOk I get you - so this has nothing to do with nimterop
16:17:50disruptekcorrect.
16:18:01disrupteki'm asking if you want to collaborate on a pure nim lib for pm.
16:18:07disruptekand what you'd like to see in it.
16:18:10shashlickLet me get off the hamster wheel then
16:18:31shashlickConfig reading for sure - I had to add that into nimterop
16:18:38disruptekright.
16:18:47shashlickWasn't fun
16:18:52disruptekconfig, paths, i want to add a config-delta.
16:19:00shashlickCompile time, run time, old versions
16:19:00*Jesin quit (Quit: Leaving)
16:19:31disruptekold versions?
16:19:51shashlickNimterop supports upto 0.20.2
16:20:05disrupteki can barely support 1.0, but, okay.
16:20:45shashlickIf you want to do a library, have to take care of some of the long tail
16:21:06disrupteki think you're nuts to support pre-1.0.
16:21:11disruptekbut whatever.
16:21:15disruptek"i don't care."
16:21:38disruptekbtw gittyup demonstrates problems with JBB currently.
16:21:42disruptekin CI.
16:22:25disruptekanyway, i will work on this a bit later. have to dig into the compiler code. lemme know if anything else occurs to you.
16:22:36FromDiscord<dom96> agree, pre-1.0 should be forgotten
16:24:15shashlickLink to the CI bug?
16:24:33disruptekhead doesn't work.
16:24:46disruptek!repo gittyup
16:24:47disbothttps://github.com/disruptek/gittyup -- 9gittyup: 11higher-level libgit2 bindings that build upon nimgit2 15 3⭐ 1🍴
16:25:01disruptekhttps://github.com/disruptek/gittyup/actions/runs/235196865
16:25:34disruptekthose failures are likely unrelated.
16:25:38disruptekit's an ssl cert issue.
16:26:03disrupteknimble test will repro it locally.
16:26:13disruptek"ssl error: the SSL certificate is invalid: 0x08 - The certificate is not correctly signed by the trusted CA"
16:33:27*kinkinkijkin joined #nim
16:34:56*solitudesf quit (Remote host closed the connection)
16:38:44disruptek!last zevv
16:38:45disbotZevv spoke in 12#nim 6 hours ago 12https://irclogs.nim-lang.org/02-09-2020.html#09:44:08
16:38:48disrupteklazy.
16:40:30disruptek5.391245e-44 # Randomly chosen my ass
16:42:19FromGitter<alehander92> huh he was here yesterday
16:42:32FromGitter<alehander92> oh i still read 76 hours in gitter
16:42:47disruptekthis isn't gitter.
16:44:27shashlickdisruptek: reproduced the gittyup failure
16:44:43shashlicklooks like mbedtls doesn't like what openssl was okay with
16:44:58disrupteksucks. any idea on what we should do?
16:45:17disruptekalehander92: how come i keep producing project ideas and you keep not implementing them?
16:45:32disruptekleorize[m]: should frosty go into fusion?
16:45:50disruptekalso asynctools.
16:45:57shashlicknot sure - maybe some flag that can be set?
16:46:05*drewr joined #nim
16:47:03disruptekyou mean i should fix it in gittyup, right?
16:47:10disruptekin a flag i set in libgit2.
16:47:19FromGitter<alehander92> well man
16:47:30FromGitter<alehander92> you didn't like my own idea !
16:47:40shashlickprobably, but not sure why it fails in the first place
16:48:05disruptekalehander92: because no one but you has use for it.
16:48:15disruptekalehander92: here's one: port nomnomml to nim.
16:48:36shashlickso it is failing in clone me?
16:49:00disrupteki think so, yes. but i think it's because it's trying to use a https vs. git url, or vice-versa.
16:49:08leorize[m]"disruptek" (https://matrix.to/#/@freenode_disruptek:matrix.org): I like those stuff, but it's up to Araq to decide what can go in
16:49:09leorize[m]never hurt to make a pr though
16:50:12disruptekwell, i'm putting frosty in the compiler anyway. and i had a branch that used asynctools for testament.
16:50:25disruptekso if it isn't in fusion, it'll just be harder for users to use.
16:50:45disrupteki don't even distribute fusion in gitnim, because it's stupid.
16:51:03FromGitter<alehander92> disruptek wow that's a cool app
16:51:11FromGitter<alehander92> but i really dont agree with ya
16:51:11disruptekalehander92: yes, and there's already nimsvg.
16:51:14disruptek!repo nimsvg
16:51:16disbothttps://github.com/bluenote10/NimSvg -- 9NimSvg: 11Nim-based DSL allowing to generate SVG files and GIF animations. 15 86⭐ 3🍴
16:51:23FromGitter<alehander92> like people put benchmarks and blogs comparing languages every day
16:51:35disruptek"i don't care."
16:51:44FromGitter<alehander92> well i dont care about uml
16:51:50disruptekfair enough.
16:52:02disruptekyou would rather use png?
16:52:08disruptekdot?
16:52:20FromDiscord<iWonderAboutTuatara> png is generally easier to work with
16:52:28FromGitter<alehander92> i just had an interview related to something like uml tho
16:52:33FromGitter<alehander92> i am not sure
16:52:34FromDiscord<iWonderAboutTuatara> and if its high res and simple enough its usually trivial to vectorize it if needed
16:52:39disruptekthat's like saying donkey dick is easier to suck than horse dick.
16:52:51FromDiscord<iWonderAboutTuatara> what an analogy
16:53:01FromDiscord<iWonderAboutTuatara> but if it is, it is
16:53:06FromGitter<alehander92> disruptek i have to compiler
16:53:14FromDiscord<iWonderAboutTuatara> I don't have experience sucking either so I can't speak to that
16:53:25FromGitter<alehander92> i plan on using normal english
16:53:27FromGitter<alehander92> for a change
16:53:31disruptekweird.
16:53:47FromDiscord<iWonderAboutTuatara> what does having to compiler mean
16:53:54FromGitter<alehander92> you see^
16:54:01FromGitter<alehander92> people can't understand me
16:54:08disruptekZevv: where are you, man? i need some help with your code.
16:54:09FromDiscord<iWonderAboutTuatara> fair enough
16:54:29FromGitter<alehander92> i think i annoyed him a lot yesterday
16:54:33FromGitter<alehander92> and he said he is off
16:55:51disruptekzevv's turn-ons include unicode, coroutines, and android.
17:01:34FromDiscord<brainproxy> On Windows, in a make target that execs `nim c ...` `gcc` (mingw) is found and used as expected. But in another make target nimble is invoked to build and run some tests, but it's reporting that `gcc` can't be found and it fails.
17:01:51FromDiscord<brainproxy> (edit) 'On Windows, in a make target that execs `nim c ...` `gcc` (mingw) is found and used as expected. But in another make target nimble is invoked to build and run some tests, but ... it's' => 'On Windows, in a make target that execs `nim c ...` `gcc` (mingw) is found and used as expected. But in another make target nimble is invoked to build and run some tests, butduring compilation'
17:15:14FromDiscord<iWonderAboutTuatara> small question
17:15:19FromDiscord<iWonderAboutTuatara> why doesn't this macro work?
17:15:27FromDiscord<iWonderAboutTuatara> sent a code paste, see https://play.nim-lang.org/#ix=2vYg
17:15:34FromDiscord<iWonderAboutTuatara> I'm sure I'm doing a number f things wrong
17:15:50FromDiscord<iWonderAboutTuatara> https://play.nim-lang.org/#ix=2vYh
17:15:59FromDiscord<iWonderAboutTuatara> I just don't know what they are
17:17:04FromDiscord<Rika> they do tho?
17:17:06FromDiscord<Rika> it compiles
17:17:48FromDiscord<Rika> remove dumpTree and move ++c below c %=
17:18:13FromDiscord<iWonderAboutTuatara> sorry that isnt the error
17:18:18FromDiscord<iWonderAboutTuatara> if you try to do ++c it won't compile
17:18:36FromDiscord<iWonderAboutTuatara> wait what
17:18:37FromDiscord<iWonderAboutTuatara> huh
17:18:44FromDiscord<iWonderAboutTuatara> if you echo that it throws an error though
17:19:58FromDiscord<iWonderAboutTuatara> wait ok what
17:20:07FromDiscord<iWonderAboutTuatara> it you try to echo ++c it errors
17:20:47*NimBot joined #nim
17:20:51FromDiscord<iWonderAboutTuatara> `++c; echo c` works, but `echo ++c` errors
17:21:49FromDiscord<Rika> echo ++c will error because `lhs = rhs` does not return anything in nim
17:21:52FromDiscord<Rika> unlike in c
17:22:02disruptekbat guano is my least-favorite guano.
17:25:03FromDiscord<iWonderAboutTuatara> so how do i ake it reutnr what i want it to?
17:26:52FromDiscord<Rika> ```inc `val`; `val` ```↵but any `++c` will need discard if alone
17:27:17FromDiscord<Rika> (im not sure on the top block, maybe `block: inc...` will work
17:27:22FromDiscord<Rika> (edit) 'block,' => 'code,' | 'work' => 'work)'
17:29:13FromDiscord<iWonderAboutTuatara> oh semicolon followed by the value returns the value?
17:29:24FromDiscord<lqdev> no
17:29:33FromDiscord<lqdev> semicolon is the same as a newline
17:42:04*Trustable quit (Remote host closed the connection)
17:42:48Zevvdisruptek: zup
17:44:02Zevvwhat did you break
17:44:29disruptektrying to figure out how your vm profiling works.
17:44:40ZevvI'm zevv. I fix problems.
17:44:47disruptekoh well.
17:46:06Zevvwell its totally trivial
17:46:19Zevvbefore a vm instruction it looks at its watch
17:46:22Zevvit runs the instruction
17:46:26Zevvand looks again
17:46:33Zevvsubstracts the second from the first
17:46:43Zevvand adds the time to all the frames on the call stack
17:47:00Zevvthat kind of sums it up I guess
17:47:07disrupteki don't get it.
17:47:25disruptekactually, i think i'm going about this wrong.
17:47:27Zevvwhat not
17:47:35*maier joined #nim
17:47:43Zevvits dead stupid
17:47:45Zevvoh sorry
17:47:50disrupteki know, i'm just kidding.
17:48:01disrupteki want to measure two things:
17:48:08disruptekhow long it takes to process a macro,
17:48:12*lritter quit (Quit: Leaving)
17:48:14disruptekhow long it takes to compile a proc.
17:48:33Zevvjust do cpuTime() before and after the invocation?
17:48:41Zevvdifferent problemy than profiling if you ask me
17:48:46disrupteki thought i would just count vm ops but maybe time is more useful.
17:48:47Zevvbecause you know what you want to measure
17:48:53Zevvtime is always more useful
17:49:07Zevvyou have cpuTime in the vm, but there is a stupid flag you need to set otherwise you get
17:49:10Zevvbecause of paranoia
17:49:15disruptekwhere does this shit get stored?
17:49:18disruptekvmProfileData?
17:49:20Zevvyeah
17:49:24disruptekokay.
17:49:34Zevvjust look at d7ccd82eacd7a03c7cf31ea56315c3a35218e122, it tells the whole story in a few lines
17:49:54disruptekso that's useless for me because i don't have lineinfo to index it with.
17:50:05disrupteki will just do this lamely.
17:50:08disruptekit's not permanent.
17:51:40Zevvnothing is, is it
17:52:07disrupteknot the way i code, no.
17:52:20disruptekps. never get stoned and try to write a resume.
17:52:25*maier quit (Ping timeout: 240 seconds)
17:52:26Zevvdude
17:52:30ZevvI feel so damned sorry for you
17:52:38Zevvwrite a resume like your 21
17:53:09disruptekmaybe i did.
17:53:13disruptekdid you read it?
17:53:16disrupteki don't know what i was thinking.
17:55:43FromDiscord<iWonderAboutTuatara> @Rika that works, but you have to set the quote do to type int
17:56:00FromDiscord<iWonderAboutTuatara> sent a code paste, see https://play.nim-lang.org/#ix=2vYo
17:56:20FromDiscord<Rika> eh? thats valid syntax?
17:56:30FromDiscord<iWonderAboutTuatara> yep
17:56:41FromDiscord<iWonderAboutTuatara> you can change the macro return value to untyped and it works
17:56:50FromDiscord<iWonderAboutTuatara> this doesn't work with literals though
17:56:54FromDiscord<iWonderAboutTuatara> ie ++32 throws error
17:56:56FromDiscord<Rika> i mean the part after do
17:57:01FromDiscord<iWonderAboutTuatara> apparently
17:57:18FromDiscord<iWonderAboutTuatara> this runs
17:57:23FromDiscord<iWonderAboutTuatara> and now i can do echo ++var
17:57:33FromDiscord<iWonderAboutTuatara> this doesn't work for literals
17:57:38FromDiscord<iWonderAboutTuatara> and I do not know why
17:58:30*narimiran joined #nim
17:58:36FromDiscord<Rika> you cant set a literal
17:58:42FromDiscord<iWonderAboutTuatara> right
17:58:43FromDiscord<iWonderAboutTuatara> right
17:58:49FromDiscord<Rika> it becomes converted to `32 = 32 + 1`
17:58:55FromDiscord<iWonderAboutTuatara> yeah
17:58:58FromDiscord<iWonderAboutTuatara> I see the issue
17:59:26FromDiscord<iWonderAboutTuatara> another question, but more general
17:59:43FromDiscord<iWonderAboutTuatara> So far, I have only really seen how this works with a basically static input
17:59:54FromDiscord<iWonderAboutTuatara> ie there's no variation in the amount of input etc
18:00:55*lritter joined #nim
18:01:20FromDiscord<Rika> wdym'
18:24:10FromDiscord<iWonderAboutTuatara> how do you work with expressions in which the types of input change
18:24:16FromDiscord<iWonderAboutTuatara> or the amount of input changes
18:25:24FromDiscord<Rika> varargs?
18:25:27FromDiscord<iWonderAboutTuatara> yeah
18:25:44FromDiscord<iWonderAboutTuatara> can you loop through the nodes?
18:25:53FromDiscord<Clyybber> Araq, @dom96 Why do we need that?
18:26:06FromDiscord<dom96> Amazing: https://twitter.com/nim_lang/status/1301224693979131904
18:26:09FromDiscord<Clyybber> How are exceptions handled currently in async?
18:26:18disruptekpoorly.
18:26:24FromDiscord<dom96> clyybber: I'm wondering that too
18:27:13FromDiscord<Clyybber> I assume because of raises: []?
18:27:21FromDiscord<Clyybber> But I'm missing context so I can't really comment
18:27:45FromDiscord<Rika> i mean regards the malware thing
18:28:02FromDiscord<Rika> ah yes discord not sending the first message
18:28:04FromDiscord<Rika> but sending the sedcond
18:28:06FromDiscord<Rika> (edit) 'sedcond' => 'second'
18:28:08FromDiscord<Rika> is that good or bad xddd
18:28:54*clyybber joined #nim
18:29:01FromDiscord<iWonderAboutTuatara> I'm sort of interested in that tbh
18:29:18FromDiscord<iWonderAboutTuatara> I like ti write some form of virus in every langauge I try
18:29:35clyybberplanetis[m]: Hey, about the vulkan issue, why do you need to use addr? I think I made most params var
18:29:37FromDiscord<iWonderAboutTuatara> macros have the potential to make understand what's going on in even unobfuscated code very hard
18:29:46*clyybber quit (Client Quit)
18:31:10*gmaggior joined #nim
18:31:37FromDiscord<Clyybber> oh, nevermind
18:32:01FromDiscord<Clyybber> seems like a good idea. I'll update the wrapper
18:33:09FromDiscord<Rika> @iWonderAboutTuatara i remember someone making a string obfuscator in nim and then yardanico improving on that afaik, but its prolly easy for experts to figure that out
18:33:24Yardanicofor experienced people - of course
18:33:32Yardanicobut it still has some issues since it's getting applied in places where it shouldn't
18:33:40Yardanicohttps://github.com/Yardanico/nim-strenc/
18:34:22disrupteknim's c is easier to deconstruct than handwritten c.
18:34:24FromDiscord<Rika> it is?
18:34:32FromDiscord<Rika> i mean to yardanico
18:34:40Yardanicoit depends
18:34:44Yardanicowith --gc:arc and -d:danger, not really
18:34:48Yardanicomaybe you mean the GC?
18:34:52Yardanicowe're talking about compiled binaries
18:37:48FromDiscord<Clyybber> @haxscramper Regarding your RFC does it matter much to you wether we implement ": or this?
18:37:57FromDiscord<Clyybber> Because one can be implemented without compiler support
18:38:20FromDiscord<Clyybber> Personally I really dislike having strings without quotes
18:38:32FromDiscord<Clyybber> and I assume it will cause havoc for highlighting
18:41:16FromDiscord<Clyybber> hardcoding it to 2 space indentation is bad
18:42:59*tane joined #nim
18:43:59FromDiscord<haxscramper> I linked unit test to github & updated my comment
18:44:28FromDiscord<haxscramper> I think syntax highlighting already handles it quite fine - not the best possible results of course, but good enoug
18:44:38FromDiscord<haxscramper> https://github.com/haxscramper/Nim/blob/devel/tests/parser/therestring2.nim
18:45:35FromDiscord<Clyybber> The same thing can be accomplished much easier though, you have a proc/macro that takes a string literal and it returns the string literal stripped of its common least leading spaces
18:45:44FromDiscord<Clyybber> without compiler support
18:46:06FromDiscord<haxscramper> Yes, everything that this RFC implements is syntax sugar. Zero new features
18:46:41FromDiscord<haxscramper> But that's the only point - it makes long string literals look better. That's all
18:47:28FromDiscord<Clyybber> Ok
18:47:33FromDiscord<haxscramper> And I understand this is why things like this usually cause a lot of debate - it is pure *preference*
18:47:53FromDiscord<Clyybber> Are you aware of strutils.unindent ?
18:48:18FromDiscord<haxscramper> Yes, of course
18:48:56FromDiscord<haxscramper> Although I usually make about 3 typos while writing this, so I implemented my own `dedent`. But that's just me having zero typing skills
18:51:16FromDiscord<Clyybber> The main reason I dislike this is that it makes string literals "hard" to spot by introducing another way to write them
18:52:13FromDiscord<haxscramper> I used quite verbose `herestring` which can be highlighted as keyword instead of `":` than includes `"` or bash-like `<< EOF` `EOF`
18:52:16FromDiscord<iWonderAboutTuatara> @Rika right, I was more referring to macros though
18:52:30FromDiscord<iWonderAboutTuatara> they can make the code painfully difficult to read and understand, or so I've heard
18:52:41Yardaniconot really
18:52:42FromDiscord<iWonderAboutTuatara> which is definetely a plus for malware authors
18:52:49FromDiscord<Clyybber> Also, no other indentation: construct behaves this way
18:53:08Yardanico@iWonder you can't really use macros for obfuscation of most nim stuff
18:53:21FromDiscord<iWonderAboutTuatara> I don't mean literal obfuscation
18:53:26FromDiscord<iWonderAboutTuatara> to be 100% clear
18:53:35FromDiscord<iWonderAboutTuatara> I mean't making the code hard to read and understand
18:53:41Yardanicothat doesn't matter
18:53:46Yardanicomacros are evaluated at compile-time
18:53:51Yardanicothe binary doesn't have macros - it has the resulting code
18:53:54FromDiscord<iWonderAboutTuatara> oh I see
18:54:01FromDiscord<iWonderAboutTuatara> right
18:55:24FromDiscord<Rika> macros can obfuscate, but you cant obfuscate code just by writing a macro
18:55:38Yardanicowell, macros can't obfuscate most stuff
18:55:44Yardanicoit would be really hard to do
18:55:47Yardanicoonly in some specific cases
18:55:50FromDiscord<haxscramper> > Also, no other indentation: construct behaves this way↵@Clyybber I'm open to suggestions about implementation - I just wrote proof-of-concept to have something to show instead of "hey, why don't we do this".
18:56:18FromDiscord<Clyybber> Oh, I don't have much to suggest, I think using unindent should be the way to go
19:08:38*narimiran quit (Ping timeout: 256 seconds)
19:22:01*pietroppeter quit (Quit: Connection closed for inactivity)
19:25:46disruptekthe problem with sleeping with pigs is you wake up smelling like a goat.
19:26:19FromDiscord<Clyybber> poetic
19:32:38*a_chou joined #nim
19:32:54FromDiscord<Rebel> Is there a way to have a thread as a type for a custom object?
19:33:02Yardanicowdym?
19:33:09FromDiscord<Rebel> it's saying 'Thread' is not a concrete type
19:33:12FromDiscord<Rebel> something like this
19:33:12Yardanicoyes
19:33:15FromDiscord<Rebel> one sec
19:33:20Yardanicoit should be either Thread[void] or Thread[othertype]
19:33:34Yardanicothe type which gets passed to the thread argument
19:33:50FromDiscord<Rebel> https://play.nim-lang.org/#ix=2vYY
19:33:57Yardanicoyes, as I said
19:34:52FromDiscord<Rebel> can I pass a generic instead?
19:35:02FromDiscord<Rebel> like Thread[T] as the type may change
19:35:19Yardanicoyes, but then your object needs to be generic as well
19:35:24Yardanicoand one object type = one thread type
19:35:50Yardanicotype J[T] = object jthread: Thread[T]
19:38:37disruptek--define:leanCompiler=off doesn't do what you expect.
19:38:55FromDiscord<Rebel> excellent thanks
19:41:31*Jesin joined #nim
19:42:53FromDiscord<Clyybber> disruptek: What did you think it does?
19:45:57disruptekturn off leanCompiler.
19:46:24disruptekwho knows someone who uses nim's hcr?
19:48:01disruptekgood, 'cause it's getting removed.
19:48:25*maier joined #nim
19:50:50disruptekclyybber: why, what did you think it does?
19:53:32*maier quit (Ping timeout: 258 seconds)
19:56:11*lritter quit (Ping timeout: 240 seconds)
19:56:12*superbia joined #nim
19:58:20Zevvdisruptek: hows the profiling
19:58:35disruptekturns out async is slow.
19:58:42Zevvwhat part
19:58:48disruptekthe macro itself.
19:58:54Zevvwell, it's hard work, isn't it?
19:59:13disruptekapparently.
19:59:31disruptekno one here uses flowvars, right?
20:01:49Zevvthe only valid answer I can give is "I don't know"
20:03:49disruptekalehander92: what do you think of gully?
20:04:06*lritter joined #nim
20:07:55disruptekkoch should probably prevent you from overriding the nimcache for tests; that, or it should put tests within the cache directory you specify.
20:08:05disruptekelse parallel tests stomp on each other.
20:09:50FromDiscord<dom96> Normal async or cps async? 😛
20:12:14*krux02 quit (Remote host closed the connection)
20:16:42FromDiscord<Rebel> Is there an equivalent to C#'s easiest way to determine in process architecture: IntPtr.Size == 4 ? "x86" : "x64" the ptr type in nim has the magic pragma so not sure if it's possible to get the size of it
20:16:59Yardanicoyes
20:17:01YardanicohostCPUI
20:17:03YardanicohostCPU
20:17:05*rockcavera quit (Ping timeout: 240 seconds)
20:17:16Yardanicoyou want architecture or bitness though?
20:18:21Yardanicothere is quite a lot of existing architectures, like "arm" or "arm64", bitness OTOH is usually 32 or 64
20:18:35*moerm joined #nim
20:19:16moermFriendly greeting to everyone from the "xenophobic"
20:19:50Yardanicomoerm: why do you call yourself xenophobic?
20:19:56Yardanicoas far as I can see no one called you that in this chat
20:20:34*donpdonp joined #nim
20:20:39moermYardanico, Because some woke idiot called me that in our forum and because 5 others +1'd it
20:20:46Yardanicohuh
20:20:59Yardanicoahhh
20:21:04donpdonpim running nimble test on a project that includes redis, and it fails at
20:21:08donpdonp/home/donp/.nimble/pkgs/redis-0.3.0/redis.nim(50, 40) Error: undeclared identifier: 'Socket'
20:21:20Yardanicowhat's your nim version?
20:21:21Yardaniconim -v
20:21:27moermYeah, because I wrote (deleted now) that I *LIKE* russian devs. based on my experience
20:21:29donpdonp1.2.0
20:21:35Yardanicoalso try nimble install redis@#head
20:21:35donpdonp50: Redis* = ref object of RedisBase[net.Socket]
20:21:41donpdonpwhich is a weird thing to fail over
20:21:51Yardanicoseems like there were some newer commits, but the tagged version is 2 years behind
20:22:15donpdonpyeah i can try master
20:23:42*donpdonp goes to lookup how to do that :)
20:23:47YardanicoI sent you the command
20:24:04Yardanicocheck it 6 messages above :)
20:24:14donpdonpfor what, the version of nim? its 1.2.0
20:24:24Yardaniconimble install redis@#head
20:24:27donpdonpi mean a requires line that says to use git head
20:24:31donpdonpahh thx
20:24:34Yardanicoah, requires
20:24:40Yardanicoredis#head then
20:24:42moermNot that I like Redis but stuff like that should work. And I mean simply and reliably
20:25:44donpdonp/home/donp/.nimble/pkgs/redis-#head/redis.nim(54, 40) Error: undeclared identifier: 'Socket'
20:26:05donpdonpmoerm: yeah, the lib is working fine for me, but to run my own tests, nimble is apparently running the tests of every dependency
20:26:12*bouzu_ quit (Quit: Leaving)
20:26:16Yardanicoit never does that
20:26:58donpdonpi say that becuase nimble build works
20:27:03donpdonpwhich still depends on redis
20:27:16donpdonpits only nimble test that throws this error
20:27:36Yardanicowell nimble test only runs your tests
20:27:39FromDiscord<dom96> interesting, try `nimble test --debug` to see what Nimble runs
20:28:31donpdonpYardanico: ok good to know
20:29:11donpdonpdom96: no extra info there except Not removing temporary path because of debug verbosity: /tmp/nimble_15566: $ cat /tmp/nimble_15566.out => {"success": false, "command": "e", "retVal": true}
20:32:12moermDoes anyone know how I can turn off auto-complete on *Return* in the VSCode abomination? (I want AC only on TAB)
20:38:49*rockcavera joined #nim
20:47:24*solitudesf joined #nim
21:02:34FromGitter<alehander92> disruptek what is gully
21:02:46disruptek!repo gully
21:02:47disbothttps://github.com/disruptek/gully -- 9gully: 11a code comment formatter 15 1⭐ 0🍴
21:03:16FromGitter<alehander92> moerm i am not sure, sorry, vscode is pretty ok tho
21:06:06FromGitter<alehander92> wow i am surprised how much thought/flags you put into this stuff
21:06:36FromGitter<alehander92> disruptek
21:06:38FromGitter<alehander92> (gully)
21:07:03disruptekit's something i've wanted for a long time.
21:07:19moermalehander92, Thx but VSC drives me nuts when e.g. I open a 'var' section and hit return and VSC insanely and arbitrarily autocompletes 'var' to some nonsense
21:09:52*solitudesf quit (Ping timeout: 246 seconds)
21:10:56FromGitter<alehander92> moerm hm, can't extensions/ect change that: i am not sure if this is core vscode behavior
21:11:02FromGitter<alehander92> i am not very good at autocmpletion
21:11:19FromGitter<alehander92> disruptek a bit niche
21:11:45FromGitter<alehander92> but useful for different langs
21:12:14FromGitter<alehander92> i .. should write more comments
21:13:13moermalehandler92 For me it's typical for the VSC abomination. But then what can one expect from idiots who base an editor on a browser backend ...
21:15:34*agent0x00 quit (Quit: WeeChat 1.9.1)
21:30:22*xace quit (Ping timeout: 256 seconds)
21:31:19FromGitter<alehander92> it's actually a very smart decision
21:31:58FromDiscord<InventorMatt> moerm: if you go to settings and type in enter to the search bard there should be an option that says accept suggestions on enter. you can turn it off there
21:31:59FromGitter<alehander92> calculating correctly what trade-offs people are ready to do for the trade-offs that browsers have
21:32:31*pbb quit (Remote host closed the connection)
21:32:58FromGitter<alehander92> yes: obviously "super over engineered how can we have that if i can use ed like that with some X"
21:33:09moermInventorMatt Thanks a ton! I'll try right away
21:33:43*pbb joined #nim
21:33:49FromGitter<alehander92> but having a browser engine does give you a lot of cool stuff you can do in an editor
21:34:01FromGitter<alehander92> and if people are willing to give 10% of their 16gb ram-s ..
21:34:08FromGitter<alehander92> why not use this niche
21:34:18moermalehander92, a) browsers have become perverse monsters, b) I'm not talking about "ed is good enough" but about a *reasonable* compromise like e.g. sublime editor
21:34:28FromGitter<alehander92> dude. i love sublime
21:34:44FromGitter<alehander92> but i am trying to show you that vscode is also a valid engineering choice
21:35:05FromGitter<alehander92> and today's UI state of the industry is not vscode's people fault
21:35:44FromGitter<alehander92> the opposite: editor makes much more sense to me to use many of those features compared to other electron apps
21:35:48moermalehander92, I respect your "embrace everyone" and harmony attitude but NO, building an editor on top of a browser monstrosity is NOT sensible engineering
21:36:02FromGitter<alehander92> it's totally not harmony or embrace everyone
21:36:15FromGitter<alehander92> just there are many pro-s and many con-s for it
21:36:27FromGitter<alehander92> for some people the pro-s are worth it for others not
21:36:56*xace joined #nim
21:37:07FromGitter<Knaque> Mind if I interject to ask a question?
21:37:10moermIf you want to defend using a 40 ton truck for going to the grocery, good luck and fun - but not with me on board
21:37:11FromGitter<alehander92> and having an editor is kinda ok 1) you get much more custom packages/bigger ecosystem .. just there
21:37:19FromGitter<Knaque> An irrelevant question, I should add.
21:37:28moermKnaque Absolutely not! Just go ahead!
21:37:29FromGitter<alehander92> 2) you already have a very optimized v8 engine with great debugging tools
21:37:41FromGitter<alehander92> 3) some people are ok with using this much ram anyway
21:37:47FromGitter<alehander92> yes, sorry, go ahead
21:38:03moermalehander92, Let's end this topic and stay friendly
21:38:07FromGitter<Knaque> `var Radio* = initTable[string, tuple[val, hover: bool]]()` doesn't seem to be making `tuple[val, hover: bool]` public, so how can I fix that? I tried my first intuition for making it public, but all the complaining tells me I must have it wrong.
21:38:32FromGitter<alehander92> disagreeing with people is being friendly for me: i respect ya, that's why i like discussing
21:38:54FromGitter<alehander92> (but i .. am biased about electron, i did use it for years for similar stuff)
21:39:26moerm* politely refrains from comment on alehandlers past*
21:39:43moermLet's turn our focus to Knaque's question ...
21:40:53FromGitter<alehander92> like .. i like TUI-s a lot, i really want lightweight stuff . but I *had to* agree that electron just has some plus-es.
21:41:11FromGitter<alehander92> Knaque this is very interesting problem
21:41:14moermOr even bettr I'll politely leave with a friendly smile
21:41:29moermHave a good day/night everyone ;)
21:41:29Yardanico@Knaque create a type?
21:41:44Yardanicoand use it in initTable
21:41:52FromGitter<alehander92> but still
21:41:57FromGitter<alehander92> is this the expected behavior
21:42:05moermYardanico, Yep. A *public* one
21:42:12FromGitter<alehander92> moerm pls don't leave: if you want i wouldn't argue anymore
21:42:12*moerm quit (Quit: Leaving)
21:42:22FromGitter<alehander92> especially if you stop calling cool smart people idiots
21:43:25FromGitter<alehander92> Knaque i can't repro tho
21:43:34FromGitter<alehander92> i can access `.val` in another module
21:43:45FromGitter<alehander92> is it possible that you dont import tables
21:44:11FromGitter<alehander92> and get a [] error (sorry if i am wrong, just it was a non-obvious error for me)
21:45:04FromDiscord<mbenam> Hello. I am trying to make an http post request. One of the variable is style = color="red". I tried creating a json using ↵"style" = "color=\"red\"". But it seems the double quote is not being escaped. Can you suggest what I need to change?
21:45:34FromDiscord<Rika> add backslashes to escape the quotes?
21:46:04FromDiscord<mbenam> sorry, I added backslash. But it disappears here
21:46:09FromGitter<Knaque> @alehander92 Is actually spot on. Guess that makes sense, I just assumed it was a public thing.
21:46:24FromDiscord<mbenam> How do you paste a code block here?
21:46:38FromDiscord<Rika> use \`\``s
21:46:46FromDiscord<Rika> ```↵test↵```
21:46:57FromDiscord<mbenam> '''↵"style" = "color=\"red\""
21:47:07FromGitter<alehander92> but moerm/Yardanico 's advice also makes sense
21:47:14FromGitter<alehander92> it's often good to just name stuff
21:47:21FromGitter<alehander92> especially if many procs take it as arg
21:47:30FromDiscord<mbenam> ```"style" = "color=\"red\""```
21:47:38FromDiscord<mbenam> That's what I did.
21:47:44FromDiscord<Rika> what's the exact error you're getting
21:48:14FromDiscord<mbenam> it posts. But I am getting a different response
21:48:28FromDiscord<mbenam> Tried with python. works fine
21:48:43FromDiscord<mbenam> when I echo the json, I still see the slashes
21:49:17*maier joined #nim
21:49:31FromDiscord<Rika> thats normal, it should have backslashes too in json or itll be invalid
21:53:59FromGitter<alehander92> please use a paste service
21:54:38*maier quit (Ping timeout: 260 seconds)
21:57:43disruptekjust use %* and let json render it, yeesh.
21:59:26*tane quit (Remote host closed the connection)
21:59:52*jxy quit (*.net *.split)
21:59:52*Oddmonger quit (*.net *.split)
21:59:52*literal quit (*.net *.split)
21:59:59*literal_ joined #nim
22:00:03FromDiscord<alehander42> hm so maybe direct pastes are ok sorry
22:00:06FromDiscord<alehander42> not sure
22:00:12*Oddmonger joined #nim
22:00:12*jxy joined #nim
22:01:01disruptek~paste
22:01:02disbotpaste: 11a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. -- disruptek
22:09:14*Jesin quit (Ping timeout: 258 seconds)
22:14:28*Kaivo quit (Ping timeout: 260 seconds)
22:16:34*Kaivo joined #nim
22:19:30disruptekit's bad, you know.
22:25:17*lritter quit (Quit: Leaving)
22:30:24*vicfred quit (Quit: Leaving)
22:41:53*Jesin joined #nim
22:54:05*a_chou quit (Ping timeout: 258 seconds)
23:23:07disrupteki need to talk to whoever chose the spelling of `rhythm`.
23:32:27disruptekwhat you don't know about porn /can/ hurt you.
23:33:30*Vladar quit (Remote host closed the connection)
23:35:12*maier joined #nim
23:35:20FromGitter<alehander92> but in discord the bot might be able to fix pastes?
23:35:37FromGitter<alehander92> porn is bad dude
23:35:38disruptekit could if someone was motivated to fix the bot.
23:35:55FromGitter<alehander92> i am motivated to finish my biscuit machine homework
23:36:01FromGitter<alehander92> it's 2 am here
23:36:03disruptekwut
23:36:07disruptekbiscuit machine?
23:36:11FromGitter<alehander92> absolutely
23:36:48disrupteki'd rather not think of you as 7 hours ahead. more likely, you are 17 hours behind.
23:36:54FromGitter<alehander92> https://github.com/alehander92/biscuit
23:37:07FromGitter<alehander92> it's a homework, but it's kinda fun i admit
23:37:20FromGitter<alehander92> i am trying to debug it a bit more making a TUI for animating it
23:37:30disruptekdo you have a public server?
23:37:41FromGitter<alehander92> nope
23:37:54disruptekhomework /should/ be fun. like porn.
23:38:16FromGitter<alehander92> porn is not fun: it's fun like overdosing on bensin is fun
23:38:29disruptekyou know what really chafes my ass?
23:38:46disruptekoreos have 70 calories each.
23:38:49FromGitter<alehander92> is this french
23:38:54disrupteklike, what the fuck were they thinking?
23:39:23FromGitter<alehander92> huh that's a lot
23:39:37FromGitter<alehander92> do you guys have bigger oreos
23:39:42FromGitter<alehander92> no idea if ours have 70
23:39:53disruptekprobably, this is 'murica after all.
23:40:03disruptekthem asses don't grow themselfs!
23:40:13*maier quit (Ping timeout: 260 seconds)
23:40:32FromGitter<alehander92> in germany i had big portions actually
23:40:34FromGitter<alehander92> in munich
23:40:44FromGitter<alehander92> they just seemed like bigger people those bavarians
23:40:46disruptekthe cookies that don't hit 70 probably fall into a special box for pussies and get shipped straight to munich.
23:41:30FromGitter<alehander92> let's make planed happen
23:41:37FromGitter<alehander92> shipped is so naval
23:41:54disruptekbut naval gazing is second only to train spotting.
23:41:58FromGitter<alehander92> rockectedthis book into my backyard
23:43:08FromGitter<alehander92> maybe gazing at other people is even more spotless
23:43:22disrupteki thought you were against porn?
23:43:29FromGitter<alehander92> "70 years and alexander didn't wash the dishes"
23:43:41FromGitter<alehander92> dude it's about old people and life together
23:43:43FromGitter<alehander92> feel the room
23:45:13disruptekmy own assertions are crashing the compiler.
23:50:38disruptekdo you think we should make laws against zombies? try to get ahead of this thing for once?
23:50:53disruptekthat's not racist of me to say, right?