<< 26-09-2019 >>

00:00:15disrupteki'm pretty good at awful programming.
00:00:36Cadeymood
00:00:52Cadeyi need to write up the backend for that GPT-2 software license shitpost
00:01:07Cadeynim here we go
00:02:28SodaScripterWell I mean my first drawing was pretty awful
00:02:32SodaScripterand I improved at drawing
00:02:39SodaScripterso I'd assume programming is the same way?
00:03:22SodaScripterCadey, what's the GPT-2 Software liscence shitpost?
00:03:44Cadeyread this thread: https://twitter.com/theprincessxena/status/1176837738357805057
00:05:33disruptekdidn't i just read about this somewhere? HN?
00:06:56Cadeyi hope not
00:07:05Cadeyi've been talking about it in #lobsters-boil all day
00:10:26disrupteki'm afraid to learn if that's code for something.
00:20:36Cadeydisruptek: do i really inspire that much fear in you?
00:21:35disrupteknot a fan of crustaceans.
00:21:39disruptekor boils, for that matter.
00:23:20FromDiscord<slymilano> Hey guys, does Nim have a formatter like Elixir's `mix format` or Go's `go fmt` to automatically format code?
00:23:39disruptektry `nimpretty`
00:24:40FromDiscord<slymilano> `nimpretty myfile.nim`? It doesn't seem to change anything, and I see no output
00:24:55FromDiscord<slymilano> If I run `nimpretty` alone, it says no input file, so nimpretty is in my path
00:25:07FromDiscord<slymilano> ```
00:25:08FromDiscord<slymilano> import os
00:25:08FromDiscord<slymilano>
00:25:08FromDiscord<slymilano> echo("Chat application started")
00:25:08FromDiscord<slymilano>
00:25:08FromDiscord<slymilano> if paramCount() == 0:
00:25:09FromDiscord<slymilano> quit("Please specify the server address, eg: ./client localhost")
00:25:10FromDiscord<slymilano>
00:25:12FromDiscord<slymilano> let serverAddress = paramStr(1)
00:25:13FromDiscord<slymilano> echo("Connecting to ", serverAddress)
00:25:15FromDiscord<slymilano> ```
00:25:16FromDiscord<slymilano>
00:25:16disruptekit's perhaps not as opinionated as you expect.
00:25:17FromDiscord<slymilano> This is what I'm trying to format
00:25:28disruptekplease don't paste here; use a paste service.
00:25:54FromDiscord<slymilano> Does nimpretty not modify spaces?
00:26:06Jjp137nimpretty --help states that by default, it overwrites the input file
00:26:08FromDiscord<slymilano> I expected it to change my un-purpose-ugly 9 spaces in `quit` to only 2 spaces
00:26:30FromDiscord<SodaScripter> I really love nim so far
00:27:01Jjp137maybe it auto-detected the indentation as 9 spaces? I don't know for sure
00:27:09disruptekthis.
00:27:25disruptekvalid indentation is any number of spaces 1+.
00:27:37disruptekthe first such indentation sets the indent for the remaining lines.
00:28:26FromDiscord<slymilano> Ah that makes sense, it's actually indenting if I set the first identation as 2, then fuck up the rest of the file. pretty sweet and immediate
00:29:21FromDiscord<slymilano> The Nim in Action is having me create a project folder structure myself, before I continue do you know if there's a way to generate a new project with Nim? Like `mix new my_app` in Elixir?
00:30:01disruptektry `nimble init`.
00:33:47FromDiscord<slymilano> That worked nicely, thank you!
00:36:23disruptekno problem, boss.
00:37:42*sealmove quit (Quit: WeeChat 2.6)
00:38:29*Jjp137 quit (Read error: Connection reset by peer)
00:38:44*Jjp137 joined #nim
00:41:54SodaScripterHow do I compile to an file my friend can run on their Unix machine?
00:42:30disruptekfirst, replace windows with linux.
00:42:44SodaScripter?
00:43:28disruptekwell, you want to build your friend a binary, yes?
00:43:32SodaScripterI'm on GNU/Linux already, if that helps.
00:44:00disruptekthey have a wildly disparate unix?
00:44:11SodaScripterthey're on BSD if that helps.
00:44:44SodaScripterI just don't know how to compile at all haha.
00:44:58SodaScripterI know nim c -r but Idk how to make it executable on their machine
00:45:01disruptekugh. tell them to install nim. i believe it works well enough to compile your source there. or, pass them the c input.
00:45:27SodaScripterok
00:51:18FromDiscord<treeform> I don't think you can make a Unix binary on Linux, but you can install a Unix vm on Linux, compile there and copy the file.
00:51:24shashlickuse docker
00:51:53shashlickdockcross and create a binary you can send
00:52:08FromDiscord<treeform> Can docker run Unix?
00:52:21disruptekif you're gonna make a habit of shipping to that platform, sure.
01:08:43*Jjp137 quit (Read error: Connection reset by peer)
01:32:56*NimBot joined #nim
01:34:25*SodaScripter quit (Remote host closed the connection)
01:50:07FromDiscord<slymilano> Nice my post on Nim is currently #1 on hackernews!
01:57:43*endragor joined #nim
01:59:04disruptekslymilano: link?
02:02:51leorize[m]it's just the link to Araq blog about v1
02:07:55owl_000https://github.com/nim-lang/Nim/issues/12249 this issue fixed already, so how to update my nim [windows]. because i can not compile without -f
02:08:18disruptekare you using `choosenim`?
02:09:18owl_000no, but i have choosenim
02:09:44disruptekyou can use it to choose the devel branch. or, you can install a new nightly.
02:10:04*sealmove joined #nim
02:11:45disrupteki dunno when the nightlies run, but obviously, you'll need one built after that patch was merged.
02:12:33owl_000one thing, for windows the default procedure is zip extraction and running finish.exe, i did it but choosenim shows nothing
02:13:04owl_000though i did add the path manually to the path environment
02:13:10disruptekwhaddya mean by `shows nothing`?
02:14:27leorize[m]choosenim can only manage installations done by it
02:14:46owl_000oh,
02:15:15disruptekyes, but it can create new installations. else we have one of those bootstrap paradoxes...
02:15:36disruptekhmm, maybe that's why i don't use choosenim.
02:15:40owl_000https://i.ibb.co/HdQgF7y/Capture.png i meant it, installed ...
02:16:17disrupteki think you can say `choosenim #devel` or something. see if a `--help`, uh, helps.
02:17:27shashlickwhere nim
02:17:39disruptektry whistling, that sometimes works.
02:17:45shashlickwhere choosenim
02:17:55owl_000in my pc
02:18:07disruptekwhen you shake it, does it rattle?
02:18:22owl_000lol
02:19:25FromDiscord<exelotl> sunvox bindings here! https://github.com/exelotl/nim-sunvox
02:19:31FromDiscord<exelotl> cc @Shield
02:20:10disruptekwow, cool. thanks for that.
02:20:41shashlickno, i mean run the command `where nim` and `where choosenim`
02:20:49owl_000oh
02:21:02disruptekcan i generate input for sunvox in the vm?
02:21:42disruptekit would be awesome to listen to my code as it runs. kinda like peep, the network auralizer.
02:24:04*exelotl quit (Ping timeout: 264 seconds)
02:24:12owl_000shashlick nim: c:/prog/nim-1.0.0/bin/nim.exe | choosenim: c:/prog/choosenim.exe
02:25:37leorize[m]choosenim can't manage installations that it didn't do
02:26:00disruptekyer blowing my mind right now.
02:26:17disruptekhow are people supposed to use it?
02:26:22shashlickowl_000 what do you want to do?
02:26:52leorize[m]you install with it using `choosenim stable/devel`
02:27:29leorize[m]it will install nim to a "hidden" folder
02:27:42shashlickhe already has a working nim
02:27:50leorize[m]then creates shims in .nimble/bin
02:28:02disruptekhe needs something fresher.
02:30:12shashlickokay, remove c:\prog\nim-1.0.0\bin from your path
02:30:34shashlickadd $HOME\.nimble\bin to your path
02:30:38shashlickand then choosenim devel
02:32:27*matlock joined #nim
02:38:06disruptekthat zip macro... have you seen this? https://github.com/numforge/loopfusion
02:40:31leorize[m]that macro is indefinitely better :p
02:40:32shashlickgaah, nim pre-1.0 didn't have delEnv
02:41:14leorize[m]drop support for pre-1.0
02:41:19leorize[m]problem solved lol
02:41:32disruptekjust reimplement it.
02:41:42shashlicki'm still supporting 0.19.6
02:42:30leorize[m]why would you need to meddle with env vars though?
02:42:59leorize[m]unless its scripting I never touch those
02:43:18disruptekit's a hack.
02:43:20shashlickhttps://github.com/nimterop/nimterop/blob/v020/nimterop/build.nim#L653
02:43:43shashlicki'm all ears if you have a better idea
02:44:20disruptekwrite a file.
02:46:08shashlickeww
02:46:30disruptekwell, you're not making it easy for us. 😜
02:47:08*mwbrown quit (Ping timeout: 276 seconds)
02:48:16leorize[m]envs are certainly usable here
02:48:45leorize[m]but I think you should store all of them in one central env
02:49:22leorize[m]something like: NIMTEROP_OPTS
02:50:28leorize[m]it will reduce the bloated env space, and makes cleaning up easier :p
02:50:30disruptekmaybe uri encode them as a querystring.
02:51:45leorize[m]also can you stop requiring static blocks?
02:51:52leorize[m]at this point it's just noise
02:52:02shashlicksounds good
02:58:06*SodaScripter joined #nim
03:08:22*Jjp137 joined #nim
03:20:01*rockcavera quit (Remote host closed the connection)
03:25:28*mwbrown joined #nim
03:32:38*owl_000 quit (Ping timeout: 276 seconds)
03:34:30matlockDo any of the nim build tools need network access besides nimble to download?
03:36:15*laaron quit (Remote host closed the connection)
03:40:03shashlicknot really i don't think
03:48:27*dddddd quit (Remote host closed the connection)
03:57:48*chemist69 quit (Ping timeout: 245 seconds)
04:00:02*chemist69 joined #nim
04:01:17*doesntgolf quit (Ping timeout: 240 seconds)
04:09:18*sealmove quit (Quit: WeeChat 2.6)
04:33:59*endragor quit (Quit: Leaving...)
04:39:03FromGitter<gogolxdong> Do we still use -d:release for production release or -d:danger?
04:41:31leorize-d:release is recommended
04:42:02FromGitter<gogolxdong> Thanks!
04:42:37FromDiscord<DeltaPHC> danger is more for if you need to squeeze out every last bit of performance and you've verified that terrible runtime bugs won't happen
04:43:20FromGitter<gogolxdong> saw -d:danger is 5x slower
04:43:45leorizeit's a typo :P
04:43:46FromGitter<gogolxdong> Did it change recently?
04:44:21FromGitter<gogolxdong> means -d:danger is faster?
04:44:30leorizeyea
04:44:43leorizeI mean, -d:danger turns off all the checks
04:44:51leorizeit can't be slower
04:45:41leorizeI'd recommend -d:release and disable certain checks at places that you verified to be safe
04:46:27FromGitter<gogolxdong> How to disable certain checks?
04:47:19leorizehttps://nim-lang.org/docs/manual.html#pragmas-compilation-option-pragmas
04:47:42leorizethey can also be used with {.push.} and {.pop.} to disable checks for speed-critical paths
04:47:48SodaScripterWhat's the best thing for a GUI in nim?
04:47:59leorizeif you're writing a windows gui, wNim
04:48:08SodaScripterCross platform
04:48:23leorizewxNim should be the most featureful
04:48:41SodaScripterGuess I'll go get wxNim
04:48:49FromDiscord<DeltaPHC> I forget that Nim has very granular compilation hints. It's a cool feature
04:49:07SodaScripteris it in nimble?
04:49:21leorizeyes
04:49:22*gour joined #nim
04:49:31leorizeactually wait
04:50:03SodaScripterit isn't ._.
04:50:27leorizelooks like PMunch didn't publish it
04:50:29leorizehttps://github.com/PMunch/wxnim#installation
04:50:39leorize^ there, you can `nimble install` the link
04:50:46leorize(sans the # part)
04:51:53leorizethere's also gintro if you can do Gtk
04:52:01leorizebut to be fair karax tops them all
04:52:15SodaScripterwhat's karax
04:52:19leorizeafter writing a frontend in that thing I now understand why devs went for electron
04:52:34leorizehttps://github.com/pragmagic/karax
04:52:59*nsf joined #nim
04:53:02SodaScripterthis is too big brained for me
04:53:24leorizekarax is basically writing html
04:53:32leorizebut in Nim :P
04:53:46shashlick@leorize - i just ended up using a global var, didn't need env vars
04:55:03leorizenice
04:55:44*laaron joined #nim
04:57:38*laaron quit (Client Quit)
04:59:55*laaron joined #nim
05:02:02SodaScripterniGui is pretty interesting
05:02:26leorizeyea, but it's a bit underdeveloped
05:02:59SodaScripterwhat would you reccomend me to use?
05:03:13*laaron quit (Client Quit)
05:04:02leorizewhat kind of gui application are you writing?
05:05:00*laaron joined #nim
05:08:38SodaScripterNot anything in particular at the moment, I just want to know a good library for when I start.
05:08:59FromDiscord<djazz> I think wx is nice
05:09:06leorizeas far as Nim is concerned wxNim is the most featureful
05:09:20leorizenext to it is gintro (which uses Gtk)
05:09:31leorizethen wNim
05:09:41leorizeif you target JS, then `karax` is the best out there
05:10:13SodaScripterI prefer native
05:10:52leorizewxNim should do for cross-platform programming
05:11:02leorizeit's not the nicest library to use, but it certainly works
05:11:14SodaScripteris it like wxWidgets?
05:11:24leorizeit's a wxWidgets wrapper
05:11:26SodaScripterah
05:11:30SodaScripterI love wxWidgets so
05:11:43FromGitter<alehander42> karax is similar to other spa-s
05:11:49FromGitter<alehander42> a bit like react
05:11:55FromGitter<alehander42> not the same, but kinda similar
05:12:00SodaScripterlast commit was in 2015 :/
05:12:31leorizehttps://github.com/PMunch/wxnim
05:12:38leorize^ that one is the newer one
05:13:03SodaScripterok
05:16:41*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
05:21:26*navin joined #nim
05:22:20*laaron joined #nim
05:22:58*navin quit (Remote host closed the connection)
05:23:30*navin joined #nim
05:26:25*laaron quit (Client Quit)
05:26:38FromDiscord<Shield> That's great @exelotl thanks!
05:27:19*navin quit (Read error: Connection reset by peer)
05:27:27*navin joined #nim
05:27:54*laaron joined #nim
05:29:06*laaron quit (Client Quit)
05:33:00*laaron joined #nim
05:33:20*LargeEpsilon joined #nim
05:38:04*narimiran joined #nim
05:49:53FromGitter<zacharycarter> It'd be nice if JS would just die already, but I think we need better wasm support first
05:50:15FromGitter<zacharycarter> Looks like - https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor - worked as an experiment
05:55:15FromDiscord<Shield> sunvox bindings work perfectly
05:57:08*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
05:57:43gourleorize: wxNim is still developed/maintained?
05:58:00*laaron joined #nim
06:09:36leorize[m]it's afaik
06:12:07*skoude joined #nim
06:13:12*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
06:13:54*laaron joined #nim
06:15:28FromGitter<alehander42> honestly, i'll miss some things
06:15:54FromGitter<alehander42> at least these days, you can inspect/play way more easily with web apps html/css, even javascript
06:16:09FromGitter<alehander42> wasm will be just "one big binary thing" black box
06:16:10FromGitter<alehander42> again
06:20:34*solitudesf joined #nim
06:25:10*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
06:25:56*laaron joined #nim
06:26:13Araqcan wasm access the DOM now?
06:28:09*laaron quit (Client Quit)
06:29:52*mibr joined #nim
06:33:46*SodaScripter quit (Remote host closed the connection)
06:34:09*SodaScripter joined #nim
06:35:01*navin quit (Remote host closed the connection)
06:35:36*Vladar joined #nim
06:35:37*skoude quit (Ping timeout: 240 seconds)
06:37:49*laaron joined #nim
06:37:52*skoude joined #nim
06:38:19*navin joined #nim
06:39:44*laaron quit (Client Quit)
06:39:56FromGitter<arnetheduck> araq, yes: https://rustwasm.github.io/docs/wasm-bindgen/examples/dom.html (with a library)
06:41:41Araqlet body = document.body().expect("document should have a body") # booohh! what's this? hidden control flow? omg the world is gonna end
06:42:29FromGitter<arnetheduck> it's quite.. explicit, I'd say. even the same letters as `except` ;)
06:42:48Araqit doesn't have an exclamation mark
06:42:50*navin quit (Ping timeout: 252 seconds)
06:43:40FromGitter<zacharycarter> I won't miss anything about HTML / CSS and JS
06:43:54FromGitter<zacharycarter> I wish them an expedient death
06:44:04Araq+1
06:44:15Araqanyway, so ... how does this "library" work?
06:44:26FromGitter<zacharycarter> which one?
06:44:45FromGitter<zacharycarter> Blazor or RustWasm?
06:45:31*navin joined #nim
06:47:35AraqI'm fine with either
06:48:09*navin quit (Remote host closed the connection)
06:48:18gour+1 for JS&co's departure
06:48:45FromGitter<zacharycarter> not really sure - but I imagine we could do something similar right now with emscripten + Nim
06:49:05Guest96751gooood morning folks, is there a nim lib to handle with network frames or should i do it with C - *.h ?
06:49:10Araqyeah but I've been there and afterwards I wrote Karax
06:49:36Araqemscripten for accessing the DOM kept crashing for me back then and the compiletimes were terrible too
06:50:19AraqGuest96751: you can easily write C-like code in Nim syntax
06:50:36FromDiscord<Shield> to this day i'll never understand how js took over webdev when luajit is superior in every way
06:50:40*navin joined #nim
06:52:23FromDiscord<Shield> btw, is there a way to run machine code on windows? linux has munmap and i can't find the windows equivalent
06:53:38Araqmunmap for running code?
06:54:34Araqhttps://docs.microsoft.com/de-de/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect
06:56:06Zevvshield: what are you trying to do?
06:56:08Araqhttps://docs.microsoft.com/de-de/windows/win32/memory/memory-protection-constants
06:57:24AraqShield: it's actually quite simpe: Js runs in the browser and nothing else did. Instant success, no competition on a system everybody wants to target
07:00:05FromDiscord<Kiloneie> Hei @Araq, should i be making a new post in my thread in the forum everytime i make a video to bump it up higher, or edit into the first post ?
07:00:35*laaron joined #nim
07:01:10narimiranyou can bump it, no harm there
07:01:59FromDiscord<Kiloneie> Okay i guess, in some other forums i used to be, people were very salty about that
07:02:02narimiranbtw, how frequent will your videos be?
07:02:11FromDiscord<Kiloneie> i want 1 per day to more
07:02:45FromDiscord<Kiloneie> right now im struggling making them so until i get better at talking and writting them it's gonna be one, but i would love to get like 2
07:03:16FromGitter<alehander42> https://raw.githubusercontent.com/alehander42/Nim/nilcheck-spec/doc/nilcheck.rst
07:03:25FromDiscord<Shield> @Zevv it's just a lingering question i had in mind when i was reading about JITs
07:03:27narimiran2 per day? will you be able to sustain that pace? i would say that 1 per day is plenty
07:03:48Araqah so you practice and will get better at it, Kiloneie, smart.
07:03:57*krux02 joined #nim
07:04:09FromGitter<alehander42> Araq, i updated my draft, not sure what am i doing wrong with rst tho, it doesnt render well, but maybe github is caching my old edits somehow
07:04:46Araqwhat's also popular: not practicing and blaming your tools instead
07:04:54leorizeGuest96751: checkout NESM for a binary serializer/parser library
07:05:05FromDiscord<Kiloneie> will see, at the beginning, i want to make more because Nim is 1.0 now and theres next to no videos so having more content to learn from for people will be good, and help me grow, then when harder content is to be made, yeah it will probably slow me down
07:05:27*gmpreussner joined #nim
07:06:02FromGitter<alehander42> i played with the cfg, and it seems there are two approaches: add more cfg primitives (nilable <location> not-nilable <location> etc) based on conditions, or process the current cfg + the ast with an additional data structure
07:06:48*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
07:07:01FromDiscord<Kiloneie> I do hope it's good and okay if i use Nim's black logo with my video's title for now
07:07:37*laaron joined #nim
07:08:13FromGitter<alehander42> i thought about auto-normalizing or, xor etc as and+not combinations in the ast itself, but i guess this would make final code harder to debug+ break overloaded `or` (but i guess overloaded `or` is just a call at this point of sem?)
07:11:48FromDiscord<Kiloneie> Google says once i get ads on i could be getting 2-5$ per 1000 views, not bad, but that will be hard to make anything out of... hopefully patreon, maybe paid ads... i am hoping it won't take a decade to make a living out of it, which is just 350$ for me.
07:11:50FromGitter<alehander42> but this is not very important, easy to deal with in the construction
07:13:05FromGitter<alehander42> you should really research other prog videos channels and what brings them most views
07:13:42FromDiscord<Kiloneie> i did some, and will do more
07:13:55FromDiscord<Kiloneie> honestly some don't give a fuck and they get views
07:14:29FromDiscord<Kiloneie> like, sorry to cut the previous video so short(insert family crap), talk about family crap for 1 minute or more and finally video.
07:15:19FromDiscord<Kiloneie> that's just after 10 minutes of video contents that he did that, like... why would you do that ? and yet barely any dislikes and lots of views, it's weird.
07:16:11leorizeyoutube is a weird place
07:16:43leorizeI'd say that you'll have better luck on patreon than waiting for yt ads to be profitable
07:16:46FromDiscord<Kiloneie> i am actually getting subs now, last time i did videos... i got 1 in 40 videos in 4 months... talk about depression there
07:17:48FromDiscord<Kiloneie> yeah, i will put up patreon once i have like 2 weeks worth of videos, so that people can see i am actually doing this and it's not just hey i made 2 videos, give me money to make more pretty please D:
07:23:06FromGitter<alehander42> well, sometimes people like "personal" stuff in videos, its strange to explain
07:23:07livcddoes finish.exe only setup the env variables ?
07:23:27FromGitter<alehander42> different folks different subs
07:25:41FromDiscord<Kiloneie> i do like getting to know my youtube people as well xD
07:28:34leorizeyoutube is an intense battleground for clicks
07:30:25leorizeand thanks to changes in how yt recommend your videos, subs doesn't mean much anymore
07:38:40FromDiscord<Kiloneie> which is both a good thing and a bad thing, makes people subbed to big youtubers see smaller ones more, i think ?...
07:44:03FromDiscord<Kiloneie> my #2 might have gotten way less videos than it could of... i forgot to put it in a playlist xD
07:44:20FromDiscord<Kiloneie> i know that the more videos i watch of a kind and or youtuber the more it shows them to me
07:44:57FromDiscord<Kiloneie> do you guys see my 2 videos in a playlist ?
07:46:02FromDiscord<Kiloneie> i see it, so you probably should too, this should help #2 get views, it's lacking compared to my intro one
07:46:45*asymptotically joined #nim
07:50:16*owl_000 joined #nim
07:50:33FromGitter<arnetheduck> Araq, wasm allows you to import functions from the environment - basically, the library is a bunch of javascript functions exported to wasm, just like the c library translates kernel stuff for nim. I imagine it could even be done in a language-independent way (ie nim could reuse the rust-web way of exporting the dom to wasm)
07:51:33FromGitter<alehander42> kiloneie, i doubt the playlist thing is critical, dont worry :)
07:52:22FromGitter<alehander42> i still think subs are important, but not sure how it works
07:52:28AraqKiloneie: can you join IRC directly?
07:52:34FromGitter<arnetheduck> fwiw, it's likely that we'll be exploring it more in depth at some point, unless someone beats us to it - we want to make the cryptography and other stuff implemented in nim available to javascript applications
07:52:53FromGitter<arnetheduck> and not through the js backend, it kind of sucks for this
07:53:08FromGitter<alehander42> @arnetheduck can nlvm compile directly to wasm currently
07:53:15FromGitter<arnetheduck> @alehander42 yes
07:54:21Araqdoes wasm support a "Native" canvas?
07:54:33Araqhmm I guess not
07:55:10FromGitter<arnetheduck> there's an opengl-based canvas from what I remember.. emscripten uses something like that to provide emulation for SDL (the graphics lib)
07:56:05FromGitter<arnetheduck> the point is though, that wasm is just an instruction set and a spec for interacting with the surrounding environment.. what that environment is depends
07:57:19Araqthe environment is all I care about
07:57:24FromGitter<arnetheduck> emscripten gives you one kind of environment (with canvases and posix functions) - rust-web another (the web dom) - and now, WASI is being developed to standardise some environment features in a modular fashion (file io,sockets etc)
07:57:53AraqI don't care about the lovely new way to encode INC EAX
07:58:12FromGitter<arnetheduck> we do ;)
07:58:46AraqI think the browser should just be DosBox ;-)
07:59:30FromGitter<arnetheduck> @alehander42 https://forum.nim-lang.org/t/4779
08:00:06Zevvisolate, virtualize, containerize, layerize, turtles all the way down
08:00:26*owl_000 quit (Remote host closed the connection)
08:00:51*owl_000 joined #nim
08:00:53Araqand in the end Doom written for i386 runs everywhere and the JVM doesn't
08:01:30Zevvyeah, but that's because of priorities. If you could choose to port either Doom or the JVM to your cool hip platform, which would *you* choose
08:02:16Araqthe useful software, of course
08:02:18solitudesfdoom
08:02:21Araq;-)
08:06:51*navin_ joined #nim
08:09:52gourleorize: just cehcked and, afaict, last commit to wxnim is 4 yrs old
08:09:53*navin quit (Ping timeout: 245 seconds)
08:14:05FromDiscord<Kiloneie> @Araq IRC ? why ? i got HexChat for IRC but i don't know how to connect, nothing i type in it connects D:
08:14:32FromGitter<arnetheduck> yeah, who needs more than 640kb anyway? :)
08:16:01Araqarnetheduck: prevents OOM denial of service attacks
08:16:07Araqsecurity!
08:16:45FromDiscord<Kiloneie> What IRC do you guys use ?
08:17:26SodaScripterHexChat
08:17:35SodaScripterwell I use HexChat
08:17:48FromDiscord<SodaScripter> I also have Discord
08:18:08SodaScripterbut it's really resource intensive, so I'm usually just on IRC
08:18:26FromGitter<alehander42> weechat
08:18:26SodaScripterunless I'm talkin with friends or som
08:18:28FromDiscord<Kiloneie> how do you.... connect ?, whats the point of IRC anyways, resource thing like you just said ?
08:18:34FromGitter<alehander42> is pretty easy to work with
08:18:41SodaScripterIRC is really nice
08:19:06SodaScripterAlso we don't use an "IRC" we use an IRC Client
08:19:13SodaScripterIRC Clients allow you to connect to IRC Servers
08:21:23FromDiscord<Kiloneie> In hexchat i press "Add", paste "irc.freenode.net", "Favor" it, then connect and it finds nothing... ,i tried every combination of that when discord bridge was down...
08:21:51FromDiscord<Arvest> Hello dou you speak french guy ?
08:22:19solitudesfhexchat should have freenode builtin
08:23:03FromDiscord<Kiloneie> it says unknown host
08:24:08FromDiscord<Kiloneie> wait... ,let me see something
08:26:13leorizegour: checkout PMunch/wxnim
08:26:16leorizethat's the newer one
08:26:58*ng0 joined #nim
08:27:03FromGitter<alehander42> Arvest, we have one french guy @mratsim
08:29:49*Kiloneie_ joined #nim
08:30:04Kiloneie_Test ?
08:30:11leorizeo/
08:30:15FromDiscord<Kiloneie> okay im in
08:31:12FromDiscord<Kiloneie> This looks like a... team speak without speak xD... ?
08:31:29leorizeZevv: can the `grammar` macro take an ident instead?
08:32:21AraqKiloneie_, I PM'ed you
08:36:14Zevvleorize: it can, although its not documented
08:36:32leorizenope it can't
08:36:39ZevvIt should, lemmesee
08:37:22Zevvit does for me, so probably I don't understand your question
08:37:40Zevvdump me your code
08:38:25leorizehttps://github.com/zevv/npeg/blob/5e212aed0733c72038c72281126ff103877cf007/src/npeg.nim#L106
08:39:31Zevvoooh, the `grammar` macro. You should have said that!
08:40:02leorizeyou need your morning coffee :P
08:40:13*owl joined #nim
08:40:51ZevvWell, it does now. Was about to dump a release shortly
08:41:16*skoude quit (Ping timeout: 265 seconds)
08:41:59leorizeZevv: have you verified that it works with backtick idents?
08:42:09leorizeprobably too much work :P
08:42:29Zevv*what* who the hell wants *backtick* idents for grammar names?!
08:43:33AraqZevv, I PM'ed you
08:43:39Zevvaraq: typing
08:43:52*owl_000 quit (Ping timeout: 264 seconds)
08:44:09leorizedon't worry, even the compiler thought so :P
08:50:49*clyybber joined #nim
08:52:28SodaScripterOh GOD, the trackpoint on my laptop is going out.
08:53:02Zevvleorize: but seriously, if you tell me what you want to do, I'd be glad to put that in
08:53:27leorizeZevv: if I have a grammar like this: `version <- "HTTP/" * Digit * '.' * Digit`, then how can I let my users capture the major and minor version individually?
08:53:39clyybberSodaScripter: No loss :P
08:54:04leorizethe backtick idents are just nitpicking :P
08:54:07SodaScripterclyybber, rude
08:54:42Zevvleorize: create two separate rules the user can shadow and use those instead of `Digit`
08:54:57SodaScripterIt's veering towards the right oh God.
08:55:18leorizesomething like: `version_major <- Digit`?
08:55:20federico3SodaScripter: #nim-offtopic please
08:55:28ZevvThe shadowing just happened to kind of fall in place and solve precisely that issue, although I'm still not sure if I like it.
08:55:29FromGitter<alehander42> ok , rebasing patches on 1.0
08:55:31Zevvleorize: right so
08:55:35FromGitter<alehander42> i hope it works out
08:55:37clyybberSodaScripter: Not you, the trackpad lol
08:56:10ZevvSo the user can do `http.version_major <- >http.version_major: echo "major = ", $1
08:56:16SodaScripteryea but I use the trackpoint
08:56:23*clyybber quit (Quit: WeeChat 2.6)
08:56:32SodaScriptersad he gone
08:56:36*clyybber joined #nim
08:56:43FromGitter<alehander42> my last patch rebase must've been 3 months ago
08:57:14leorizeZevv: would it match any digit or just the ones in the `version` peg?
08:58:42Zevvjust that. Basically what it does is rename http.version_major to http.version_major_1, and put the user provided rule in place. The user rule then gets called by the outer grammar, and the users call to http.version_major then calls http.version_major_1
08:59:11leorizesounds good
08:59:15leorizeprobably should be documented
08:59:30Zevvhttps://github.com/zevv/npeg#library-rule-overridingshadowing
08:59:46Zevvprobably should read the documentation :)
08:59:52leorizeI've read it
08:59:59leorizejust not sure if it would match all Digit or not :P
09:00:00Zevvthen I should probabl write better documentation
09:00:55*laaron quit (Remote host closed the connection)
09:01:09FromDiscord<Arvest> @gitterirc<FromGitter> <alehander42> Arvest, we have one french guy @mratsim
09:01:12FromDiscord<Arvest> Yes
09:01:21Zevvleorize: 0.18.0 just pushed, your grammar can now take idents. And it runs about 30% faster in my json-parser performance test
09:01:56leorizeI guess you finally beat Araq's packedjson?
09:03:09FromDiscord<kodkuce> lol i just now saw you got 1.0 out, nice 🙂
09:03:20ZevvI believe it already did, parsing-wise, but didn't check recently.
09:03:30FromDiscord<Rika> does nimpretty still exist
09:03:37leorizeyes
09:04:13FromDiscord<Rika> windows x64 dist doesnt seem to have it bundled
09:04:15FromDiscord<Arvest> Are there any French people?
09:04:39FromDiscord<kodkuce> je suis fromage
09:04:47FromGitter<alehander42> Araq what is this `Error: 'transformed_n' should be: 'transformedN'
09:04:53FromDiscord<Arvest> @kodkuce ?
09:04:57FromGitter<alehander42> is snake case a compiler error
09:05:02leorizeZevv: wasn't by a meaningful margin iirc
09:05:20Araqyeah, the compiler code base enforces --styleCheck:error
09:05:21leorizenow, if packedjson also creates a json tree while it parse, then you still haven't won :P
09:05:25*laaron joined #nim
09:05:42Araqleorize, it does that, yes
09:05:55Zevvleorize: ssssshht
09:05:55FromDiscord<Arvest> Gitterirc c est un vrai bot ?
09:05:56FromDiscord<kodkuce> @Arvest am just troling, thats from cartoon Dexter and Didy, Dexter is learning french and his CD gets stuck and it repets Je suis fromage all day
09:06:48FromDiscord<kodkuce> @Arvest did you just ask whats wrang with gitter irc bot?
09:06:53FromDiscord<Arvest> Ha ok xd if not really French here ??
09:07:35leorizeI guess once nim grew enough we'll need regional nim irc channels also :P
09:07:46*sealmove joined #nim
09:07:52FromDiscord<Arvest> I use google translation @kodkuce
09:07:57FromDiscord<Rika> am i supposed to compile nimpretty myself or is it supposed to be in the bin folder when downloaded
09:08:12leorize@Rika it's supposed to be there
09:08:20leorizeis it not in the 1.0 release zip?
09:08:32FromDiscord<Shield> c'est le temps d'apprendre l'anglais
09:08:48FromDiscord<Rika> leorize, it hasnt since 0.20
09:08:59FromDiscord<Rika> my 0.20.2 install doesnt have it either afaik
09:09:00leorizethen that's a bug
09:09:17narimiranisn't it inside of `bin` folder?
09:09:41narimiranlast time i checked on linux, it was there, together with othre tools, such as nimgrep, nimsuggest, etc
09:09:48FromDiscord<Rika> its not on windows
09:09:50Araqit's missing indeed
09:09:51FromDiscord<Rika> windows x64
09:09:58Araq1.0.2 will have it
09:10:00FromDiscord<Arvest> @Shield fr ?
09:10:09FromDiscord<Arvest> Oui
09:10:13FromDiscord<Rika> there's already a 1.0.1?
09:10:17Araq'koch tools' should build it for you
09:10:28narimiranthe releases have even numbers
09:10:30leorize@Rika: nah, nim stable versions are odd versions
09:10:34leorizeeven*
09:10:36leorize:P
09:10:38FromDiscord<Rika> what why
09:10:38narimiranso 1.0.0, 1.0.2, 1.0.4, etc.
09:10:42FromDiscord<Rika> is there a reason
09:10:46FromDiscord<Rika> is that part of semver
09:10:47narimiranyes, there is
09:10:49AraqI said 'will have', we're waiting for about 2 weeks and then release 1.0.2
09:10:53leorizeodd are development versions
09:11:34FromGitter<alehander42> ok first patch rebased
09:11:44FromGitter<alehander42> second patch is ~1400 lines
09:12:45leorizeZevv: so... when should I put my pegs so that inlining happen and when should I not do that?
09:13:13FromDiscord<Arvest> @gitterirc bot ?
09:14:27*Kiloneie_ quit (Read error: Connection reset by peer)
09:14:39FromDiscord<Arvest> Or human ?
09:14:58leorizeit's a bot that bridge discord and irc
09:15:00*solitudesf quit (Quit: Leaving)
09:15:12*skoude joined #nim
09:15:20*solitudesf joined #nim
09:15:32Zevvleorize: well, "it depends" is the right answer. Do you want a fast parser or a small parser
09:15:46FromDiscord<Arvest> Ok
09:16:53leorizethere's a balance somewhere, no?
09:17:07leorizewe don't inline all of our functions for example
09:17:28Zevvleorize: usually, it doesn't really matter, it will just work and performance is not too big of an issue. But if you want to microoptimize to beat araqs packedjson, then you should do some profiling to see what happens.
09:18:13leorizeok
09:18:36leorizeI'm just used to declare things top-down so just wondering if that'd cause any problems
09:20:30Zevvthat is usually just fine
09:26:38FromDiscord<Mamy> @Arvest @alehander42, if you tag @mratsim, I will only see the notifications on my phone as Gitter desktop is broken for me and I use discord now
09:27:49FromGitter<alehander42> sorry i thought about that but wasnt sure
09:27:52FromGitter<alehander42> how discord tags
09:28:22FromDiscord<Mamy> well with a @ as well but my name is different
09:28:55*Kiloneie joined #nim
09:29:17*Kiloneie quit (Client Quit)
09:29:32*Kiloneie joined #nim
09:30:04FromDiscord<mratsim> changed my name
09:30:54FromDiscord<Rika> well its more complicated to tag in discord because it can be as complicated as @Rika (`@Rika`) afaik (maybe i got the syntax wrong tho lmao)
09:31:49FromDiscord<Rika> alternatively you can add a discriminator after the name (`@Rika#3939`) to actually mention a user (not sure if it works through irc bridge though)
09:32:15Kiloneie(test)
09:32:36FromDiscord<Rika> *the discriminator of the user, not just any 4-digit number
09:32:38*Kiloneie_ joined #nim
09:32:40*Hideki_ joined #nim
09:33:18*endragor joined #nim
09:35:18lqdev[m]the irc bridge doesn't show these so it's inconvenient, to say the least
09:36:30FromDiscord<Shield> anybody tried to implement wait-free multithreading? my initial idea was to use an atomic to check if memory wasn't in use but it seems that you need to set some flags so the compiler doesn't reorder lines of code and break it
09:36:58FromDiscord<Shield> also in some implementations of atomics they use locks which is kinda counter productive
09:37:04Araqatomic.nim library
09:37:37Araqwe have it. twice, for some reason, one part of system.nim, the other a real module
09:37:57*skoude quit (Ping timeout: 245 seconds)
09:39:29clyybberAraq: For https://github.com/nim-lang/Nim/pull/12268 which is a tiny breaking change, should I add a changelog entry?
09:39:36leorizeAraq: you can fix that, right? :P
09:40:42Araqleorize, sure
09:41:03FromDiscord<Shield> oh i see, it prevents reordering by default, does that cover compiler reodering too?
09:41:32leorizewhy would the compiler ever reorder your code?
09:42:04FromDiscord<mratsim> it will if it can prove it has no visible effect
09:42:13FromDiscord<Shield> optimization, it seems that you need to add an explicit barrier to prevent that
09:42:16Zevvleorize: use before declaration
09:42:18FromDiscord<mratsim> it can even exchange nested loops iteration order
09:42:34Zevvoh wait, different reordering, sorry
09:42:46FromDiscord<mratsim> yes it's the C compiler we are talking about
09:42:59Zevvyeah. That reorders everything it can to keep its pipelines filled
09:43:08Araqclyybber, yeah, don't add the [backport] tag and it's fine
09:43:22FromDiscord<mratsim> @Shield, what do you mean by wait-free multi threading? a specific wait-free concurrent data structure or something else?
09:43:32leorizewell gcc is great at making your code fails faster :)
09:44:30*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
09:46:06*laaron joined #nim
09:47:53FromDiscord<Shield> all i'm doing is using the multi buffer method to update data, the main thread will render whatever buffer that isn't being worked on, but it seems that it's not guaranteed that the atomic switch is changed exactly after data is processed
09:49:04FromGitter<arnetheduck> oh my, breaking changes already, clyybber? :)
09:49:18FromDiscord<mratsim> I'm not to sure about your case but if you want to prevent reordering, it's all about acquire and release
09:49:46clyybberarnetheduck: Heh, sorry but take a look at the PR, its definitely more correct with it
09:49:56*skoude joined #nim
09:50:02FromGitter<arnetheduck> I'm not saying it'
09:50:30Araqcome on, say it
09:50:47*Kiloneie quit (Quit: Leaving)
09:50:47*Kiloneie_ quit (Quit: Leaving)
09:51:01leorize!eval echo float64 high uint64
09:51:04NimBot-1.0
09:51:07*Kiloneie_ joined #nim
09:51:08leorize^ do we have a bug report for this yet?
09:51:12*Kiloneie joined #nim
09:51:13FromDiscord<mratsim> @Shield iirc I think Herb Sutter talk on Lock Free Programming - Juggling with Razor blades was the best introduction to all that stuff: https://youtu.be/c1gO9aB9nbs?t=2407
09:51:15*Kiloneie quit (Client Quit)
09:51:16*Kiloneie_ quit (Client Quit)
09:51:28FromGitter<arnetheduck> "we've learned to deal with it, it's not a big issue"
09:51:28*Hideki_ quit (Remote host closed the connection)
09:51:32*Kiloneie joined #nim
09:51:50FromGitter<alehander42> @arnetheduck your edits are not visible in irc, just saying
09:52:26FromDiscord<Shield> the goal is to avoid locks too, in theory you just need the atomic switch to coordinate threads, basically a less expensive way for tryAcquire
09:52:28FromGitter<arnetheduck> bah. I keep forgetting we're not in 2019 :/ @alehander42
09:52:37FromGitter<arnetheduck> > "we've learned to deal with it, it's not a big issue"
09:52:51*Hideki_ joined #nim
09:52:59FromGitter<alehander42> this one is visible, the "we've hit that bug lots and lots of times in nimbus" wasn't
09:53:00*abm joined #nim
09:53:30FromDiscord<mratsim> @arnetheduck: https://github.com/ircv3/ircv3-specifications
09:53:34Araqthe point of 1.0.x was mostly to give us back the 0.19.x experience, where we figured out that only backporting bugs does work reliably
09:54:28clyybberAraq: Is it fine to include a small code snippet in the changelog entry?
09:54:37Araqso there is one Nim to trust on, the 1.0.x series, the 1.1.x series will break stuff back and forth, see the "fix 'nil' finally ffs" effort
09:55:36FromGitter<alehander42> message id-s should fix that in irc
09:55:40FromGitter<alehander42> thanks mratsim
09:56:22FromDiscord<mratsim> what did I do?
09:58:51*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
09:59:04FromGitter<alehander42> you linked the irc3 spec
10:02:30FromGitter<arnetheduck> @mratsim that looks about as likely to happen as perl6 :)
10:08:33FromDiscord<arnetheduck> ok, since discord is the hot new thing...
10:09:44FromDiscord<arnetheduck> ok, since discord is the hot new thing... what happens to edits here?
10:09:51leorize@arnetheduck: most irc servers implemented a part of irc3 already
10:10:16leorizeedits post the edited message to irc
10:10:20leorizewhich is annoying...
10:10:35FromDiscord<Clyybber> test
10:10:38*xace quit (Ping timeout: 244 seconds)
10:10:43FromDiscord<Clyybber> testEdit
10:11:19clyybberHmm, so when you edit with s/test/testEdit in discord it doesn't send the s/.../... part
10:11:45FromDiscord<Rika> what happens if someone spams edit tho ðŸĪ”
10:11:52FromDiscord<Rika> oh yeah also emoji what happens to those
10:12:05leorizethose are unicode, so we can still see them
10:12:13leorizespamming edits means spamming irc
10:12:18leorizeit has happened before
10:12:29owlwhat is wrong with gc? reading lot of content about nim, i frequently seing gc, reference count etc..
10:12:33*xace joined #nim
10:14:06leorizeit's "rare" to see gc in a compiled language
10:14:06FromDiscord<Kiloneie> some people are just manual monkeys
10:14:08FromDiscord<Kiloneie> 😛
10:14:09FromDiscord<Rika> gcs can be slow i think
10:14:13FromDiscord<arnetheduck> so sending the edited message again seems better than not sending the edit at all, no?
10:14:20FromDiscord<Rika> yes it is arne
10:14:31leorizea habit of discord users is that they edit a lot...
10:14:37FromDiscord<Kiloneie> just add more text, don't edit
10:14:45clyybbergcs are undeterministic
10:14:50FromDiscord<Rika> on average i edit once or twice, no more than such
10:15:01FromDiscord<Rika> for typos
10:15:25*sealmove quit (Quit: WeeChat 2.6)
10:15:30FromDiscord<Kiloneie> The thing is, Nim can be run without a GC, and there are multiple, and a new runtime is being developed that will i think make the default Nim be without GC
10:16:00*SodaScripter quit (Quit: Leaving)
10:16:02leorizethe problem is that editing for typo will just makes irc users see twice of the (seemingly same) message
10:16:21leorizeit's really annoying because we would have to spot out what you edited
10:17:30clyybberAraq: How do important packages work with the post 1.0 dev model?
10:17:41clyybberAre breaking changes allowed to break them?
10:17:59*sealmove joined #nim
10:18:41Zevv1.0 broke mine already, kind of
10:20:43*sealmove quit (Client Quit)
10:20:50Araqclyybber, not really
10:20:54FromGitter<alehander42> ok, on1.0
10:21:01*sealmove joined #nim
10:21:01FromGitter<alehander42> based *patches
10:21:04FromGitter<alehander42> my codebase as well
10:21:26FromDiscord<Shield> that video was very interesting @mratsim
10:21:31FromGitter<alehander42> @arnetheduck perl6 happened
10:21:34FromGitter<alehander42> a long time ago
10:21:36*asymptotically quit (Quit: Leaving)
10:21:42*laaron joined #nim
10:22:08*sealmove quit (Client Quit)
10:22:28*sealmove joined #nim
10:22:29clyybberAraq: So how to proceed on https://github.com/nim-lang/Nim/pull/12268 ?
10:23:03*sealmove quit (Client Quit)
10:23:24*sealmove joined #nim
10:23:47Araqclyybber, we wait until your patch was applied to tiny_sqlite
10:23:55FromGitter<alehander42> @arnetheduck also a smarted bot can post just edited diffs of messages
10:24:28*skoude quit (Ping timeout: 268 seconds)
10:25:52*laaron quit (Client Quit)
10:26:14clyybberOk
10:27:09FromDiscord<Rika> with 5 characters of context or so lmao
10:27:15FromDiscord<Rika> that sounds pretty smart tbh
10:33:05FromDiscord<arnetheduck> @alehander42 https://github.com/perl6/problem-solving/pull/89
10:33:31FromGitter<alehander42> i know
10:33:44FromGitter<alehander42> but it was the "perl6"
10:33:48FromGitter<alehander42> that larry etc worked on
10:34:43FromDiscord<arnetheduck> yeah, but you'd probably agree that by all practical applications of the word, "happened" wouldn't be satisfied since the uptake so far is nonexistant
10:36:12FromGitter<alehander42> eh .. who are we to judge their uptake
10:36:41FromDiscord<arnetheduck> https://www.tiobe.com/tiobe-index/perl/
10:36:52FromGitter<alehander42> tiobe is ...
10:36:52*navin joined #nim
10:37:06FromGitter<alehander42> a nice idea, but please dont use it for ranking languages
10:37:25FromGitter<alehander42> it showed crystal > rust for some time
10:37:38FromGitter<alehander42> their algo isn't very good for this goal
10:38:30FromDiscord<arnetheduck> prove it wrong in the perl case
10:38:43FromGitter<alehander42> i mean, they are very good at calculating google trends, but this in itself is not a good lang ranking metric
10:38:56FromGitter<alehander42> i dont have to prove anything
10:39:09FromGitter<alehander42> perl6 was released, that's all
10:39:31FromGitter<alehander42> number of users doesn't change the fact a release happens :)
10:40:02FromGitter<alehander42> we'll see how the raku rename works for them
10:40:18*navin_ quit (Ping timeout: 245 seconds)
10:40:56FromGitter<alehander42> i am honestly a fan of the perl6/raku lang in purely experimental viewpoint: it's full of interesting langdesign experiments imho
10:41:05FromDiscord<arnetheduck> that's the difference between "released" and "happened" - I'd say python3 happened: people use it more than python2
10:41:40FromGitter<alehander42> nitpicking , sorry
10:42:00FromGitter<alehander42> the fact that it was released after all these years is still interesting from historical viewpoint
10:42:16FromGitter<alehander42> maybe it was a mistake to not rebrand it from the beginning tho
10:43:20FromGitter<alehander42> but this renaming is a good idea
10:46:28clyybberI dont like that you now have to have a space after keywords like if
10:47:22clyybberSo if(condition) isn't allowed in perl6
10:48:58*dddddd joined #nim
10:49:24AraqI dislike the sigils and the only reason they exist is because the older Perl had them
10:49:56Araqbut then if you remove them you would have to admit that they serve no purpose when you have a real type system
10:50:37Araqwhat kinds of type is '$' anyway? "string or a number"? well good luck with that idea
10:51:48FromDiscord<Rika> do partial functions exist in nim
10:51:50FromGitter<alehander42> i agree, the old perl-isms are not great probably
10:51:59FromGitter<alehander42> but they probably thought they need to be kinda compatible
10:52:01FromGitter<alehander42> for a long time
10:52:25FromDiscord<Rika> wait they should be right; how are they constructed is a better question
10:54:32sealmoveperl 6 is renamed to raku?
10:55:20FromDiscord<Rika> `Perl 6 (also known as Raku[6])`
10:55:24FromDiscord<Rika> https://en.wikipedia.org/wiki/Perl_6 lmao
10:57:26FromDiscord<Kiloneie> does anyone know binary well ? how do you know a number is negative in binary ?
10:58:14FromDiscord<Kiloneie> i know binary system from school and some college(never finished), but i don't recall any negatives...
10:58:26sealmoveKiloneie: depends
10:58:38sealmovethere is no one binary
10:59:24FromDiscord<Kiloneie> i am trying to explain why one would both initialize and declare a variable at the same time, so i gotta explain sizes, like with integers, now i gotta cover the - as well...
10:59:32clyybberKiloneie: There is two complement and one complement
11:00:14clyybberBut I think explaining how integers work is out of scope for an introduction to nim.
11:00:24FromDiscord<Kiloneie> im on #3 video..
11:00:25clyybberAfter all it doesn't matter unless you do shift
11:00:29sealmovetypically cpus use 2's complement
11:00:56clyybberKiloneie: Oh ok. Well a negative number has its first/last bit set to 1 depending on wether you live in little or big endian
11:01:26FromDiscord<Kiloneie> i think it's a good idea to explain how sizes work, and not just say welp in a future video... not when trying to explain something well
11:01:33clyybberNvrmind that
11:01:41clyybberI dont think endianness affects integers
11:03:29sealmoveDepends on your style. Judging from video #1 you like to provide a lot of context for beginners, so keep up with that ;) it can actually make the videos more interesting for beginners.
11:04:40narimiranKiloneie know thy audience
11:05:16narimiranif i were a beginner who started following you, and watching the videos from the beginning, and you start complicating in video #3 — probably goodbye
11:05:57FromDiscord<Kiloneie> Thank you, i like to explain things if it's time to do so, not just say "automagically" or you don't need to know that. It bugged me when i was learning things, sometimes you don't fucking care what and how IOSTREAM library is and works whoever wrote the book on c++ i have, several pages on IOSTREAM and i still don't get what the fuck the program did and how xD....
11:05:57narimiranKISS
11:06:35FromDiscord<Kiloneie> it's just a draft for now, i like to check my work several times, to see if a beginner would actually understand that
11:06:39FromDiscord<Kiloneie> in most cases NO
11:07:18FromDiscord<Kiloneie> if you went to a computer science school, you would also know that most people teach by the textbook which is garbage...
11:07:37narimiranbeginners are interested in making their first non-trivial program, and solving the potential obstacles on the way, not about the internal representation of ints or whatever
11:08:11FromDiscord<Kiloneie> yeh i know, it's just a draft D:...
11:08:42FromDiscord<Kiloneie> i do gotta explain use cases when mentioning explaining sometimes, in a simple way
11:08:48FromGitter<mratsim> If I want to make y first crypto program in a language I sure as hell look into the int representation ;)
11:08:55*gour left #nim ("Leaving")
11:09:00FromGitter<mratsim> But I guess that was a jab at javascript
11:09:02narimiran@mratsim you're special, you don't count :P :D
11:09:49FromGitter<mratsim> At this point it is still safe to assume that all nim users are special
11:10:12narimiranafter first two videos like those released by Kiloneie, you cannot suddenly just switch gears
11:10:39FromDiscord<Kiloneie> well it is a new language and all and unpopular, so people that do find them tend to be very picky with what they use.
11:10:56narimiranit happened to me while i was reading "real world ocaml": ok, nice, ok, got it, BOOM! wtf is that all of the sudden
11:10:59FromDiscord<Kiloneie> #3 is not about explaining binary lol no... it's variables, comments and stuff
11:11:37FromDiscord<Kiloneie> and i went a bit too deep on explaining the use case of initialising and declaring a variable at the same type e.g.: var a: int8 = 127
11:11:52FromDiscord<Kiloneie> it will come in handy in a later video though, RECYCLE !
11:12:43narimiranKiloneie feel free to borrow some ideas from https://narimiran.github.io/nim-basics/#_naming_values (btw, a slightly updated version is coming soon)
11:14:53*owl quit (Ping timeout: 245 seconds)
11:18:41FromDiscord<Kiloneie> might be useful
11:19:36FromDiscord<arnetheduck> @alehander42 perl6 might have interesting features that make it useful to a language designer - but does it pass the more general test of being used to solve problems outside of programming language theory / itself? this is a form of peer review - by passing that test the features that were merely interesting now have the weight of being more broadly applicable to them, and for people with problems, a useful signal for curation
11:20:00FromDiscord<arnetheduck> @alehander42 perl6 might have interesting features that make it useful to a language designer - but does it pass the more general test of being used to solve problems to solve/ :) outside of programming language theory / itself? this is a form of peer review - by passing that test the features that were merely interesting now have the weight of being more broadly applicable to them, and for people with problems, a useful signal for cura
11:20:06FromDiscord<Kiloneie> ookay this might have changed my mind, i was initially gonna start by initializing a variable then showing how to declare it... might reverse that.... idk...
11:20:54FromDiscord<arnetheduck> bummer. I tried to do the right thing and typed out `s/problems/problems to solve/` and discord turned that into an edit ðŸĪĶ
11:21:15FromDiscord<Kiloneie> man my views to like ratio on my 2 videos is weird: 188: 7 likes, 33 views: 6 likes lol
11:21:45*skoude joined #nim
11:21:57narimiranif you're doing your videos because of some statistics.... :'(
11:22:50FromDiscord<Kiloneie> no no, i just wish for more views D:
11:23:07FromDiscord<Kiloneie> #2 is slacking
11:23:24narimirangive it some time, don't expect miracles
11:23:42Araqsuccess in the real world is as far away from "peer review" as I can imagine
11:24:01FromDiscord<Kiloneie> i know, its going great compared to my previous videos...
11:25:34FromGitter<alehander42> arnetheduck what you say makes sense and i think is true in general
11:25:47Araqnot that I mind success as a criterion but come on, there is no "science" involved in these things, not even something like "in the absense of real science that's our second best thing"
11:25:51*owl joined #nim
11:26:06FromGitter<alehander42> but imo it can solve many problems probably better than classic python/ruby/perl5/php
11:26:16FromGitter<alehander42> the problem is its baggage
11:26:17FromGitter<alehander42> imho
11:26:44FromGitter<alehander42> and the fact that maybe a too dynamic language is not so fashionable as a new lang these days
11:26:55FromGitter<alehander42> (even if gradually typed)
11:27:23FromGitter<alehander42> arnetheduck wow discord does that
11:27:25FromDiscord<Kiloneie> i don't mind what happens, as long as i reach my goal in the time i have, i could be stuck on same views for years for all i care once that happens
11:34:15FromDiscord<arnetheduck> Araq, it's decentralized and spontaneous peer review 😉 I guess the sticking point is that the review doesn't happen against the stated goals of the project but rather against the general needs of people.
11:34:28clyybberIts peer review but with ads
11:35:27sealmovearnetheduck: I've been there :D discord can positively surprise you sometimes
11:38:10FromDiscord<Kiloneie> well the need is there
11:38:19FromDiscord<Kiloneie> im just not super man xD...
11:38:37sealmoveguys, can someone summarize what perl6 brings to the table (I know it might be impossible question), just to get a first general idea
11:38:54sealmoveto lazy to dive into perl6 atm
11:38:57sealmovetoo*
11:44:09FromGitter<alehander42> Araq, how to get the current javascript exception
11:44:10FromGitter<alehander42> as obj
11:45:57FromGitter<alehander42> hm lastJSError
11:46:02FromGitter<alehander42> but not sure why not exposed
11:46:53*theelous3_ joined #nim
11:50:49FromGitter<alehander42> ok works
11:52:17FromDiscord<mratsim> Gitter also does the s/edit/thing/
11:52:31*rockcavera joined #nim
11:53:06*mibr quit (Ping timeout: 246 seconds)
11:54:03FromGitter<alehander42> test
11:54:08FromGitter<alehander42> s/test/e
11:56:18FromDiscord<arnetheduck> need another slash to terminate maybe
11:57:49FromDiscord<mratsim> if it was successful we wouldn't see it anyway 😉
12:00:08*couven92 joined #nim
12:02:22*fredrik92 joined #nim
12:02:58*couven92 quit (Disconnected by services)
12:03:04*fredrik92 is now known as couven92
12:03:45*theelous3_ quit (Ping timeout: 268 seconds)
12:03:56FromGitter<alehander42> yep arnetheduck was right, i changed the second one
12:04:24*navin quit (Remote host closed the connection)
12:05:46*navin joined #nim
12:06:34owlkiloneie give me the video link (if it is available), because i am the real beginner, all are emulating a beginner in vbox.
12:07:32*owl is now known as owl_000
12:08:08FromDiscord<Kiloneie> okay, you could just youtube kiloneie but okay
12:08:08FromDiscord<Kiloneie> link: INTRO + setup video: https://youtu.be/5tVIsDYPClA
12:08:08FromDiscord<Kiloneie> #2: https://youtu.be/wD-p06zbY1g
12:09:39*daddoo joined #nim
12:11:39*Kaivo joined #nim
12:11:55*navin quit (Remote host closed the connection)
12:13:56*navin joined #nim
12:17:19*endragor quit (Remote host closed the connection)
12:20:22owl_000kiloneie, that is great, specially second part, first part's font is small.
12:21:18FromDiscord<Kiloneie> thank you, i listened to feed back, so i fixed a lot of things, videos will look like #2 from now on, unless someone has some ideas to make it even better
12:22:35*asymptotically joined #nim
12:23:33owl_000surely it will help many beginners.(i have programing knowledge in python, as a result, i am looking for in detail guide about template and other things which a dynamic language lacks of.
12:26:11FromDiscord<Kiloneie> it will take me a while to get to templates
12:26:17FromDiscord<Kiloneie> but templates are very simple
12:27:07leorizeto be fair you don't need templates in python :P
12:27:33FromDiscord<Kiloneie> they are macros are the only structure in nim that can receive any type without any performance impact on it(unlike auto which is a bad thing to do)
12:27:33FromDiscord<Kiloneie> then whatever you put into a template that's what it will insert into your program at the location you called it at
12:27:41FromDiscord<Kiloneie> if you didn't know this already
12:27:53FromDiscord<Kiloneie> they are REALLY simple
12:28:03*owl_000 quit (Ping timeout: 240 seconds)
12:28:12leorizebasically templates in Nim are `def` in python :P
12:28:39FromDiscord<Kiloneie> well python like any language would benefit greatly from templates, dynamic languages less so, but they are amazing, big time saver
12:28:48FromDiscord<Kiloneie> and you can do some crazy things with them
12:29:22FromDiscord<Kiloneie> things like those people saying why Nim when D does it too and has a better syntax and is more popular !? D doesn't have metaprogramming
12:29:40FromGitter<alehander42> no, D has metaprogramming, let's keep this realistic
12:29:53FromDiscord<Kiloneie> not nearly as powerful as in Nim
12:29:57FromDiscord<Kiloneie> nor easy to use
12:30:48FromDiscord<Kiloneie> c++ has some of it too(google says so), but, lol im pretty sure it's not even remotely close to Nim's, because that language was never designed for this
12:31:13FromGitter<alehander42> afaik D's metaprogramming is also powerful
12:31:40FromGitter<alehander42> i'd agree i prefer the nim macro system
12:31:57FromGitter<alehander42> but if you're not sure about something, don't really insist on it
12:32:57FromGitter<alehander42> let's not get you in a discussion with @timotheecour :P
12:33:46FromDiscord<Kiloneie> yeah ups
12:34:19FromDiscord<Kiloneie> D is a great language, but um, i don't like how unreadable C syntax is(nope)
12:36:51*couven92 quit (Ping timeout: 240 seconds)
12:37:21*couven92 joined #nim
12:38:16*navin quit (Remote host closed the connection)
12:38:24FromDiscord<SrMordred> @Kiloneie iÂīm D programmer, can question me some things if u want :P
12:38:24FromDiscord<SrMordred> (just started to explore Nim, really liking it)
12:38:25*navin joined #nim
12:38:26*navin quit (Remote host closed the connection)
12:38:53*navin joined #nim
12:39:22FromDiscord<Kiloneie> Sure thing, i did actually try to learn it years ago, but back then it was really new and it lacked clear instructions how to do anything... that's how that story ended :P.
12:39:48FromDiscord<Kiloneie> Btw isn't D basically what C++ is to C ? A successor ?
12:40:23FromDiscord<Kiloneie> And C is successor to B(by motorola i believe) i read about that once... not sure if my memory is correct on that
12:41:40FromDiscord<SrMordred> in a way yes. D original name was Mars. but i believe that people saw Mars as a next C++ so they started called it D until the name was changed 😛
12:42:09FromDiscord<SrMordred> *as a better C++ *
12:42:10livcdwas there the promised video for 1.0 ? :D
12:43:16*navin quit (Ping timeout: 252 seconds)
12:43:44FromDiscord<Kiloneie> ? there is a video being worked on by Araq for 1.0, a promo video, should be uploaded soon, if it's not already
12:43:56*Kiloneie quit (Read error: Connection reset by peer)
12:46:31clyybberAlso D has a mode where it's just better C
12:47:14clyybberAnd gcc is also a D compiler, which is pretty cool
12:48:03*navin joined #nim
12:52:07Araqthe "better C" is still called Modula 2 as far as I'm concerned
12:54:34FromDiscord<SrMordred> @clybber yeah D with betterC is C with strong metaprogramming capabilities, which is pretty cool.
12:54:34FromDiscord<SrMordred> Since i like the metaprogramming stuff, the first thing i notice is the lack of variadic templates in Nim (although i think that macros can solve this)
12:55:40*navin quit (Remote host closed the connection)
12:56:27*nsf quit (Ping timeout: 240 seconds)
12:56:28Araqyou can pass static tuples around instead but I never felt the need to do that
13:00:39FromDiscord<SrMordred> @araq probably i dont need it in Nim. I just have to get used to the new paradigm.
13:00:39FromDiscord<SrMordred> is justs that is very simple to do this in D, so obviously i try to emulate this on nim (until i find better ways)
13:00:39FromDiscord<SrMordred> ```d
13:00:40FromDiscord<SrMordred> void print( Args... )( Args args )
13:00:40FromDiscord<SrMordred> {
13:00:40FromDiscord<SrMordred>
13:00:42FromDiscord<SrMordred> static foreach( arg ; args )
13:00:42FromDiscord<SrMordred> writeln( arg );
13:00:43FromDiscord<SrMordred> }
13:00:44FromDiscord<SrMordred> print(1, "test", [1,2,3]);
13:00:46FromDiscord<SrMordred> /*internally expand to:
13:00:47FromDiscord<SrMordred> writeln(1);
13:00:49FromDiscord<SrMordred> writeln("test");
13:00:50FromDiscord<SrMordred> writeln([1,2,3]);
13:00:51FromDiscord<SrMordred> */
13:00:53FromDiscord<SrMordred> ```
13:00:54FromDiscord<SrMordred> (varargs[T] must be the same type, right?
13:00:56FromDiscord<SrMordred> Unless in macros where it can be untyped .. ? still learning 😛 )
13:01:15*nsf joined #nim
13:01:26FromDiscord<Shield> lol
13:01:37FromGitter<zetashift> @SrMordred when pasting several lines of code please use a pastebin, the code block doesn't get rendered on Gitter/IRC
13:02:08FromDiscord<SrMordred> @zetashift oh, sorry, forgot about it ;/
13:02:58FromGitter<zetashift> no problem, fwiw I tried D too but ended up liking Nim more because it's way more readable for me
13:03:59FromDiscord<SrMordred> @araq probably i dont need it in Nim. I just have to get used to the new paradigm.
13:03:59FromDiscord<SrMordred> is justs that is very simple to do this in D, so obviously i try to emulate this on nim (until i find better ways)
13:03:59FromDiscord<SrMordred>
13:03:59FromDiscord<SrMordred> https://run.dlang.io/is/zcv68d
13:04:00FromDiscord<SrMordred>
13:04:00FromDiscord<SrMordred> (varargs[T] must be the same type, right?
13:04:02FromDiscord<SrMordred> Unless in macros where it can be untyped .. ? still learning 😛 )
13:05:07Araqvarargs[typed] exists and is what 'echo' uses
13:05:21Araqthe only problem is that you don't get to see its implementation
13:05:41FromDiscord<SrMordred> @zetashift i like very much D since im using it a long time. but i'm very happy with my first experimentation with Nim 🙂
13:05:58FromGitter<zetashift> https://github.com/timotheecour/D_vs_nim
13:06:00FromGitter<alehander42> varargs[typed, `$`]
13:06:42FromGitter<zetashift> D is great too, I'm still sad too see it not as popular as Go or something, those compile times of D are still really good
13:07:20FromDiscord<SrMordred> @alehander varargs[typed, $] but this means that the type will be converted to string, right?
13:07:47Araqyeah but you can leave out the $, varargs[typed]
13:08:04FromGitter<alehander42> yeah, i mostly meant the echo example where this is fine
13:08:14FromDiscord<SrMordred> @zetashift, yes compiles times is a must! Nim is very fast too. iÂīm in a low end pc now, and hello world from Rust take like 10-30 seconds. ridiculous 😛
13:08:54FromDiscord<SrMordred> @araq will try varargs[typed] 🙂
13:09:18leorizewe at haiku can't even compile rust with our buildbots because of their excessive ram usage
13:09:29leorizeits*
13:09:43Araqleorize, are you into Haiku?
13:10:02*dddddd quit (Ping timeout: 245 seconds)
13:10:14Araqis it too late to tell you Haiku should remove its package manager?
13:10:25leorizeyes, it's too late :P
13:10:25Araqah never mind, I'm not going to win this fight.
13:10:29*solitudesf quit (Ping timeout: 276 seconds)
13:11:18*navin joined #nim
13:11:54*dddddd joined #nim
13:13:46*owl_000 joined #nim
13:14:44*navin_ joined #nim
13:15:32*navin quit (Ping timeout: 252 seconds)
13:19:16*navin_ quit (Ping timeout: 264 seconds)
13:21:08*sealmove quit (Quit: WeeChat 2.6)
13:32:20*nsf quit (Quit: WeeChat 2.5)
13:32:51*skoude quit (Ping timeout: 240 seconds)
13:36:41*sealmove joined #nim
13:41:22shashlick@dom96 can you please take a look at my PRs for nimble and choosenim
13:42:39*Kiloneie joined #nim
13:44:41*navin joined #nim
13:48:05FromDiscord<Kiloneie> based on this D is only a bit less popular than Go 1.220 vs 0.955%
13:48:07FromDiscord<Kiloneie> https://www.tiobe.com/tiobe-index/
13:48:30FromDiscord<Kiloneie> Where in Nim here ? xD.... dont ask
13:48:33Araqtiobe-index is unreliable crap
13:48:41FromDiscord<Kiloneie> i know
13:48:55FromDiscord<Kiloneie> its people who decided to post they use it inn the industry
13:48:57Araqthen why bring it up?
13:49:05FromDiscord<Kiloneie> as one example
13:49:22FromDiscord<Kiloneie> not the example
13:49:54Araqhttps://www.youtube.com/watch?v=P8oJUGVbOlQ here
13:50:02Araqas promised
13:50:23Yardanicolol
13:50:27*couven92 quit (Ping timeout: 240 seconds)
13:51:08Yardaniconice video
13:51:37FromDiscord<Kiloneie> my third viewing on it, i like this music lol
13:52:09Araqand now I'll lean back and watch it go viral
13:52:26FromDiscord<Kiloneie> hopefully
13:52:48Araqthe next video will have a special guest, Strawberry Shortcake
13:52:56YardanicoAraq: what is https://www.youtube.com/watch?v=XcpEHB-snVo btw ? :P
13:53:03*navin quit ()
13:53:11YardanicoI got two notifications from your youtube channel (yes I have notifications enabled for your channel), there was this video 33mins ago
13:53:23Araqthat one doesn't exist
13:53:39Araq:P
13:53:52Araqit was the same video with a broken link
13:53:55Araq:DD
13:54:17leorizeyes, food is the key factor in attracting viewers :P
13:55:02FromDiscord<Kiloneie> And boobs
13:55:04FromDiscord<Kiloneie> xD
13:56:43FromDiscord<Shield> that music tho
13:57:29Araqcan't argue over music taste
13:58:42FromDiscord<Kiloneie> it's great
13:59:02FromDiscord<Shield> it was a bit loud
13:59:06FromDiscord<Kiloneie> i don't listen to music besides when partying so i don't listen to much, but this is great
13:59:20FromDiscord<Kiloneie> and my videos are quiet, turn the knob 😛
14:00:00leorizeI see "pendulum", I click like
14:02:05*navinmistry joined #nim
14:02:19FromDiscord<Shield> the beat was distracting, but good video, i like the focus on benchmarks
14:02:40ZevvYesss!
14:04:11FromDiscord<Shield> Araq, add some more tags, your video shows when i search for "nim" or "nim lang" but not "nim language"
14:04:33*navinmistry quit (Remote host closed the connection)
14:05:04FromGitter<alehander42> i
14:05:07FromGitter<alehander42> well
14:05:08FromGitter<alehander42> wow
14:05:12YardanicoXD
14:05:18Yardanicoalmost like my reaction, yeah
14:05:24YardanicoI was a bit ... ehm, surprised
14:05:39FromDiscord<Shield> it needs show up for "nim programming language", gotta cover most keywords
14:05:52FromGitter<alehander42> good video
14:06:17FromGitter<alehander42> very
14:06:27FromGitter<alehander42> happy video
14:07:03FromGitter<alehander42> a bit DIY but if we're talking fun, it's fun
14:08:09YardanicoTIL about `bat`
14:08:19FromDiscord<Shield> i was expecting an X game clip at some point
14:08:25FromDiscord<Shield> xD
14:08:31leorizerust is taking over the cli :P
14:08:57clyybberAraq: I'd suggest putting the song in the video description
14:08:58FromGitter<alehander42> what is bat
14:09:02clyybberPeople like that
14:09:15leorizehttps://github.com/sharkdp/bat
14:09:18FromDiscord<Shield> the song is mentioned in the outro
14:09:49Calinoualso Pastel, https://github.com/sharkdp/pastel
14:09:56Calinouwhich does what I did last year in Nim, but 10 times better :(
14:11:10clyybberShield: Oh, ok. Nevermind then, I haven't yet watched it till the end
14:11:25leorizeguess we can never beat rust on the cli
14:13:08*Hideki_ quit (Remote host closed the connection)
14:13:45*Hideki_ joined #nim
14:13:49Araqyeah because that's so hard, just some freaking ansi escape stuff
14:14:03FromDiscord<Kiloneie> add more tags
14:14:26FromDiscord<Kiloneie> Nim v1.0 first result, Nim 1.0 can't find it, Nim programming language, can't find it in the 20 results
14:14:27FromDiscord<Kiloneie> etc
14:14:28FromDiscord<Kiloneie> more tags
14:15:00clyybberI don't know if pastel does that, but simulating the various different color spaces is hard.
14:15:12FromDiscord<mratsim> tags were useful 10 years ago. If people try to sell you modern SEO with tags they are stuck in the 2000's
14:15:33FromDiscord<Kiloneie> ? im talking about YouTube tags
14:15:42FromDiscord<Kiloneie> what are you talking about ?
14:15:53Araqok, added more tags
14:16:01Araqfeels redundant now, but *shrug*
14:16:48FromDiscord<Kiloneie> the more the merrier
14:17:57*Hideki_ quit (Ping timeout: 240 seconds)
14:19:01*nif quit (Quit: ...)
14:19:11*nif joined #nim
14:19:55*navinmistry joined #nim
14:20:16Yardanico@mratsim youtube needs tags sometimes
14:20:18*navinmistry quit (Client Quit)
14:20:23Yardanicofor less known videos especially
14:23:17FromDiscord<Kiloneie> that is the only way low sub, low popularity channels get views
14:23:25FromDiscord<Kiloneie> besides linking all over the place
14:27:42*navinmistry joined #nim
14:28:43*navinmistry is now known as timesurfer
14:28:49Yardanicolol
14:31:20clyybberAraq: Is this an intented feature: http://ix.io/1X2R ?
14:31:45clyybberI mean it's pretty cool IMO, just wondering if its an accidental feature
14:32:06*Hideki_ joined #nim
14:32:11*Hideki_ quit (Remote host closed the connection)
14:36:54Yardanicobtw, on the topic of typing in videos - i really like them, sometimes i just wanna relax and use programming videos with soft, quiet voices and keyboard typing as ASMR content :D
14:36:59disruptekwhat's the "feature"?
14:37:37disrupteki just see generics.
14:37:55FromDiscord<Kiloneie> my fan 😛
14:38:08clyybberdisruptek: `additions: Tarr` is missing the generic param
14:38:10FromDiscord<Kiloneie> mechanical madness
14:38:16FromDiscord<Kiloneie> or hammering
14:38:22clyybberBut the compiler figures it out automagically from the argument
14:38:22disruptekah.
14:38:45Yardanico@Kiloneie something like https://www.youtube.com/watch?v=Y-o3pJEhwD4
14:38:52FromDiscord<Shield> interdasting
14:39:58FromDiscord<Kiloneie> is there a way to increaser the font in the VS Code terminal ?
14:40:03Yardanicoyes, in config
14:40:07FromDiscord<Kiloneie> i don't know how to use magnifier with obs
14:40:09FromDiscord<Kiloneie> okay
14:40:40disrupteki guess the thing about not knowing is that there are no degrees to it. the compiler doesn't know the generic until its instantiated, so it doesn't really care.
14:40:49Yardanicoalso you may like some fancy stuff like themes :P https://i.imgur.com/mE7wAJu.png
14:40:51disruptek^it's
14:40:53*timesurfer quit ()
14:41:35Yardanico@Kiloneie, open user settings, type "font" in search field and you'll find all configuration you need :)
14:41:54narimiranYardanico: bold font? why?
14:41:56FromDiscord<Kiloneie> i found it
14:42:02Yardaniconarimiran: IDK, I like it more that way
14:42:18FromDiscord<Kiloneie> but imma increase it to only 18 from 14, because man is it gonna be ugly with compiler errors
14:42:31Yardanicoor be a real linux geek and modify it directly in settings file - https://github.com/Yardanico/dotfiles/blob/master/.config/Code%20-%20OSS/User/settings.json
14:42:33FromDiscord<Kiloneie> which i am about to cover ?.... maybe.... i shouldn't... idk.
14:42:46FromDiscord<Shield> that color scheme with the bold font is quite fuzzy for me
14:42:49YardanicoI'd suggest you to make a bit longer vids of like 10-15 min or maybe more
14:43:24narimiranyou can split vscode vertically: on the left you have your program, on the right you have the terminal
14:43:36narimiranso even with the bigger font, lots of lines are shown for both
14:43:39FromDiscord<Kiloneie> well today's title is gonna be Variables and Errors, sincew variables means both muttable and immutable so i will explain both, and that just ties nicely into errors, since changing a immutable let variable will result in an error
14:43:42Calinouyou can split the terminal too since last year
14:44:06FromDiscord<Kiloneie> how to that ?
14:44:17FromDiscord<Kiloneie> i probably won't do that for this video, but you know
14:44:18narimirantop-right of the terminal window
14:44:53FromDiscord<Kiloneie> how to unsplit ?
14:44:58narimirantop-right of the terminal window
14:45:10Yardanicokill terminal directly or press on a trash can
14:45:18Yardanico(just type "exit" to kill it without having to use the mouse)
14:45:20FromDiscord<Kiloneie> thank you
14:45:35clyybberhttps://www.youtube.com/watch?v=kopoLzvh5jY RL is nothing new, but this visualization is really beautiful
14:45:54FromDiscord<Kiloneie> btw is font 28 a bit much for writting code ?
14:45:59narimiran(btw, i'm not talking about splitting a terminal in two, i'm talking about vertical layout, where the terminal is on the right-hand side)
14:46:24FromDiscord<Arvest> I am french you can explain the server
14:46:47*navinmistry joined #nim
14:47:01FromDiscord<Arvest> Pliz
14:47:25FromGitter<zetashift> @Arvest what server are you talking about?
14:48:39FromDiscord<Kiloneie> will font 24 still be viewable enough ?
14:48:43FromDiscord<Kiloneie> down from 28 ?
14:49:05FromGitter<zetashift> Do you have a screenshot of both?
14:49:08FromDiscord<Arvest> that she is the nim language
14:49:15Yardanicowat
14:49:35FromGitter<zetashift> @Arvest could say it in french because I'm not getting any of this :(
14:49:44FromDiscord<Arvest> what is it for
14:50:05FromGitter<zetashift> Nim is a programming language, it's used to program whatever your mind can think of
14:50:50Calinou@Kiloneie it depends on the resolution you're recording at
14:50:58Calinouideally, you should aim your video to be readable in 720p resolution
14:51:06Calinouif you record in 1440p, you should set the OS display scale to 200%
14:51:23Calinouin 1080p, you should set it to 150% (or maybe 125%)
14:51:56FromDiscord<Kiloneie> did you see video #2 ?
14:52:00Calinouthat said, some tasks require having a lot of real estate available, so that may not alwways be possible
14:52:06FromDiscord<Kiloneie> was that okay ? i just upped the font
14:52:59FromDiscord<Arvest> yes but it allows to do what @gitterirc
14:53:00*uu91 quit (Remote host closed the connection)
14:53:15Calinouthe code font is readable at 720p, but the terminal output is much less so
14:53:31FromDiscord<Kiloneie> yeah it's at 14, i jsut upped it to 18
14:53:47FromDiscord<Kiloneie> but lowered the code font to 24, because i can't look at it O,O
14:53:53Calinoualso, just a suggestion, you could hide the Windows task bar, I find it looks amateurish but that's just me :P
14:53:56FromDiscord<Yardanico> @Arvest don't use @gitterirc for mentions, it's a bridge to the IRC. You can pretty much do anything in almost any programming language including Nim.
14:54:05FromDiscord<Kiloneie> -.-
14:54:15*uu91 joined #nim
14:54:19FromDiscord<Kiloneie> okay...
14:55:36FromDiscord<Kiloneie> i don't think you have seen many programming videos on youtube xD... mine is VERY professional in comparison lol D:
14:55:47Yardanicooh nice I found sources for my incompleted discord-irc bridge in Nim from a year ago
14:55:48FromDiscord<Kiloneie> but i will do that
14:56:02FromDiscord<Arvest> ok should you explain me in mp more precisely please @Yardanico
14:56:14FromGitter<zetashift> @Arvest it allows you to make the programs you find on any device, e.g. you could program your own Word or program your own Discord
14:56:23narimiranby the time you do 347th video, you will have the best looking videos in the world :D
14:56:32FromDiscord<Yardanico> @Arvest uhhh, I guess you should read https://en.wikipedia.org/wiki/Computer_programming a bit 🙂
14:56:45Calinouyeah, expect it to take a while before you manage to achieve a really professional style
14:56:55*narimiran looking at guys who feed the troll....
14:57:18FromDiscord<Arvest> Ok thank you @Yardanico
14:58:10FromDiscord<Kiloneie> https://justpaste.it/6hv88
14:58:10FromDiscord<Kiloneie> 7 is the line and 1 is the ACTION ?
14:58:26narimiran1 is the column
15:00:21FromDiscord<Kiloneie> no action
15:00:21FromDiscord<Kiloneie> https://play.nim-lang.org/#ix=1X31
15:00:36FromDiscord<Kiloneie> or statement ...
15:01:03FromDiscord<Kiloneie> omg i am dumb.... i didn't share my #2 video's code trough playground LOL
15:01:40FromDiscord<Kiloneie> maybe for the better, will explain it in this video
15:02:27narimiranspace after `;`, not before. sincerely, my OCD
15:02:59FromDiscord<Kiloneie> i know, i had the same problem
15:03:05FromDiscord<Kiloneie> i just wanted to copy pasta quickly
15:03:19FromDiscord<Kiloneie> i need spaces everywhere xD
15:07:03clyybberOoooooh, I managed to create some funky memory corruption
15:07:31clyybberWithout ptr, pointer, ref or anything else unsafe AFAICT
15:07:35*Hideki_ joined #nim
15:10:13clyybberAnd with --newruntime it just works TM \o/
15:10:57leorizeso, uh, that means you can create memory corruption with newruntime?
15:11:16clyybberNono, the memory corruption is only reproducable without --newruntime
15:11:34leorizenow that's a high priority bug :P
15:11:36disruptekyay?
15:11:40clyybberyay!
15:11:52clyybberAt least this means that --newruntime is doing something right lol
15:12:07disrupteknow diff those .c
15:13:02clyybberThats gonna be a huge diff probably
15:13:35disruptekonce you are able to repro in a small block it should be comparable, i would think.
15:13:46clyybberI shall try
15:13:58FromDiscord<SrMordred> where can i read about newruntime?
15:13:59disruptekyou are a badass and you will succeed.
15:14:02FromDiscord<Shield> can you even corrupt memory in newruntime
15:14:17clyybberShield: Of course. But then its your doing.
15:14:40leorizenewruntime used to corrupt global vars :P
15:14:57clyybberI fixed that :D
15:15:37FromDiscord<Kiloneie> can you show taskbar only on one monitor ?
15:16:14shashlickAre tables ported to newruntime
15:17:11*abm quit (Quit: Leaving)
15:18:02clyybberdisruptek: http://ix.io/1X38 this is the code. Looks safe, right?
15:18:41disruptekyou're cheating with that generic, aren't you.
15:19:03clyybberI'm pretty sure that shouldn't be the cause
15:19:19disrupteky'know ima quote you on that later.
15:20:02disruptekwhen you have an `...add block:` why do you use parens? doesn't that annoy you?
15:20:16clyybberThe thing is
15:20:21clyybberIt doesn't work without parens
15:20:28clyybberA bug IMO
15:21:13disruptekhmm, you can `...add quote do:` but you cannot `...add block:` ?
15:21:23clyybberIt's certainly a bug
15:21:42disruptekah, it's because quote is altering the semantics.
15:22:12clyybberStill that block thing should work, because its documented. It's an expression. It should wherever an expression fits
15:22:18disrupteki agree it's a bug.
15:23:54clyybberWhat amazes me is the amount of different error messages that thing is able to spit out
15:24:26disruptekwhat's the deal with `func` these days. araq doesn't like it, is that all?
15:24:26clyybberAssertionErrors Overflows, DivByZeros, errors in $, errors in newObj
15:24:53clyybberdisruptek: Its just syntactic sugar for {.noSideEffects.}
15:25:20disrupteki know, but has it fallen out of favor or is it safe? i was wary to use it though i wanted to.
15:25:29disrupteklike so many things...
15:25:30clyybberUse it it's safe
15:25:57*Hideki_ quit (Ping timeout: 240 seconds)
15:26:24FromDiscord<Shield> wait, araq doesn't like it? isn't it recommended
15:26:46clyybberShield: You shouldn't care wether he likes it or not
15:26:53narimiranthis ^
15:26:58clyybberTo quote him "I rarely write user level code anymore"
15:27:39disruptekit's a bellwhether for future breakage, though i suppose with 1.0 it should be safe indefinitely. it's too minor a thing to remove.
15:27:43FromDiscord<Kiloneie> He is part god now D:
15:28:05disruptekclyybber: i don't see the problem.
15:28:13clyybberMe neither
15:28:14FromDiscord<Shield> as long as it doesn't get nuked sometimes in the future
15:28:40clyybberdisruptek: I can't really minify that either
15:29:47FromDiscord<arnetheduck> > Its just syntactic sugar for {.noSideEffects.}
15:29:47FromDiscord<arnetheduck>
15:29:47FromDiscord<arnetheduck> @Clyybber it's not - it's similar, but there are bugs and issues surrounding it.. for example, it's not part of the same overload set and there are other minor and subtle annoying differences
15:30:09clyybberHuh, ok.
15:30:24disruptekah, it has a separate overload set.
15:30:34disrupteki didn't realize that.
15:30:39clyybberMe neither
15:30:54FromDiscord<Shield> wow, that's subtle
15:31:08disruptekgah i'm not even sure what to make of that.
15:31:30disrupteki guess from the fp perspective, it makes a lot of sense.
15:32:41disruptekclyybber: if you change your func to proc you get a div0
15:32:53clyybberdisruptek: Run it again
15:33:01clyybberWether you get a div0 or not is random
15:33:01disruptekomg
15:33:09clyybberlol
15:33:49clyybberTo be fair, there is a randomize() call there, but still. Pretty cool :)
15:34:33disruptekwell, there are multiple bugs, so i guess it will benefit from more dissection.
15:34:43FromDiscord<arnetheduck> it's two different things in the compiler - I suspect the majority of the differences could be considered bugs - it's pretty hard to follow because `{.noSideEffect.}` becomes a flag and func turns into a `skfunc` symbol kind so two representations of the same idea
15:36:17FromDiscord<arnetheduck> it's a bit of a mess actually, I tried to patch some of stdlib to use func instead but it's impossible
15:36:56disrupteki don't understand `prepareTileset`.
15:37:17disruptekarnetheduck: wow, really?
15:39:19clyybberdisruptek: I don't expect you to :P
15:39:28clyybberIt's not really correct yet either
15:41:37FromDiscord<Kiloneie> Nim for Beginners #3 Variables, Errors And Comments
15:41:37FromDiscord<Kiloneie> Too long ? Is this better: Nim for Beginners #3 Variables and Errors ?
15:41:37FromDiscord<Kiloneie> And leave the comments part ? i have a good tie from errors to comments so i am thinking of explaining all of this
15:42:18FromGitter<awr1> i suppose yeah
15:44:02disruptekcan't decide if this feels idiomatic:
15:44:06disruptekwhile (let nextTiles = result.chooseTilesToCollapse(); nextTiles.len > 0):
15:44:18clyybberIdiomatic or not, I like it
15:44:25disruptekit's kinda cute, i admit.
15:44:44FromDiscord<Kiloneie> looks nice
15:44:49clyybberIt spares me duplicating one line only for the first iteration
15:55:56disruptekclyybber: i don't even have a clue how you could even be stepping on your own memory; it doesn't seem like you are doing anything remotely creepy.
15:56:09clyybberYeah, thats a funny one
15:59:12*dddddd quit (Ping timeout: 245 seconds)
16:00:45*dddddd joined #nim
16:01:01clyybberManaged to minify it a bit and reported it here: https://github.com/nim-lang/Nim/issues/12273
16:01:05*nsf joined #nim
16:03:18*Gnjurac joined #nim
16:04:02Gnjurachmm this kiwi web irc has embeded video player, does irc still not support code formating like
16:04:02Gnjurachttps://support.discordapp.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-
16:04:53*owl_000 quit (Ping timeout: 240 seconds)
16:05:51*Gnjurac quit (Remote host closed the connection)
16:09:10clyybberGnjurac: IRC doesnt "support" any code formatting
16:09:28clyybberBut it also won't do anything to the text you send soo
16:09:32leorizebold italic bi
16:09:53clyybber?
16:09:58leorizewell you do have limited formatting in irc
16:10:03leorizethis is bold
16:10:11clyybberNot for me :P
16:10:14leorizethis should be italics
16:10:19clyybberNope
16:10:21leorizeyou need a better terminal :P
16:10:27clyybberalacritty?
16:10:32clyybberIs what I use
16:10:36clyybberIt should support it
16:10:38leorizeI'm using it too
16:10:47clyybberProbably my font
16:11:12leorizeunderline!
16:11:15*narimiran quit (Ping timeout: 265 seconds)
16:11:20disrupteki tried to like alacritty, but it wasn't as complete as kitty.
16:11:20leorizereversed
16:11:31leorizekitty hates iosevka
16:11:34leorizeso I don't use kitty
16:11:43FromDiscord<arnetheduck> pattern matching would be nice though, so that one can pick out the value without `get`
16:11:44FromDiscord<arnetheduck> that syntax is useful with `option`: `if (let x = f(); x.isSome): echo x.get()`
16:11:50clyybberUnderline works, but thats because alacritty does underlines independently of the font (and in kind of a hacky way but who cares)
16:13:01leorizeyou can't do code blocks on irc though
16:13:12leorizebecause pasting more than one line is considered bad practice
16:13:30clyybberwell you *can*
16:13:48clyybberbut you attract the anger of all irc ppl
16:14:27*solitudesf joined #nim
16:14:38leorizei'm trying to make asynchttpserver works with newruntime
16:14:43leorizeadded a bunch of owned
16:14:43disruptektbh, i dunno why it's such a big deal.
16:14:58*NimBot joined #nim
16:15:04leorizeand now thanks to borked lineinfo I have no idea what's wrong
16:15:31disruptekhow does iosevka compare to firacode?
16:15:44disruptektake your mind off line numbers and focus on me.
16:16:16leorize'r'
16:16:24leorizethere, that's my comparison
16:16:56clyybberdisruptek: Me neither, but there were a few occasions today where I could watch irc ppl begging for the lines to en
16:16:58clyybberd
16:17:53*Vladar quit (Remote host closed the connection)
16:17:55disruptekit was an issue 30 years ago, now it's just nbd.
16:22:14*dddddd quit (Ping timeout: 276 seconds)
16:29:26*navinmis_ joined #nim
16:30:31Zevvleorize: you're on a tricky path. I believe async is an unsolved problem with newruntime. Adding a bunch of 'owned's will not get you there
16:31:54ZevvAraq noted that gc:destructors and newruntime are in a fight to the death; the winner is the first to support async
16:33:17*navinmistry quit (Ping timeout: 250 seconds)
16:34:00FromDiscord<Kiloneie> Aprox. ETA on the new runtime ? What does it do besides being NO GC default Nim ? any possible performance bumps ?
16:34:07leorizeif only Araq would document their differences...
16:34:36*dddddd joined #nim
16:34:39leorizein certain cases it's slower :P
16:35:07FromDiscord<Kiloneie> how so ?
16:35:19*Vladar joined #nim
16:35:25disruptekthe speed is diminished.
16:35:38FromDiscord<Kiloneie> i am pretty sure i will be sticking with this nifty GC
16:35:44leorizethe gc can stack up a bunch of small deallocation for a big free
16:35:47leorizemuch faster
16:35:51FromDiscord<Kiloneie> i don't like manual labor D:
16:36:16leorizeso in a rapid alloc scenario, the gc can actually be faster
16:36:24FromDiscord<Kiloneie> good for games 🙂
16:36:29FromDiscord<Kiloneie> one day...
16:37:01FromDiscord<Kiloneie> man do i want to finish what i tried to do so many years ago... HUGE ambitious game...
16:37:31FromDiscord<Kiloneie> talk about several FTL games of work
16:37:46*daddoo quit (Quit: Leaving)
16:38:11leorizei got ambitious ideas too, except that i'm too lazy to actually do them...
16:38:27*sealmove quit (Quit: WeeChat 2.6)
16:38:35FromDiscord<Kiloneie> i worked for a year on one game, that's how i learned so much coding etc
16:38:49FromDiscord<Kiloneie> but i quit after countless semantic and actual errors
16:39:01FromDiscord<Kiloneie> my 15 year old brain couldn't grasp it all
16:40:04leorizei worked on a game engine for several months :P
16:40:22leorizeI quit after freepascal keeps erroring on my generics
16:40:27FromDiscord<DeltaPHC> Well, GC for games, it depends. It's better if you're careful, but GC'd languages tend to encourage practices that might slow a game down slightly. For example, GC pauses as it tries to collect all the 'garbage' you generate. Then, of course, you get around that by not generating garbage, or for Nim, tuning the GC parameters
16:40:27*drewr quit (Quit: ERC (IRC client for Emacs 26.3))
16:40:32leorizeswitched to nim but I never restarted my work :P
16:41:52FromDiscord<DeltaPHC> And also in non-GC languages, it can still be fast by not allocating all the time. Working from an arena buffer
16:41:55FromDiscord<Kiloneie> There's time ^^
16:42:18FromDiscord<Kiloneie> all that stuff is after the game is in the polish state 😛
16:42:39FromDiscord<Kiloneie> like, i really would not care about performance unless i actually can't do a feature without it
16:42:52leorizethose are dangerous words :P
16:43:19FromDiscord<Kiloneie> yeah well, game design doesn't like to get too tehnical D:
16:44:07FromDiscord<DeltaPHC> And it's not just memory allocation either. GC'd languages also encourage you to use reference types. Easy for coding, but a lot of indirection is bad for cache/data locality
16:44:23leorizecertainly not nim :P
16:44:33FromDiscord<Kiloneie> well you learn what to do and how, practice a few times, and let's make games D:
16:45:03leorizeonce you learned about what can slow a pc down, it's not that easy anymore :P
16:45:14FromDiscord<Kiloneie> everything does...
16:45:15FromDiscord<Yardanico> @DeltaPHC nim doesn't have a pause-the-world GC by default
16:45:19FromGitter<awr1> @leorize that's one of the advantages of GC that i unfortunately never see talked about
16:45:45FromGitter<awr1> cleanup can be more easily deferred to a more optimal time
16:45:56FromDiscord<mratsim> memory accesses slow a PC. Let's remove memory.
16:45:59*drewr joined #nim
16:46:02FromDiscord<DeltaPHC> lol
16:46:29FromDiscord<DeltaPHC> Deferred cleanup isn't something that *only* a GC can do, though
16:46:31FromGitter<awr1> don't you need a VM for stop-the-world?
16:46:40Zevvno, why?
16:46:46FromGitter<awr1> or
16:46:52FromGitter<awr1> maybe i'm confusing it with something else
16:47:11FromDiscord<mratsim> compile nim wth --gc:mark_and_sweep (not sure about the underscore)
16:47:31FromDiscord<mratsim> btw Araq, do we have somethign like that: https://discourse.julialang.org/t/version-1-0-released-of-nim-programming-language/29099/52
16:47:32disruptekmarkAndSweep
16:47:37leorizeeven the default gc can collect small memory chunks
16:47:38FromGitter<awr1> how exactly does the GC pause execution in a stop-the-world system? threading magic?
16:47:53Zevvtypically on allocations it will also do the GC step
16:47:57disruptekthere's no threads. simple.
16:48:04leorizethere are a bunch of primitives that could force the world to stop
16:48:22FromDiscord<DeltaPHC> To be clear, I'm not knocking against Nim. I like Nim. I'm just saying that the stated benefits of GC here aren't exclusive to GC. Non-GC languages can do custom memory management as well
16:48:30FromGitter<awr1> @Zevv yeah that's what nim does iirc, on allocations it can decide to pause
16:48:35disruptekmemory access is synchronous.
16:48:43FromDiscord<mratsim> in Nim, the compiler randomily inserts calls to the GC via genericReset and genericResetAux
16:48:56FromGitter<awr1> but in a VM it could be like, oh every X VM cycles we could just pause
16:49:15leorizeit's possible in non-vm case also
16:49:29Zevvdisruptek: it doesn't have to be. In theory, if your virtual memory system figures out memory is not there because it is paged out, you could go do something else while the page is being fetched.
16:49:35Zevvawait a = 3 :)
16:49:56FromGitter<awr1> @mratsim does Nim really do that?
16:50:04FromGitter<awr1> i thought i heard different
16:50:04disruptekcool theory, bruh ðŸĪĢ
16:50:09leorizenot that random :P
16:50:24leorizeonly on ref type creation iirc
16:50:46Zevvwhich indeed involve an alloc
16:51:03FromDiscord<mratsim> I remember changing assignations in Arraymancer, and suddenly I have genericRset appearing
16:51:26FromDiscord<mratsim> so I worked around that by using template instead of proc
16:51:38FromDiscord<mratsim> because I think the code only checks for the start of procs
16:52:02FromGitter<awr1> @leorize how would you do a cyclic "timer interrupt" stop-the-world without a VM
16:52:06FromGitter<awr1> would you just use threads?
16:52:45FromDiscord<mratsim> example: @Zevv https://github.com/mratsim/Arraymancer/issues/111#issuecomment-336235974
16:53:15clyybberYou can implement batched deallocation in newruntime too
16:53:17clyybberbbl
16:53:21disruptekawr1: or async
16:53:32Zevvmratsim: well, that is unexpected
16:54:11FromDiscord<mratsim> the main issue is that if you don't benchmark regularly, suddenly after 3 months of changes you realize that what used to work is now super slow
16:54:55Zevvmratsim: what is the rule of thumb when to expect those?
16:55:05FromGitter<awr1> that is quite strange
16:55:11leorize@awr1 you can have one thread managing the heap, then insert sync primitives to all other threads
16:55:23leorizeonce all of them reach the sync point you do GC
16:55:48leorizenot the most optimal way :P
16:56:32FromGitter<awr1> i wonder if you could also use something like `SuspendThread()`
16:56:46FromGitter<awr1> no real pthreads equivalent
17:00:51*dddddd quit (Ping timeout: 240 seconds)
17:06:54FromGitter<awr1> that nim trailer video reminds me of https://www.youtube.com/watch?v=rRbY3TMUcgQ
17:07:00FromDiscord<mratsim> @Zevv, mmmh no idea, I benchmark. I've only seen them on generics though
17:07:08*Kiloneie quit (Quit: Leaving)
17:07:17FromDiscord<mratsim> if you use plain ref types, there doesn't seem to be an issue
17:07:30*navinmis_ quit (Remote host closed the connection)
17:07:53*navinmistry joined #nim
17:07:54*navinmistry quit (Remote host closed the connection)
17:09:16*navinmistry joined #nim
17:10:11ZevvWell, I've done some tracking and tracing from nim to the asm level over the last few days, and it hasn't hit me luckily
17:13:56*dddddd joined #nim
17:17:12*navinmistry quit (Remote host closed the connection)
17:19:24*navinmistry joined #nim
17:39:10FromGitter<alehander42> Araq, can you think of other aspects which should be written down in the nilcheck init spec
17:40:22*matlock quit (Read error: Connection reset by peer)
17:44:40FromDiscord<Kiloneie> Guys, how long does the link to code in nim's playground exist ?
17:44:54FromDiscord<Kiloneie> if i put code in those links, will it exists years down the line ?
17:45:19Zevvwe're at the mercy of the ix.io ppl
17:45:30Zevvnot sure if anyone has ever contacted him
17:46:21FromGitter<alehander42> and what does `The compiler ensures that every code path initializes variables which contain ⏎ non nilable pointers. The details of this analysis are still to be specified ⏎ here.` mean?
17:46:41FromGitter<alehander42> currently i guess this is not implemented, as i can define var a: NotNilable and deref it
17:46:46FromGitter<alehander42> and the compiler is happy to let me
17:47:02FromDiscord<kodkuce> magic
17:47:02FromDiscord<Kiloneie> idk... i will put it in a link, and also save it in my onenote
17:47:40FromGitter<alehander42> does this mean e.g. a obj with such field, won't be able to be constructed without explicit field: nonnilable value
17:49:54FromGitter<matrixbot> `testgovno` ignor me, just testing matrix
17:50:41*poopBot joined #nim
17:50:59solitudesfmatrix can connect to irc directly, so you can avoid one relay
17:51:06FromGitter<matrixbot> `testgovno` again
17:53:09*Hideki_ joined #nim
17:55:02FromGitter<matrixbot> `testgovno` meybe but this fluffyChat is wierd app
17:56:08leorizejoin #freenode_#nim
17:57:09*testgovno[m] joined #nim
17:57:23FromGitter<alehander42> @dom96 btw can we have github login for the forum
17:57:25testgovno[m]hmm
17:57:37testgovno[m]ok
17:57:40FromGitter<alehander42> it's really annoying to maintain separate login info
17:57:42FromGitter<alehander42> for each site
17:57:43*Hideki_ quit (Ping timeout: 268 seconds)
17:57:58FromGitter<alehander42> and i basically never login to the forum
17:58:11FromGitter<alehander42> what i mean is, would such a pr be accepted if i eventually have free time
17:58:15Araqalehander42: we should be more aggressive
17:58:15FromGitter<alehander42> one day
17:58:38Araq'ref T' is 'ref T not nil', unless written as 'nil ref T'
17:58:53Araqand it also applies to 'proc' types
17:59:36FromGitter<alehander42> so how can you define a nilable proc variable, i use that often
17:59:42FromGitter<alehander42> var e: nil proc : void ?
17:59:47Araqyeah
18:00:07Araqmaybe we need a different syntax
18:00:18Araq'nil | proc ...'
18:00:23Araq'nil | ref T'
18:00:38Araqmakes some sense but this '|' then doesn't produce a typeclass
18:00:49Araqwhether that matters I don't know
18:00:52FromGitter<alehander42> nil / ref T ?
18:01:02FromGitter<alehander42> or just to reuse the common `?` syntax?
18:01:11FromGitter<alehander42> i really like it in c# / typescript
18:01:14Araqbut we don't have suffix operators
18:01:24FromGitter<alehander42> but i guess it might be seen as a additional symbol
18:01:36Araqso it would be ?(ref T), not really nice
18:02:24Araqor maybe it's good enough
18:02:26FromGitter<alehander42> but why dont we have suffix ops
18:02:27FromGitter<alehander42> tradition?
18:02:44Araqcreates new ambiguities
18:02:56FromGitter<alehander42> why not ref? T
18:03:05FromGitter<alehander42> maybe confusing yeah
18:03:07Araqx @ @ y
18:03:17Araq(x@) @ y
18:03:18Araqor
18:03:26FromGitter<alehander42> yeah, but `?` isn't used at all, so i guess it can't be ambigious
18:03:30Araqx @ (@ y)
18:03:45Araq? is an operator symbol just like +
18:04:08Araqsee the spec, the fact that system.nim doesn't use ? is irrelevant
18:04:47FromGitter<alehander42> ahh yeah, it's there
18:05:10FromGitter<alehander42> i imagined that it can be added as syntax just the same way `nil` works now
18:05:18Araqvar foo: nilref T
18:05:32Araqwould work, but looks weird
18:05:34FromGitter<alehander42> ?A nil A ⏎ ?ref A => nil ref A ⏎ ?proc: void => nil proc
18:07:31FromGitter<alehander42> but wouldn't `? ref A`
18:07:32FromGitter<alehander42> just work
18:07:38FromGitter<alehander42> from my experiments with +
18:07:45FromGitter<alehander42> it seems to generate the ast i expect
18:07:57FromGitter<alehander42> it needs `()` only for combined expressions
18:07:57Araqyeah, well, also try
18:08:00FromGitter<alehander42> which is rare
18:08:10Araq?ref Table[string, string]
18:08:43Araqbut ok, if it works, ?ref and ?ptr and ?proc is the way to go
18:08:52FromGitter<alehander42> it's great
18:08:53FromGitter<alehander42> it works
18:09:43clyybberits ugly
18:09:51FromGitter<awr1> what about `ret T can nil`
18:10:05FromGitter<awr1> to make it more orthagonal to `not nil`
18:10:05*narimiran joined #nim
18:10:27FromGitter<alehander42> i think `not nil` wouldn't be used a lot
18:10:30FromGitter<alehander42> if its going to be default
18:10:38FromGitter<alehander42> so it's more like `T` vs `nil T`
18:10:38clyybberThen call it nilref
18:10:45FromGitter<alehander42> that's why i prefer `T` vs `?T`
18:10:52clyybberI think those type "modifiers" dont do any good
18:11:03FromGitter<awr1> *ref
18:11:10FromGitter<alehander42> clybber, but this is not very orthogonal..
18:11:20clyybberorthogonal to what?
18:11:21FromGitter<alehander42> i can have a nil proc, a nil MyRef etc
18:11:27clyybberAh
18:11:29FromGitter<alehander42> nil ref is just one case
18:11:34clyybberYeah, sure
18:11:56FromGitter<alehander42> i think it's basically `nil T` vs `?T`
18:12:15FromDiscord<treeform> Does nim have object escape analysis? If I create a ref object inside a proc and it can tell that it never leaves the proc it will be created on the stack instead?
18:12:41FromGitter<awr1> or `ref T or nil` to make it "boolean", similar what @Araq said but agh the typeclass issue
18:13:02clyybber`ref T or type(nil)`
18:13:03FromGitter<alehander42> one point is that iirc typescript did this
18:13:13FromGitter<alehander42> string | undefined or something similar
18:13:20FromGitter<alehander42> and i think later they got the string?
18:13:25FromGitter<alehander42> which became more popular
18:13:43Araqtreeform: nah, it doesn't come up often
18:13:59FromGitter<awr1> `or nil` could be a special case
18:14:03FromGitter<alehander42> so we might learn from that (but i might be wrong about the order of things in their story)
18:14:29Araq`ref T or type(nil)` is too verbose
18:14:32FromGitter<alehander42> we dont need new special cases sadly
18:14:47FromGitter<alehander42> i think if we want to have the `nil` thing, `nil T` should be fine
18:14:50FromGitter<awr1> but if parsing it is too weird why not `can nil`?
18:15:11Araqplease notice that nilable ref types still are very common when you use 'ref' for the things it was designed for -- creating trees and graphs
18:15:15FromGitter<alehander42> well , why two keywords for one new feature
18:15:30FromGitter<alehander42> not-very-new*
18:15:38disruptek?ugly
18:15:50FromGitter<awr1> that's just one new keyword
18:15:53FromGitter<alehander42> also, `isnot` etc , nim usually uses one keyword
18:15:55clyybberAraq: Where do not nil refs come up then?
18:15:56FromGitter<awr1> we already use two keywords for `not nil`
18:15:59FromGitter<alehander42> so `can nil` would be strange
18:16:15FromGitter<alehander42> @awr1 but the whole point is that now we woudln't need `not nil` in most code
18:16:30Araqclyybber: in parameters
18:16:35FromGitter<awr1> so what are you saying? deprecate `not nil`?
18:16:46FromGitter<awr1> (as a specific syntax)
18:16:50FromGitter<alehander42> well, if it's the default, people would just not need to write it
18:16:55FromGitter<alehander42> it doesn't matter if its deprecated
18:16:55clyybberAraq: And then the compiler will statically determine that its not nil?
18:17:13Araqclyybber: it will enforce it, yes. no nil derefs at runtime anymore
18:18:17FromGitter<awr1> I don't like `?`, people will mistake that for the optional chaining stuff you see in swift et al
18:18:27clyybberYeah
18:18:33FromGitter<alehander42> that's not true
18:18:38disrupteki just don't like the way it reads.
18:18:42FromGitter<alehander42> c# and typescript use it exactly with the same meaning
18:18:49clyybberMe neither, it doesn't *feel* nim
18:19:14clyybberPerhaps because its a postfix operator
18:19:29FromGitter<alehander42> but it's a prefix operator in our bikeshedding idea
18:19:40FromGitter<timotheecour> Hi @araq I was hoping you could shed a piece of insight on https://github.com/pragmagic/karax/issues/121 which is yet another karax blocker I’m running into
18:19:40clyybber`nil ref` is better IMO
18:19:48disruptekhow about foo(node: MyNode and nil); ie you might get MyNode and you might get nil.
18:19:53FromGitter<awr1> i would say `maybe ref T` but again...that could be confused for optionals
18:20:17FromGitter<alehander42> disruptek this would be confusing .. `and` implies some kind of subtyping imo
18:20:20disrupteki like `may nil`, too, but don't wanna add an identifier.
18:20:27disruptekkeyword, that is.
18:20:53FromGitter<alehander42> `maybe` sounds nice as well, but it can be confused with Option imo
18:20:55disruptekwell, it's clearly two types.
18:21:03disruptekmay is more verby.
18:21:03FromGitter<alehander42> disruptek not really
18:21:20FromGitter<alehander42> ah sorry, i thought you said it about and
18:21:31FromGitter<alehander42> theresa may ref
18:21:38clyybberPerhaps we should really make a nilable ref an Option ?
18:21:39FromGitter<alehander42> i already miss her
18:21:39disrupteki think `Foo and nil` are clearly two distinct values.
18:22:00FromGitter<alehander42> disruptek thats not really how it looks
18:22:06FromGitter<alehander42> imagine the venn diagram
18:22:18clyybberWhy not embrace Options and make nilrefs an Option?
18:22:20FromGitter<alehander42> and the types as sets
18:22:26disruptekclyybber: it's not crazy.
18:22:28FromGitter<alehander42> A or B includes values from both types
18:22:39FromGitter<alehander42> A and B only values which are both A and B
18:22:46FromGitter<awr1> `ref T using nil`?
18:22:53FromGitter<alehander42> so i would read it like "only nils"
18:23:05disrupteki guess that's a fair argument.
18:23:17clyybberdisruptek: Right? I feel like thats the most "orthogonal way"
18:23:24FromGitter<alehander42> `using nil`, `can nil` just seem needlessly long to me
18:23:26clyybberThe Option approach I mean
18:23:30FromGitter<alehander42> you can have those often
18:23:36FromGitter<alehander42> the option thing is interesting
18:23:44FromGitter<alehander42> i admit i often use nilable refs as something like an option
18:23:48disruptekoptions might be too heavy though.
18:24:03FromGitter<alehander42> and especially with flow typing, its easy to "destructure"
18:24:16shashlickWas trying a git bisect between 0.19.6 and 0.20.0
18:24:19clyybberdisruptek: WDYM? The bool variable can be optimized away
18:24:20FromGitter<alehander42> e.g. if not option.isNil: just use option, no need for .get
18:24:25shashlickReally painful
18:24:40shashlickSome commits don't even build
18:24:49shashlickSome crash
18:25:05shashlickNo way to isolate to my issue
18:25:10disruptekwill i be able to have separate dispatch on nilable ref and not-nilable ref?
18:25:36FromGitter<alehander42> they are different types
18:25:42FromGitter<alehander42> so i would suppose so
18:25:42disruptekso, yes.
18:26:00FromGitter<alehander42> but on the other hand
18:26:03disruptekit sounds like this is just a macro.
18:26:47clyybberdisruptek: In fact Option[ref] already optimizes the boolean away
18:27:05FromGitter<alehander42> on the other hand A not nil matches nil A
18:27:13FromGitter<awr1> yeah that's another point
18:27:28disruptekhmmm. curiouser and curiouser.
18:27:57FromGitter<awr1> what if we could just have Options instead of nilables as a lang feature
18:28:15FromGitter<awr1> i mean
18:28:23FromGitter<awr1> not have have nilables as a lang feature
18:28:55FromGitter<alehander42> @awr1 this is a different thing
18:29:01FromGitter<alehander42> ah, i see what you mean
18:29:05disruptekhaving the concept of nothing is kinda integral to the concept of something.
18:29:24FromGitter<alehander42> well, i guess a problem is that nilable `ref-s` are deeply
18:29:35FromGitter<alehander42> tied to current nim codebases
18:29:59FromGitter<awr1> `ontological ref T`
18:30:03FromGitter<awr1> :P
18:30:03FromGitter<alehander42> so i doubt you can really remove the concept at this moment
18:31:06FromGitter<alehander42> otherwise i guess you imagine something like rust's option
18:31:29FromGitter<awr1> loosely yeah
18:31:48lqdev[m]oh man, I'm having a bit of a problem. so I allocate a fixed size buffer on the stack; the main prob is that its size isn't enough on older machines and increasing it crashes the program
18:32:31lqdev[m]and as I previously stated, I cannot use a seq because that's heap memory and I can't use that.
18:32:43Zevvwhy can't you use that, again?
18:32:56lqdev[m]it crashes the audio thread
18:33:03lqdev[m]because it does syscalls
18:33:06FromGitter<alehander42> can you somehow access the stack of older frames
18:33:13FromGitter<awr1> you can change stack size
18:33:15FromGitter<awr1> in gcc iirc
18:33:22FromGitter<alehander42> Araq, what i wonder for the spec is
18:33:24FromGitter<alehander42> init
18:33:25clyybberlqdev[m]: Ummm, living without a heap is hard
18:33:28lqdev[m]how?
18:33:34FromGitter<alehander42> e.g. var c: NonNilable
18:33:36clyybberAnd there is no way to increase the stack size on windows afaik
18:33:36lqdev[m]yeah
18:33:46FromGitter<awr1> `--stack,<number>`
18:33:49FromGitter<alehander42> how do we ensure it is initialized and where
18:33:52FromGitter<alehander42> until the end of scope?
18:34:00lqdev[m]worst problem's that I can't stream the audio directly to a single seq
18:34:19Zevvlqdev[m]: still, what you're trying to do should all be possible
18:34:21FromGitter<alehander42> i can imagine we keep some internal "temp nilable" flag for it
18:34:21FromGitter<awr1> also https://docs.microsoft.com/en-us/cpp/build/reference/f-set-stack-size?view=vs-2019
18:34:24clyybberlqdev[m]: Nvrmind there is: https://superuser.com/questions/340239/how-to-increase-stack-size-permanently-on-windows-7
18:34:40clyybberlqdev[m]: But I really recommend just using another audio lib
18:34:46lqdev[m]please no
18:34:52lqdev[m]I did too much work for this to go to waste
18:34:53disrupteki guess what i want is a separate dispatch sensitivity for runtime values of nil. but, i doubt you want to impl that.
18:35:06lqdev[m]@awr1 I don't use msvc
18:35:11clyybberlqdev[m]: Then report it upstream?
18:35:20clyybberSounds like a bug in the audio lib to me
18:35:25FromGitter<awr1> then try `--stack,<number>`
18:35:29lqdev[m]nope
18:35:30FromGitter<alehander42> and this is easy for variables, but it gets harder for objects: a = Obj() # now we have to ensure a.nonNilable
18:35:30lqdev[m]it's not
18:35:34lqdev[m]it's a bug in my program
18:35:43Zevvlqdev[m]: what was your lib, I forgot the name
18:35:53lqdev[m]my buffer size's too small to fit in the whole sample batch
18:35:55lqdev[m]soundio
18:36:10clyybberAh, so decrease the buffer size?
18:36:14FromGitter<awr1> i don't even understand how you're doing what you're doing
18:36:23FromGitter<awr1> normally you get audio buffers from the OS
18:36:42FromGitter<awr1> unless i don't remember how to use DirectSound
18:36:59FromGitter<awr1> oh wait yeah i dont
18:37:08clyybberlqdev[m]: Wait, i thought the bugger is too big and the stack too small?
18:37:10FromGitter<awr1> you allocate and then DirectSound uses
18:37:12FromGitter<awr1> hmm
18:37:13lqdev[m]damn I just realized something
18:37:15clyybbers/bugger/buffer
18:37:30lqdev[m]clyybber: yes
18:37:31FromGitter<awr1> still why can't you heap allocate?
18:37:32lqdev[m]but I have another idea now
18:37:37lqdev[m]let me try it out
18:37:57lqdev[m]awr1: the audio thread runs in real time and if it slows down a bit it crashes the whole program
18:38:12lqdev[m]but give me a second, I have a much better idea in mind
18:38:14clyybberThat sounds like a bug
18:38:19lqdev[m]it's not
18:38:20*skoude joined #nim
18:38:27lqdev[m]it's how audio works
18:38:29lqdev[m]ÂŊ\_(ツ)_/ÂŊ
18:38:34FromGitter<awr1> are you worried that GC will track the buffer
18:38:36lqdev[m]brb
18:38:45clyybberNormally audio can deal with not-full buffers
18:38:50lqdev[m]awr1: no, it's that I can't use malloc or anything
18:39:37FromGitter<awr1> then i do not understand what would cause the slowdown
18:40:22FromGitter<awr1> are you just wary of allocating too much as you composite the buffer?
18:40:41leorizeif underruns crashes your program
18:40:46leorizeyou need a better audio libray
18:40:48leorizelibrary*
18:40:59clyybberYeah
18:41:12FromGitter<awr1> "I can't use malloc or anything" why?
18:41:24FromGitter<awr1> what systems are you running on
18:41:47Zevvlqdev[m]: I still don't really see what the root cuase of your problem is
18:41:59ZevvYou have a nim program and a proc that runs in a non-native thread
18:42:19Zevvso the non-native thread basically cannot do any real nim things
18:42:28lqdev[m]I realized that I can send the samples in batches of 256
18:43:06Zevvbut all you need to do is copy memory into a buffer somewhere. Nevermind if this is stack or heap, as long as you do not trigger any nim gc or allocs
18:43:17*skoude quit (Ping timeout: 276 seconds)
18:43:30FromGitter<awr1> it sounds like you don't want to use malloc b/c you don't want to deal with the deallocation cost
18:43:43FromGitter<awr1> but you can malloc without immediately having to free
18:43:49FromGitter<awr1> you can just hang on to that allocation
18:43:53lqdev[m]until I send all the required samples
18:43:58*navinmistry quit (Remote host closed the connection)
18:44:06FromDiscord<Kiloneie> whos done videos before ? why the fuck does da vinci resolveshow me there is volume but it doesn't play any !? or at places it shows there is no audio and yet it plays it... O,O
18:44:49*navinmistry joined #nim
18:46:07*adeohluwa joined #nim
18:49:16YardanicoSomeone asked on TG - "Hello, how to implement an iterator for a distinct type using the base type implementation?"
18:50:26*exelotl joined #nim
18:52:40FromGitter<awr1> you can use `distinctBase` from `std / sugar`
18:53:33clyybberYardanico: `iterator items(c: someDistinct): someType =\n for p in c.theBaseType.items: yield p`
18:53:41clyybberThat should work afaict
18:53:44narimirananother question about iterators: https://old.reddit.com/r/nim/comments/d9mzex/iterator_transformers_in_nim/
18:54:51*LargeEpsilon quit (Ping timeout: 240 seconds)
18:55:15*laaron joined #nim
18:55:44FromGitter<awr1> https://play.nim-lang.org/#ix=1X4C
18:58:39lqdev[m]@awr1 but then the GC flips out
18:59:40FromGitter<awr1> if you really want to, why not just `alloc0`
19:01:33Araqtimotheecour: still here?
19:01:56*navinmis_ joined #nim
19:05:28*navinmistry quit (Ping timeout: 264 seconds)
19:08:41*daddoo joined #nim
19:12:59*adeohluwa quit (Ping timeout: 265 seconds)
19:19:16FromGitter<alehander42> hm, i'll try to prototype my test-dependency idea for nim
19:19:36FromGitter<alehander42> it would be cool if it optimizes tests for an example project
19:20:16Araqlqdev[m], you can write a custom seq via Nim's destructors
19:20:32Araqthe manual shows how
19:20:40AraqI mean the destructors manual
19:31:20zedeuswhat's the difference between --newruntime and --gc:destructors? I can't find much info and it seemed like Araq said they're now competing for async compatibility
19:32:00FromDiscord<DeltaPHC> IIRC, newruntime implies gc:destructors
19:32:08FromDiscord<DeltaPHC> But not the other way around
19:32:53*adeohluwa joined #nim
19:33:23zedeushmm, I supposed newruntime is more about 'owned' then
19:33:39FromDiscord<mratsim> from Gitter merging all messages is really awful on Discord
19:34:26FromDiscord<mratsim> @Araq, do we have something like this, i.e. a description of semcheck? https://discourse.julialang.org/t/version-1-0-released-of-nim-programming-language/29099/52?u=mratsim
19:34:56FromDiscord<mratsim> I wonder if it's a question about Hindler-Milner 😛
19:34:57Araqzedeus, I'm writing an article but I can't clone myself
19:35:13Araq1. we don't use HM, HM with overloading is NP-complete.
19:35:29Araq2. semcheck is symbol lookup + type checking
19:36:05Araqbut the spec is super imprecise about this, I started to write an article about it...
19:36:39zedeussadly, looking forward to it :)
19:36:50AraqI can give you a summary
19:37:04FromDiscord<mratsim> you can put the summary in a gist and I'll link it
19:37:18rayman22201I can try a bad tldr until Araq finishes his article.
19:37:28rayman22201oh, or Araq can summarize himself :-P
19:37:35Araqboth modes use destructors for strings/seqs. --newruntime introduces 'owned'
19:38:07Araq--gc:destructors is still a GC for 'ref' but the syncronization points are non-existent
19:38:49Araqyou need to call collect() on the stack bottom yourself -- well the async framework will do it for you
19:39:06Araqno need to track stack slots for async as async avoids the stack anyway
19:39:30FromDiscord<DeltaPHC> When you say "introduces owned", does that include `sink T` and `lent T`?
19:39:58FromGitter<zetashift> The discussion on the Julia forums are a lot better than the ones I linked in the Rust reddit atleast ;P (though I'm always glad to see the case insensivity discussion /s)
19:40:17Araqyou can also call dispose() or deepDispose() to free memory yourself, then the GC kicks in less often then. if you free everything yourself, the GC never kicks in
19:40:37Zevvlqdev[m]: this works for me http://ix.io/1X4Q
19:40:49*adeohluwa quit (Remote host closed the connection)
19:40:51Zevvthe ringbuffer is a nim object on the heap with it's data in a seq
19:41:00Zevvwhich is shared between nim and the audio callback thread
19:41:01Zevvno magic
19:41:06Zevvexcept for the c_printf() inside the thread
19:41:12AraqDeltaPHC, 'sink T' and 'lent T' are generally available and optimizations
19:41:25Araqfor value-based datatypes
19:41:27FromDiscord<DeltaPHC> Ahh
19:41:33lqdev[m]Zevv: try that on a slow machine and see how compatible it is
19:42:11lqdev[m]it's very likely that you'll have to increase the buffer size to ludicrous amounts
19:42:13lqdev[m]s/buffer/ring buffer
19:42:47Zevvbut why?!
19:43:58Zevvworks fine with a 4k buffer for me, as long as the nim side takes care to keep the ringbuffer filled up
19:44:00Araqthe idea behind --gc:destructors is "gradual" memory management, you start with the GC and then can add calls to dispose() until even hole was plugged and no leaks remain
19:44:28Zevvlqdev[m]: I still do not understand what your underlying problem is
19:44:56lqdev[m]you don't need to understand, I know how to fix it
19:45:06lqdev[m]I guess my engine goes against conventions lol
19:45:45Araqand yeah, it's the old safety vs performance tradeoff and you can curse me for not having solved a problem nobody else solved either.
19:46:27Zevvlqdev[m]: ok, good luck then
19:47:44Araqok, nobody cares good, back to bugfixing
19:47:59FromDiscord<DeltaPHC> Heh, I mean, depends on what you mean by solved. There's also a tradeoff of developer ergonomics depending on how you do it
19:48:17zedeusthank you for the summary
19:49:27FromDiscord<DeltaPHC> That's the tradeoff that Rust makes. It makes the rules quite strict in the name of safety/soundness, at the expense of ergonomics
19:49:39lqdev[m]mratsim: this comes close https://nim-lang.org/docs/manual.html#type-relations
19:49:48AraqRust makes entirely different tradeoffs
19:50:23AraqRust tracks stack-like memory via its borrowing annotations but heap-like memory is usually refcounted
19:50:47FromDiscord<DeltaPHC> Only if you make it refcounted, but yeah
19:50:53Araqas it has no other option, lifetimes don't model a heap
19:51:12FromDiscord<arnetheduck> Hindler-Milner
19:51:14FromDiscord<Kiloneie> Does the Rust author talk to his users as much as ours does ?
19:51:27FromDiscord<DeltaPHC> There isn't a single "Rust author" these days
19:51:33Araqyup :-)
19:52:02FromDiscord<DeltaPHC> There is a guy who invented Rust who isn't involved in its development anymore (though he still uses the language)
19:52:56FromDiscord<DeltaPHC> Dev is managed by a small team, plus whatever contributions they get
19:54:28Araqdunno about the "small team", Rust feels big
19:54:49Araqthey had a gorilla in their team once
19:54:58FromDiscord<DeltaPHC> lmao
19:55:16FromDiscord<Kiloneie> What do you mean by a "gorilla" oO ?
19:55:36*matlock joined #nim
19:55:55clyybberAraq: Haskell uses HM and has overloading? Do you have a source where it shown to be NP?
19:56:23FromDiscord<DeltaPHC> In any case, while lifetimes/destructors in Rust don't have anything to do with the heap, the lifetime of a heap object can still be tied to a stack (owned) thing
19:56:57Araqsure, I'm a bit hand-wavy about it
20:00:00Araqclyybber, meh, I'm rusty. IIRC HM for ML already is only fixed parameter tractable
20:00:45Araqand the fixed parameter is the number of let-bindings
20:00:54Araqbut don't quote me on that...
20:02:08lqdev[m]how to not do bounds checking 101: set your array size to SomeSize * 2 and then typecheck whether index is inbounds using `x in 0..<SomeSize`
20:02:16Araqhttps://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system#Overloading
20:02:48*tiorock joined #nim
20:02:48*tiorock quit (Changing host)
20:02:48*tiorock joined #nim
20:02:48*rockcavera is now known as Guest38338
20:02:48*Guest38338 quit (Killed (cherryh.freenode.net (Nickname regained by services)))
20:02:48*tiorock is now known as rockcavera
20:02:51*mibr joined #nim
20:05:30Araqhttps://pdfs.semanticscholar.org/c57f/35b665caa96743fc9e88e0a8052d53a02e9c.pdf
20:05:44Araq"s. In Sections 2–7 we will explain in detail why overloading resolution is NP-complete
20:05:44Araqfor an important case: a Îŧ-calculus with overloading."
20:05:54Araqclose enough :P
20:07:14lmariscaldom96 does the nimble file supports branch specifics? like the nimble isntall
20:07:23FromDiscord<Shield> @lqdev[m] why would the audio thread crash the whole program?
20:07:36dom96lmariscal, nimble file supports everything the nimble install command supports
20:07:43dom96just without the `@`
20:08:00clyybberAraq: Interesting, thanks
20:09:28*navinmis_ quit (Ping timeout: 245 seconds)
20:09:32lmariscalit is still throwing an error with requires "nimgl#1.0 > 1.0.0" saying that nimgl#1.0 doesn't exist in the packages.json
20:09:42lmariscalit both happens with @# and just #
20:10:17*adeohluwa joined #nim
20:10:37lmariscalrequires "nimgl#1.0 >= 1.0.0" to be more specific about the >=
20:10:58dom96you're specifying two version requirements
20:11:00dom96you can't do that
20:11:37dom96You either ask Nimble for a nimgl that's greater than or equal to 1.0
20:11:45dom96or you ask it for a nimgl at commit hash "1.0"
20:12:05lmariscalthat makes so much more sense thank you dom96!
20:12:07*mwbrown quit (Ping timeout: 245 seconds)
20:14:08dom96lock files are in development and they will ensure that when you "lock" your package that your dependencies stay at a particular commit hash
20:14:13dom96I guess that is what you were trying to achieve here
20:14:21*mwbrown joined #nim
20:19:46FromDiscord<Kiloneie> @Araq how long did it take for your video to render ?
20:22:22lmariscalDo to a rework in the package I am trying to mantain two versions of it via two different branches so it is important to specify which branch you want in nimble
20:23:17*nsf quit (Quit: WeeChat 2.5)
20:24:07*al_ joined #nim
20:25:32FromGitter<timotheecour> @araq yes, back here
20:28:48dom96I can't help but cringe at that commercial still
20:29:26dom96Araq, you did improve it according to my feedback though so I am happy
20:30:52dom96Araq, can you send me the raw video file so I can tweet it?
20:31:15FromDiscord<Kiloneie> what did you suggest ?
20:31:26clyybberdom96: Just tweet the link to youtube
20:31:35clyybberI think most people would prefer it that way
20:31:47dom96I don't think so
20:31:49FromDiscord<Kiloneie> i told him white clouds for text boxes is not a great idea D:, he improved it some
20:33:17clyybberdom96: You can't change the video quality on twitter, youtube videos can be embedded into a tweet.
20:34:30dom96clyybber, to be honest I'm not sure Twitter will allow such a long video, but the problem with YouTube is that people have to click it. With an embedded video it'll just autoplay as they scroll through tweets
20:34:59clyybberWill the target audience not be annoyed by that autoplay? I know I am
20:35:16FromDiscord<Kiloneie> Same -.-, autoplay should BURN !
20:36:27*adeohluwa quit (Remote host closed the connection)
20:36:34dom96Yes, I'm sure Twitter users that see auto-playing videos all the time will get super annoyed if we post a native video on twitter.
20:36:54FromDiscord<Kiloneie> FINALLY, #3 is done with an hour delay, bloody waveforms appearing in wrong places or not at all, and a random high pitch in the middle of the video blowing people's ears out after rendering...
20:36:54FromDiscord<Kiloneie>
20:36:54FromDiscord<Kiloneie> LINK: https://youtu.be/TB5b_AO84U8
20:38:24clyybberWhats the most simple way to strip trailing whitespace of a string?
20:39:10FromDiscord<exelotl> clyybber there's strip in strutils
20:39:13FromDiscord<exelotl> https://nim-lang.org/docs/strutils.html#strip%2Cstring%2Cset%5Bchar%5D
20:39:14FromGitter<zetashift> `strip`?
20:39:25FromGitter<zetashift> ah shit exelotl just a bit faster with the link
20:39:32clyybberAh, thanks
20:39:37FromDiscord<exelotl> yeet
20:44:42lqdev[m]it works!! I fixed the bugs!!!
20:44:51Zevvso, what was your problem then
20:44:56Zevvnot your memory, right? :)
20:45:32lqdev[m]nope, in the end I made the buffer way smaller
20:45:33lqdev[m]I stream the audio on small chunks of 256 frames now
20:45:40Zevvthat makes sense
20:45:40lqdev[m]the problem I encountered later was actually way more stupid
20:46:11lqdev[m]I set my buffer's array size to a constant * 2 and I forgot to add that `* 2` to my bound checking, so it was effectively discarding 50% of the produced samples
20:46:24lqdev[m]why the `* 2`? because stereo
20:46:25*Vladar quit (Remote host closed the connection)
20:46:35ZevvYes, and every audio lib has a different notion of 'frame'
20:46:48Zevvfor some a frame is a sample, for some a frame is a bunch of samples for all channels
20:46:56lqdev[m]well, in soundio it's basically just audio samples
20:47:08Zevvwell, good news then \o/
20:47:16*Serrellanos joined #nim
20:47:30lqdev[m]I still prefer that second definition though
20:48:05Zevvsame here. frame >= sample
20:49:32lqdev[m]so I'm happy to announce that rapid/audio is actually somewhat usable now https://github.com/liquid600pgm/rapid
20:49:43lqdev[m]I'd be really happy if someone could test it on their hardware
20:49:51lqdev[m]`nim c -r tests/taudio`
20:50:17disruptekholy smokes.
20:50:19ZevvBeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep
20:50:22disrupteki never thought i'd see the day.
20:50:24FromGitter<alehander42> mratsim i answered with https://discourse.julialang.org/t/version-1-0-released-of-nim-programming-language/29099/53?u=alehander42
20:50:32disruptekcongrats, lq
20:50:42FromGitter<alehander42> but it might be not a good answer, so feel free to add another
20:50:55Zevvactually, it's Beeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeep
20:51:00Zevv^ note the whitespace
20:51:03lqdev[m]ooh that's weird
20:51:11lqdev[m]it stutters?
20:51:22Zevva tad
20:51:29lqdev[m]maybe it's the latency, I should make it configurable
20:52:59ZevvAdd an underflow_callback as well for diagnostic purposes
20:53:27Zevvit's not your code: I added the xrun callback and its not triggering. So something in my pulse/alsa/whatever is below this
20:53:29lqdev[m]I think I did that some time ago? I don't know where it went lol
20:53:50Zevvanyway, I'm out. Enjoy!
20:53:56lqdev[m]I probably removed it to prevent crashes
20:55:39lqdev[m]I'll add an `underruns` property to RAudioDevice, to help diagnose problems
20:56:17*narimiran quit (Ping timeout: 245 seconds)
20:59:55FromDiscord<Pat> So is this lang going to make its way into the industry or what?
21:00:04FromDiscord<Pat> What's this lang currently most useful for?
21:00:27lqdev[m]we can only hope that it'll make its way up the charts
21:00:46FromGitter<zetashift> @Pat 1.0.0 was just released so we're still expanding ecosystem and tooling
21:00:56FromDiscord<Pat> Once you can build desktop applications with it I bet it wiil
21:01:04lqdev[m]I personally use it for game and app development
21:01:29Yardanico@Pat well nobody stops you from building desktop applications with nim right now :)
21:01:41FromDiscord<Pat> Really? Is there libraries made for that or you reinvent the wheel?
21:01:46clyybberI also do gamedev and all the related stuff in nim
21:01:57FromDiscord<Shield> is this the "godots has no games yet therefore i won't use it" argument lol
21:02:01Yardanicohttps://github.com/search?o=desc&q=language%3ANim+GUI&s=stars&type=Repositories
21:02:03FromDiscord<Shield> godot*
21:02:10FromDiscord<Pat> When I stumbled across this language Im pretty puzzled as to why this isn't being fastracked
21:02:15Yardanicoand https://nimble.directory/search?query=GUI
21:02:49FromDiscord<DeltaPHC> Well like any language, libraries don't just magically appear. Someone has to code it
21:03:04FromDiscord<Pat> Right but the concept entirely is solid
21:03:08FromDiscord<Shield> people in production are very wary of non mainstream languages
21:03:57FromDiscord<Pat> C and cpp are dinosaur langs with extreme power.. building a high level programming language to act as a transpiler
21:04:02FromDiscord<Pat> is just genius
21:04:56FromDiscord<Pat> Doing away with the VM langs and putting work into transpilers could be the way to go?
21:05:00FromDiscord<DeltaPHC> It's not a new idea
21:05:08FromGitter<alehander42> careful with the transpiler's thing
21:05:10FromGitter<alehander42> :P
21:05:31FromGitter<alehander42> kidding, but more seriously, it doesnt really matter so much it transpiles to C /C++ imo
21:05:36FromDiscord<Pat> well yeah it's not a new idea NIM has been around a bit
21:05:39FromGitter<alehander42> its aaaalmost an implementation detail
21:05:46FromGitter<alehander42> it could target llvm
21:05:52FromGitter<alehander42> there are pro-s and con-s
21:06:01FromGitter<alehander42> of targgeting C, but it's really low level C
21:06:08FromDiscord<Pat> But it generates native code as a high level language correct?
21:06:20clyybberalehander42: s/could/can
21:06:23FromGitter<alehander42> it generates native code, yes
21:06:28FromDiscord<Pat> These kinds of languages are the future I know it.
21:06:36FromGitter<alehander42> clyybber is right, actually nim does have a llvm backend
21:06:39Yardanico@Pat Nim has a LLVM backend
21:06:58Yardanicoit's unofficial though, but in the future could maybe become official
21:07:02FromGitter<alehander42> so targgeting C is nice, but not the most important part of nim
21:07:59FromDiscord<Pat> Of course not
21:08:14FromDiscord<Pat> Nim's power lies in the concepts it brings from other langs and the new ones it presents
21:08:21clyybberPat: It can even target javascript
21:08:39FromDiscord<Pat> Yeah I love how its trying to support backend and frontend development
21:09:03FromDiscord<Pat> I saw crystal-lang and honestly it looks gross to me.
21:10:12FromDiscord<Pat> I'd love to use NIM I just can't really think of little practical applications I can do with it to learn it. Admittedly I have a lot to read still on the site but I just wanted to see how the community feels and where you see it going.
21:10:29FromDiscord<Pat> I'd love to use NIM I just can't really think of little practical applications I can do with it yet to learn it. Admittedly I have a lot to read still on the site but I just wanted to see how the community feels and where you see it going.
21:10:35FromGitter<alehander42> everything that you'd use go for
21:10:39FromGitter<alehander42> ok, most of it
21:11:00FromDiscord<Kiloneie> you can watch my videos to get started :), for beginners...
21:11:02FromGitter<alehander42> e.g. cli tools/TUI interfaces/some services
21:11:10FromDiscord<DeltaPHC> Well, one of the advantages of compiling down to C is that Nim can also second-hand target whatever C can target
21:11:43FromGitter<zetashift> Nim even works on the Switch and GBA!
21:11:48FromDiscord<Pat> I'd love to mess around with doing front end stuff in NIM. So we could make GUI apps that look the same across multiple platforms
21:12:00FromDiscord<DeltaPHC> You still have to make special considerations for constrained/exotic platforms, but that applies to any language
21:12:10FromGitter<alehander42> you have two options here: nim native ui frameworks and e.g. electron
21:12:12FromDiscord<Pat> Java got very wishy washy with their "cross-platform" gui libs
21:12:30FromDiscord<Pat> I am a reinvent the wheel kind of guy and im interested in working on a 2d graphics lib for nim
21:12:36FromGitter<alehander42> mostly saying it to ensure that nim can be used most of the places where javascript can too
21:13:09FromGitter<alehander42> guys, i have a weird nimble error
21:13:10FromGitter<alehander42> Could not read package info file in /home/al/diff/diff.nimble;
21:13:28FromGitter<alehander42> Invalid field: /home/al/diff/diff_4180.nims.
21:13:51FromDiscord<DeltaPHC> Well, Nim has bindings for SDL2, GLFW, OpenGL. If you want to reinvent the wheel, the basics are there
21:13:58FromDiscord<DeltaPHC> And probably vulkan I think?
21:14:04dom96alehander42: nimble ver?
21:14:20clyybberDeltaPHC: Yep, I have vulkan bindings.
21:14:21FromGitter<alehander42> huh, 0.10.2
21:14:23FromGitter<zetashift> Is there a way to update nimble itself?
21:14:29FromDiscord<treeform> @Pat that is what I am working on UI apps that looks the same on all platforms:
21:14:30FromGitter<alehander42> isn't `koch nimble` in the 1.0.0 repo enough
21:14:32dom96nimble install nimble
21:14:35FromDiscord<treeform>
21:14:36FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/626889381529124865/unknown.png
21:14:54FromGitter<zetashift> sweet thanks dom
21:14:57dom96(you need to make Nimble isn't in Nim's bin folder though, or move Nim's bin folder after ~/.nimble/bin in your PATH)
21:15:00FromGitter<alehander42> @dom96 nice, thanks
21:15:02dom96*make sure
21:15:36FromGitter<zetashift> I'm just using choosenim so they are all in ~/.nimble/bin right?
21:15:56dom96in fact, I think `koch nimble `should put nimble into ~/.nimble/bin
21:16:24FromGitter<alehander42> the thing is `koch nimble` seemed to generate
21:16:28FromGitter<alehander42> is nimble a submodule?
21:16:35FromGitter<alehander42> of the nim repo
21:16:57FromGitter<alehander42> i probably havent updated the submodule, thats why, nimble install nimble fixed it tho
21:17:43dom96it's not
21:17:55dom96`koch nimble` clones it
21:18:20*skoude joined #nim
21:18:32FromGitter<alehander42> ok, it works now
21:22:26*skoude quit (Ping timeout: 240 seconds)
21:22:28FromDiscord<Pat> @treeform That's amazing
21:23:01FromDiscord<Pat> The open source developers and the devs doing this will be rewarded in time I'm sure.
21:24:38*al_ quit (Quit: al_)
21:25:41disruptekhow many more decades, do you think?
21:26:11FromDiscord<Kiloneie> less than one please :)))))
21:30:33clyybberHow do I use a string stream at compile time?
21:30:53clyybberI know that krux02 made it work, but I still get Error: limited VM support for 'addr'
21:31:07FromDiscord<treeform> @Pat thanks
21:31:51disrupteki think i wasn't able to make ct string streams work a month ago.
21:34:10*solitudesf quit (Ping timeout: 268 seconds)
21:34:36clyybberdisruptek: Its so weird because https://github.com/nim-lang/Nim/pull/10746#issuecomment-468256300 this works
21:35:03disrupteki know, it's voodoo.
21:36:03*Hideki_ joined #nim
21:36:19disruptekbtw, as in that thread i had to bump my vm iterations. that's the only reason i am maintaining the aws apis separately -- you'd have to rebuild your compiler to use my code.
21:38:14disruptekand another btw... it's annoying that you can only parse json at ct outside a js backend. ðŸĪŠ
21:40:16*Hideki_ quit (Ping timeout: 240 seconds)
21:41:56FromDiscord<Pat> A json parser is a fun college project lol
21:42:18disrupteknim already has at least three.
21:42:43FromDiscord<Kiloneie> yeah a lot, make a different one xD...
21:43:25FromDiscord<Kiloneie> Documentation needs work, libraries etc... quite a bit of work, you can have a look there
21:44:19clyybberHmm, well I mentioned it in the PR now.
21:44:26clyybberGood night
21:44:35*clyybber quit (Quit: WeeChat 2.6)
21:48:34lqdev[m]zetashift: Nim works on GBA!? hook me up
21:50:04krux02clyybber: I don't know about string streams, I just know about parsers that I made work at compile time.
21:50:16krux02but it was related to string streams.
21:50:55krux02disruptek, what do you want to parse at compile time?
21:52:14*daddoo quit (Quit: Leaving)
21:55:18FromGitter<jason_koch_twitter> ok , new nim user here, i'm hoping to get some help on some C <-> nim FFI ⏎ ⏎ first up - i should say i'm enjoying nim a lot and was glad to see it go 1.x!, congrats ⏎ ⏎ now onto the real reason i'm here... ... [https://gitter.im/nim-lang/Nim?at=5d8d33c6bf625112c0e7bf06]
21:56:08*asymptotically quit (Quit: Leaving)
21:59:11FromGitter<Araq> proc malloc(size: int): pointer {.importc, header: "<stdlib.h>".} 
22:01:06Araqdon't use allocShared and stuff, if the C lib wants malloc, use malloc
22:03:32Araqgood night
22:12:19*sealmove joined #nim
22:12:56*sentreen_ joined #nim
22:14:51*sentreen quit (Ping timeout: 240 seconds)
22:18:25FromGitter<jason_koch_twitter> well, it makes sense
22:18:36FromGitter<jason_koch_twitter> i had wondered if there was a more nim way but malloc will work
22:19:05FromGitter<jason_koch_twitter> thanks
22:20:16*Serrellanos quit (Ping timeout: 240 seconds)
22:21:03sealmove"nimmy way" sounds better
22:21:29sealmoveor "a nimmier way"
22:21:58Araq"nimish way"
22:27:27FromDiscord<Rika> how do i expect a proc as an arg
22:27:40FromDiscord<Rika> the one i tried expects one with a closure pragma
22:28:05Araqproc p(callme: proc () {.nimcall.})
22:28:30FromDiscord<Rika> return type still uses colon?
22:28:39FromDiscord<Rika> proc (): int {...
22:28:39FromDiscord<Rika> ?
22:29:03disruptekyou can create a type signature (as a type) and use that.
22:29:27disruptek(yes, it still uses a colon)
22:30:24rayman22201random low priority wish of the day: that proc pragmas could be inferred by the compiler better (i.e. closure, nimcall, gcsafe, etc...)
22:37:37*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
22:38:08*laaron joined #nim
22:44:58*owl_000 joined #nim
22:49:31*owl_000 quit (Ping timeout: 265 seconds)
23:03:25FromDiscord<mratsim> I don't think it's low priority
23:04:12FromDiscord<mratsim> it's a pain with higher order function
23:04:59FromGitter<zetashift> @lqdev[m] https://forum.nim-lang.org/t/5192 exelotl has more info and see this: https://github.com/hcorion/nim-on-gba
23:09:05*krux02 quit (Remote host closed the connection)
23:11:42exelotllqdev[m]: yes! here's the framework I'm using: https://github.com/exelotl/nim-tonc
23:21:03FromGitter<zetashift> @lqdev[m] also your audio test works fine(if that BEEEEEPPP is the correct output) on Windows x64
23:26:51*poopBot quit (Remote host closed the connection)
23:37:32FromGitter<zacharycarter> I am getting a sigsev when attempting to dealloc a cstringarray
23:38:58FromGitter<awr1> how are you deallocing
23:39:44FromGitter<zacharycarter> https://gist.github.com/zacharycarter/d9b76f78b2405959edac59b0403fb8f6
23:39:51FromGitter<zacharycarter> failing on the last line of that proc
23:40:04FromGitter<awr1> @rayman22201 how do you mean
23:40:17FromGitter<awr1> do you mean as a proc literal or just a normal proc decl
23:41:42rayman22201as @mratsim says, it's a pain for higher order functions. For proc definitions used as arguments to another function, it gets very tedious.
23:42:23rayman22201formal parameter declarations
23:42:55FromGitter<awr1> ironically @zacharycarter somone had a similar problem to you in a similar context
23:42:56FromGitter<awr1> https://forum.nim-lang.org/t/3037
23:43:24FromGitter<zacharycarter> thanks
23:47:05FromGitter<awr1> @zacharycarter try after `outExtensions.setLen(extCount)`
23:47:39FromGitter<awr1> `outExtensions.applyIt(it = VK_MAX_EXTENSION_NAME_SIZE.spaces())`
23:48:12FromGitter<awr1> remove the `it = `, was accidental
23:49:31FromGitter<zacharycarter> still sigseved but I think I can just get away with using cstrings instead of strings in my seq and casting the address of the first element in the seq to a cstring array
23:49:36FromGitter<zacharycarter> that seems to work fine and is simpler
23:49:59FromGitter<awr1> i haven't used the SDL functions for creating vulkan instances but normally you just get a struct back
23:52:02FromGitter<awr1> Ohhhhhhhhh
23:52:08FromGitter<awr1> i think SDL allocates for you lol
23:53:58FromGitter<zacharycarter> weird
23:54:51FromGitter<awr1> do something like
23:54:56FromGitter<awr1> `var extNames = cast[pointer](alloc0(sizeof(cstring) * extCount))`
23:54:57FromGitter<awr1> `dealloc(cast[pointer](extNames))`
23:56:45FromGitter<awr1> i mean
23:56:50FromGitter<zacharycarter> that seems to work
23:56:57FromGitter<awr1> `var extNames = cast[cstringarray](alloc0(sizeof(cstring) * extCount))`
23:56:58FromGitter<awr1> yeah
23:57:10FromGitter<zacharycarter> cool thanks
23:57:23FromGitter<awr1> the reason i think this works is because when you do the `allocCStringArray` nim reserves space multidimensionally
23:57:45FromGitter<zacharycarter> ah okay
23:58:11FromGitter<awr1> and when you overwrite it with the SDL function it gets confused because now it's deallocating pointers that Nim doesn't know about
23:58:39FromGitter<zacharycarter> that makes sense