<< 21-02-2020 >>

00:00:13*leorize quit (Remote host closed the connection)
00:00:48*leorize joined #nim
00:00:53Araqhttps://jaxenter.de/wp-content/uploads/2020/01/Java-Developer-Productivity-Report.png
00:01:40Araq^ "I don't want to think about memory management" theory vs practice :P
00:03:18FromGitter<Varriount> Araq: How do you know that "long response time" is due to memory?
00:03:51AraqI mean the 2nd answer, "memory leaks"
00:21:19dadadaillwill/illwillwidgets look cool
00:23:59*zahary1 joined #nim
00:24:16*zahary quit (Ping timeout: 255 seconds)
00:26:02leorize@treeform: https://play.nim-lang.org/#ix=2cgD
00:42:33*gmpreussner quit (Quit: kthxbye)
00:42:50*gmpreussner joined #nim
00:50:47*couven92 quit (Read error: Connection reset by peer)
00:51:11*couven92 joined #nim
00:59:07*sentreen_ joined #nim
01:02:16FromDiscord_<treeform> leorize, thanks, I did not know you could use template like that, like a varible.
01:02:20*sentreen quit (Ping timeout: 265 seconds)
01:03:11FromDiscord_<treeform> I guess I was just using that other thing you hinted at before: https://gist.github.com/treeform/e84db5f8caf9208d253f347e61fba556#file-radix-nim-L95
01:03:24FromDiscord_<treeform> I don't think I can use template var as a parameter.
01:04:23leorizeyes you can?
01:04:44*couven92 quit (Read error: Connection reset by peer)
01:05:10*couven92 joined #nim
01:05:23*rhenvar quit (Ping timeout: 260 seconds)
01:05:29*zahary1 quit (Quit: Leaving.)
01:05:45*zahary joined #nim
01:05:45FromDiscord_<treeform> I think casting it to a ptr of seq works, it does not appear to make a copy
01:06:04leorizeyes, since you are not trying to use the copy operator `=`
01:06:14*couven92 quit (Read error: Connection reset by peer)
01:06:16FromDiscord_<treeform> yeah
01:06:17*zahary quit (Client Quit)
01:06:40*couven92 joined #nim
01:06:57leorizeit's crucial to understand that templates are not proc, but AST substitutions :)
01:07:27FromDiscord_<treeform> I though one could use them only to substitute a proc
01:07:32FromDiscord_<treeform> this is neat
01:08:13*Jesin joined #nim
01:10:41*rhenvar joined #nim
01:13:12*r4vi quit (Ping timeout: 246 seconds)
01:14:44*couven92 quit (Read error: Connection reset by peer)
01:15:07*rhenvar quit (Ping timeout: 255 seconds)
01:15:11*couven92 joined #nim
01:15:23*r4vi joined #nim
01:18:44*couven92 quit (Read error: Connection reset by peer)
01:19:12*couven92 joined #nim
01:23:50*rhenvar joined #nim
01:30:44FromGitter<Obround> Hello. If you compile a nim file with `gc:none`, will the output run faster?
01:33:45*rhenvar quit (Ping timeout: 240 seconds)
01:38:19FromDiscord_<Rika> Technically yes but it's not recommended
01:38:39FromDiscord_<Rika> You can't exactly use strings and ref objects without modifying the code
01:42:44FromGitter<Obround> What do you mean?
01:42:58*Jesin quit (Quit: Leaving)
01:45:18FromDiscord_<Elegant Beef> If you use anything that relies on the GC you'll have fun when you disable it
01:48:15FromGitter<Obround> Ok... Forgive my ignorance, but what relies on the GC?
01:50:56FromDiscord_<Elegant Beef> ref objects, strings like rika said i know slightly more about the C# GC but still rather nothing overall
01:58:23FromDiscord_<Elegant Beef> ref objects, strings like rika said, i know slightly more about the C# GC but still rather nothing overall
01:59:07*leorize quit (Quit: WeeChat 2.6)
02:12:59FromGitter<Varriount> References, strings, and sequences
02:13:18*NimBot joined #nim
02:13:37FromGitter<Varriount> @Obround Are you having performance problems at compile time, or runtime?
02:14:53*chemist69 quit (Ping timeout: 272 seconds)
02:16:30*chemist69 joined #nim
02:41:03*azed quit (Ping timeout: 260 seconds)
02:43:43*Cadey quit (Quit: WeeChat 2.7)
02:44:17*Xe joined #nim
02:55:42*azed joined #nim
02:57:44*ptdel joined #nim
02:59:11dadadamacros/templates don't seem to be working inside type definitions
02:59:33dadadawanted to create a macro that modifies/automates enum definitions
02:59:38dadadabut there seems to be no chance
03:05:08dadadahave an ambigous proc, can a proc be marked to be forcibly chosen when there's an ambiguity?
03:06:15disruptekif you could then it wouldn't be ambiguous.
03:07:12dadadayes, "when there's an ambiguity otherwise"
03:09:52FromDiscord_<Rika> Basically proc overriding?
03:11:02dadadayes
03:11:36FromDiscord_<Rika> I'd like to see that too
03:12:26dadadais there a way to import a proc by another name?
03:13:06dadadaonly thing I could do now would be to fork the code
03:13:22*rockcavera quit (Remote host closed the connection)
03:19:45*dddddd quit (Read error: Connection reset by peer)
03:22:57FromDiscord_<demotomohiro> If you import 2 modules that have same name procs, add module name to proc like `mymodule.myproc`.
03:26:27*muffindrake quit (Ping timeout: 272 seconds)
03:28:15*muffindrake joined #nim
03:30:37*endragor joined #nim
03:32:15FromGitter<Varriount> dadada: Source?
03:32:32FromGitter<Varriount> dadada: What are you trying to do?
03:35:58*dadada quit (Ping timeout: 255 seconds)
03:37:30*dadada joined #nim
03:37:53*dadada is now known as Guest51824
03:46:56*leorize joined #nim
03:55:17*couven92 quit (Ping timeout: 258 seconds)
04:00:05*Guest51824 quit (Ping timeout: 240 seconds)
04:02:16*dadada joined #nim
04:02:40*dadada is now known as Guest2213
04:15:47*Guest2213 quit (Ping timeout: 260 seconds)
04:17:07*dadada_ joined #nim
04:30:52*dadada_ quit (Ping timeout: 255 seconds)
04:31:24*nsf joined #nim
04:32:16*dadada_ joined #nim
04:37:30FromGitter<Obround> @Varriount -- In a way yes. I need nim to run as fast as it can...
04:37:56FromGitter<Varriount> @Obround Ok, but is it running fast enough already?
04:38:17FromGitter<Varriount> Steps to optimize (stop when it's fast enough):
04:38:28FromGitter<Varriount> 1) Use `-d:release`
04:38:29FromDiscord_<Elegant Beef> but i want extra ns!
04:38:44FromGitter<Varriount> 1) Use `-d:danger`
04:39:06disruptektry --gc:markAndSweep, too.
04:40:20FromDiscord_<Elegant Beef> I mean doesnt the GC only matter if they're actively using it?
04:40:36disrupteksure, but it's hard not to use it.
04:41:27*azed quit (Ping timeout: 260 seconds)
04:42:29FromGitter<Varriount> Or, if you have a short-running command line program, you can sometimes get away with not using a garbage collector at all, and just leak memory
04:42:46FromGitter<Varriount> (Like, if the only time you would deallocate memory is at the end of the program)
04:43:10FromDiscord_<Elegant Beef> I'd imagine micro controllers wouldnt use the GC much
04:43:18FromDiscord_<Elegant Beef> but i've been known to be wrong often 😄
04:46:16*dadada_ quit (Ping timeout: 258 seconds)
04:47:10*dadada joined #nim
04:47:34*dadada is now known as Guest63631
04:55:10*Jjp137 quit (Ping timeout: 268 seconds)
04:56:06*Jjp137 joined #nim
04:58:42*ptdel quit (Ping timeout: 260 seconds)
04:59:20*LER0ever quit (Remote host closed the connection)
05:01:05*NimBot joined #nim
05:01:38*LER0ever joined #nim
05:02:06*dadada_ joined #nim
05:11:06FromDiscord_<Rika> Did you recommend them to try gc arc?
05:16:10*dadada_ quit (Ping timeout: 258 seconds)
05:17:04*dadada_ joined #nim
05:23:56*sagax joined #nim
05:31:34*dadada_ quit (Ping timeout: 265 seconds)
05:32:07*dadada_ joined #nim
05:46:01*dadada_ quit (Ping timeout: 255 seconds)
05:47:10*dadada joined #nim
05:47:34*dadada is now known as Guest24608
06:01:01*Guest24608 quit (Ping timeout: 258 seconds)
06:01:52*narimiran joined #nim
06:02:06*dadada_ joined #nim
06:15:58*dadada_ quit (Ping timeout: 258 seconds)
06:17:11*dadada_ joined #nim
06:30:55*dadada_ quit (Ping timeout: 258 seconds)
06:32:07*dadada_ joined #nim
06:37:49*LER0ever quit (Ping timeout: 258 seconds)
06:38:34*LER0ever joined #nim
06:39:59*Romanson joined #nim
06:45:38*dadada_ quit (Ping timeout: 240 seconds)
06:47:06*dadada joined #nim
06:47:28*dadada is now known as Guest65836
06:54:08*arecaceae quit (Remote host closed the connection)
06:54:30*arecaceae joined #nim
07:00:46*Guest65836 quit (Ping timeout: 240 seconds)
07:02:07*dadada_ joined #nim
07:03:45*hax-scramper quit (Ping timeout: 240 seconds)
07:05:22*hax-scramper joined #nim
07:09:29*xcdvfghythrge joined #nim
07:09:31xcdvfghythrgeHi. What is the best efficient and portable way you know to make a program remove himself ?
07:10:31Zevvremove from what?
07:11:01FromDiscord_<Elegant Beef> a self deleting application is called a weirdplication
07:11:20*hax-scramper quit (Read error: Connection reset by peer)
07:12:01*hax-scramper joined #nim
07:15:55*dadada_ quit (Ping timeout: 260 seconds)
07:16:51*sealmove joined #nim
07:16:58leorizeremoveFile(getAppFilename())
07:17:07*dadada_ joined #nim
07:19:10*NimBot joined #nim
07:30:49*hoijui joined #nim
07:31:19*dadada_ quit (Ping timeout: 260 seconds)
07:31:29*hax-scramper quit (Read error: Connection reset by peer)
07:32:12*dadada_ joined #nim
07:33:03*marmotini_ joined #nim
07:35:51FromDiscord_<Rika> Why tho
07:41:18leorizeit's useful for making malware :P
07:41:23FromDiscord_<demotomohiro> Is there any OS that forbid removing the executable while it is running?
07:42:10leorizewindows
07:42:39leorizeyou can, however, move it
07:42:44leorizebut you can't remove it
07:45:37FromDiscord_<demotomohiro> @leorize, then, removing a program portable way seem hard.
07:46:10*dadada_ quit (Ping timeout: 255 seconds)
07:46:37FromDiscord_<demotomohiro> Create another process that remove the program after exit?
07:47:08*dadada joined #nim
07:47:32*dadada is now known as Guest18254
07:48:52*hoijui quit (Quit: Leaving)
07:50:08FromDiscord_<Elegant Beef> the want of a executable that removes itself is very odd
07:51:53livcdyou can do this
07:52:07livcdi was trying to replicate this in Go some time ago
07:53:00livcdhttp://www.catch22.net/tuts/win32/self-deleting-executables#
07:55:05FromDiscord_<Elegant Beef> couldnt you just pass a few commands to the console like timeout then delete file
07:55:32lqdev[m]^ both can be found in os
07:55:40livcdyou get an error as far as i remember
07:55:49FromDiscord_<Elegant Beef> why?
07:56:01livcdwell try it and you tell me :-)
07:56:04FromDiscord_<Elegant Beef> You send the wait x seconds and delete then close the application
07:56:13FromDiscord_<Elegant Beef> Well considering im not on windows, no 😄
07:59:48*jjido joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:00:26*Guest18254 quit (Ping timeout: 240 seconds)
08:02:06*dadada_ joined #nim
08:04:49*gmpreussner joined #nim
08:15:57*dadada_ quit (Ping timeout: 258 seconds)
08:17:12*dadada_ joined #nim
08:29:01*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:31:10*dadada_ quit (Ping timeout: 255 seconds)
08:32:08*dadada_ joined #nim
08:36:26*narimiran quit (Read error: Connection reset by peer)
08:36:36*narimiran joined #nim
08:51:06*jjido joined #nim
08:52:41FromDiscord_<Stuffe> A couple of days ago I thought I had found a bug in Nim when in fact it was just me being a noob
08:52:51FromDiscord_<Stuffe> So I am not going to claim this is a bug I found today, but could someone more knowledgeable please explain what is going on here? Sure seems strange: https://play.nim-lang.org/#ix=2chO
08:58:16*floppydh joined #nim
08:58:25*uvegbot quit (Ping timeout: 265 seconds)
09:01:08*floppydh quit (Client Quit)
09:02:13*floppydh joined #nim
09:13:27*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:14:44FromGitter<Varriount> Stuffe: it breaks aliasing rules
09:16:38*marmotini_ quit (Remote host closed the connection)
09:17:11*marmotini_ joined #nim
09:18:14FromGitter<Varriount> Stuffe: https://nim-lang.org/docs/manual_experimental.html#aliasing-restrictions-in-parameter-passing
09:20:50FromDiscord_<Stuffe> how exactly does it break the aliasing rules?
09:21:55*marmotini_ quit (Ping timeout: 260 seconds)
09:23:21Zevvgood question - I don't see it either
09:24:40FromGitter<Varriount> Stuffe: specifically rule 3
09:24:51Zevvwhen changing to `let v = returns_123(); table[0].id = v` it works as expected
09:26:12ZevvVarriount: there is no output parameter involved here?
09:27:45FromDiscord_<Stuffe> Yeah, the output is constant, shouldn't be influenced by the global variable
09:28:56*Romanson quit (Quit: Connection closed for inactivity)
09:29:06ZevvThis surely feels like a bug
09:31:03Zevvthe number 86 is also special here
09:31:10FromDiscord_<Stuffe> yeah
09:31:28FromDiscord_<Stuffe> but if you declare the table with size 256, the bug goes away
09:32:07Zevvmy guess is that the insertion inside `returns_123` causes a reallocation of the underlying table data, while the outer assignment to element 0 has already been "started" when evaluating the RHS
09:32:19Zevvif you preallocate it goes away, indeed
09:33:04Zevvit also happens with 43
09:33:30Zevvshall I file a bug for you?
09:33:39FromDiscord_<Stuffe> yeah sure
09:36:52sealmovedoes anyone has an example of a recursive descent parser in Nim?
09:37:23Zevvlook in rod
09:38:25Zevvhttps://github.com/nim-lang/Nim/issues/13454
09:38:26disbotUB when modifying/adding data to a table
09:39:49narimiranZevv, @Stuffe i haven't followed discussion, is there a TL;DR why/how is it different than https://github.com/nim-lang/Nim/issues/13430 ?
09:39:51disbotStrange Table memory error ; snippet at 12https://play.nim-lang.org/#ix=2chW
09:40:33Zevvit smells similar indeed
09:41:14Zevvsorry for missing that but I have not been folling issues the last week or so
09:41:21Zevvlife happened
09:43:19lqdev[m]sealmove: https://github.com/liquid600pgm/rod/blob/master/src/rod/private/parser.nim
09:43:32lqdev[m]it's not the cleanest code ever, but it does its job
09:44:24Zevvits pretty cool, I was able to follow it on the first read
09:44:28lqdev[m]I just noticed the header still says 2019, lol
09:44:46Zevvbut of course the NPeg version is much more consice :)
09:44:56lqdev[m]indeed
09:45:04sealmovethanks ;D
09:45:09Zevvwill you look at this beauty :) https://github.com/zevv/npeg/blob/master/misc/rod.nim
09:45:23ZevvI should update it with your latest parser, this is ooold
09:46:44lqdev[m]also, yours does not cover everything; rod is line break sensitive and I couldn't find any line break rules in your version
09:47:20Zevvoh it's probably far from complete. It just happened to be a very cool test case for me
09:47:43sealmovewell, I got my hands on this https://github.com/cierelabs/yaml_spirit/blob/master/doc/specs/yaml-LL1.txt
09:47:54lqdev[m]sure, I'm not complaining :)
09:48:07sealmoveI think it's easier to do it the classic way than npeg
09:48:43ZevvI think so too
09:48:46*lritter joined #nim
09:56:44*zyklon joined #nim
10:01:39*dadada_ quit (Ping timeout: 268 seconds)
10:02:05*dadada joined #nim
10:02:29*dadada is now known as Guest85115
10:08:15*neceve joined #nim
10:15:45*Guest85115 quit (Ping timeout: 240 seconds)
10:17:07*dadada_ joined #nim
10:19:36*marmotini_ joined #nim
10:21:57*marmotini_ quit (Remote host closed the connection)
10:22:24*marmotini_ joined #nim
10:22:40*marmotini_ quit (Remote host closed the connection)
10:22:47*marmotini_ joined #nim
10:23:04Zevvso, if that bug is related to 13430 I still think it is a nasty one, you can't require a user to know about Tables implementation and side effects, right?
10:24:15Araqwe can implement the capturing to a table differently, maybe
10:24:56*fanta1 joined #nim
10:31:02Araqmaybe a borrow checker isn't a bad idea :P
10:32:29FromDiscord_<Rika> Was it ever
10:37:01WilhelmVonWeinerif I have a proc that sets up a socket
10:37:15WilhelmVonWeinerand I want to socket.close() on ctrl+c
10:37:21WilhelmVonWeinerhow would one do that?
10:38:45*krux02 joined #nim
10:40:13*couven92 joined #nim
10:41:11*fabian- joined #nim
10:42:56*gangstacat quit (Quit: Ĝis!)
10:44:33Zevvyou can't really close() from a signal handler, so you typically would make a note when you receive a signal and handle the close from your main code
10:44:53WilhelmVonWeinerReasonable
10:45:15ZevvI am a very reasonable man, usually
10:45:28FromDiscord_<Rika> There's a proc that you can use to set a hooc for Ctrl c
10:45:30FromDiscord_<Rika> Hook
10:46:01ZevvWell, if you don't catch SIGTERM, ^C will terminate your program and the socket will close anyway
10:46:22WilhelmVonWeinerRika: The function for that hook has to be declared at the top level of a source file
10:46:49FromDiscord_<Rika> You need to dynamically set it?
10:46:55FromDiscord_<Rika> Don't think it's possible then
10:46:58WilhelmVonWeinerZevv: ^C (smart) will leave your socket hanging
10:47:04WilhelmVonWeineruntil the kernel cleans it up
10:47:28Zevvuse setsockopt(REUSEADDR)
10:47:52WilhelmVonWeinerI like that
10:47:54Zevvyou don't get TIME_WAIT states then
10:48:24WilhelmVonWeinerthat is pretty much what I was looking for
10:48:28WilhelmVonWeinerthanks
10:48:42Zevvyw
10:48:53Araqwhich camera do you recommend for recording youtube videos?
10:49:40*zyklon quit (Ping timeout: 248 seconds)
10:52:23FromDiscord_<Rika> Any camera not older than a few years should do really
10:55:07Zevvunless you want to record in the dark, under water or in areas with high radiaton I guess anything that can do 720p @ 30fps should be ok
10:56:33Araqhmm under water
10:59:01*abm joined #nim
11:02:05Zevvand assuming you are going to talk, please consider using a proper microphone and not the cameras built in
11:02:21Zevvthat makes the difference between a good and a bad video in a lot of cases
11:04:25*sealmove quit (Quit: WeeChat 2.7)
11:04:59*gangstacat joined #nim
11:10:10*zyklon joined #nim
11:10:39FromDiscord_<Stuffe> @narimiran TLDR, both issues are about reallocation of global scope tables. But the second issue does not seem to be about aliasing and I guess therefore not covered by the "aliasing restrictions"
11:10:54FromDiscord_<Stuffe> but yeah, im kind of out of my depth here
11:11:32*azed joined #nim
11:15:15*jjido joined #nim
11:15:50federico3Araq: http://gallium.inria.fr/blog/incremental-cycle-detection/
11:22:40*solitudesf joined #nim
11:22:54*zedeus_ joined #nim
11:26:05*zedeus quit (Ping timeout: 258 seconds)
11:29:30*marmotini_ quit (Remote host closed the connection)
11:29:58*marmotini_ joined #nim
11:32:54*marmotini_ quit (Remote host closed the connection)
11:33:01*marmotini_ joined #nim
11:38:43ZevvStuffy: that was my guess as well, this can not be blamed at the user with a "your program is bad and you should feel bad"
11:46:15*marmotini_ quit (Remote host closed the connection)
11:46:42*marmotini_ joined #nim
11:51:25*marmotini_ quit (Ping timeout: 268 seconds)
11:51:42*marmotini_ joined #nim
11:52:38*zedeus_ is now known as zedeus
11:53:25FromDiscord_<clyybber> Thats a very weird bug
11:53:58FromDiscord_<clyybber> I don't see how its an aliasing violation even
11:55:06*fanta1 quit (Quit: fanta1)
11:55:23Zevvno it's not
11:56:06Zevvstuff happens in the table element assignment before the right hand side gets evaluated
11:56:13FromDiscord_<clyybber> yeah
11:56:16Zevvbut the RHS modifies the table and boom
11:56:16FromDiscord_<clyybber> thats weird
11:58:13FromDiscord_<clyybber> weird
11:58:19FromDiscord_<clyybber> it even happens with gc:arc
12:02:49Araqfederico3, I've read it and it doesn't apply
12:02:50Zevvyeah
12:03:55FromDiscord_<clyybber> Araq: Any idea why this table bug is happening?
12:10:42Araqit's the strict left-to-right evaluation
12:11:14*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:11:32Araq T7_ = X5BX5D___O79c8Iqf2AZWec1459bEWw8w(table__9a3nIawjo0hjT3Hb2gPQn0A, ((NI) 0));
12:11:34Araq (*T7_).id = returns123__vlPhGVpRevCYJR1PArTT5A();
12:12:13Araqwe compute the pointer too early
12:14:45*NimBot joined #nim
12:14:54Araqand evaluation is from left to right for calls.
12:15:17FromDiscord_<clyybber> we must special case `=` imo
12:15:32Araqthe root cause is 'a = b' is a bad legacy, write it as 'b -> a' # store b into a
12:15:44Araqand the problem disappears. it's magic
12:17:26FromDiscord_<clyybber> Even left-to-right would work, but we would have to go through another pointer indirection
12:17:36FromDiscord_<clyybber> IMO right to left for assignments is reasonable
12:17:56Araqnot only reasonable, it makes much more sense than left-to-right
12:18:00FromDiscord_<clyybber> Its not like custom `=` operators have any way on relying on the evaluation order
12:18:03FromDiscord_<clyybber> Araq: Yeah
12:18:23FromDiscord_<clyybber> It through me a bit off when I first discovered its LTR in assignments
12:18:51Araqwell it now would be a spec change :P
12:19:03Araqbut what's your solution for custom '='?
12:19:08FromDiscord_<Rika> bet people are gonna riot from it too
12:19:22FromDiscord_<Rika> "wtf?! why does nim use this for assignment instead of the norm?!?"
12:19:24Araqcustom '=' also has right-to-left evaluation?
12:19:31FromDiscord_<clyybber> yeah
12:19:43Araqhmm sounds tough to implement/ensure
12:20:14FromDiscord_<clyybber> This begs the qeustion though
12:20:30FromDiscord_<clyybber> a.add b would have to be RTL too in some cases
12:20:54FromDiscord_<clyybber> if b would access a
12:22:11FromDiscord_<clyybber> Maybe pointer indirection is the way to go
12:22:17FromDiscord_<clyybber> And when we prove its not needed
12:22:19FromDiscord_<clyybber> we leave it out
12:22:41Araqsounds terrible
12:22:56*rockcavera joined #nim
12:23:06FromDiscord_<clyybber> you have an better idea?
12:23:12Araqwe know that 'var T' is only 90% safe
12:23:26Araqwith borrowing rules we can make it 100% safe
12:23:37Araqand we have an RFC for that
12:23:48FromDiscord_<clyybber> which would forbid this case, right?
12:23:55Araqyeah
12:24:08FromDiscord_<clyybber> All I am proposing is, that instead of outright forbidding it, we store the LHS in a pointer
12:25:25Araqlook, a double indirection doesn't even solve it, you store addr(someSeq[i]) somewhere and then someSeq reallocates, classic bug
12:25:50Araqwhat are you gonna do? make the entries in the 'seq' a 'ref'?
12:25:53FromDiscord_<clyybber> add another one :p
12:26:06FromDiscord_<clyybber> no wait
12:26:34FromDiscord_<clyybber> hmmm
12:26:58Araqand also, if you make it "memory safe" by not destroying the old seq buffer, the assignment targets the wrong data
12:27:24Araqso the assignment has no effect, but it's "memory safe". bad solution
12:27:41Araqit's pretty much Go's solution afaik btw
12:27:52FromDiscord_<clyybber> yeah, I didn't think about that addr(someSeq[i]) case
12:28:10Araqwell that's what happens
12:29:21Araqit can be solved by "address stability"
12:29:45Araqinstead of a seq, use a "colony"
12:30:02Araqbut then s[i] isn't as easy to compute
12:30:11*floppydh quit (Quit: WeeChat 2.7)
12:31:00FromDiscord_<clyybber> Oh, can you explain how that works? I can't find any info on it
12:31:46Araqhttps://plflib.org/colony.htm
12:32:06*marmotini_ quit (Remote host closed the connection)
12:32:23*Xe is now known as Cadey
12:32:35*marmotini_ joined #nim
12:33:07*nsf quit (Quit: WeeChat 2.7)
12:34:48dadada_Araq: please keep lhs = rhs ... it would really throw me off (confuse me) if this basic syntax I know from nearly all languages that I've used, wouldn't work in nim ... and I think you'll make it harder for newbies to get familiar with the language quickly
12:34:49Araqbut I'm disliking closures more and more, they hide too much
12:35:42FromDiscord_<Rika> i really doubt they'd change it to x -> x
12:36:18dadada_it's not that people (including me) can't adjust, but I think there're good reasons why this syntax is common in so many languages, it's a natural notation you grow up with in math class
12:36:22Araqdon't worry, we have better things to do
12:36:39*dadada_ is now known as dadada
12:37:09Araqis it though? Math has no assignments, f(x) = x + 2 is the same as x + 2 = f(x)
12:37:22*marmotini_ quit (Ping timeout: 265 seconds)
12:38:03FromDiscord_<Rika> imagine if programming languages could assign from either side...
12:38:27FromDiscord_<Rika> this is just like the yoda conditionals some people do
12:38:30dadadaAraq: yes, but it's close enough ... first of all I wasn't thinking of math functions but rather something like x = y + 2
12:38:44Araqwell in C you can write i[a] instead of a[i], Rika.
12:39:21FromDiscord_<Rika> wh art
12:39:23FromDiscord_<Rika> what*
12:39:53FromDiscord_<Rika> dadada but y + 2 = x is equivalent
12:40:21FromDiscord_<Rika> any equation can be flipped at its eq sign
12:40:21dadadaRika: I don't know why people in here ALWAYS want to point out the obvious to me
12:40:33Araqdadada, x = x + 1 is also a classic example of how un-math-y it really is
12:40:54FromDiscord_<clyybber> @Rika Because in c its just a pointer addition
12:40:57Araqx = x + 1 is an unsolvable equation
12:41:00FromDiscord_<clyybber> multiplied by the size of the type
12:41:11FromDiscord_<Rika> oh arrays okay i see
12:41:17dadadaRika: CAN is differerent from the convention, the convention is that you put the value you want to calculate (ie. x) on the left side, and the stuff that you use to calculate is conventionally put on the right side
12:41:31dadadaRika: I don't know why people on IRC love to split hairs
12:41:39FromDiscord_<clyybber> Araq: uint1
12:41:51FromDiscord_<clyybber> who doesn't love cyclic groups
12:41:56Araqdadada, well anyway, '=' is an update, not an equation
12:42:14lqdev[m]equations are ==, tho
12:42:22Araqand Pascal used ':=' for the update operation
12:42:22lqdev[m]why would you change that
12:42:22*floppydh joined #nim
12:42:33FromDiscord_<Rika> no we're discussing something else
12:42:52*skelett quit (Quit: WeeChat 2.5)
12:43:02Araqand Pascal got the order wrong too, it should have been '3 + i =: i'
12:43:15FromDiscord_<clyybber> then again, if you do that
12:43:17Araqyou store the result of 3 + i inside the i.
12:43:27FromDiscord_<clyybber> and want to make a.add b() logical
12:43:41Araqin fact, I remember being confused about it when I learned it
12:43:45FromDiscord_<clyybber> you will never get LTR
12:43:49Araqbecause the order is wrong ;-)
12:43:53FromDiscord_<clyybber> unless a.add b() is a template
12:44:02dadadaAraq: I never said it was an equation! I just pointed out that there's a familiar structure, and sometimes x = 2 * 10 is an equation, that happens to work through updating/storing a value ... just not always ... also it depends on what you define as an equation
12:44:12dadadanever said it was a classical math equation
12:44:17Araqalright ok
12:44:24Araqbut the point remains
12:44:31FromDiscord_<clyybber> that expands to `inc a.len; b() -> a[a.len-1]`
12:45:41*floppydh quit (Client Quit)
12:46:15dadadaAraq: my main thing is, I want nim to become massively popular ... it shouldn't be too inconvenient to switch from JS/Java/Python/C++ to Nim and vice versa ... also I think we can use "->" for something better
12:46:41Araqdadada, relax please :-) I'm not gonna introduce ->
12:46:43FromDiscord_<clyybber> dadada: Don't worry mate. We wouldn't break literally all code that exists :p
12:46:47*couven92 quit (Ping timeout: 260 seconds)
12:47:05Araqbut it's very helpful to talk about it
12:47:15Araqto see where it leads us
12:47:23FromDiscord_<clyybber> Yeah
12:47:56Araqclyybber: x.add x[^1] is also really bad indeed, had a couple of bugs with it
12:48:01FromDiscord_<clyybber> Araq: Hmm, maybe sink parameters should be evaluated before non-sink ones?
12:48:01dadadayou never know, Araq is a very opinionated guy, which is a great trait in many cases... but breaking code/habits should generally be avoided
12:48:38Araqnah. Others have opinions, I have facts.
12:48:42FromDiscord_<clyybber> Araq: At least when we automatically determine that something is a sink param
12:49:04FromDiscord_<clyybber> Because sink params are then going to be stored somewhere
12:49:25FromDiscord_<clyybber> It would solve the `add` case
12:49:31Araqwhat you say makes sense but I'd rather have the compiler complain instead of re-order
12:49:34FromDiscord_<clyybber> But `=` still has to be special cased
12:50:09Zevv"Others have opinions, I have facts". I will save that one, I can probably use it every now and then
12:50:30Araqreordering is fine if the results is easy-to-follow and unique
12:50:37Araqbut I doubt it would be
12:51:48*floppydh joined #nim
12:51:59Araqso ... how do we know that returns_123 writes to 'table' ?
12:52:10Araqit could be a function pointer
12:52:15*floppydh quit (Client Quit)
12:52:31Araqand it's .noSideEffect because table is not global
12:52:45Araqthankfully we do know that it's a freaking .closure
12:52:56*couven92 joined #nim
12:53:55dadadaAraq: sorry, opinionated was the wrong word, not a native speaker here ... "independently thinking" would probably better fit what I wanted to express there
12:53:58*floppydh joined #nim
12:54:28Araqdadada, "opinionated" was spot-on too
12:55:16dadadaAraq: according to dict.cc it means starrsinnig or dogmenbehaftet in German, and I definitely didn't mean that!
12:55:45AraqZevv, speaking of which, my ARC improvements broke npeg
12:56:05Araqthere is still a serious bug left though that could have caused it
12:57:25*couven92 quit (Ping timeout: 240 seconds)
12:58:43Araqreplied with a workaround, if we get borrowing rules, the compiler will complain and make you write my workaround
12:59:09Araqwhich is a good solution and doesn't need us butcher our evaluation order rules
13:02:17*couven92 joined #nim
13:03:42*fredrik92 joined #nim
13:04:44*freddy92 joined #nim
13:06:50*couven92 quit (Ping timeout: 240 seconds)
13:07:04FromDiscord_<clyybber> Araq: Can you change the evaluation order with named params?
13:08:25*fredrik92 quit (Ping timeout: 240 seconds)
13:09:13*marmotini_ joined #nim
13:16:11ZevvAraq: something I can do to fix that, or should I just wait until it is fixed on the Nim side?
13:18:35Zevvhmm I don't see it, araq-arc-optimizations works just fine with npeg?
13:18:57Zevvoh right no indeed
13:19:12Zevvsigsegv even
13:28:29*endragor quit (Remote host closed the connection)
13:36:16*zahary joined #nim
13:43:01*dadada quit (Ping timeout: 255 seconds)
13:45:06*zahary quit (Quit: Leaving.)
13:48:25*dadada joined #nim
13:48:49*dadada is now known as Guest22335
13:57:09FromGitter<Varriount> Araq: I saw this earlier this week on Hacker News, and thought you might be interested: https://news.ycombinator.com/item?id=22372937
13:57:49FromDiscord_<clyybber> lol
13:57:58FromDiscord_<clyybber> its the third time this was sent to Araq now
14:00:55*marmotini_ quit (Remote host closed the connection)
14:01:02*marmotini_ joined #nim
14:01:25FromGitter<Varriount> Darn, I'm late to the game
14:02:06*Guest22335 quit (Ping timeout: 258 seconds)
14:03:20*dadada joined #nim
14:03:40*marmotini_ quit (Remote host closed the connection)
14:03:43*dadada is now known as Guest42903
14:04:06*marmotini_ joined #nim
14:08:56*marmotini_ quit (Ping timeout: 268 seconds)
14:12:13*fanta1 joined #nim
14:13:36*marmotini_ joined #nim
14:16:45*Guest42903 quit (Ping timeout: 240 seconds)
14:18:26*dadada_ joined #nim
14:24:35*floppydh quit (Quit: WeeChat 2.7)
14:26:13*fabian- quit (Ping timeout: 255 seconds)
14:31:41*jjido joined #nim
14:32:23*dadada_ quit (Ping timeout: 258 seconds)
14:33:16*dadada_ joined #nim
14:43:59*ptdel joined #nim
14:54:25FromDiscord_<Stuffe> Araq: I know this is probably a dumb noob question, but why is it so hard to have certain functions evaluate right to left? It could even be a pragma maybe?
14:54:50*tane joined #nim
15:15:03*endragor joined #nim
15:19:32*endragor quit (Remote host closed the connection)
15:26:02*MD87 quit ()
15:28:30*zahary joined #nim
15:32:23*marmotini_ quit (Remote host closed the connection)
15:32:49*marmotini_ joined #nim
15:36:43*Trustable joined #nim
15:37:44*marmotini_ quit (Ping timeout: 268 seconds)
15:37:55*marmotini_ joined #nim
15:46:12FromGitter<Varriount> Hm, in C++ it says that (just) for the assignment operator, expressions are grouped right to left
15:47:09FromGitter<Varriount> https://stackoverflow.com/questions/33598938/order-of-evaluation-of-assignment-statement-in-c
15:47:18FromGitter<Varriount> (ctrl+f, "update 2")
15:47:23*marmotini_ quit (Remote host closed the connection)
15:47:49*marmotini_ joined #nim
15:49:12*marmotini_ quit (Remote host closed the connection)
15:49:19*marmotini_ joined #nim
15:49:29disruptekhey zevv is back
15:49:31disruptekyou okay, buddy?
15:54:19*dddddd joined #nim
15:55:49AraqStuffe: it's not that hard but the spec decided on "left to right everywhere"
15:56:20FromGitter<rishavs> quick stupid question; ⏎ ⏎ ```type ⏎ myObj = ref object of RootObj``` ⏎ ⏎ and [https://gitter.im/nim-lang/Nim?at=5e4ffda4c2c73b70a44d4687]
16:00:40FromDiscord_<Rika> one is a ref
16:00:42FromDiscord_<Rika> the other isnt
16:00:49Araqthey do very different things and you should read a tutorial
16:01:22FromDiscord_<Rika> if you do a copy of a ref it doesnt copy the data, only the reference; the other will copy the data
16:02:06FromGitter<rishavs> Thanks. That makes sense
16:02:33*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:03:29*marmotini_ quit (Remote host closed the connection)
16:03:57*marmotini_ joined #nim
16:08:36*marmotini_ quit (Ping timeout: 258 seconds)
16:21:04AraqZevv, is it easy to extract a smaller example program that fails?
16:24:35*marmotini_ joined #nim
16:29:04*marmotini_ quit (Ping timeout: 255 seconds)
16:43:00*jjido joined #nim
16:48:10FromGitter<danielecook> Anyone know how to compile with a header? Not even sure if I'm speaking the right language here
16:48:36FromGitter<danielecook> But I want to add something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e5009e4ff00c664eed941de]
16:49:13FromGitter<danielecook> to prevent a compile error from occurring
16:52:42leorizeyou can emit that in, but why?
16:53:36FromGitter<danielecook> those symbols are missing on mac os
16:53:55FromGitter<danielecook> so not sure if I'm along the right lines here... but `-d: "fopen=fopen" in `nim.cfg`?
16:54:44Araqthose symbols are non-standard, import them or don't but don't mess around with the existing Nim library
16:55:02*solitudesf quit (Remote host closed the connection)
17:02:00*zahary quit (Quit: Leaving.)
17:03:59FromDiscord_<Stuffe> Araq: I don't think it is even theoretically possible to swap the order of two turing complete statements that can reference each other and guarantee the same resulting state
17:04:39FromDiscord_<Stuffe> kind of seems like it has to be evaluated in the correct order, or it will forever be buggy
17:04:44Araqhuh?
17:05:55FromDiscord_<Stuffe> I mean the right hand side has to be evaluated first if it can run something turing complete and can reference the left hand side
17:06:32leorizedanielecook: you can modify whatever wrapper you're using to use the right symbols on macos
17:06:33FromDiscord_<Stuffe> i mean i obviously have no clue how all this is implemented
17:06:40leorizeinstead of that define mess
17:07:13FromGitter<danielecook> leorize thanks - but I have no idea what I am doing!
17:07:19FromGitter<danielecook> I should prob. go learn C at this point
17:07:29FromGitter<danielecook> but basically I am getting this error when building something
17:07:56FromGitter<danielecook> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e500e6c4880f07ed1ed8ef3]
17:08:43FromGitter<danielecook> I think it's b/c of this library: https://github.com/richgel999/miniz
17:09:10leorizeit probably doesn't support macos
17:09:18FromGitter<danielecook> So how would I modify nim.cfg or the nimble file to add (rename?) these symbols
17:09:21leorizeor the nim wrapper of it that you use doesn't
17:09:54FromGitter<danielecook> https://stackoverflow.com/questions/4003479/how-to-enable-large-file-support-under-darwin
17:10:08FromDiscord_<Stuffe> What I meant was it is not possible to ensure that calling fun_a() then fun_b() will have the same result as calling fun_b() then fun_a(). Given a turing complete langauge
17:11:18FromGitter<danielecook> Also related I believe https://github.com/richgel999/miniz/issues/26
17:11:20disbotUndefined symbols for 64-bit variants of stdio functions on Mac OS X ; snippet at 12https://play.nim-lang.org/#ix=2cjO
17:11:32leorizeyea this is why you never copy paste code from stackoverflow :P
17:11:46Araqas a rule of thumb, when you say "Turing complete" you got it wrong
17:12:11Araqit's true this time too, so enforce some static restrictions
17:12:21Araqin order to prove what you need to
17:13:04leorizedanielecook: the library doesn't support osx
17:13:17leorizeyou shouldn't use it
17:13:19FromGitter<danielecook> ok got it
17:13:23FromGitter<danielecook> I'll move on
17:13:36FromGitter<danielecook> Thanks for looking into it
17:22:54FromDiscord_<Stuffe> But Araq the left hand side is ristricted sure, I don't know what goes on under the hood. But the right hand side can be the result of a function call, so it surely is turing complete. And since the right hand side can change the state that the left hand side needs to know, you end up in an impossible situation. I know I am just restating the problem that you already know. But I guess my point is following causal order of evaluation is real
17:24:17FromDiscord_<clyybber> you mean causal as in evaluate right HS before the LHS?
17:24:25FromDiscord_<Stuffe> yes
17:24:30FromDiscord_<clyybber> I agree
17:24:41FromDiscord_<clyybber> but we have toe extend it to add too I *think*
17:24:49FromDiscord_<clyybber> like `a.add b()`
17:25:09FromGitter<kaushalmodi> A big shoutout to @Vindaar 's awesome ggplotnim package. It draws amazing plots.
17:25:15FromGitter<kaushalmodi> !repo ggplotnim
17:25:16disbothttps://github.com/Vindaar/ggplotnim -- 9ggplotnim: 11A port of ggplot2 for Nim 15 31⭐ 2🍴
17:25:17FromDiscord_<clyybber> agreed
17:26:19FromDiscord_<clyybber> I'm not RTL evaluation is needed for add too though
17:26:26FromDiscord_<clyybber> *not sure
17:26:40FromGitter<kaushalmodi> It helped me create a potpie of SystemVerilog/C interface, MATLAB->C exported FFT calc libs, my Nim code and ggplotnim and create awesome FFT plots 🎉
17:27:46FromDiscord_<Stuffe> clyybber: I guess it depends on how well the left hand side is restricted
17:29:37FromDiscord_<Stuffe> But you can prove that you can't know for any arbitrary function if it will cause a global table to reallocate
17:32:03FromDiscord_<clyybber> I think the best way to solve this is to evaluate sink arguments first
17:32:07FromDiscord_<clyybber> before all other args
17:32:23*krux02 quit (Remote host closed the connection)
17:32:46FromDiscord_<clyybber> Or make it error
17:33:07FromDiscord_<clyybber> Araq: Do you have these rules written down somewhere?
17:33:23FromDiscord_<clyybber> Those who would detect this case
17:40:23*sagax quit (Remote host closed the connection)
17:46:40*ikan-keli_2 joined #nim
17:46:44*ikan-keli_ quit (Ping timeout: 248 seconds)
17:48:58*Trustable quit (Remote host closed the connection)
18:00:05*methsex joined #nim
18:06:02*methsex quit (Quit: -a- IRC for Android 2.1.53)
18:08:47*marmotini_ joined #nim
18:09:03*marmotini_ quit (Remote host closed the connection)
18:09:35*marmotini_ joined #nim
18:09:52*marmotini_ quit (Remote host closed the connection)
18:10:27*marmotini_ joined #nim
18:10:32*marmotini_ quit (Remote host closed the connection)
18:10:45*marmotini_ joined #nim
18:11:40*lqdev[m] quit (Ping timeout: 252 seconds)
18:11:40*planetis[m] quit (Ping timeout: 252 seconds)
18:11:47*k0mpjut0r quit (Ping timeout: 240 seconds)
18:11:49*leorize[m] quit (Ping timeout: 248 seconds)
18:11:58*hohlerde quit (Ping timeout: 245 seconds)
18:11:59*unclechu quit (Ping timeout: 245 seconds)
18:12:04*silvernode[m] quit (Ping timeout: 246 seconds)
18:12:08*s87651[m] quit (Ping timeout: 240 seconds)
18:12:08*grantmwilliams quit (Ping timeout: 240 seconds)
18:12:10*BitPuffin quit (Ping timeout: 240 seconds)
18:12:21*oswin[m] quit (Ping timeout: 248 seconds)
18:12:21*Yardanico[m] quit (Ping timeout: 248 seconds)
18:12:22*salotz[m] quit (Ping timeout: 248 seconds)
18:12:23*pqflx3[m] quit (Ping timeout: 245 seconds)
18:12:24*vycb[m] quit (Ping timeout: 246 seconds)
18:12:24*freepump[m] quit (Ping timeout: 246 seconds)
18:12:25*watzon[m] quit (Ping timeout: 252 seconds)
18:12:26*Demos[m] quit (Ping timeout: 256 seconds)
18:12:26*pigmej quit (Ping timeout: 256 seconds)
18:12:26*GitterIntegratio quit (Ping timeout: 256 seconds)
18:12:37*skrylar[m] quit (Ping timeout: 260 seconds)
18:12:37*d-nice2[m] quit (Ping timeout: 260 seconds)
18:13:47*Jjp137 quit (Quit: Leaving)
18:14:09*Jjp137 joined #nim
18:17:33*hohlerde joined #nim
18:17:39disruptekima stream as i muddle through this testing project.
18:21:09*pqflx3[m] joined #nim
18:24:42*d-nice2[m] joined #nim
18:24:43*skrylar[m] joined #nim
18:29:54*planetis[m] joined #nim
18:30:54*planetis[m] quit (Client Quit)
18:30:56*skrylar[m] quit (Quit: killed)
18:30:56*d-nice2[m] quit (Quit: killed)
18:30:56*pqflx3[m] quit (Quit: killed)
18:30:58*hohlerde quit (Quit: killed)
18:32:20FromGitter<Vindaar> @kaushalmodi thanks for the kind words! Glad you enjoy it :)
18:32:38disruptekplease propose a name for a new unittest module.
18:36:00FromDiscord_<Rika> testunit
18:36:03FromDiscord_<Rika> 🙂
18:36:45disruptekhah.
18:38:37disruptek!search testing framework reusable
18:38:38disbothttps://github.com/status-im/nim-chronicles/issues/71 -- 3Extract the testing framework used in nim-chronicles into a more reusable library 7& 1 more...
18:40:35FromGitter<kaushalmodi> disruptek: watchmen
18:41:27disruptekit's kind a bad sign that `nimble test` doesn't actually work with this testing framework.
18:42:07disruptekFinished run: 47/53 tests successful
18:45:46*dadada_ quit (Ping timeout: 258 seconds)
18:46:49disruptekwatchmen?
18:47:01disruptekbeholder
18:58:43*chemist69 quit (Ping timeout: 272 seconds)
18:59:07*chemist69 joined #nim
19:02:33FromDiscord_<Yepoleb> hi, could someone please make this example work for me? https://play.nim-lang.org/#ix=2cke
19:02:42*BitPuffin joined #nim
19:03:10FromDiscord_<Yepoleb> i can't figure out how to pass the * to the macro
19:04:10disruptekthere's a newExportedIdent proc iirc, or you can use postfix().
19:07:01Araqclyybber: no, but Rust figured it out for us
19:09:49*sagax joined #nim
19:12:40FromDiscord_<Yepoleb> So there's no simple way to use the * already part of the argument?
19:13:34leorizeyea, unless the parser is updated to handle that
19:18:29FromDiscord_<clyybber> Araq: But rust is also very ristrictive
19:18:40FromDiscord_<clyybber> restrictive
19:19:24FromDiscord_<clyybber> disruptek: Where are you streaming?
19:22:29Zevvdisruptek: all is fine here. I was never gone, just lots of stuff going on
19:22:41disruptek👍
19:25:28*Yardanico[m] joined #nim
19:25:28*planetis[m] joined #nim
19:25:29*pigmej joined #nim
19:25:29*salotz[m] joined #nim
19:25:29*k0mpjut0r joined #nim
19:25:29*unclechu joined #nim
19:25:29*Demos[m] joined #nim
19:25:29*lqdev[m] joined #nim
19:25:29*GitterIntegratio joined #nim
19:25:29*leorize[m] joined #nim
19:25:35*oswin[m] joined #nim
19:25:35*skrylar[m] joined #nim
19:25:35*d-nice2[m] joined #nim
19:25:35*grantmwilliams joined #nim
19:25:35*s87651[m] joined #nim
19:25:35*hohlerde joined #nim
19:25:35*silvernode[m] joined #nim
19:25:35*freepump[m] joined #nim
19:25:35*watzon[m] joined #nim
19:25:36*pqflx3[m] joined #nim
19:25:36*vycb[m] joined #nim
19:36:58*ofelas quit (Quit: shutdown -h now)
19:41:21*krux02 joined #nim
19:42:39disruptekclyybber: the dog demands a trip to the park, but then i'll try twitch again.
19:45:33*hax-scramper joined #nim
19:50:03rayman22201@Zevv, I had a thought about Arduino support. Nim has good VSCode support, and Arduino IDE has a "beta" CLI interface that has good VSCode support. It stands to reason, that you could set up a good experience for Arduino with Nim using VSCode: https://learn.sparkfun.com/tutorials/efficient-arduino-programming-with-arduino-cli-and-visual-studio-code/all
19:50:57rayman22201might be easier than fighting embedded C language zealots :-P
19:52:06FromDiscord_<clyybber> disruptek: Cool
19:55:45Zevvrayman22201: sounds like a better solution than the hack I'm using now, but I guess the arduino CLI support uses the same tools under the hood as the arduino IDE, so I guess it makes sense to just whip up a dedicated Nim/arduino build tool and plug that in vscode instead
19:56:15rayman22201exactly. I agree
19:56:59rayman22201still a hack, but a slightly better hack
19:57:55Zevvbut then again, it probably makes sense to just use normal make files and only add some glue to make use of arduino libs
19:58:08Zevvbecause those libs is the only reason to do arduino stuff anyway
20:01:11rayman22201true. I don't disagree. The whole point of arduino is the nice noob friendly libs. My point is that it is probably better to focus on making VSCode work well, instead of trying to fight with the Arduino IDE.
20:01:32Zevv"pick your fights"
20:01:36rayman22201yup
20:01:50ZevvI actually kind of abandoned that effort
20:02:20rayman22201I saw the thread on the Arduino forum. That's what gave me this idea.
20:02:25Zevvno reply from the arduino IDE author mailing list, and on the Arduino forum there was an old hog whining and nitpicking about how bad Nim must be
20:02:27rayman22201It was a good effort :-P
20:02:52rayman22201I was very sad when I saw it, but not too surprised.
20:03:04ZevvI never promised him a rose garden
20:03:34Zevvso I didn't even bother about telling him about metaprogramming, CTFE and all the other nasty stuff we do
20:03:36rayman22201He literally ignored you, and continued to rant
20:03:48ZevvI was proud of myself
20:03:54Zevvsitting on my hands and biting my tongue instead
20:04:05rayman22201lol, yes
20:04:26FromDiscord_<Elegant Beef> I'd personally rather shit on my hands and clap, then post on any forum for a language/hardware
20:04:45FromDiscord_<Elegant Beef> People are too connected to their tools to care
20:05:35nullwarpthats... descriptive - but i completely agree
20:06:25FromDiscord_<Elegant Beef> lol
20:06:32FromDiscord_<Elegant Beef> All in good fun
20:07:31Zevv:)
20:08:01rayman22201anyway. I think a VSCode based "Nimduino" is a cool idea, and good marketing for Nim. Another project to add to my "eventually I hope to have time to get around to it" pile. Or hope someone like Zevv gets there first :-P
20:09:07ZevvNaah, my attention span has passed I'm afraid
20:09:14Zevv"it works", meh
20:09:36lqdev[m]meanwhile me, not giving a single crap about the "ez" arduino stuff and implementing LCD display drivers myself…
20:09:46lqdev[m]and frying LCD displays since 2019
20:09:51ZevvI always did it myself
20:10:02rayman22201lol. You are the best of us
20:10:09ZevvI can't be seen with arduinos or raspberries at day time
20:10:29lqdev[m]I don't like when a library abstracts away the low level details and keeps control away from me :)
20:10:31rayman22201the "real grown up embedded devs"
20:10:48Zevvto be honest, the low level stuff is the most fun part of doing embedded
20:10:57Zevvas soon as the controlling works, the rest is again "just software"
20:11:04*Jesin joined #nim
20:11:06lqdev[m]I agree with Zevv
20:11:16lqdev[m]low level is the fun part
20:11:31lqdev[m]figuring out all the timings, switching each pin on or off
20:11:37lqdev[m]this is the real stuff
20:11:59FromDiscord_<Elegant Beef> My favourite part about arduino is buying one and putting it in my closet for 5 years
20:12:00Zevvheat should be dissipated by mechanical means
20:12:01lqdev[m]I don't do much embedded programming, though
20:12:09*dadada joined #nim
20:12:32*dadada is now known as Guest62848
20:13:14lqdev[m]especially since I fried my ATmega328p and can't be bothered to buy another one.
20:13:25rayman22201"heat should be dissipated by mechanical means" quote of the day lmao
20:13:47FromDiscord_<Elegant Beef> I fried one of my ardiunos accidently sending a 24v drill battery straight through iit
20:13:54FromDiscord_<Elegant Beef> polarity is a hell of a drug
20:15:02lqdev[m]ah yes, inverse polarity is how I fried my chip :)
20:15:26FromDiscord_<Elegant Beef> ah we're brothers now
20:15:26lqdev[m]I probably shouldn't be smiling but whatever
20:15:51ZevvAfter 25 years I tend to get more careful with that. I don't want to know for how much money I have fried electronics in my career, but I'm sure you could buy a nice car for that
20:15:53lqdev[m]nice.
20:16:19lqdev[m]dude
20:16:43FromDiscord_<Elegant Beef> I tend to not fry electronic as much as mechanically break them then pooch them when i attempt to repair them
20:16:45lqdev[m]at least that ATmega328p isn't that expensive, y'know
20:16:46FromDiscord_<Elegant Beef> Headsets mainly
20:17:09*abm quit (Quit: Leaving)
20:17:13lqdev[m]lol
20:17:24FromDiscord_<Elegant Beef> do have to say if you like user servicable headsets superlux hd610s are super easy to repair
20:17:41ZevvOne of my coolest fries was a custom made chip. We did the software side bringup in simulated verilog, then one day the real first spin came in. Cardboard box the size of a fridge, filled with empty boxes expecpt for one. Recurse down three levels with empty boxes until we come to the tray of chips, 14 of them.
20:18:01ZevvThe whole company in a circle around me. I open the tray, pick the first chip and place it in the ZIF Socket
20:18:08Zevv- 90 degrees rotated -
20:18:11Zevvand power up the rig
20:18:30Zevvthose were the days
20:18:49FromDiscord_<Elegant Beef> Then you loudly say "And god said let there be smoke, and there was"
20:18:54disruptekwow.
20:18:55FromDiscord_<Elegant Beef> Releasing the magic smoke is a skill
20:19:27ZevvThe best part was this colluege who loudly clapped his hands once at the exact moment I switched on the power supply
20:19:39Zevvwe still work together these days, and we still do that to each other
20:19:52Zevvslowly - carefully - *CLAP*
20:19:54lqdev[m]a few months ago the dumbass inside me thought it'd be a great idea to keep an uncapped bottle of water right next to my amplituner, boy was I scared when I accidentally hit the bottle with my hand and the amp switched off
20:20:02lqdev[m]fortunately it's still working
20:20:09ZevvOh switched off, lucky you :)
20:20:52lqdev[m]yeah, I think it spilled mainly on the heatsink inside, but also tripped a fuse or something. idk
20:21:10FromDiscord_<Elegant Beef> My one friend was working on gambling machines, and accidently exploded a diode which scare the shit outta everyone nearby, he also once grabbed a hot air gun in a pencil grip on the tip
20:21:42disrupteki always look for an opportunity to hit the horn while a minion is pouring brake fluid into the reservoir.
20:21:56ZevvExploding big capacitors on purpose is also fun. Reverse polarization and double the max voltage. Count to three and *sizzleBOOMsmokesmelll*
20:22:22lqdev[m]yes
20:23:00FromDiscord_<Elegant Beef> well everytime i've released magic smoke, my reaction has always been "Well shit, what did i do wrong"
20:23:02Zevvdisruptek: I think these guys end up totally reistant to that
20:23:28disrupteki dunno, it's one of those things you never expect.
20:23:32FromDiscord_<Elegant Beef> like one time i shorted a bluetooth speakers battery terminals trying to make it not useless, and that uhh was illadvised
20:23:46FromDiscord_<Elegant Beef> Who measures amperage in vs out
20:23:51FromDiscord_<clyybber> I replaced a fuse on my DS I lent to my cousin cause she charged it with a bad charger
20:23:52FromDiscord_<Elegant Beef> *smart people that's who*
20:24:04FromDiscord_<Elegant Beef> Now we know you're lying
20:24:05FromDiscord_<clyybber> and by replace I mean: I didn't have a replacement and just bridged it
20:24:14FromDiscord_<Elegant Beef> no one has the security drivers
20:24:16FromDiscord_<Elegant Beef> 😛
20:24:28FromDiscord_<clyybber> next time I lent it to her I gave her a good charger
20:24:36FromDiscord_<clyybber> but she still managed to use the bad one
20:24:41FromDiscord_<clyybber> and now my DS is roast
20:24:50FromDiscord_<clyybber> and her floor too
20:24:51FromDiscord_<Elegant Beef> I wonder if fuses exist for a reason...
20:24:59FromDiscord_<clyybber> well, I didn't see one
20:25:07FromDiscord_<clyybber> no stupid -> no fuse
20:25:15lqdev[m]so when I plugged in my AVR with reverse polarity my first reaction was, "hey, why's the LED not blinking". after debugging for 5 minutes, I saw that I swapped my + and - cables, thought "oh shit", and immediately went to unplug the entire programmer
20:25:19FromDiscord_<clyybber> fuse -> stupid?
20:25:28FromDiscord_<Elegant Beef> I mean it probably wasnt the charger that did it, more the ds was pooched
20:25:29lqdev[m]what's weird is that there was no magic smoke, the chip just died.
20:25:46*neceve quit (Ping timeout: 255 seconds)
20:25:56FromDiscord_<clyybber> @Elegant Beef nah the charger was too *strong*
20:26:02FromDiscord_<Elegant Beef> Even the proper one?
20:26:05FromDiscord_<clyybber> no
20:26:07FromDiscord_<clyybber> that one worked
20:26:17FromDiscord_<clyybber> she used a usb to ds-power cable
20:26:22FromDiscord_<clyybber> and plugged it into her phone charger
20:26:24FromDiscord_<clyybber> bad idea
20:26:40Zevvbut sorry for talking #nim here: how did ryu go?
20:26:49FromDiscord_<clyybber> it works
20:26:51lqdev[m]uh oh
20:27:04Zevvsweet. Will it go into the stdlib?
20:27:13FromDiscord_<clyybber> leorize is still working on a nim reimplementation from scratch
20:27:24FromDiscord_<clyybber> Zevv: My version probably not
20:27:29Zevvoh is yours not good enough?
20:27:35FromDiscord_<Elegant Beef> @clyybber next get interfaces implemented to araq's satisfaction 😄
20:27:38FromDiscord_<clyybber> its a straight up port
20:27:44FromDiscord_<clyybber> so it uses those tables
20:27:48Zevvso what
20:27:49FromDiscord_<clyybber> and is very fast
20:27:57FromDiscord_<clyybber> Araq doesn't like those tables
20:28:00Zevvdo we want to generate these tables every run?
20:28:15disruptekthey are constants.
20:28:34FromDiscord_<clyybber> They can be a bit big
20:28:38FromDiscord_<clyybber> 4kb or something
20:28:49FromDiscord_<clyybber> I dunno if thats a good idea with embedded and stuff
20:28:51Zevvyeah, who cares? If you generate them at CT they are still in the binary
20:29:03Zevvyou need them for an efficient runtime I guess
20:29:17Zevvand for embedded I'd rather use my good'ole printf() implementation
20:29:27FromDiscord_<clyybber> heh
20:29:28disruptekit's really not a big deal to include the size-optimized ones.
20:29:37FromDiscord_<clyybber> aight
20:29:41disruptekif you don't want them, don't use ryu.
20:29:54FromDiscord_<Elegant Beef> arent you talking about int128?
20:29:58disruptekspace and time, the eternal tradeoff.
20:29:59FromDiscord_<clyybber> nah
20:30:01FromDiscord_<clyybber> its not needed
20:30:25FromDiscord_<Elegant Beef> disruptek it's a continuium not a trade off
20:30:38disruptekit's a continuum of tradeoffs.
20:30:48Zevvlife is
20:30:48disruptekalso there are some goats in there.
20:31:24FromDiscord_<clyybber> Zevv: Maybe its faster than printf even when we eliminate those tables
20:31:43disruptekit will be.
20:31:52FromDiscord_<clyybber> sure?
20:31:58disruptekyes.
20:32:02FromDiscord_<clyybber> how come?
20:32:07Zevvif not, there is really no use for the whole thing, right?
20:32:17disruptekbecause it's a fundamentally smarter approach.
20:32:19FromDiscord_<clyybber> Zevv: There is
20:32:34FromDiscord_<clyybber> its prints the minimum viable string representation
20:32:35Zevvoh yeah it's the more precise representation
20:32:39FromDiscord_<clyybber> that can still do the roundtrip
20:33:15FromDiscord_<clyybber> Zevv: https://github.com/Clyybber/nimryu/
20:34:42Zevvthanks
20:34:57FromDiscord_<Elegant Beef> *how expensive are logs?*
20:35:08Zevvabout 20 bucks
20:35:10FromDiscord_<Elegant Beef> i see the decimal length and it hurts!
20:35:37FromDiscord_<Elegant Beef> floor(log10(val)) +1 tells you decimals! 😄
20:35:59FromDiscord_<Elegant Beef> floor(log10(val)) +1 tells you digits! 😄
20:36:02FromDiscord_<Elegant Beef> *digits*
20:36:09FromDiscord_<clyybber> hey
20:36:14FromDiscord_<clyybber> its a *faithful* port
20:36:20FromDiscord_<clyybber> :p
20:36:31FromDiscord_<Elegant Beef> idk i dont like multiple if statements
20:36:38FromDiscord_<clyybber> me neither
20:36:42FromDiscord_<clyybber> should be a case
20:36:43FromDiscord_<clyybber> of
20:36:44*lritter quit (Quit: Leaving)
20:36:44FromDiscord_<clyybber> thing
20:36:55FromDiscord_<clyybber> lemme do that real quick
20:36:59FromDiscord_<Elegant Beef> i mean i dont like that either
20:37:05FromDiscord_<Elegant Beef> still too much repetition
20:37:10FromDiscord_<clyybber> me neither but its faster than log10
20:37:13FromDiscord_<Elegant Beef> yea i know
20:37:21FromDiscord_<Elegant Beef> but i like my sanity over performance
20:37:22FromDiscord_<Elegant Beef> 😛
20:37:33FromDiscord_<clyybber> ryu has given that up a long time ago
20:37:55FromDiscord_<clyybber> oh wait
20:38:01FromDiscord_<clyybber> a case thing aint working here
20:38:56FromDiscord_<Elegant Beef> damn there is a log approximation but it's `x^x`
20:39:00FromDiscord_<Elegant Beef> so inotherwords deadly
20:39:01FromDiscord_<clyybber> you ever been *round-tripping*?
20:39:17FromDiscord_<Elegant Beef> i mean i walk to my fridge and back to get water
20:39:18*fanta1 quit (Quit: fanta1)
20:39:18FromGitter<matrixbot> `BarrOff` Hello, is there a way to interpret variables as another type? I mean like having a float64 and interpreting it as an uint64? I don't need a conversion, where the bits of the number change. In the example above you would take the bits of the float and act on them as if they were an uint64
20:39:33FromDiscord_<clyybber> cast
20:39:52FromDiscord_<clyybber> cast[uint64](someFloat64)
20:49:53*marmotini_ quit (Remote host closed the connection)
20:50:25*marmotini_ joined #nim
20:54:57*marmotini_ quit (Ping timeout: 258 seconds)
20:56:19*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:58:22FromGitter<Varriount> The most "embedded" system I worked with was a CRIO system for FRC robotics
21:01:07*freddy92 quit (Read error: Connection reset by peer)
21:01:25*zahary joined #nim
21:01:30*freddy92 joined #nim
21:04:41*filcuc_ joined #nim
21:09:35*freddy92 quit (Read error: Connection reset by peer)
21:09:52*hax-scramper quit (Ping timeout: 255 seconds)
21:10:03*freddy92 joined #nim
21:11:10*filcuc_ quit (Remote host closed the connection)
21:11:43*Guest62848 quit (Ping timeout: 272 seconds)
21:13:56*filcuc joined #nim
21:16:21disrupteki think i'm round trippin' right now.
21:17:22*hax-scramper joined #nim
21:17:52*dadada joined #nim
21:18:16*dadada is now known as Guest8076
21:20:25*narimiran quit (Ping timeout: 240 seconds)
21:21:05*jjido joined #nim
21:26:52*krux02 quit (Remote host closed the connection)
21:32:42leorizeit appears to me that ryu supports multiple rounding mode
21:32:49leorizewhat should we use then?
21:33:04leorizeclyybber, disruptek: ^
21:34:30CadeyVarriount: back in the day I ported LOLCODE to a cRIO for FRC
21:34:39disruptekwhatever passes the tests, to start.
21:41:39*fabian joined #nim
21:42:47FromDiscord_<Elegant Beef> is the glitter bot OSS?
21:43:36FromDiscord_<Elegant Beef> would be cool to implement a [nickname] that mentions discord users from irc
21:43:51disruptekwhat?
21:44:19FromDiscord_<Elegant Beef> In discord if you @Elegant Beef it pings them with a notification
21:44:35FromDiscord_<Elegant Beef> using the [nickname] would look up if users have that nickname and if so ping them
21:44:55disruptekthis doesn't ping @Elegant Beef ?
21:44:59FromDiscord_<Elegant Beef> nop
21:45:05FromDiscord_<Elegant Beef> nope*
21:45:12FromDiscord_<Elegant Beef> Lacks the #5502
21:45:14disbothttps://github.com/nim-lang/Nim/pull/5502 -- 6don't allow casting to non-concrete types; fixes #5428
21:45:27disruptekor, you could just use irc.
21:45:31FromDiscord_<Elegant Beef> lol
21:45:38disruptekoh, forgot to stream.
21:45:43FromDiscord_<Elegant Beef> also bot over sensitive
21:46:04FromDiscord_<Elegant Beef> try `@Elegant Beef#5502`
21:46:19FromDiscord_<Elegant Beef> Im curious if it'd properly interpret that
21:46:24disrupteki can't even render my own stream.
21:46:30disruptekhttps://www.twitch.tv/disruptek
21:46:34disruptekmaybe it's my browser.
21:46:45FromDiscord_<Elegant Beef> works for me
21:46:49FromDiscord_<Elegant Beef> in chrome
21:47:28*filcuc quit (Ping timeout: 258 seconds)
21:47:29FromDiscord_<Elegant Beef> I have no clue how you live with those notifications for that long
21:47:42disrupteki can dismiss them.
21:47:53leorizeYardanico is working on a Nim-based discord bot
21:48:03leorizeit's already running in the offtopic channel iirc
21:48:24FromDiscord_<Elegant Beef> is the source open or should i just suggest the idea 😄
21:48:34*fabian quit (Quit: Using Circe, the loveliest of all IRC clients)
22:03:41ZevvWe hear you - it's very comforting
22:04:19disruptekso why can't i see you
22:04:24disrupteksay something int he chat.
22:04:29disruptekmaybe the bot is busy.
22:04:33ZevvI have no clue - this is as new for me as it is for you
22:04:57disruptekdoes no one use this?
22:05:01*zickzackv joined #nim
22:05:17ZevvAlso I have not been paying attention, to be honest :) I'm lost in my own problems already
22:05:34*zickzackv quit (Remote host closed the connection)
22:05:58*zickzackv joined #nim
22:09:40*rhenvar joined #nim
22:24:52leorizeyay my basic float to string converter worked!
22:25:02disruptekneat.
22:25:11disruptekthat's awesome progress.
22:28:38FromDiscord_<Elegant Beef> i'd love to believe it's just $float
22:29:34leorize$float gives you this: 7.174999999999999e-43
22:29:41leorizemy converter gives you this: 7.17E-43
22:29:51leorizenow I just gotta understand how this stuff even works
22:30:05FromDiscord_<Elegant Beef> can you specify sig digs?
22:30:55leorizethe paper relies on the reader to be an expert in floating point :P
22:31:17leorizeyou can't atm but I think I can make it do so
22:32:11FromDiscord_<treeform> nim's float32 formatting is bad. I think it cats float32 to float64 and prints it which is wrong...
22:32:15FromDiscord_<treeform> casts*
22:41:13*filcuc joined #nim
22:42:49*filcuc quit (Client Quit)
22:43:03*filcuc joined #nim
22:43:11FromGitter<Varriount> leorize: Ah the old "I don't know how this works, but I do know how to translate it" scenario?
22:44:06leorizeyea :P
22:44:50leorizeI gotta read more on the entire proof of that algo
22:47:37*filcuc quit (Read error: Connection reset by peer)
22:47:45disruptekyou are clearly getting it.
22:47:50*filcuc joined #nim
22:47:53disruptekyou are our expert, afaic.
22:49:54FromDiscord_<Elegant Beef> "Our expert", way to insight screaming and running
22:49:59FromDiscord_<Elegant Beef> Can i be the resident village idiot?
22:52:12disruptekthat position is taken.
22:57:54*filcuc quit (Quit: Konversation terminated!)
22:58:09*filcuc joined #nim
23:03:02*filcuc quit (Quit: Konversation terminated!)
23:03:16*filcuc joined #nim
23:08:15*filcuc quit (Quit: Konversation terminated!)
23:08:25*filcuc joined #nim
23:10:03disruptek!repo disruptek/testutils
23:10:05disbothttps://github.com/disruptek/testutils -- 9testutils: 11testrunner et al 15 0⭐ 0🍴
23:11:07FromDiscord_<Elegant Beef> disruptek who do i have to armwrestle to get that position?
23:11:25disruptek👍this guy👍
23:12:41FromDiscord_<Elegant Beef> Well ill untie my moose and ill head down, where you again?
23:12:45FromDiscord_<Elegant Beef> where are you*
23:16:52disrupteki'm outside philly, but moving to vegas soon.
23:17:22disruptektreeform: i will sort the audio out before next stream; thanks for the help.
23:18:11FromDiscord_<Elegant Beef> quite far from me
23:18:15FromDiscord_<Elegant Beef> My moose is retied up
23:20:07*freddy92 quit (Read error: Connection reset by peer)
23:20:33*freddy92 joined #nim
23:23:38*filcuc quit (Quit: Konversation terminated!)
23:23:51*filcuc joined #nim
23:24:03FromDiscord_<Recruit_main70007> How can I access the magnification api or the header?
23:24:03FromDiscord_<Recruit_main70007>
23:24:03FromDiscord_<Recruit_main70007> https://docs.microsoft.com/en-us/previous-versions/windows/desktop/magapi/magapi-intro
23:24:48disruptekthat's the url i use.
23:26:56FromDiscord_<Recruit_main70007> How?
23:27:42disrupteki mean, when i want to read about 32-bit-only windows extensions. that's the one i go to.
23:32:49FromDiscord_<Recruit_main70007> But that’s a comment aside, not an answer right?
23:32:49FromDiscord_<Recruit_main70007> I’m sorry, but it’s a bit late here 😅
23:32:53*filcuc quit (Ping timeout: 258 seconds)
23:32:54FromGitter<Varriount> disruptek: Come to the east coast. Then we can meet up
23:33:08disruptekthe east coast of where?
23:33:13FromGitter<Varriount> US
23:33:26disruptekvegas calls.
23:33:32FromDiscord_<Elegant Beef> disruptek doesnt tend to provide helpful insight 90% of the time, just jesting comments
23:33:33disruptekwhere are you?
23:33:46FromGitter<Varriount> I live in Virginia
23:34:23FromGitter<Varriount> I get to be next-door neighbors with Maryland and DC. Woo!
23:34:54disruptekcould be worse.
23:35:00FromDiscord_<Elegant Beef> i feel like "and DC" is negligable, it's a single city 😄
23:35:44FromGitter<Varriount> Yes, but it's the nation's capital.
23:36:47*xet7 quit (Remote host closed the connection)
23:42:07*freddy92 quit (Read error: Connection reset by peer)
23:42:31*freddy92 joined #nim
23:43:28FromGitter<Varriount> disruptek: Well, there's a non-zero chance that I'll be flying to California sometime this year, so perhaps we can meet up then.
23:43:42FromGitter<Varriount> Or if you're dragged to Virginia or DC
23:45:37*xet7 joined #nim
23:46:53*zickzackv quit (Ping timeout: 272 seconds)
23:50:58*Guest8076 quit (Ping timeout: 255 seconds)