<< 17-08-2020 >>

00:11:30*awe002 quit (Ping timeout: 260 seconds)
00:38:33FromDiscord<Recruit_main707> So, once arc/orc become the default “gc”, will the other ones, like the current default one, regions, etc, etc, be eventually deprecated? Or they will stay indefinitely and still be maintained?
00:41:04disruptekregions is close to deprecation. there won't be much need for the other gcs once arc hits stride.
00:45:57FromDiscord<Recruit_main707> Hmm, that’s a bit sad, one of the beauties of Nim is the variety of the gcs imo.↵I do understand you might don’t want to spend your time maintaining rather unused gcs.↵(I sis like the concept of how regions works, at least how it should work in theory :p )
00:46:21disrupteki do, too. i'm particularly partial to regions.
00:46:37disrupteklike, if there was a gc i /wouldn't/ want to deprecate, it'd be that one.
00:47:19disrupteki just think the flexibility it affords has /got/ to be useful to someone.
00:47:28disruptek!repo dust
00:47:28disbothttps://github.com/disruptek/dust -- 9dust: 11Dust: Unattended Syntax Truncation 15 0⭐ 0🍴 7& 1 more...
00:47:55disruptekdust is at an interesting point; it demonstrates an out-of-compiler compilation pass.
00:48:17disruptekand virtually nothing else.
00:48:35*bung joined #nim
00:52:26*arecacea1 quit (Remote host closed the connection)
00:52:30FromDiscord<Joe-23> What are the advantages of Nim over Python, as Python can also be used as a compiled language so I am curious to know?
00:52:55*arecacea1 joined #nim
00:52:59disruptekthey aren't really comparable.
00:53:02FromDiscord<Recruit_main707> How can python be used as a compiled language?
00:53:14FromDiscord<Recruit_main707> Do you mean statically typed?
00:53:43FromDiscord<Joe-23> > How can python be used as a compiled language?↵@Recruit_main707 I think there is CPython that treats it like a compiled language
00:54:21FromDiscord<Joe-23> > CPython is the reference implementation of the Python programming language. Written in C and Python, CPython is the default and most widely used implementation of the language. CPython can be defined as both an interpreter and a compiler
00:54:43FromDiscord<Joe-23> Somebody told me it can be used as a compiled language
00:55:02FromDiscord<Hearthstone> Cython
00:55:12FromDiscord<Hearthstone> Cython can compile Py files to C or C++
00:55:22FromDiscord<Hearthstone> But it's speed is still, really slow compared to Nim
00:55:35disruptekit makes more sense to compare python to nimscript.
00:55:46FromDiscord<Hearthstone> Plus half of the libs made in Python don't work when ran through Cython
00:55:54disrupteknimscript is basically nim syntax but running on the nim vm.
00:56:04FromDiscord<Recruit_main707> Because cython (probably) transpires the code 1:1, Nim does a lot more than that
00:57:02FromDiscord<Joe-23> > But it's speed is still, really slow compared to Nim↵@Hearthstone I see interesting.
00:57:29FromDiscord<Hearthstone> Mhm
00:57:34FromDiscord<Joe-23> > nimscript is basically nim syntax but running on the nim vm.↵@disruptek[IRC]#0000 I didn't even know Numscript exists
00:57:40FromDiscord<Recruit_main707> About the advantages, Nim is faster, way faster, it has nice metaprogramming capabilities, and a simple and flexible syntax
00:57:48FromDiscord<Hearthstone> I've worked with Cython before
00:57:58FromDiscord<Hearthstone> > About the advantages, Nim is faster, way faster, it has nice metaprogramming capabilities, and a simple and flexible syntax↵Definitely agree with this
00:58:06FromDiscord<Joe-23> > About the advantages, Nim is faster, way faster, it has nice metaprogramming capabilities, and a simple and flexible syntax↵@Recruit_main707 I am glad I found this language
00:58:11FromDiscord<Hearthstone> I remember missing classes from Python though, but I'm over that now
00:58:42FromDiscord<Recruit_main707> We all had to get over them ;)
01:01:11FromDiscord<Hearthstone> Mhm :)
01:01:40FromDiscord<Hearthstone> Nim doesn't need classes, especially since it has types, plus it's cool way of passing the first argument
01:04:12*krux02_ quit (Remote host closed the connection)
01:14:20FromDiscord<Rika> i never fucking missed classes in python
01:14:52FromDiscord<Rika> even if python was my first language i dont know why i never missed classes at all
01:15:18disruptekmaybe because it's not classes that add value.
01:15:57FromDiscord<Rika> wdym?
01:16:06FromDiscord<Elegant Beef> It's those member functions, which a UFCS lets you get them everywhere!
01:16:19disruptekno one picks up python because they want classes.
01:16:22FromDiscord<Rika> if so many people from other languages missed classes at some point in their nim journey, why did i never miss them?
01:16:31FromDiscord<Elegant Beef> I didnt miss them from C#
01:16:38FromDiscord<Elegant Beef> Which is inheritly class based
01:16:39disruptekmaybe because it's not classes that add value.
01:16:57FromDiscord<Rika> dont get it
01:17:04FromDiscord<Elegant Beef> Classes just give you member functions, which you dont really need since we have the UFCS, it's no benefit to have classes
01:17:05disruptekother people might just be stupid.
01:17:05FromDiscord<Rika> w/e ive been awake for 24 hours at this point
01:18:28FromDiscord<Joe-23> One thing, can this language be compiled for Android and iOS?
01:18:34disrupteksure.
01:19:09disruptekyou can generate objective-c and pull it right into your xcode projects, too.
01:19:22FromDiscord<Rika> yes for both but theyre both immature compared to other backends
01:20:47FromDiscord<Joe-23> > you can generate objective-c and pull it right into your xcode projects, too.↵@disruptek[IRC]#0000 Oh nice
01:21:00FromDiscord<Joe-23> > yes for both but theyre both immature compared to other backends↵@Rika Is this something that is being worked on constantly?
01:21:20FromDiscord<Rika> not as much as the other backends but sure
01:21:33FromDiscord<Rika> more on android side less on ios afaik
01:21:39FromDiscord<Rika> comparing to each other
01:22:05FromDiscord<Joe-23> > more on android side less on ios afaik↵@Rika Yeah for me Android is more important than iOS due to its complete closed source eco system
01:25:02FromDiscord<Joe-23> sent a code paste, see https://play.nim-lang.org/#ix=2unJ
01:25:30disruptekyes.
01:25:36disruptek~manual
01:25:37disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
01:28:55FromDiscord<Joe-23> Thanks
01:29:14FromDiscord<Joe-23> sent a code paste, see https://play.nim-lang.org/#ix=2unK
01:29:18FromDiscord<Joe-23> I have no idea this means?
01:29:54disrupteki think on windows nim comes with a compiler that works.
01:30:03disruptekif you want to use the one that it found, instead, you can.
01:30:46FromDiscord<Joe-23> I see thanks
01:31:02disrupteki'm guessing. i don't use windows.
01:52:51*apahl quit (Ping timeout: 272 seconds)
01:54:10*apahl joined #nim
01:57:51*leorize quit (Quit: WeeChat 2.8)
02:07:41*waleee-cl quit (Quit: Connection closed for inactivity)
02:12:52shashlickJust add your compiler to the path and be fine
02:14:36*endragor joined #nim
02:18:23*thomasross joined #nim
02:33:52*muffindrake quit (Ping timeout: 260 seconds)
02:36:03*muffindrake joined #nim
02:56:19*unihernandez22 joined #nim
03:04:53FromDiscord<Joe-23> > i'm guessing. i don't use windows.↵@disruptek[IRC]#0000 Minggw doesn't come with Windows I installed this myself
03:04:58FromDiscord<Joe-23> but yeah I did all yeses
03:08:42FromDiscord<Joe-23> hmm `nim` didn't seem to install
03:08:46FromDiscord<Joe-23> after doing all yeses
03:08:49FromDiscord<Joe-23> it just closed
03:09:00FromDiscord<Joe-23> and when I type nim on the console it doesn't recognise it
03:09:07FromDiscord<Joe-23> (edit) 'nim' => '`nim`'
03:10:06FromDiscord<Joe-23> I am launching the installer again and it is detecting the nim is in my path
03:16:04FromDiscord<Hearthstone> @Joe-23 restart the PC
03:21:06shashlickWindows isn't very predictable with paths
03:25:19FromDiscord<Hearthstone> Linux is way better :3
03:25:25*unihernandez22 quit (Ping timeout: 264 seconds)
03:25:51FromDiscord<Joe-23> > @Joe-23 restart the PC↵@Hearthstone I will give that a shot
03:26:01FromDiscord<Hearthstone> Okay!
03:26:10FromDiscord<Joe-23> > Linux is way better :3↵@Hearthstone Yeah true
03:26:15FromDiscord<Hearthstone> I just remember having to do this because of Window's weirdness
03:26:20FromDiscord<Hearthstone> :)
03:26:22*unihernandez22 joined #nim
03:29:59FromDiscord<Joe-23> 😆
03:33:49*unihernandez22 quit (Ping timeout: 264 seconds)
03:33:55*leorize joined #nim
03:35:20FromDiscord<Hearthstone> Aah, reminds me of when I first tried linux
03:36:30leorizelooks like Nim popped to HN front page again :P
03:37:34leorizeanyone here wrote elixir?
03:38:52leorizeI read that elixir/erlang promotes writing systems that are separated into processes for fault tolerance
03:39:25leorizewhich is a pretty valid strat, but no one really do it in mainstream langs because it's just complex
03:39:49leorizewonder what's in erlang/elixir that makes it easier and whether I can build a nim lib that do the same thing :P
03:40:27kungtotteThe entire Erlang platform is built around that concept, so most of it is handled for you behind the scenes
03:42:49leorizewhat I'm interested would be how the syntax and the flow works
03:43:43leorizesecure and reliable systems can be built pretty well by splitting a big program into supervised processes (it also let you do privsep)
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:37*supakeen joined #nim
04:10:37Zevvdisruptek: hmm interesting approach, was dust born for the benefit of cps/csp?
04:24:35FromDiscord<Joe-23> > I just remember having to do this because of Window's weirdness↵@Hearthstone It works now, thanks, sometimes it doesn't require restart with other compilers which is strange
04:28:22*thomasross quit (Ping timeout: 246 seconds)
04:36:44*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:36:51*njoseph joined #nim
04:36:51*njoseph quit (Client Quit)
04:36:57*njoseph joined #nim
04:36:57*njoseph quit (Client Quit)
04:37:03*njoseph joined #nim
04:37:03*njoseph quit (Client Quit)
04:37:09*njoseph joined #nim
05:31:08*solitudesf joined #nim
05:42:29*leorize quit (Remote host closed the connection)
05:49:32*Vladar joined #nim
05:50:34*leorize joined #nim
05:53:57*apahl quit (Ping timeout: 260 seconds)
05:54:28*apahl joined #nim
06:12:13*leorize quit (Quit: WeeChat 2.8)
06:19:44Araqall you need to do is to restart your console/terminal after a PATH change
06:21:14Zevvlook who's back
06:24:41*PMunch joined #nim
06:26:41Zevvso you got your two weeks fully packed with adrenaline-induced nothingness?
06:32:20Araqyeah. I managed to hardly program at all
06:32:40PMunchOh, welcome back :)
06:33:08FromDiscord<Yardanico> I managed to hardly program in these two weeks as well :D
06:33:51Zevvgood work
06:40:32FromDiscord<krisppurg> is there a nim benchmark comparison between go rust etc?
06:41:21FromDiscord<Elegant Beef> https://github.com/kostya/benchmarks↵https://github.com/frol/completely-unscientific-benchmarks
06:41:22PMunchThere are plenty
06:42:05PMunchHmm, it would be nice if the bot would replace newlines with a space instead of the ↵ character..
06:42:28PMunchref: https://irclogs.nim-lang.org/17-08-2020.html#06:41:21
06:42:49FromDiscord<Elegant Beef> Ah, my bad 😄
06:43:33FromDiscord<krisppurg> Oh?
06:44:10Araqdon't look at "completely unscientific benchmarks"
06:45:37Araqlook at scientific benchmarks or simply use Nim because it's as fast as Rust in theory and practice is catching up to theory
06:46:11FromDiscord<Elegant Beef> I mean it says just that
06:46:29FromDiscord<Elegant Beef> > Nim, D, and Rust can go as fast as C/C++ can when you switch to "unsafe" manual memory management.
06:46:52FromDiscord<Elegant Beef> But this doesnt use ARC, so the test is probably outdated
06:48:03FromDiscord<Elegant Beef> Atleast in my view Nim on there is put relatively high based off all statistics
06:49:04FromDiscord<Elegant Beef> But yea the fact is it's a fast language with more readable syntax, so just use it 😄
06:49:16PMunchYeah, Nim tends to be in the upper echelon in all these suites
06:50:53FromDiscord<Elegant Beef> The Json test though it's pretty slow, but eh who needs all that json speed 😄
06:54:41PMunchYeah that one surprised me a bit
06:55:15FromDiscord<Elegant Beef> I mean packedjson gets it up a bit, but still relatively slow
06:56:06Yardanicopackedjson with ARC is faster
06:56:40FromDiscord<Elegant Beef> Is it sub 1s?
06:57:02PMunchI tried to run ARC on the unscientific "fast" implementation, it segfaulted :P
06:57:38FromDiscord<Elegant Beef> Got that ARC speed, less time in the application than the alternative implementations
07:08:25Araqjson's performance got a regression when we made it work for compile-time
07:08:58PMunchHaven't it worked on compile-time for ages?
07:09:01Araqbut I haven't been able to fix it and its variance is high on my machines, not easy to optimize
07:09:06PMunchHasn't
07:09:37PMunchOr were you talking specifically about packedjson?
07:09:48Araqno, json's parser which is used by packedjson too
07:10:01Araqand the regression happened before v1 iirc
07:15:27FromDiscord<Varriount> Araq! You're back!
07:16:40PMunchHmm, I have a problem with the dlls.zip file. I have a Makefile that downloads it and unzips it. This runs within a docker container. But after creating the output directory and downloading the file I get a permission denied on unpacking the file..
07:20:09PMunchOh damn it.. I simply didn't have `unzip` installed.. Why is that a permission denied error, ffs
07:20:23FromDiscord<Elegant Beef> i just learned that `a := <- b` is acceptable go syntax, why do languages hurt me
07:21:07FromDiscord<Elegant Beef> is `a.send(b)` too cool or something?
07:22:56AraqI think it's a 'receive' operation, not a send.
07:23:07FromDiscord<Varriount> @Elegant Beef Take a value out of channel b and assign it to a?
07:23:26FromDiscord<Elegant Beef> https://tour.golang.org/concurrency/2 It's used in go's channels
07:23:42FromDiscord<Elegant Beef> a is a channel in that case
07:23:50Araqyeah I know Go.
07:24:09FromDiscord<Varriount> No, b is the channel
07:24:16FromDiscord<Elegant Beef> Yea sorry operator is used twice
07:24:28FromDiscord<Elegant Beef> without `:=` it's send
07:25:29Araqno, it's "unary <- is receive, binary <- is send, := has nothing to do with it"
07:25:55FromDiscord<Elegant Beef> I meant in the example on the page
07:26:50PMunchYeah, but `a := <- b` is assign a to the result of unary <- applied on b while `a <- b` is binary <- between a and b, no?
07:35:00FromDiscord<Elegant Beef> We'll say yes just to add words below
07:42:06*krux02 joined #nim
07:46:48PMunchHi krux02 :) Been thinking about the negative stack thing a bit more. I was wondering if it would be more intuitive if a command gets put on the stack as half-applied function instead of going into some hidden list
07:47:05PMunchI already have commands in stacklang, so it would mesh nice with that
07:47:27krux02you mean like haskell?
07:48:17PMunch`5 +` would result in a stack with `+(5)` on it, then you could run something like `10 swap call` which would add 10 to the stack, swap the order, and then call the topmost item (now the +(5) command)
07:48:29PMunchKind of, yeah
07:50:58PMunchSo you'd have to do the `swap call` dance which isn't all that nice. But it allows you to use the normal syntax and such to modify these commands (e.g. pop it if you don't want it any more)
08:14:25Zevvjust make a forth and be happy
08:14:28Zevvnothing to be ashamed off
08:15:43PMunchWell that's no fun
08:18:03Zevvwe've all been there
08:19:05Zevvhttps://github.com/zevv/zForth and I'm not even sorry
08:22:07PMunchI had already tried Forth before I decided to make stacklang
08:22:22PMunchIt's simply isn't what I was looking for
08:22:23FromDiscord<Elegant Beef> Yall nerds are weird, just use a calculator
08:22:32PMunchIt is a calculator :P
08:22:46PMunchA programmable one at that
08:23:12PMunchBasically stacklang tries to be closer to a regular calculator than your average Forth
08:23:27PMunch(and by regular calculator I mean RPN calculator)
08:32:16*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:37:36Zevvyou need at least 2 stacks, but 3 is better
08:44:39PMunchIn stacklang you can create as many as you'd like :)
08:44:56PMunchIt doesn't even have variables, just named stacks
08:47:29FromDiscord<Elegant Beef> Pmunch do you have speed stack cups, cause i think you have a thing for stacking
08:56:58PMunchHaha, no I've never tried that :P
09:10:04*fowl_ quit (Read error: Connection reset by peer)
09:10:45*fowl quit (Read error: Connection reset by peer)
09:10:57*sirn quit (Read error: Connection reset by peer)
09:11:06*kwilczynski quit (Read error: Connection reset by peer)
09:14:12*kwilczynski joined #nim
09:14:45*kwilczynski quit (Max SendQ exceeded)
09:15:15*fowl_ joined #nim
09:15:56*fowl joined #nim
09:16:28*sirn joined #nim
09:19:44*kwilczynski joined #nim
09:22:27Araqhttps://gizmodo.com/boeing-747s-still-use-floppy-disks-to-get-critical-soft-1844683811
09:22:32Araqnice
09:31:05Zevvif it aint broken, right
09:32:05*abm joined #nim
09:33:19Araqmy floppies were constantly broken, but it's much better than an IoT always online device
09:43:29*tribly quit (Remote host closed the connection)
09:43:54*tribly joined #nim
09:47:18ZevvI have this one 1.44" disk that I have been using for my oscilloscope for over 15 years and it still goes and goes
09:47:21Zevvits amazing
09:47:29*awe002 joined #nim
09:48:18Zevvone day my usb drive will fail, and then what
09:57:56FromDiscord<gokr> Idiotic question: Are casts purely compile time? Do they incur a runtime cost?
09:59:22FromDiscord<gokr> Sidenote: Our game written in Nim using ORX now builds and runs in Android 🙂
10:01:43*FromGitter quit (Ping timeout: 244 seconds)
10:01:50FromDiscord<Recruit_main707> nice! congrats
10:02:19FromDiscord<Recruit_main707> casts are runtime i think
10:02:42FromDiscord<Recruit_main707> but i think they dont have any overhead too (not sure)
10:03:02*oprypin quit (Ping timeout: 260 seconds)
10:03:23FromDiscord<lqdev> casts are just changing the type without changing the bit pattern
10:03:30FromDiscord<lqdev> so they do involve some codegen
10:03:36FromDiscord<lqdev> but the C compiler *should* optimize them out
10:04:00FromDiscord<gokr> Right, that was what I kinda guessed.
10:07:31FromDiscord<Recruit_main707> whats the game name btw?
10:07:37FromDiscord<Recruit_main707> i want to check it out
10:16:15*oprypin joined #nim
10:18:12Zevvclyybber: we dont have a nim issue for the typed macro proc idents/syms http://ix.io/2uht/nim yet, do we?
10:19:00*FromGitter joined #nim
10:25:29FromDiscord<Yardanico> You didn't ping him :) @Yardanico
10:25:41FromDiscord<Yardanico> Ah wait
10:25:45FromDiscord<Yardanico> He left discord right
10:25:47FromDiscord<Yardanico> I forgot
10:25:52FromDiscord<Yardanico> I need to leave it now too
10:30:13PMunch@Yardanico, did you intend to ping yourself there?
10:30:21PMunchOr is that a bug in the bridge?
10:31:22FromDiscord<lqdev> he pinged himself on discord, there was no bridge involved :P
10:32:20Zevvmaybe he very much identifies with @clyybber
10:32:28PMunchOkay :) Just wasn't sure if that was intentional or if the ping -> name conversion logic was borked
10:32:32Zevvbut i didnt ping him on purpose, pinging is nasty
10:33:26Zevvin this age of whatsapp, twitter and other demanding "social" media, let us honour the async nature of the IRC medium, and the peace it brings to its users
10:33:55Zevvyou hear me @clyybber? let us!
10:39:49*Vladar quit (Remote host closed the connection)
10:40:15Araqyay, "Address Sanitizer in Visual C++"
10:41:59*arecacea1 quit (Remote host closed the connection)
10:42:00*Vladar joined #nim
10:42:18*arecacea1 joined #nim
10:43:20FromDiscord<djazz> can threads be enabled by code/pragma or is the compiler switch required?
10:44:05PMunchI think the switch is required
10:44:14PMunchBut it can of course be put in nim.cfg
10:54:45*Trustable joined #nim
11:00:13FromDiscord<lqdev> anyone knows an algorithm for decoding raw yuv420p data?
11:02:41PMunchHmm federico3, is the directory down?
11:03:38federico3works for me
11:03:56PMunchOh, now it works
11:04:00PMunchGot a 503 just a second ago
11:14:29Zevvlqdev: "decoding"?
11:14:50Zevvyou mean color convert to interleaved RGB, for example?
11:15:56Zevvits not hard to do, but it is hard to do it fast
11:16:21Zevveither go for a simple loop with pointers to your y,u,v planes and do the math to convert each pixel to r,g,b
11:16:26Zevvor use libswscale
11:16:59Zevv*real* men write a shader and do it on the gpu of course
11:37:28FromDiscord<Clyybber> sup
11:39:19FromDiscord<Clyybber> Araq: hi! https://github.com/nim-lang/Nim/pull/15158 ignoring the hacky scope restoring; do you think instead of using resetSemFlag we should just introduce efForceResem?
11:39:20disbotFix #5691
11:40:23FromDiscord<lqdev> Zevv: i don't need interleaved RGB, i need to compare some pixels
11:40:30FromDiscord<lqdev> so the color format doesn't matter too much
11:41:06FromDiscord<lqdev> what i'm actually trying to do is delete frames that don't have a certain colored pixel
11:43:23*synshroud joined #nim
12:04:31PMunchIs there a terminal table library in Nim?
12:04:53PMunchAdd rows with columns and then say print and have it print the entire thing?
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:40*supakeen joined #nim
12:06:59leorize[m]!repo termtables
12:07:01disbothttps://github.com/case/termtables -- 9termtables: 11Go ASCII Table Generator, ported from the Ruby terminal-tables library 15 1⭐ 17🍴 7& 10 more...
12:07:15FromDiscord<flywind> !repo nim-terminaltables
12:07:16disbothttps://github.com/xmonader/nim-terminaltables -- 9nim-terminaltables: 11terminal tables for nim 15 31⭐ 2🍴
12:07:19Oddmongerit seems not possible to have something like this in a case / of:
12:07:23Oddmongercase foo:
12:07:31Oddmonger var used_in_every_of = …
12:07:36Oddmonger of bar:
12:07:38Oddmonger
12:07:42PMunchYeat I've seen that, but I don't want the boxes and stuff..
12:08:01Oddmongercannot have shared var defined inside the case is entered
12:08:08PMunchUhm, no, that is not possible Oddmonger
12:08:23PMunchYou can wrap the case in a block
12:08:49Oddmongerwrap in a block ?
12:10:21PMunchhttps://play.nim-lang.org/#ix=2uqc
12:10:24PMunchLike so ^
12:11:16AraqClyybber: if possible, remove the nfSem flag instead entirely
12:11:45Araqthere is no good reason for it. there are however, aliasing problems where we forget copyNode/Tree
12:12:51Oddmongerthank you PMunch
12:14:06PMunchOddmonger, no problem
12:14:22Oddmongeri note the world exists only in a very small range, and the darkness swallows the rest… Howard Philips Nimcraft
12:14:24PMunchThere is no guarantee that you actually use it in all the branches by the way
12:15:21PMunchHuh, just realised I've never really known Lovecrafts first name until now
12:15:22Oddmongeri could also defines the var outside of the case/of , it would have very very little overhead
12:15:29PMunchI've just known him as HP Lovecraft
12:16:26PMunchYeah the block thing is only really useful for scoping
12:16:40PMunchWell, and it's actual usage which is to be able to "break" out of them
12:17:04PMunchYou can also name them like "block outer: block inner: break outer"
12:17:50PMunchEven though your quote was more fitting I was actually referencing "Hello darkness my old friend" there :P
12:18:36PMunchOh wait, that wasn't an actual quote :P
12:27:43Oddmongerbtw i just check and it's Phillips, not «Philips» :)
12:28:12*waleee-cl joined #nim
12:31:39FromDiscord<Joe-23> sent a code paste, see https://play.nim-lang.org/#ix=2uqm
12:32:10FromDiscord<Joe-23> I know that `echo` prints `/n` automatically, is there a way to disable `/n` or use another comand that does not print out this extra `/n` character?
12:33:23PMunchstdout.write
12:33:42FromDiscord<Joe-23> Thanks
12:34:00PMunchNo problem
12:44:38FromDiscord<gokr> @Recruit_main707 Well, it's not out yet - and it's not going to be open source, but... you can see a tiny bit of early gameplay at <https://www.youtube.com/watch?v=eU7VKn8dZPM>
12:45:54FromDiscord<gokr> (although that's a truly crappy movie - I had a hard time driving tanks all on my own via keyboard)
12:59:03*Kaivo joined #nim
13:13:54AraqI like it :-)
13:15:04FromDiscord<Joe-23> One question I am a bit confused between `readLine(stdin)` and `stdin.readLine`.↵↵So like with `readLine(stdin)` how does `stdin` tell `readLine` to read from the user input?
13:16:07solitudesfhttps://nim-lang.github.io/Nim/manual.html#procedures-method-call-syntax
13:16:19Zevvthere is not telling, its just a different way to do the same thing
13:16:59Zevvit's syntactic sugar. if you do a.b(), nim will - with some additional rules - transform this to b(a)
13:17:08PMunchThis applies to everything
13:17:13PMunchSo 5.echo works as well
13:17:36Zevvand which you use is mostly a matter of personal taste
13:18:02Zevvi seem to have no preferred style, i just mix them both without any proper philosophy
13:18:11PMunchHaha :P
13:19:00Zevvusually as soon as the brackets come in, i move to traditional style
13:20:16*vqrs joined #nim
13:23:34*lritter joined #nim
13:24:35FromDiscord<InventorMatt> Zevv: i tried using your nim-arduino library and after following your instructions i get: exit status 1 Error compiling for board Arduino Uno. when i try and compile
13:24:58FromDiscord<InventorMatt> do you have any ideas what could cause that?
13:35:45Zevvoh dude i haven't ran that myself since I initially made that
13:36:47Zevvand to be honest, it's a bit of a hack
13:37:17ZevvI contacted the arduino people to see if they would be interested to help out with a proper integration, but apparently they were not
13:38:03FromDiscord<InventorMatt> that's what i figured. I would love to help improve it but i wouldn't even know where to start. I have only a rudimentary grasp of cpp or even c for that matter
13:38:07FromDiscord<Clyybber> Araq: pong
13:38:18FromDiscord<Clyybber> \> if possible, remove the nfSem flag instead entirely↵Yeah, I think thats best
13:38:24FromDiscord<Clyybber> if possible
13:40:06Zevv~inventormatt: I'd start with seeing if you can get some more verbose logging: what is being ran, and why does it fail?
13:40:07disbotno footnotes for `inventormatt:`. 🙁
13:40:50Zevvmy hack consists of a thing that *looks* like a c compiler, but actually invokes the nim compiler
13:41:03*sentreen quit (Ping timeout: 265 seconds)
13:42:40FromDiscord<InventorMatt> i'll see if i can get it to do that then. I know have a nim and the nim_arduino in my path so it must be something the ide is doing
13:43:30Zevvgood start. if you need some more help ping me later, i'm on mobile now so hard to look into this
13:43:55FromDiscord<InventorMatt> thanks. will do
13:44:16PMunchBasically the Arduino IDE calls the hack compiler as a C compiler and then the hack compiler translates that into a call to the Nim compiler to build the code into whatever the Arduino IDE excepts to get out
13:44:54PMunchThe Arduino IDE has a mode that gives way more verbose output, can't quite remember what the setting is called, but if you enable that you should be able to see a lot more information
13:45:15Zevvah and of course you have pmunch, he's our arduino expert
13:45:23Zevvhe actually *uses* that stuff
13:45:25*PMunch blushes
13:46:05Zevvwell, I have this problem you know. I advertise myself as a professional embedded software developer. So of course that means I can not be seen in public ever carrying an arduino or a raspberry or stuff like that
13:46:22Zevvbecause, you know, I'm a *professional*
13:46:57PMunchHaha :P
13:48:51Oddmongerhow do you call this ? « echo "{foo}" » (the {foo} part)
13:49:05Oddmongerit's for searching syntax in the manual :þ
13:49:13FromDiscord<InventorMatt> found the more verbose output zevv, pmunch https://pastebin.com/k9akTh9N
13:49:30Oddmongerfor defining rounded numbers printing
13:50:08Oddmongerah , strformat
13:50:23ZevvI guess arduino studio added some stuff which the hack compiler does not like
13:51:25FromDiscord<InventorMatt> maybe i should try for an older arduino version then
13:52:14Zevvgimme a minute, Ill try to find a computer somewhere
13:54:12alehander92zevv i couldnt find job
13:54:15alehander92as embedded
13:54:43alehander92i think i didn't do well on the bits-combination! stuff
13:55:02alehander92it seemed so simple and so unreachable
13:55:14Zevvalehander92: its a bit of a niche I guess.
13:55:22ZevvI was just lucky I started that stuff as an 10yo
13:55:52alehander92cool
13:56:11ZevvI'm not even an expert, but I've seen a lot of layers of shit. I think I should be able to explain from the transistor level up what happens when you type 'A' in your xterm over an ssh session to another machine
13:56:15PMunchYeah that -DARDUINO_LIB_DISCOVERY_PHASE seems to not have been parsed correctly..
13:56:26ZevvPMunch: npeg troubles right
13:56:37PMunchHmm, might be
13:56:43Zevvsuch a mess
13:56:44Zevvthat
13:56:47PMunchOr it might've been added to the command a touch late
13:56:53PMunchAnyways, I'm off
13:56:55alehander92<3
13:56:58Zevvbye
13:57:00PMunchTime to go home and collapse :S
13:57:05alehander92yeah that's a cool thing
13:57:19*PMunch quit (Quit: Leaving)
13:57:19alehander92i still have to fill some gaps in my knowledge
13:57:28alehander92buy pmunch
13:57:30alehander92bye*
13:59:20*arecacea1 quit (Remote host closed the connection)
14:01:22ZevvInvetorMatt: interestingly enough I do not see that -DARDUINO_LIB_DISCOVERY in my logs
14:01:48Zevvwhat is your arduino studio version?
14:02:47FromDiscord<InventorMatt> i am using 1.8.13
14:02:53*arecacea1 joined #nim
14:03:14Zevvoh right I just downloaded 1.8.12 :)
14:03:41FromDiscord<Slyris> hey, i forked official nimble package list from nim lang repo, when i use `nimble refresh` i always get ↵↵Error: Refresh failed↵... Downloaded packages.json file is invalid
14:03:44FromDiscord<Slyris> Is it intented ?
14:05:01Zevvyea, can reproduce now
14:05:03Zevvlemmesee
14:06:55FromDiscord<Slyris> How to install a package from a new json package list ?
14:06:59FromDiscord<Slyris> Using nimble install
14:07:07FromDiscord<Slyris> It's seems to always pick from official package list
14:15:45Zevvyeah the fun, arduino studio just appends stuff after the cmdline I generate in the platform.local.txt
14:15:51Zevvso it kind of violates its own protocol with that
14:17:10*drewr quit (Quit: brb)
14:18:18FromDiscord<Joe-23> sent a long message, see http://ix.io/2uqT
14:22:03*drewr joined #nim
14:25:11ZevvInventorMatt: do you run nim_arduino from git or from nimble?
14:25:23ZevvI updated the git repo, but I don't have my gitlab credentials here so I can't make a new release
14:26:12disrupteki have your password written down somewhere; gimme a sec.
14:26:41FromDiscord<InventorMatt> zevv: I run it from nimble
14:28:55FromDiscord<djazz> How can I check whether a proc has a return type or not in a template? I send it in as an untyped
14:29:15FromDiscord<Clyybber> if its untyped then theres no way to
14:29:29FromDiscord<Clyybber> you could forward it to a something that takes typed
14:29:32FromDiscord<Clyybber> and check there
14:36:16ZevvInventorMatt; dang
14:36:24Zevvoh wait I only need to tag
14:37:50ZevvInventorMatt: oh you do a nimble install with the git url, right?
14:37:55Zevvyou should be good now then
14:41:57FromDiscord<InventorMatt> after updating i am now getting a new more interesting error https://pastebin.com/3uwUDx2s
14:45:30Zevvyeah you have spaces in your paths
14:45:34Zevvthis was never tested I guess
14:46:35ZevvI think this might be a though one to crack, I think I'm losing the original quotes somewhere
14:50:24Zevvthis always makes me kind of mad. I *know* spaces are valid in file names and so on, but was it *that* hard for MS not to put it in each and every program by calling that directory "Program Files"
14:51:18Zevvproblem is that arduino studio puts that stuff in {includes}, and I pass that along in platform.local.txt
14:51:42Zevvbut at that point there is no telling anymore where the original arguments start and end. It is one single variable called {includes}
15:03:13*dddddd quit (Ping timeout: 265 seconds)
15:05:24FromDiscord<InventorMatt> if the spaces in the file path is the problem then maybe I'll try installing arduino on wsl and seeing if i can get it to run from there then
15:06:32Zevvmaybe installing it in c:\arduino would also help
15:06:45ZevvI can break it on linux too by moving it in a directory with spaces
15:07:23Zevvbut I'm not sure if I can make this work. The problem is this extra layer of passing through the fake compiler. I get a single {includes} which can consist of multiple -Idir parts. If these dirs have spaces, the whole thing is ambigious
15:07:50Zevvwith wsl you might be having problems with accessing your programmer hardware
15:09:00FromDiscord<InventorMatt> true, that is possible. you may want to post a warning on the readme for now then about having spaces in the path
15:10:25Zevvwell, I'm happy to see that this even works at all on windows
15:10:30Zevvnever tested, never aimed for that
15:12:24ZevvLet me know if you get it to work one way or the other, I'll add a note to the readme
15:14:39*hnOsmium0001 joined #nim
15:16:46*dddddd joined #nim
15:19:05disruptekaren't strings wonderful?
15:21:07Oddmongeryes on my guitar
15:21:22FromDiscord<InventorMatt> Zevv, after creating a new folder and changing the path so far it is now throwing any errors but it is taking ages to compile so far and almost seems to freeze
15:22:11*NimBot joined #nim
15:23:34FromDiscord<InventorMatt> *not
15:25:46*liblq-dev joined #nim
15:31:01FromDiscord<InventorMatt> yeah, after waiting at least 5+ minutes it doesn't seem like it is compiling at all. just frozen there
15:31:46*synshroud_ joined #nim
15:32:13Zevvbah
15:32:14*synshroud quit (Ping timeout: 260 seconds)
15:32:35Zevvseems i need to find myself a windows computer if i want to get this to work :(
15:47:14FromDiscord<gokr> @Araq If "I like it" was aimed at our game - then thanks! 🙂 Nim + ORX is delivering very nicely. The physics you can see is LiquidFun which is integrated in ORX. The game is actually just 760 lines of Nim code so far.
15:56:12Zevvxtank!
15:58:26*tribly quit (Quit: WeeChat 2.9)
15:59:18Zevvor what was it called. in the 90s
15:59:23Zevvon unix workstations
15:59:31Zevvthat was so great
16:05:10*tribly joined #nim
16:05:37disruptekremember netrek?
16:06:14FromDiscord<gokr> We are going for a tad of retro - but focusing on good gameplay and pysics, and above all - plots of players in sofa in front of big TV.
16:06:30FromDiscord<gokr> (edit) 'pysics,' => 'physics,' | 'plots' => 'lots'
16:07:06FromDiscord<Varriount> Hmm. I'm a 90's kid, so I grew up on point+click adventure games. And flash games
16:08:04FromDiscord<Varriount> My favorite was a turn-based strategy game called "Spybot: The Nightfall Incident".
16:17:44FromDiscord<mratsim> Spybot: Search & Destroy
16:30:15disruptekZevv: dust is for minimizing any bug, but initially it will be limited to sem bugs.
16:35:42leorize[m]the ultimate nimsuggest fuzzer?
16:36:55leorize[m]s/fuzzer/bug isolator/
16:37:40disrupteknot really; i don't want to fuck with invalid ast at all.
16:41:02disruptekbut, i don't know of anything similar. i hope that it will help make integrating the compiler less onerous for people.
16:42:01disruptekthere's a lot you can do before you actually pass code to the backend.
16:48:00FromDiscord<Avatarfighter> What's up party people and disruptek
16:48:02FromDiscord<Avatarfighter> 😛
16:48:17disruptekdude.
16:48:29FromDiscord<Avatarfighter> hahah how are you doing today disruptek ?
16:49:05FromDiscord<Avatarfighter> working on anything interesting today ?
16:49:08disrupteksurvivin'.
16:49:12disruptekhow are you, fighter/
16:49:34FromDiscord<Avatarfighter> Doing pretty good, I'm downloading devel on 500kbps atm
16:49:57FromDiscord<Avatarfighter> the download bar has never been so entertaining before
16:50:44disrupteki have 1mbit upload here. every morning i spend a couple hours wondering if i really need backups.
16:51:12disruptekwhy are you running devel?
16:51:15disruptekor, hoping to?
16:51:23FromDiscord<Avatarfighter> LMAO
16:51:40FromDiscord<Avatarfighter> I'm just curious to see what changes devel has to offer compared to stable release
16:52:03FromDiscord<Avatarfighter> other than numerous bugs
16:52:21disruptekaged to perfection.
16:52:28disruptekexquisite bugs.
16:52:47FromDiscord<Avatarfighter> I'm looking for those free-range, cage-less bugs I've heard devel has to offer
16:53:02disruptekthey're not all organic, you know.
16:53:11disruptekzevv has filed a few artificial ones.
16:53:14FromDiscord<Avatarfighter> Whaa! I'm possible
16:53:18FromDiscord<Avatarfighter> impossible*
16:53:30FromDiscord<Avatarfighter> I can't believe Zevv has done this
16:53:45disruptekit's true. he has strange ideas and vast quantities of BGH.
16:53:50disruptekbug growth hormone.
16:53:55FromDiscord<Avatarfighter> ahahah
16:54:06disrupteknetherlands, y'know.
16:54:17FromDiscord<Avatarfighter> Netherlands is wild
16:54:36FromDiscord<Avatarfighter> The way to not have bugs is to only test your code one way so it never breaks
16:54:44FromDiscord<Avatarfighter> maybe that should be applied to devel to remove all the bugs
16:57:53*superbia3 joined #nim
16:57:56disruptekwe now have a bot that removes bugs for us.
16:57:57shashlickwho has used fuzzing in the past
16:58:02*vicfred joined #nim
16:58:07*liblq-dev quit (Quit: WeeChat 2.9)
16:59:32alehander92hm
17:01:06*superbia2 quit (Ping timeout: 256 seconds)
17:01:36disruptekshashlick: varriount is working on a fuzzing project.
17:02:41FromDiscord<Avatarfighter> What are you trying to fuzz shashlick if i may ask?
17:03:18FromDiscord<Clyybber> @Avatarfighter did you git clone --depth 1 ?
17:03:33FromDiscord<Avatarfighter> I did not @Clyybber
17:03:41FromDiscord<Avatarfighter> Do you think it'll help ?
17:03:45FromDiscord<Clyybber> yeah
17:03:46FromDiscord<Clyybber> a lot
17:04:04FromDiscord<Avatarfighter> Ok i'll do that hahah
17:04:15FromDiscord<Avatarfighter> Rip the download bar you were fun and long
17:04:19shashlickjust looking at https://github.com/status-im/nim-testutils/blob/master/testutils/fuzzing/readme.md
17:04:31shashlickand wondering how it can be applied to my projects
17:05:27FromDiscord<Avatarfighter> Oh yeah that looks super interesting!
17:06:35FromDiscord<Recruit_main707> why is this pr still not pushed?↵https://github.com/nim-lang/Nim/pull/11920↵↵i asked it in the conversation itself, but maybe someone can give me a faster answer in here.
17:06:36disbotgc_regions: cleanup & fixes for deallocation
17:14:50FromDiscord<Clyybber> no particular reason
17:14:53FromDiscord<Clyybber> I think
17:15:07FromDiscord<Clyybber> other than that it broke code that was previously "working" as in leaking
17:20:02Zevvwho needs regions anyway, deprecate that stuff the second arc is out
17:20:10disruptekshhh
17:20:15Zevvoh sorry
17:20:17disruptekregions is cool.
17:20:25FromDiscord<Recruit_main707> deletethis
17:20:41Zevvi never got my regions back, there is always something sticking behind
17:20:57FromDiscord<Recruit_main707> it would be cooler if they worked though :P
17:21:46Zevveven
17:22:05*sagax quit (Ping timeout: 240 seconds)
17:24:07awe002is there a way to get a variable initialized (data section) with the address of another variable?
17:24:19awe002something like this c code: int a; int* ptr = &a;
17:25:26awe002I tried different things with const, compileTime, but I only could get the initialization of 'ptr' at runtime, init of the module
17:25:57*Pisuke joined #nim
17:26:46*MyMind quit (Ping timeout: 246 seconds)
17:34:12Zevvyou can do "var a:int; let p = a.addr"
17:34:35Zevvthat translates quite literary to your c snippet
17:34:46FromDiscord<Clyybber> he wants a to be in the data section
17:34:47FromDiscord<Clyybber> I think
17:36:27FromDiscord<Clyybber> I think you just have to make sure your a is let and the rhs is constant
17:36:28awe002yes, when I do that, nim puts p in bss, and add init code to get the address, unlike the code in c, which will put both in data
17:36:51Zevvah right
17:38:39*mbuchel quit (Quit: WeeChat 2.8)
17:39:37FromDiscord<Clyybber> @exelotl probably knows how to do it
17:39:57Zevvi think this needs some .emit.
17:40:40Zevvor what was it. we also needed that to get lets properly in .text
17:40:50Zevvinstead of having a .data copy always
17:41:09Zevvthat matters on tiny archs like avr
17:41:50FromDiscord<Clyybber> https://github.com/nim-lang/Nim/blob/devel/tests/ccgbugs/tprogmem.nim is similar
17:41:51Zevvnah data/bss, sorry
17:41:55Zevvright
17:42:17awe002yes, I am on embedded, trying nim on a custom riscv32
17:42:25FromDiscord<exelotl> Oh hi!
17:42:51Zevvawe002: check back here when PMunch is in, he spent some proper time on avr optimizations
17:43:05Zevvawe002: using arc and os:any?
17:44:41awe002Zevv: ok, thx
17:45:29Zevvare you? using arc and os:any?
17:46:10awe002no, gc:none and os:standalone
17:47:24Zevvyou might to consider those. --gc:arc -d:usemalloc --os:any runs on about everything, and most of the stdlib is usable
17:47:30awe002I want to start with the basics (easier to inspect the generated c and asm), before going to arc/orc
17:48:10*superbia3 is now known as superbia
17:48:12*superbia quit (Quit: WeeChat 2.9)
17:48:13Zevvhttps://nim-lang.org/docs/nimc.html#nim-for-embedded-systems
17:48:18Zevvfair enough
17:49:52*endragor quit (Remote host closed the connection)
17:50:20*endragor joined #nim
17:54:23FromDiscord<exelotl> awe002: the solution depends on what kind of data you need really. I made an RFC a while back but only a small portion of it got implemented. Basically you can do let myVar = [1,2,3] and myVar will probably end up as const in the generated C code
17:57:28FromDiscord<exelotl> (Then you have to use unsafeAddr to get the address, since its a let variable)
17:57:40FromDiscord<exelotl> But its limited to some simple arrays/objects. You can't make a constant pointer to constant data this way.
17:57:52awe002exelotl: the usecase I am trying is a table with pointers/len to other structures, all in .data
17:58:06awe002exelotl: so it's a const ptr to const data
17:59:57FromDiscord<djazz> when using newAsyncHttpServer and serve, how can I get the listening ip and port? the socket is private :/
18:00:07*endragor quit (Ping timeout: 265 seconds)
18:01:40FromDiscord<exelotl> awe002: yeah, that's pretty tricky to do. A Nim-friendly way I found recently, is to put all your data in a `const` array of objects (nim const, not C const), and then, instead of using pointers, use an enum to index the array
18:03:03FromDiscord<exelotl> Alternatively, you can put your data in C code, and then import it into Nim as a `var` and use it unsafely that way
18:04:25awe002exelotl: exelotl: I'd rather stay with the current runtime init of the pointers, or try the emit/codegenDecl, because array of object will take the maimum object size afaic, and I have very different object sizes
18:26:58FromDiscord<djazz> how can I use async/await while having a blocking gui loop? threadpool and serve instead of async?
18:35:04Zevvit's kind of tricky. You could do async in one thread, and do your gui in the other, and have them communicate over a pipe or socketpair
18:36:49FromDiscord<Rika> what i did is that i made the gui loop "async" as in whenever a delay is needed i used `await sleepAsync`
18:37:07FromDiscord<Rika> (edit) 'is' => 'dor a similar projec tis'
18:37:13FromDiscord<Rika> (edit) 'projec tis' => 'project is'
18:38:01disruptekdafuq
18:38:13Zevvzup
18:40:01Zevvyou just can't do that, you know. Go "dafuq" and not eloborate on the cause
18:40:15FromDiscord<Rika> prolly me existing lol
18:44:29Zevvso, what's new
18:46:07FromDiscord<dom96> It's easy peasy
18:46:18disruptekpondering how to structure dust.
18:46:46disruptekthe compiler crashes too easily.
18:46:54FromDiscord<dom96> @djazz depends on your GUI framework, but generally you just register a timer and call asyncdispatch.poll in it
18:47:15Zevvdisruptek: why dust
18:47:35disruptekwhaddya mean?
18:47:39Zevvwhy
18:47:43Zevvare you doing this
18:47:53alehander92what is it
18:48:16Zevvoh it's your reducer, right?
18:48:19Zevvnimreduce
18:48:23dom96a tool to turn the Nim compiler to dust duh
18:48:39disruptekyes.
18:48:44Zevvdude
18:48:47Zevvdon't stop
18:49:16alehander92a fuzzer
18:49:17alehander92?
18:49:23Zevvcreduce for nim
18:49:31Zevvgive it a program that generates error X
18:49:44Zevvthen it throws out stuff and more stuff until no more stuff cacn be thrown out
18:49:50Zevvall the wile making sure it still generates error X
18:49:55Zevvis that about right?
18:49:59disruptekbasically, yes.
18:50:11disruptekbut it won't just elide stuff, it will mutate things, too.
18:50:36disruptekunfortunately, the compiler is pretty grumpy about stuff.
18:50:38Zevvwas there anything you could learn from the c-reduce thing?
18:50:47*WilhelmVonWeiner joined #nim
18:50:53disruptekyeah, that i don't feel i need to write 50k loc to do this.
18:51:05Zevvyeah, but that's C for you
18:51:08disruptekthe transformations will be syntactically correct, always.
18:51:11ZevvI guess they implemented half a compiler for that
18:51:16disruptekpretty much, yes.
18:51:47Zevvso, for cps we're stuck in the mud, right?
18:51:56disruptekafaik, yes.
18:52:14Zevvdamn. I tried to dig into the compiler to see if I could make any sense of these bugs, but pfff man
18:52:23Zevvit's holidays, you know
18:52:31disrupteki do know that.
18:52:59disruptekwell, #35... we could figure out how we want to handle this.
18:53:45disrupteki assume that we add a proc(c: Cont; x, y: int): Cont, right?
18:53:53Zevvit would be cool to have something working end to end again, actually
18:54:03Zevvyeah I guess so
18:54:34Zevvbut that is basically "the continuation version", afaik there is always just 2 versions
18:54:42Zevvthe booty and the cpsCall
18:54:52Zevvwhy more?
18:55:35disrupteki forget. i created this issue because you need a way to pump your iterator.
18:55:46disruptekcan you do that with cpsMagic?
18:56:07Zevvno, that's just the "internal" generated fn(c: C): C procs only
18:56:22Zevvthe booty and cpsCall are the only ones needed to get started, to jump in
18:56:32Zevvafter that all splits are of the above signature, these get tramped
18:56:33disruptekdoes the iterator work right now?
18:56:53Zevvit works, apart from passing the initial vars to the booty because of the ident/gensym
18:57:24*endragor joined #nim
18:57:47Zevvoh it *worked* yesterday
18:57:50disruptekwe should think about what the first version of cps should support. maybe we can make a real release when typed is done.
18:57:51Zevvdamn
18:58:12Zevvbasically I want all my stuff in stash to run
18:58:22Zevviterator, echo server, goto
18:58:32Zevvthat is enough to get this stuff running "in real life"
18:58:35*sagax joined #nim
18:58:45disruptekfair enough.
18:58:46Zevvfrom there I hope we can go optimize this stuff to avoid spurious splitting
18:58:57Zevvthe iterator should need 1 split only, I guess
18:59:01disruptekthe symbol substitution looks really good to me.
18:59:10disruptekexcept for the fact that nim is buggy, i mean.
18:59:25Zevvlet me see if I can get iterator back to work
18:59:41disrupteki don't think it's possible right now.
18:59:51Zevvwell, you broke it :)
19:00:04disrupteki threw out a fair amount of old code on the assumption that clyybber would be able to fix this stuff.
19:00:19Zevvworks with HEAD^
19:00:26Zevvok cool
19:01:28FromDiscord<Varriount> Araq: Would it be viable to give a macros access to there AST "ahead" of its invocation? That is, the part of the tree that hasn't been semantically checked yet?
19:02:06disruptekthat's what `untyped` is.
19:02:10Zevvisn't tht waht untyped is
19:02:17Zevvyeah, what he said
19:02:30Zevvoh readin time again
19:03:43FromDiscord<Varriount> Zevv, disruptek: I"m talking about giving it access the to AST in the rest of the file.
19:04:12*FromDiscord quit (Remote host closed the connection)
19:04:16disruptekoh, i remember this idea now.
19:04:26disruptekyeah, i still hate it. 😁
19:04:26*FromDiscord joined #nim
19:05:07*endragor quit (Ping timeout: 246 seconds)
19:06:04*Trustable quit (Remote host closed the connection)
19:14:20*endragor joined #nim
19:23:10Zevvhow cool would that be right
19:23:35Zevvand then the rest of all imported files as well, right
19:25:12*superbia joined #nim
19:25:32*endragor quit (Ping timeout: 256 seconds)
19:31:28federico3https://semgrep.dev/ this could be useful
19:44:04*superbia quit (Quit: WeeChat 2.9)
19:51:38AraqVarriount: should be made avaliable via compiler plugins IMO
19:51:57Araqand ideally compiler plugins are at least as easy to write as macros
19:52:13AraqI consider this the next steps in Nim's evolution
19:52:37federico3dom96: this could be a good reference for Nimble https://arxiv.org/pdf/2005.09535.pdf
19:54:19disruptekAraq: where are we supposed to put state we want to make available to passes?
19:58:12Araqdisruptek, in the compiler new passes inherit from PPassContext
19:58:36*endragor joined #nim
19:58:44Araqin the macro system, you can get away with .compileTime variables but it's a crude, modularity breaking mechanism
19:59:02disrupteki know, but how can i put data into a pass from outside the pass? or take data out?
20:00:36disrupteki guess taking data out isn't a challenge.
20:02:52disrupteki'd like it to be easier to control the error handling behavior, too. there are a lot of quits lying around.
20:03:23disrupteki can hook errors, but the hook happens in addition to output and quits, etc.
20:04:10bunghow async yield work together?
20:05:46FromDiscord<Recruit_main707> when compiling nim from devel, should i worry if this happens? https://media.discordapp.net/attachments/371759389889003532/745010499787292843/unknown.png
20:06:06FromDiscord<Recruit_main707> `Hint: operation successful (128812 lines compiled; 21.993 sec total; 327.473MiB peakmem; Dangerous Release Build) [SuccessX]`↵`FAILURE` (for IRC)
20:06:22disrupteklooks dangerous.
20:08:10FromDiscord<Recruit_main707> it seems like it worked (?) the nim exe is there, also the nimsuggest one, but thats it, is that correct?
20:11:47*endragor quit (Ping timeout: 240 seconds)
20:16:34disruptekunlikely.
20:20:39FromDiscord<Recruit_main707> ill just wait for tomorrow's nightly build then
20:20:51FromDiscord<Recruit_main707> the regions fix was merged btw :)
20:22:06Araqdisruptek, are you talking about the compiler code?
20:22:17FromDiscord<19> hello, im getting this error:https://pastebin.com/XLarRDUE after i run `nimble init`
20:22:29disrupteki'm working on a program that implements the compiler.
20:22:41disruptek!repo dust
20:22:41disbothttps://github.com/disruptek/dust -- 9dust: 11Dust: Unattended Syntax Truncation 15 0⭐ 0🍴 7& 1 more...
20:23:14disruptekit'll permute the ast to try to minimize tests while reproducing errors.
20:23:50disruptekif anyone can point me at a working compiler plugin, maybe it can inform my approach.
20:25:23disruptekhttps://github.com/disruptek/dust/blob/master/dust/pass.nim
20:25:27bungcan i yield item one by one in a async proc ?
20:26:21disruptekyou can have an iterator yield futures.
20:26:26Araqah
20:28:18disruptekif you want a truly async iterator, i think you probably need something more like cps.
20:28:21disruptek!repo cps
20:28:23disbothttps://github.com/disruptek/cps -- 9cps: 11Continuation-Passing Style for Nim 🔗 15 29⭐ 1🍴
20:28:31bungthen I can't use await before yield
20:30:19disruptekno, but you can yield before await.
20:30:46disrupteki think. i can't remember. try it and find out.
20:31:20bungiterator cant have the async pragma the editor hints
20:31:37disruptekright, i cannot find any such animal in my async code.
20:31:48disruptekjust yield futures and then await them elsewhere.
20:31:55disruptekor, seriously, look at cps.
20:33:07bungeven this done, how to do await item in myitems()?
20:33:37bungI haven't seen some code like that
20:33:39disruptekwhat?
20:33:52disruptekyou haven't seen code like that because it's not possible.
20:34:37bungyeah, not like js have done that parts.
20:35:40*disruptek is now known as clippy
20:35:49clippyit sounds like you're trying to write an async iterator!
20:36:46bungyeah, that's what I want but can't do with a iterator proc with async pragma.
20:37:00clippyshall i provide the url for the cps repository that demonstrates such creatures?
20:39:42bungno ,thanks! I dont want change current mode, but add it to your repo's example seems nice
20:40:03clippythere are examples in stash/
20:40:06*clippy is now known as disruptek
20:41:42bungah , I checked just now
20:42:06FromDiscord<Kiloneie> Man reading online about what people think of Nim is just depressing, and more often than not it's metaprogramming is completely skipped over. I should make a whole video series just on metaprogramming and or all the amazing features of it.
20:46:38FromDiscord<19> i agree, nim needs more presence and more love online.
20:47:24FromDiscord<Hearthstone> Yes
20:56:05*vicfred quit (Quit: Leaving)
21:04:02hnOsmium0001scheme: I've heard you talking about metaprogramming? /s
21:04:14hnOsmium0001more generally lisp family
21:11:23*Vladar quit (Quit: Leaving)
21:12:13*awe002 quit (Ping timeout: 264 seconds)
21:14:39*endragor joined #nim
21:27:26FromDiscord<Elegant Beef> @Kiloneie I mean the metaprogramming is never a reason i hear someone say that doesnt want to use nim. It's significant whitespace, or from the rust guys, lacking anything new
21:27:45*thomasross joined #nim
21:28:14FromDiscord<Elegant Beef> My favourite quote ever was "You dont run the code"
21:28:28disruptekwut
21:29:16FromDiscord<Elegant Beef> Yep, that was my reaction
21:29:23*endragor quit (Ping timeout: 240 seconds)
21:29:26FromDiscord<Elegant Beef> As if Rust or any other language is ran as is
21:29:47FromDiscord<Rika> what the fuck does "you dont run the code" mean
21:30:02disruptekYOU CAN'T HANDLE THE RUNTIME!
21:30:15*abm quit (Quit: Leaving)
21:30:35FromDiscord<Elegant Beef> It means that nim is converted to C which they see differently than converting to LLVM
21:30:56FromDiscord<Rika> sounds immensely dumb or ignorant
21:31:26FromDiscord<Elegant Beef> I could always ping the person that said it if i really wanted to, as he's in the discord 😄
21:32:24FromDiscord<Elegant Beef> He's also said "It doesnt do anything new"
21:32:30FromDiscord<Rika> im not the best person to argue with
21:32:36disruptekindeed.
21:32:36FromDiscord<Elegant Beef> So it's a wild world of "Ok...and?"
21:32:37FromDiscord<Rika> you can ask disruptek and he'll agree
21:32:41FromDiscord<Rika> see
21:33:22FromDiscord<Rika> what do you mean it doesnt do anything new
21:33:38FromDiscord<Rika> if you dig deep enough into languages you can argue that RUST doesnt do anything new
21:34:02FromDiscord<Rika> probably, i didnt dig deep enough to defend that
21:34:27FromDiscord<Elegant Beef> I mean ownership is what he says is new
21:35:07FromDiscord<Rika> well new features arent usually the jewels of languages anyway, its the execution of features that are
21:35:13FromDiscord<Rika> the implementation rather
21:35:39FromDiscord<Rika> its just that rust nailed (?) the implementation of a new (?) feature, ownership
21:35:50*awe002 joined #nim
21:35:54disrupteknah.
21:35:58disruptekit's a huge pita.
21:36:01FromDiscord<Rika> see the (?) s
21:36:03FromDiscord<Rika> i know it is
21:36:05FromDiscord<Rika> i tried it
21:36:08FromDiscord<Rika> i noped the fuck out
21:36:12FromDiscord<Elegant Beef> But muh safety!
21:36:17disrupteki would say that arc nails it.
21:36:20FromDiscord<Rika> but muh productivity
21:36:30*solitudesf quit (Ping timeout: 256 seconds)
21:36:36FromDiscord<Rika> oh
21:36:41FromDiscord<Rika> how is arc not a new feature?
21:36:47FromDiscord<Rika> ask that to them
21:36:53FromDiscord<Rika> or if theyre seeing this, hello
21:36:58FromDiscord<Elegant Beef> They dont look in here
21:37:08FromDiscord<Rika> so ignorance
21:37:36FromDiscord<Rika> maybe you were just bad at showcasing nim 😛
21:39:02FromDiscord<Elegant Beef> Lol after this joke implementation he did say "Nim is so compact and ugly"
21:39:06FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2sJV
21:39:54FromDiscord<Rika> did you write that?
21:39:59FromDiscord<Rika> ~~it looks bad~~
21:40:18disrupteki just puked a little in my mouth.
21:40:21FromDiscord<Elegant Beef> inb4 you complain about X thing
21:40:38FromDiscord<dom96> That looks like Nim written by a C programmer
21:40:52FromDiscord<Rika> who wrote that then
21:40:55FromDiscord<dom96> that if statement at least
21:40:56FromDiscord<Elegant Beef> I did
21:41:01FromDiscord<Rika> jesus
21:41:03FromDiscord<Elegant Beef> Dude i write ifs with `()`
21:41:09FromDiscord<Rika> why thoi
21:41:11FromDiscord<Rika> (edit) 'thoi' => 'tho'
21:41:27FromDiscord<Elegant Beef> i prefer the seperation it gives, easier for my generally misreading mind to see the logic
21:41:28FromDiscord<Recruit_main707> ^
21:41:35FromDiscord<dom96> habits eh?
21:41:36FromDiscord<Elegant Beef> I often misread stuff
21:41:43FromDiscord<Elegant Beef> So with those there things dont flow into shit
21:41:45FromDiscord<dom96> at least add a space after the `if`
21:42:06FromDiscord<Rika> also
21:42:18FromDiscord<Rika> why do they word "compact" as if that was a bad thing?
21:42:22FromDiscord<Elegant Beef> Not a clue
21:42:44FromDiscord<Elegant Beef> I do like how picking apart this insincere implementation was more important than that question 😛
21:42:47FromGitter<ynfle> https://play.nim-lang.org/#ix=2utj How can this have side affects?
21:43:11disruptekexceptions are side-effects.
21:44:14FromDiscord<dom96> nope
21:44:18FromDiscord<dom96> global var causes it
21:44:24FromDiscord<dom96> move the variable into the func and it compiles
21:44:42disruptekwell, it shouldn't. 😁
21:45:50FromDiscord<dom96> Well, at least I have the BDFLs support. https://media.discordapp.net/attachments/371759389889003532/745035681989918811/unknown.png
21:45:58disruptekif you try to execute it, you'll find it produces side-effects.
21:46:10disruptekhttps://play.nim-lang.org/#ix=2utk
21:46:20disrupteki can't help that araq is wrong.
21:46:27disruptekall i can do is try to teach him something.
21:46:50FromDiscord<dom96> disruptek: nope, you've got echo in the func https://play.nim-lang.org/#ix=2utl
21:47:07disruptekoh, you're right.
21:47:24disruptekwell, he's still wrong.
21:47:39FromDiscord<Kiloneie> To me Nim is in overall an excelent package, which other language can say the same? A lot of them have huge flaws or ancient design. Doesnt do anything new...
21:48:03FromDiscord<dom96> Why do you consider exceptions to be side effects?
21:48:15FromDiscord<Recruit_main707> Tbh, Nim has some tiny flaws
21:48:16disruptekwhat else could they be?
21:48:20FromDiscord<Rika> nim has flaws
21:48:35FromDiscord<dom96> They're more like return values
21:48:41FromDiscord<Kiloneie> Yeh but not like Java ones.
21:48:43FromDiscord<dom96> You'll get the same exception for the same inputs
21:49:41disrupteki'm afraid i don't have the patience to go through this argument again.
21:49:56disruptekexceptions are not alloc-free, ergo they have side-effects.
21:50:06FromDiscord<Rika> alloc free?
21:50:23FromDiscord<Rika> as in literally alloc free?
21:50:30FromDiscord<Varriount> They allocate memory from the heap
21:50:47FromDiscord<Rika> then that would make creating a ref within the function count as a side effect no?
21:51:12FromDiscord<Varriount> Don't forget a function call - that allocates stack memory
21:51:54FromDiscord<dom96> lol wat
21:52:07FromDiscord<Rika> i dont know with dis
21:52:21FromDiscord<Varriount> Calling a function increases the stack pointer
21:52:23FromDiscord<dom96> Pretty sure that's not the commonly accepted definition of "side effect free"
21:52:31FromDiscord<dom96> allocs don't matter
21:52:52*Cthalupa quit (Ping timeout: 256 seconds)
21:53:10FromGitter<ynfle> @dom96, it was a `let` not `var`
21:54:00disruptekit's not important to me that you agree.
21:54:03FromDiscord<Rika> maybe it would be useful to have both definitions? though the other definition i still dont understand so im not sure if this is a good idea either
21:54:12FromDiscord<dom96> ynfle: what do you mean?
21:54:40disruptekdoes anyone know of a compiler plugin for nim? or is this just a myth that araq trots out to explain away feature requests?
21:54:41FromDiscord<dom96> disruptek: well, it's certain that at least Nim's definition is different to yours. Can you name a language that follows your definition?
21:54:50FromGitter<ynfle> I thought `let x = "hello"` means x is imutable
21:54:58disruptekmaybe, but as i said, i don't have the patience for this right now.
21:55:28FromDiscord<dom96> ynfle: yes, I actually think it may be a bug that it gives you that error when that is a global
21:55:38FromDiscord<dom96> so please report on github
21:55:47FromGitter<ynfle> Ok 👍
21:56:11FromGitter<ynfle> It wasn't discovered by me so I'll credit that person
21:57:45FromDiscord<Elegant Beef> Isnt the issue that the let from global scope could be mutated by the unsafeaddr?
21:58:08FromDiscord<Elegant Beef> So the reference of the immutable table is an issue, or am i looney?
21:58:23FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2utp this here
21:58:57FromGitter<ynfle> Why is that different for `const`?
21:59:19FromDiscord<Elegant Beef> `/usercode/in.nim(10, 3) Error: expression has no address`
21:59:51FromGitter<ynfle> Aha
22:00:03FromDiscord<dom96> they're not using unsafeAddr though
22:00:38FromDiscord<Elegant Beef> oh i know, but i just assumed the side effect checker seen the reference to the table, and went "this can have sideeffects", so i am probably wrong to the reason
22:01:30FromGitter<ynfle> I think he means that because the same tableRef can have different key, value pairs when declared with `let`, It's inherently sideEffect prone
22:02:21FromDiscord<Elegant Beef> Nah if i meant that i'd have said that
22:03:07FromGitter<ynfle> ...
22:03:15FromGitter<ynfle> So what did you mean?
22:03:57FromDiscord<dom96> nonetheless, this is a bug, speculating about why it's a bug is pointless 🙂
22:04:09FromDiscord<Elegant Beef> I was just guessing that the issue appears due to the let being mutable if abusing the unsafeaddr, so if it was referenced inside the func it complains, i have really never used funcs so i just assumed they were only supposed to reference global consts and internally constructed things 😄
22:05:26FromDiscord<Elegant Beef> I mean dom based off what i was saying i was implying using a let was wrong, but you're smarter than me so you should know what's proper 😄
22:06:16FromGitter<ynfle> Im pretty sure that's what I said
22:06:54FromDiscord<Elegant Beef> well no you said the key/values arent constant, i was saying cause you can change them inside a proc with unsafeaddr
22:07:19FromGitter<ynfle> Sorry, that's what I meant
22:07:30FromDiscord<Elegant Beef> I have no clue if this is a bug, dom indicates it is, so report it as such
22:08:15FromGitter<ynfle> I shall
22:08:20FromDiscord<Elegant Beef> My understanding of pure functions is they're supposed to take inputs and use globals only, so this seems fine to me 😄
22:09:35FromDiscord<Elegant Beef> Is the side effect checker supposed to be smart enough to check if there is a side effect or only if the body touches variables which could have side effects?
22:11:23FromDiscord<dom96> Well, just to be clear, I think it's a bug. Araq may disagree with me 🙂
22:11:42FromDiscord<dom96> Still worth a report though
22:11:45FromDiscord<Elegant Beef> Hey i admit im not smart, so i say it'sa bug too 😛
22:13:31FromGitter<stisa> @disruptek you mean like https://github.com/nim-lang/Nim/blob/devel/compiler/plugins/locals.nim ? that's the only thing I remember seeing about compiler plugins
22:14:28disrupteknah.
22:17:02*Cthalupa joined #nim
22:19:20disrupteki have a rewrite pass but i don't like having to interface with it using tricks.
22:20:17*leorize joined #nim
22:21:12FromGitter<ynfle> How do I enable strict funcs again?
22:21:45FromGitter<ynfle> Also, where is the `sideEffect`ness of funcs checked in the compiler?
22:37:34leorizewdym by strict funcs?
22:39:48leorizelooks like it's `{.experimental: "strictFuncs".}
22:56:43*lritter quit (Quit: Leaving)
23:00:53*arecacea1 quit (Remote host closed the connection)
23:01:13*arecacea1 joined #nim
23:02:12*arecacea1 quit (Remote host closed the connection)
23:02:42*arecacea1 joined #nim
23:07:38FromDiscord<19> is this the best way i can write this construction: https://play.nim-lang.org/#ix=2utO ?
23:08:22disruptekremove :void
23:08:36disruptekwhat do you mean by "best way"?
23:08:46FromDiscord<19> shortest
23:10:22disruptekhttps://play.nim-lang.org/#ix=2utR
23:11:01disruptektypo: s/y/h/
23:11:26*vicfred joined #nim
23:11:50FromDiscord<19> id like this Vector2 type to be inside the Rect()
23:12:07disruptekyou didn't define the Rect.
23:12:26FromDiscord<19> its from sdl2
23:12:33disrupteki noticed that.
23:12:54FromDiscord<19> ok so i redefine it?
23:13:18disruptekif you want your own type to be inside it, yes, you probably will need to.
23:13:49disrupteki would probably do this differently, though.
23:14:07FromDiscord<19> im trying to learn, please enlighten me
23:14:17FromDiscord<19> 🐱
23:16:09disruptekhttps://play.nim-lang.org/#ix=2utV
23:16:26disruptekthe idea is that you can specify 2, 3, or 4 values. the second two default to the first.
23:19:02FromDiscord<19> very cool!
23:20:05FromDiscord<19> thanks!
23:45:58FromDiscord<19> its a waste to put the Vector2 with the Rect type since they both have x and y
23:46:11disrupteksure.
23:46:20FromDiscord<19> better to use Vec2 outside for calculations and mutate the Rect
23:46:34disruptekmakes sense.
23:46:49*krux02_ joined #nim
23:46:50FromDiscord<Clyybber> width and height default to x and y? sounds like a recipe for nicey bugs :D
23:47:02disruptekshhh
23:47:14disruptekdon't you have some nim bugs to play with?
23:47:14FromDiscord<19> its just a quick example to show me syntax
23:47:21FromDiscord<19> xD
23:47:52FromDiscord<Clyybber> disruptek: heh, the typed bug is fixed, but I'm trying to get rid of nfSem
23:48:02disruptekwhy?
23:48:12FromDiscord<Clyybber> we can probably live without it
23:48:14disruptekalso, that's awesome.
23:48:30FromDiscord<Clyybber> <3
23:48:43disruptektyped proc params?
23:48:47FromDiscord<Clyybber> but I gotta get some sleep, been awake since 20 hours or so
23:48:59disruptekaight, peace out.
23:49:06FromDiscord<Clyybber> gnite
23:49:07FromDiscord<Clyybber> peac
23:49:08FromDiscord<Clyybber> e
23:49:37*krux02 quit (Ping timeout: 260 seconds)