00:00:15 | disruptek | i'm pretty good at awful programming. |
00:00:36 | Cadey | mood |
00:00:52 | Cadey | i need to write up the backend for that GPT-2 software license shitpost |
00:01:07 | Cadey | nim here we go |
00:02:28 | SodaScripter | Well I mean my first drawing was pretty awful |
00:02:32 | SodaScripter | and I improved at drawing |
00:02:39 | SodaScripter | so I'd assume programming is the same way? |
00:03:22 | SodaScripter | Cadey, what's the GPT-2 Software liscence shitpost? |
00:03:44 | Cadey | read this thread: https://twitter.com/theprincessxena/status/1176837738357805057 |
00:05:33 | disruptek | didn't i just read about this somewhere? HN? |
00:06:56 | Cadey | i hope not |
00:07:05 | Cadey | i've been talking about it in #lobsters-boil all day |
00:10:26 | disruptek | i'm afraid to learn if that's code for something. |
00:20:36 | Cadey | disruptek: do i really inspire that much fear in you? |
00:21:35 | disruptek | not a fan of crustaceans. |
00:21:39 | disruptek | or boils, for that matter. |
00:23:20 | FromDiscord | <slymilano> Hey guys, does Nim have a formatter like Elixir's `mix format` or Go's `go fmt` to automatically format code? |
00:23:39 | disruptek | try `nimpretty` |
00:24:40 | FromDiscord | <slymilano> `nimpretty myfile.nim`? It doesn't seem to change anything, and I see no output |
00:24:55 | FromDiscord | <slymilano> If I run `nimpretty` alone, it says no input file, so nimpretty is in my path |
00:25:07 | FromDiscord | <slymilano> ``` |
00:25:08 | FromDiscord | <slymilano> import os |
00:25:08 | FromDiscord | <slymilano> |
00:25:08 | FromDiscord | <slymilano> echo("Chat application started") |
00:25:08 | FromDiscord | <slymilano> |
00:25:08 | FromDiscord | <slymilano> if paramCount() == 0: |
00:25:09 | FromDiscord | <slymilano> quit("Please specify the server address, eg: ./client localhost") |
00:25:10 | FromDiscord | <slymilano> |
00:25:12 | FromDiscord | <slymilano> let serverAddress = paramStr(1) |
00:25:13 | FromDiscord | <slymilano> echo("Connecting to ", serverAddress) |
00:25:15 | FromDiscord | <slymilano> ``` |
00:25:16 | FromDiscord | <slymilano> |
00:25:16 | disruptek | it's perhaps not as opinionated as you expect. |
00:25:17 | FromDiscord | <slymilano> This is what I'm trying to format |
00:25:28 | disruptek | please don't paste here; use a paste service. |
00:25:54 | FromDiscord | <slymilano> Does nimpretty not modify spaces? |
00:26:06 | Jjp137 | nimpretty --help states that by default, it overwrites the input file |
00:26:08 | FromDiscord | <slymilano> I expected it to change my un-purpose-ugly 9 spaces in `quit` to only 2 spaces |
00:26:30 | FromDiscord | <SodaScripter> I really love nim so far |
00:27:01 | Jjp137 | maybe it auto-detected the indentation as 9 spaces? I don't know for sure |
00:27:09 | disruptek | this. |
00:27:25 | disruptek | valid indentation is any number of spaces 1+. |
00:27:37 | disruptek | the first such indentation sets the indent for the remaining lines. |
00:28:26 | FromDiscord | <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:21 | FromDiscord | <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:01 | disruptek | try `nimble init`. |
00:33:47 | FromDiscord | <slymilano> That worked nicely, thank you! |
00:36:23 | disruptek | no 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:54 | SodaScripter | How do I compile to an file my friend can run on their Unix machine? |
00:42:30 | disruptek | first, replace windows with linux. |
00:42:44 | SodaScripter | ? |
00:43:28 | disruptek | well, you want to build your friend a binary, yes? |
00:43:32 | SodaScripter | I'm on GNU/Linux already, if that helps. |
00:44:00 | disruptek | they have a wildly disparate unix? |
00:44:11 | SodaScripter | they're on BSD if that helps. |
00:44:44 | SodaScripter | I just don't know how to compile at all haha. |
00:44:58 | SodaScripter | I know nim c -r but Idk how to make it executable on their machine |
00:45:01 | disruptek | ugh. tell them to install nim. i believe it works well enough to compile your source there. or, pass them the c input. |
00:45:27 | SodaScripter | ok |
00:51:18 | FromDiscord | <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:24 | shashlick | use docker |
00:51:53 | shashlick | dockcross and create a binary you can send |
00:52:08 | FromDiscord | <treeform> Can docker run Unix? |
00:52:21 | disruptek | if 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:07 | FromDiscord | <slymilano> Nice my post on Nim is currently #1 on hackernews! |
01:57:43 | * | endragor joined #nim |
01:59:04 | disruptek | slymilano: link? |
02:02:51 | leorize[m] | it's just the link to Araq blog about v1 |
02:07:55 | owl_000 | https://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:18 | disruptek | are you using `choosenim`? |
02:09:18 | owl_000 | no, but i have choosenim |
02:09:44 | disruptek | you can use it to choose the devel branch. or, you can install a new nightly. |
02:10:04 | * | sealmove joined #nim |
02:11:45 | disruptek | i dunno when the nightlies run, but obviously, you'll need one built after that patch was merged. |
02:12:33 | owl_000 | one thing, for windows the default procedure is zip extraction and running finish.exe, i did it but choosenim shows nothing |
02:13:04 | owl_000 | though i did add the path manually to the path environment |
02:13:10 | disruptek | whaddya mean by `shows nothing`? |
02:14:27 | leorize[m] | choosenim can only manage installations done by it |
02:14:46 | owl_000 | oh, |
02:15:15 | disruptek | yes, but it can create new installations. else we have one of those bootstrap paradoxes... |
02:15:36 | disruptek | hmm, maybe that's why i don't use choosenim. |
02:15:40 | owl_000 | https://i.ibb.co/HdQgF7y/Capture.png i meant it, installed ... |
02:16:17 | disruptek | i think you can say `choosenim #devel` or something. see if a `--help`, uh, helps. |
02:17:27 | shashlick | where nim |
02:17:39 | disruptek | try whistling, that sometimes works. |
02:17:45 | shashlick | where choosenim |
02:17:55 | owl_000 | in my pc |
02:18:07 | disruptek | when you shake it, does it rattle? |
02:18:22 | owl_000 | lol |
02:19:25 | FromDiscord | <exelotl> sunvox bindings here! https://github.com/exelotl/nim-sunvox |
02:19:31 | FromDiscord | <exelotl> cc @Shield |
02:20:10 | disruptek | wow, cool. thanks for that. |
02:20:41 | shashlick | no, i mean run the command `where nim` and `where choosenim` |
02:20:49 | owl_000 | oh |
02:21:02 | disruptek | can i generate input for sunvox in the vm? |
02:21:42 | disruptek | it 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:12 | owl_000 | shashlick nim: c:/prog/nim-1.0.0/bin/nim.exe | choosenim: c:/prog/choosenim.exe |
02:25:37 | leorize[m] | choosenim can't manage installations that it didn't do |
02:26:00 | disruptek | yer blowing my mind right now. |
02:26:17 | disruptek | how are people supposed to use it? |
02:26:22 | shashlick | owl_000 what do you want to do? |
02:26:52 | leorize[m] | you install with it using `choosenim stable/devel` |
02:27:29 | leorize[m] | it will install nim to a "hidden" folder |
02:27:42 | shashlick | he already has a working nim |
02:27:50 | leorize[m] | then creates shims in .nimble/bin |
02:28:02 | disruptek | he needs something fresher. |
02:30:12 | shashlick | okay, remove c:\prog\nim-1.0.0\bin from your path |
02:30:34 | shashlick | add $HOME\.nimble\bin to your path |
02:30:38 | shashlick | and then choosenim devel |
02:32:27 | * | matlock joined #nim |
02:38:06 | disruptek | that zip macro... have you seen this? https://github.com/numforge/loopfusion |
02:40:31 | leorize[m] | that macro is indefinitely better :p |
02:40:32 | shashlick | gaah, nim pre-1.0 didn't have delEnv |
02:41:14 | leorize[m] | drop support for pre-1.0 |
02:41:19 | leorize[m] | problem solved lol |
02:41:32 | disruptek | just reimplement it. |
02:41:42 | shashlick | i'm still supporting 0.19.6 |
02:42:30 | leorize[m] | why would you need to meddle with env vars though? |
02:42:59 | leorize[m] | unless its scripting I never touch those |
02:43:18 | disruptek | it's a hack. |
02:43:20 | shashlick | https://github.com/nimterop/nimterop/blob/v020/nimterop/build.nim#L653 |
02:43:43 | shashlick | i'm all ears if you have a better idea |
02:44:20 | disruptek | write a file. |
02:46:08 | shashlick | eww |
02:46:30 | disruptek | well, you're not making it easy for us. ð |
02:47:08 | * | mwbrown quit (Ping timeout: 276 seconds) |
02:48:16 | leorize[m] | envs are certainly usable here |
02:48:45 | leorize[m] | but I think you should store all of them in one central env |
02:49:22 | leorize[m] | something like: NIMTEROP_OPTS |
02:50:28 | leorize[m] | it will reduce the bloated env space, and makes cleaning up easier :p |
02:50:30 | disruptek | maybe uri encode them as a querystring. |
02:51:45 | leorize[m] | also can you stop requiring static blocks? |
02:51:52 | leorize[m] | at this point it's just noise |
02:52:02 | shashlick | sounds 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:30 | matlock | Do 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:03 | shashlick | not 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:03 | FromGitter | <gogolxdong> Do we still use -d:release for production release or -d:danger? |
04:41:31 | leorize | -d:release is recommended |
04:42:02 | FromGitter | <gogolxdong> Thanks! |
04:42:37 | FromDiscord | <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:20 | FromGitter | <gogolxdong> saw -d:danger is 5x slower |
04:43:45 | leorize | it's a typo :P |
04:43:46 | FromGitter | <gogolxdong> Did it change recently? |
04:44:21 | FromGitter | <gogolxdong> means -d:danger is faster? |
04:44:30 | leorize | yea |
04:44:43 | leorize | I mean, -d:danger turns off all the checks |
04:44:51 | leorize | it can't be slower |
04:45:41 | leorize | I'd recommend -d:release and disable certain checks at places that you verified to be safe |
04:46:27 | FromGitter | <gogolxdong> How to disable certain checks? |
04:47:19 | leorize | https://nim-lang.org/docs/manual.html#pragmas-compilation-option-pragmas |
04:47:42 | leorize | they can also be used with {.push.} and {.pop.} to disable checks for speed-critical paths |
04:47:48 | SodaScripter | What's the best thing for a GUI in nim? |
04:47:59 | leorize | if you're writing a windows gui, wNim |
04:48:08 | SodaScripter | Cross platform |
04:48:23 | leorize | wxNim should be the most featureful |
04:48:41 | SodaScripter | Guess I'll go get wxNim |
04:48:49 | FromDiscord | <DeltaPHC> I forget that Nim has very granular compilation hints. It's a cool feature |
04:49:07 | SodaScripter | is it in nimble? |
04:49:21 | leorize | yes |
04:49:22 | * | gour joined #nim |
04:49:31 | leorize | actually wait |
04:50:03 | SodaScripter | it isn't ._. |
04:50:27 | leorize | looks like PMunch didn't publish it |
04:50:29 | leorize | https://github.com/PMunch/wxnim#installation |
04:50:39 | leorize | ^ there, you can `nimble install` the link |
04:50:46 | leorize | (sans the # part) |
04:51:53 | leorize | there's also gintro if you can do Gtk |
04:52:01 | leorize | but to be fair karax tops them all |
04:52:15 | SodaScripter | what's karax |
04:52:19 | leorize | after writing a frontend in that thing I now understand why devs went for electron |
04:52:34 | leorize | https://github.com/pragmagic/karax |
04:52:59 | * | nsf joined #nim |
04:53:02 | SodaScripter | this is too big brained for me |
04:53:24 | leorize | karax is basically writing html |
04:53:32 | leorize | but in Nim :P |
04:53:46 | shashlick | @leorize - i just ended up using a global var, didn't need env vars |
04:55:03 | leorize | nice |
04:55:44 | * | laaron joined #nim |
04:57:38 | * | laaron quit (Client Quit) |
04:59:55 | * | laaron joined #nim |
05:02:02 | SodaScripter | niGui is pretty interesting |
05:02:26 | leorize | yea, but it's a bit underdeveloped |
05:02:59 | SodaScripter | what would you reccomend me to use? |
05:03:13 | * | laaron quit (Client Quit) |
05:04:02 | leorize | what kind of gui application are you writing? |
05:05:00 | * | laaron joined #nim |
05:08:38 | SodaScripter | Not anything in particular at the moment, I just want to know a good library for when I start. |
05:08:59 | FromDiscord | <djazz> I think wx is nice |
05:09:06 | leorize | as far as Nim is concerned wxNim is the most featureful |
05:09:20 | leorize | next to it is gintro (which uses Gtk) |
05:09:31 | leorize | then wNim |
05:09:41 | leorize | if you target JS, then `karax` is the best out there |
05:10:13 | SodaScripter | I prefer native |
05:10:52 | leorize | wxNim should do for cross-platform programming |
05:11:02 | leorize | it's not the nicest library to use, but it certainly works |
05:11:14 | SodaScripter | is it like wxWidgets? |
05:11:24 | leorize | it's a wxWidgets wrapper |
05:11:26 | SodaScripter | ah |
05:11:30 | SodaScripter | I love wxWidgets so |
05:11:43 | FromGitter | <alehander42> karax is similar to other spa-s |
05:11:49 | FromGitter | <alehander42> a bit like react |
05:11:55 | FromGitter | <alehander42> not the same, but kinda similar |
05:12:00 | SodaScripter | last commit was in 2015 :/ |
05:12:31 | leorize | https://github.com/PMunch/wxnim |
05:12:38 | leorize | ^ that one is the newer one |
05:13:03 | SodaScripter | ok |
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:38 | FromDiscord | <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:53 | FromGitter | <zacharycarter> It'd be nice if JS would just die already, but I think we need better wasm support first |
05:50:15 | FromGitter | <zacharycarter> Looks like - https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor - worked as an experiment |
05:55:15 | FromDiscord | <Shield> sunvox bindings work perfectly |
05:57:08 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
05:57:43 | gour | leorize: wxNim is still developed/maintained? |
05:58:00 | * | laaron joined #nim |
06:09:36 | leorize[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:28 | FromGitter | <alehander42> honestly, i'll miss some things |
06:15:54 | FromGitter | <alehander42> at least these days, you can inspect/play way more easily with web apps html/css, even javascript |
06:16:09 | FromGitter | <alehander42> wasm will be just "one big binary thing" black box |
06:16:10 | FromGitter | <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:13 | Araq | can 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:56 | FromGitter | <arnetheduck> araq, yes: https://rustwasm.github.io/docs/wasm-bindgen/examples/dom.html (with a library) |
06:41:41 | Araq | let body = document.body().expect("document should have a body") # booohh! what's this? hidden control flow? omg the world is gonna end |
06:42:29 | FromGitter | <arnetheduck> it's quite.. explicit, I'd say. even the same letters as `except` ;) |
06:42:48 | Araq | it doesn't have an exclamation mark |
06:42:50 | * | navin quit (Ping timeout: 252 seconds) |
06:43:40 | FromGitter | <zacharycarter> I won't miss anything about HTML / CSS and JS |
06:43:54 | FromGitter | <zacharycarter> I wish them an expedient death |
06:44:04 | Araq | +1 |
06:44:15 | Araq | anyway, so ... how does this "library" work? |
06:44:26 | FromGitter | <zacharycarter> which one? |
06:44:45 | FromGitter | <zacharycarter> Blazor or RustWasm? |
06:45:31 | * | navin joined #nim |
06:47:35 | Araq | I'm fine with either |
06:48:09 | * | navin quit (Remote host closed the connection) |
06:48:18 | gour | +1 for JS&co's departure |
06:48:45 | FromGitter | <zacharycarter> not really sure - but I imagine we could do something similar right now with emscripten + Nim |
06:49:05 | Guest96751 | gooood morning folks, is there a nim lib to handle with network frames or should i do it with C - *.h ? |
06:49:10 | Araq | yeah but I've been there and afterwards I wrote Karax |
06:49:36 | Araq | emscripten for accessing the DOM kept crashing for me back then and the compiletimes were terrible too |
06:50:19 | Araq | Guest96751: you can easily write C-like code in Nim syntax |
06:50:36 | FromDiscord | <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:23 | FromDiscord | <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:38 | Araq | munmap for running code? |
06:54:34 | Araq | https://docs.microsoft.com/de-de/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect |
06:56:06 | Zevv | shield: what are you trying to do? |
06:56:08 | Araq | https://docs.microsoft.com/de-de/windows/win32/memory/memory-protection-constants |
06:57:24 | Araq | Shield: 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:05 | FromDiscord | <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:10 | narimiran | you can bump it, no harm there |
07:01:59 | FromDiscord | <Kiloneie> Okay i guess, in some other forums i used to be, people were very salty about that |
07:02:02 | narimiran | btw, how frequent will your videos be? |
07:02:11 | FromDiscord | <Kiloneie> i want 1 per day to more |
07:02:45 | FromDiscord | <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:16 | FromGitter | <alehander42> https://raw.githubusercontent.com/alehander42/Nim/nilcheck-spec/doc/nilcheck.rst |
07:03:25 | FromDiscord | <Shield> @Zevv it's just a lingering question i had in mind when i was reading about JITs |
07:03:27 | narimiran | 2 per day? will you be able to sustain that pace? i would say that 1 per day is plenty |
07:03:48 | Araq | ah so you practice and will get better at it, Kiloneie, smart. |
07:03:57 | * | krux02 joined #nim |
07:04:09 | FromGitter | <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:46 | Araq | what's also popular: not practicing and blaming your tools instead |
07:04:54 | leorize | Guest96751: checkout NESM for a binary serializer/parser library |
07:05:05 | FromDiscord | <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:02 | FromGitter | <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:01 | FromDiscord | <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:13 | FromGitter | <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:48 | FromDiscord | <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:50 | FromGitter | <alehander42> but this is not very important, easy to deal with in the construction |
07:13:05 | FromGitter | <alehander42> you should really research other prog videos channels and what brings them most views |
07:13:42 | FromDiscord | <Kiloneie> i did some, and will do more |
07:13:55 | FromDiscord | <Kiloneie> honestly some don't give a fuck and they get views |
07:14:29 | FromDiscord | <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:19 | FromDiscord | <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:11 | leorize | youtube is a weird place |
07:16:43 | leorize | I'd say that you'll have better luck on patreon than waiting for yt ads to be profitable |
07:16:46 | FromDiscord | <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:48 | FromDiscord | <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:06 | FromGitter | <alehander42> well, sometimes people like "personal" stuff in videos, its strange to explain |
07:23:07 | livcd | does finish.exe only setup the env variables ? |
07:23:27 | FromGitter | <alehander42> different folks different subs |
07:25:41 | FromDiscord | <Kiloneie> i do like getting to know my youtube people as well xD |
07:28:34 | leorize | youtube is an intense battleground for clicks |
07:30:25 | leorize | and thanks to changes in how yt recommend your videos, subs doesn't mean much anymore |
07:38:40 | FromDiscord | <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:03 | FromDiscord | <Kiloneie> my #2 might have gotten way less videos than it could of... i forgot to put it in a playlist xD |
07:44:20 | FromDiscord | <Kiloneie> i know that the more videos i watch of a kind and or youtuber the more it shows them to me |
07:44:57 | FromDiscord | <Kiloneie> do you guys see my 2 videos in a playlist ? |
07:46:02 | FromDiscord | <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:33 | FromGitter | <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:33 | FromGitter | <alehander42> kiloneie, i doubt the playlist thing is critical, dont worry :) |
07:52:22 | FromGitter | <alehander42> i still think subs are important, but not sure how it works |
07:52:28 | Araq | Kiloneie: can you join IRC directly? |
07:52:34 | FromGitter | <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:53 | FromGitter | <arnetheduck> and not through the js backend, it kind of sucks for this |
07:53:08 | FromGitter | <alehander42> @arnetheduck can nlvm compile directly to wasm currently |
07:53:15 | FromGitter | <arnetheduck> @alehander42 yes |
07:54:21 | Araq | does wasm support a "Native" canvas? |
07:54:33 | Araq | hmm I guess not |
07:55:10 | FromGitter | <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:05 | FromGitter | <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:19 | Araq | the environment is all I care about |
07:57:24 | FromGitter | <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:53 | Araq | I don't care about the lovely new way to encode INC EAX |
07:58:12 | FromGitter | <arnetheduck> we do ;) |
07:58:46 | Araq | I think the browser should just be DosBox ;-) |
07:59:30 | FromGitter | <arnetheduck> @alehander42 https://forum.nim-lang.org/t/4779 |
08:00:06 | Zevv | isolate, 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:53 | Araq | and in the end Doom written for i386 runs everywhere and the JVM doesn't |
08:01:30 | Zevv | yeah, 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:16 | Araq | the useful software, of course |
08:02:18 | solitudesf | doom |
08:02:21 | Araq | ;-) |
08:06:51 | * | navin_ joined #nim |
08:09:52 | gour | leorize: just cehcked and, afaict, last commit to wxnim is 4 yrs old |
08:09:53 | * | navin quit (Ping timeout: 245 seconds) |
08:14:05 | FromDiscord | <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:32 | FromGitter | <arnetheduck> yeah, who needs more than 640kb anyway? :) |
08:16:01 | Araq | arnetheduck: prevents OOM denial of service attacks |
08:16:07 | Araq | security! |
08:16:45 | FromDiscord | <Kiloneie> What IRC do you guys use ? |
08:17:26 | SodaScripter | HexChat |
08:17:35 | SodaScripter | well I use HexChat |
08:17:48 | FromDiscord | <SodaScripter> I also have Discord |
08:18:08 | SodaScripter | but it's really resource intensive, so I'm usually just on IRC |
08:18:26 | FromGitter | <alehander42> weechat |
08:18:26 | SodaScripter | unless I'm talkin with friends or som |
08:18:28 | FromDiscord | <Kiloneie> how do you.... connect ?, whats the point of IRC anyways, resource thing like you just said ? |
08:18:34 | FromGitter | <alehander42> is pretty easy to work with |
08:18:41 | SodaScripter | IRC is really nice |
08:19:06 | SodaScripter | Also we don't use an "IRC" we use an IRC Client |
08:19:13 | SodaScripter | IRC Clients allow you to connect to IRC Servers |
08:21:23 | FromDiscord | <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:51 | FromDiscord | <Arvest> Hello dou you speak french guy ? |
08:22:19 | solitudesf | hexchat should have freenode builtin |
08:23:03 | FromDiscord | <Kiloneie> it says unknown host |
08:24:08 | FromDiscord | <Kiloneie> wait... ,let me see something |
08:26:13 | leorize | gour: checkout PMunch/wxnim |
08:26:16 | leorize | that's the newer one |
08:26:58 | * | ng0 joined #nim |
08:27:03 | FromGitter | <alehander42> Arvest, we have one french guy @mratsim |
08:29:49 | * | Kiloneie_ joined #nim |
08:30:04 | Kiloneie_ | Test ? |
08:30:11 | leorize | o/ |
08:30:15 | FromDiscord | <Kiloneie> okay im in |
08:31:12 | FromDiscord | <Kiloneie> This looks like a... team speak without speak xD... ? |
08:31:29 | leorize | Zevv: can the `grammar` macro take an ident instead? |
08:32:21 | Araq | Kiloneie_, I PM'ed you |
08:36:14 | Zevv | leorize: it can, although its not documented |
08:36:32 | leorize | nope it can't |
08:36:39 | Zevv | It should, lemmesee |
08:37:22 | Zevv | it does for me, so probably I don't understand your question |
08:37:40 | Zevv | dump me your code |
08:38:25 | leorize | https://github.com/zevv/npeg/blob/5e212aed0733c72038c72281126ff103877cf007/src/npeg.nim#L106 |
08:39:31 | Zevv | oooh, the `grammar` macro. You should have said that! |
08:40:02 | leorize | you need your morning coffee :P |
08:40:13 | * | owl joined #nim |
08:40:51 | Zevv | Well, it does now. Was about to dump a release shortly |
08:41:16 | * | skoude quit (Ping timeout: 265 seconds) |
08:41:59 | leorize | Zevv: have you verified that it works with backtick idents? |
08:42:09 | leorize | probably too much work :P |
08:42:29 | Zevv | *what* who the hell wants *backtick* idents for grammar names?! |
08:43:33 | Araq | Zevv, I PM'ed you |
08:43:39 | Zevv | araq: typing |
08:43:52 | * | owl_000 quit (Ping timeout: 264 seconds) |
08:44:09 | leorize | don't worry, even the compiler thought so :P |
08:50:49 | * | clyybber joined #nim |
08:52:28 | SodaScripter | Oh GOD, the trackpoint on my laptop is going out. |
08:53:02 | Zevv | leorize: but seriously, if you tell me what you want to do, I'd be glad to put that in |
08:53:27 | leorize | Zevv: 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:39 | clyybber | SodaScripter: No loss :P |
08:54:04 | leorize | the backtick idents are just nitpicking :P |
08:54:07 | SodaScripter | clyybber, rude |
08:54:42 | Zevv | leorize: create two separate rules the user can shadow and use those instead of `Digit` |
08:54:57 | SodaScripter | It's veering towards the right oh God. |
08:55:18 | leorize | something like: `version_major <- Digit`? |
08:55:20 | federico3 | SodaScripter: #nim-offtopic please |
08:55:28 | Zevv | The 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:29 | FromGitter | <alehander42> ok , rebasing patches on 1.0 |
08:55:31 | Zevv | leorize: right so |
08:55:35 | FromGitter | <alehander42> i hope it works out |
08:55:37 | clyybber | SodaScripter: Not you, the trackpad lol |
08:56:10 | Zevv | So the user can do `http.version_major <- >http.version_major: echo "major = ", $1 |
08:56:16 | SodaScripter | yea but I use the trackpoint |
08:56:23 | * | clyybber quit (Quit: WeeChat 2.6) |
08:56:32 | SodaScripter | sad he gone |
08:56:36 | * | clyybber joined #nim |
08:56:43 | FromGitter | <alehander42> my last patch rebase must've been 3 months ago |
08:57:14 | leorize | Zevv: would it match any digit or just the ones in the `version` peg? |
08:58:42 | Zevv | just 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:11 | leorize | sounds good |
08:59:15 | leorize | probably should be documented |
08:59:30 | Zevv | https://github.com/zevv/npeg#library-rule-overridingshadowing |
08:59:46 | Zevv | probably should read the documentation :) |
08:59:52 | leorize | I've read it |
08:59:59 | leorize | just not sure if it would match all Digit or not :P |
09:00:00 | Zevv | then I should probabl write better documentation |
09:00:55 | * | laaron quit (Remote host closed the connection) |
09:01:09 | FromDiscord | <Arvest> @gitterirc<FromGitter> <alehander42> Arvest, we have one french guy @mratsim |
09:01:12 | FromDiscord | <Arvest> Yes |
09:01:21 | Zevv | leorize: 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:56 | leorize | I guess you finally beat Araq's packedjson? |
09:03:09 | FromDiscord | <kodkuce> lol i just now saw you got 1.0 out, nice ð |
09:03:20 | Zevv | I believe it already did, parsing-wise, but didn't check recently. |
09:03:30 | FromDiscord | <Rika> does nimpretty still exist |
09:03:37 | leorize | yes |
09:04:13 | FromDiscord | <Rika> windows x64 dist doesnt seem to have it bundled |
09:04:15 | FromDiscord | <Arvest> Are there any French people? |
09:04:39 | FromDiscord | <kodkuce> je suis fromage |
09:04:47 | FromGitter | <alehander42> Araq what is this `Error: 'transformed_n' should be: 'transformedN' |
09:04:53 | FromDiscord | <Arvest> @kodkuce ? |
09:04:57 | FromGitter | <alehander42> is snake case a compiler error |
09:05:02 | leorize | Zevv: wasn't by a meaningful margin iirc |
09:05:20 | Araq | yeah, the compiler code base enforces --styleCheck:error |
09:05:21 | leorize | now, 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:42 | Araq | leorize, it does that, yes |
09:05:55 | Zevv | leorize: ssssshht |
09:05:55 | FromDiscord | <Arvest> Gitterirc c est un vrai bot ? |
09:05:56 | FromDiscord | <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:48 | FromDiscord | <kodkuce> @Arvest did you just ask whats wrang with gitter irc bot? |
09:06:53 | FromDiscord | <Arvest> Ha ok xd if not really French here ?? |
09:07:35 | leorize | I guess once nim grew enough we'll need regional nim irc channels also :P |
09:07:46 | * | sealmove joined #nim |
09:07:52 | FromDiscord | <Arvest> I use google translation @kodkuce |
09:07:57 | FromDiscord | <Rika> am i supposed to compile nimpretty myself or is it supposed to be in the bin folder when downloaded |
09:08:12 | leorize | @Rika it's supposed to be there |
09:08:20 | leorize | is it not in the 1.0 release zip? |
09:08:32 | FromDiscord | <Shield> c'est le temps d'apprendre l'anglais |
09:08:48 | FromDiscord | <Rika> leorize, it hasnt since 0.20 |
09:08:59 | FromDiscord | <Rika> my 0.20.2 install doesnt have it either afaik |
09:09:00 | leorize | then that's a bug |
09:09:17 | narimiran | isn't it inside of `bin` folder? |
09:09:41 | narimiran | last time i checked on linux, it was there, together with othre tools, such as nimgrep, nimsuggest, etc |
09:09:48 | FromDiscord | <Rika> its not on windows |
09:09:50 | Araq | it's missing indeed |
09:09:51 | FromDiscord | <Rika> windows x64 |
09:09:58 | Araq | 1.0.2 will have it |
09:10:00 | FromDiscord | <Arvest> @Shield fr ? |
09:10:09 | FromDiscord | <Arvest> Oui |
09:10:13 | FromDiscord | <Rika> there's already a 1.0.1? |
09:10:17 | Araq | 'koch tools' should build it for you |
09:10:28 | narimiran | the releases have even numbers |
09:10:30 | leorize | @Rika: nah, nim stable versions are odd versions |
09:10:34 | leorize | even* |
09:10:36 | leorize | :P |
09:10:38 | FromDiscord | <Rika> what why |
09:10:38 | narimiran | so 1.0.0, 1.0.2, 1.0.4, etc. |
09:10:42 | FromDiscord | <Rika> is there a reason |
09:10:46 | FromDiscord | <Rika> is that part of semver |
09:10:47 | narimiran | yes, there is |
09:10:49 | Araq | I said 'will have', we're waiting for about 2 weeks and then release 1.0.2 |
09:10:53 | leorize | odd are development versions |
09:11:34 | FromGitter | <alehander42> ok first patch rebased |
09:11:44 | FromGitter | <alehander42> second patch is ~1400 lines |
09:12:45 | leorize | Zevv: so... when should I put my pegs so that inlining happen and when should I not do that? |
09:13:13 | FromDiscord | <Arvest> @gitterirc bot ? |
09:14:27 | * | Kiloneie_ quit (Read error: Connection reset by peer) |
09:14:39 | FromDiscord | <Arvest> Or human ? |
09:14:58 | leorize | it'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:32 | Zevv | leorize: well, "it depends" is the right answer. Do you want a fast parser or a small parser |
09:15:46 | FromDiscord | <Arvest> Ok |
09:16:53 | leorize | there's a balance somewhere, no? |
09:17:07 | leorize | we don't inline all of our functions for example |
09:17:28 | Zevv | leorize: 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:13 | leorize | ok |
09:18:36 | leorize | I'm just used to declare things top-down so just wondering if that'd cause any problems |
09:20:30 | Zevv | that is usually just fine |
09:26:38 | FromDiscord | <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:49 | FromGitter | <alehander42> sorry i thought about that but wasnt sure |
09:27:52 | FromGitter | <alehander42> how discord tags |
09:28:22 | FromDiscord | <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:04 | FromDiscord | <mratsim> changed my name |
09:30:54 | FromDiscord | <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:49 | FromDiscord | <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:15 | Kiloneie | (test) |
09:32:36 | FromDiscord | <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:18 | lqdev[m] | the irc bridge doesn't show these so it's inconvenient, to say the least |
09:36:30 | FromDiscord | <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:58 | FromDiscord | <Shield> also in some implementations of atomics they use locks which is kinda counter productive |
09:37:04 | Araq | atomic.nim library |
09:37:37 | Araq | we 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:29 | clyybber | Araq: For https://github.com/nim-lang/Nim/pull/12268 which is a tiny breaking change, should I add a changelog entry? |
09:39:36 | leorize | Araq: you can fix that, right? :P |
09:40:42 | Araq | leorize, sure |
09:41:03 | FromDiscord | <Shield> oh i see, it prevents reordering by default, does that cover compiler reodering too? |
09:41:32 | leorize | why would the compiler ever reorder your code? |
09:42:04 | FromDiscord | <mratsim> it will if it can prove it has no visible effect |
09:42:13 | FromDiscord | <Shield> optimization, it seems that you need to add an explicit barrier to prevent that |
09:42:16 | Zevv | leorize: use before declaration |
09:42:18 | FromDiscord | <mratsim> it can even exchange nested loops iteration order |
09:42:34 | Zevv | oh wait, different reordering, sorry |
09:42:46 | FromDiscord | <mratsim> yes it's the C compiler we are talking about |
09:42:59 | Zevv | yeah. That reorders everything it can to keep its pipelines filled |
09:43:08 | Araq | clyybber, yeah, don't add the [backport] tag and it's fine |
09:43:22 | FromDiscord | <mratsim> @Shield, what do you mean by wait-free multi threading? a specific wait-free concurrent data structure or something else? |
09:43:32 | leorize | well 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:53 | FromDiscord | <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:04 | FromGitter | <arnetheduck> oh my, breaking changes already, clyybber? :) |
09:49:18 | FromDiscord | <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:46 | clyybber | arnetheduck: Heh, sorry but take a look at the PR, its definitely more correct with it |
09:49:56 | * | skoude joined #nim |
09:50:02 | FromGitter | <arnetheduck> I'm not saying it' |
09:50:30 | Araq | come on, say it |
09:50:47 | * | Kiloneie quit (Quit: Leaving) |
09:50:47 | * | Kiloneie_ quit (Quit: Leaving) |
09:51:01 | leorize | !eval echo float64 high uint64 |
09:51:04 | NimBot | -1.0 |
09:51:07 | * | Kiloneie_ joined #nim |
09:51:08 | leorize | ^ do we have a bug report for this yet? |
09:51:12 | * | Kiloneie joined #nim |
09:51:13 | FromDiscord | <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:28 | FromGitter | <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:50 | FromGitter | <alehander42> @arnetheduck your edits are not visible in irc, just saying |
09:52:26 | FromDiscord | <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:28 | FromGitter | <arnetheduck> bah. I keep forgetting we're not in 2019 :/ @alehander42 |
09:52:37 | FromGitter | <arnetheduck> > "we've learned to deal with it, it's not a big issue" |
09:52:51 | * | Hideki_ joined #nim |
09:52:59 | FromGitter | <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:30 | FromDiscord | <mratsim> @arnetheduck: https://github.com/ircv3/ircv3-specifications |
09:53:34 | Araq | the 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:28 | clyybber | Araq: Is it fine to include a small code snippet in the changelog entry? |
09:54:37 | Araq | so 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:36 | FromGitter | <alehander42> message id-s should fix that in irc |
09:55:40 | FromGitter | <alehander42> thanks mratsim |
09:56:22 | FromDiscord | <mratsim> what did I do? |
09:58:51 | * | laaron quit (Quit: ZNC 1.7.4 - https://znc.in) |
09:59:04 | FromGitter | <alehander42> you linked the irc3 spec |
10:02:30 | FromGitter | <arnetheduck> @mratsim that looks about as likely to happen as perl6 :) |
10:08:33 | FromDiscord | <arnetheduck> ok, since discord is the hot new thing... |
10:09:44 | FromDiscord | <arnetheduck> ok, since discord is the hot new thing... what happens to edits here? |
10:09:51 | leorize | @arnetheduck: most irc servers implemented a part of irc3 already |
10:10:16 | leorize | edits post the edited message to irc |
10:10:20 | leorize | which is annoying... |
10:10:35 | FromDiscord | <Clyybber> test |
10:10:38 | * | xace quit (Ping timeout: 244 seconds) |
10:10:43 | FromDiscord | <Clyybber> testEdit |
10:11:19 | clyybber | Hmm, so when you edit with s/test/testEdit in discord it doesn't send the s/.../... part |
10:11:45 | FromDiscord | <Rika> what happens if someone spams edit tho ðĪ |
10:11:52 | FromDiscord | <Rika> oh yeah also emoji what happens to those |
10:12:05 | leorize | those are unicode, so we can still see them |
10:12:13 | leorize | spamming edits means spamming irc |
10:12:18 | leorize | it has happened before |
10:12:29 | owl | what 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:06 | leorize | it's "rare" to see gc in a compiled language |
10:14:06 | FromDiscord | <Kiloneie> some people are just manual monkeys |
10:14:08 | FromDiscord | <Kiloneie> ð |
10:14:09 | FromDiscord | <Rika> gcs can be slow i think |
10:14:13 | FromDiscord | <arnetheduck> so sending the edited message again seems better than not sending the edit at all, no? |
10:14:20 | FromDiscord | <Rika> yes it is arne |
10:14:31 | leorize | a habit of discord users is that they edit a lot... |
10:14:37 | FromDiscord | <Kiloneie> just add more text, don't edit |
10:14:45 | clyybber | gcs are undeterministic |
10:14:50 | FromDiscord | <Rika> on average i edit once or twice, no more than such |
10:15:01 | FromDiscord | <Rika> for typos |
10:15:25 | * | sealmove quit (Quit: WeeChat 2.6) |
10:15:30 | FromDiscord | <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:02 | leorize | the problem is that editing for typo will just makes irc users see twice of the (seemingly same) message |
10:16:21 | leorize | it's really annoying because we would have to spot out what you edited |
10:17:30 | clyybber | Araq: How do important packages work with the post 1.0 dev model? |
10:17:41 | clyybber | Are breaking changes allowed to break them? |
10:17:59 | * | sealmove joined #nim |
10:18:41 | Zevv | 1.0 broke mine already, kind of |
10:20:43 | * | sealmove quit (Client Quit) |
10:20:50 | Araq | clyybber, not really |
10:20:54 | FromGitter | <alehander42> ok, on1.0 |
10:21:01 | * | sealmove joined #nim |
10:21:01 | FromGitter | <alehander42> based *patches |
10:21:04 | FromGitter | <alehander42> my codebase as well |
10:21:26 | FromDiscord | <Shield> that video was very interesting @mratsim |
10:21:31 | FromGitter | <alehander42> @arnetheduck perl6 happened |
10:21:34 | FromGitter | <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:29 | clyybber | Araq: 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:47 | Araq | clyybber, we wait until your patch was applied to tiny_sqlite |
10:23:55 | FromGitter | <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:14 | clyybber | Ok |
10:27:09 | FromDiscord | <Rika> with 5 characters of context or so lmao |
10:27:15 | FromDiscord | <Rika> that sounds pretty smart tbh |
10:33:05 | FromDiscord | <arnetheduck> @alehander42 https://github.com/perl6/problem-solving/pull/89 |
10:33:31 | FromGitter | <alehander42> i know |
10:33:44 | FromGitter | <alehander42> but it was the "perl6" |
10:33:48 | FromGitter | <alehander42> that larry etc worked on |
10:34:43 | FromDiscord | <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:12 | FromGitter | <alehander42> eh .. who are we to judge their uptake |
10:36:41 | FromDiscord | <arnetheduck> https://www.tiobe.com/tiobe-index/perl/ |
10:36:52 | FromGitter | <alehander42> tiobe is ... |
10:36:52 | * | navin joined #nim |
10:37:06 | FromGitter | <alehander42> a nice idea, but please dont use it for ranking languages |
10:37:25 | FromGitter | <alehander42> it showed crystal > rust for some time |
10:37:38 | FromGitter | <alehander42> their algo isn't very good for this goal |
10:38:30 | FromDiscord | <arnetheduck> prove it wrong in the perl case |
10:38:43 | FromGitter | <alehander42> i mean, they are very good at calculating google trends, but this in itself is not a good lang ranking metric |
10:38:56 | FromGitter | <alehander42> i dont have to prove anything |
10:39:09 | FromGitter | <alehander42> perl6 was released, that's all |
10:39:31 | FromGitter | <alehander42> number of users doesn't change the fact a release happens :) |
10:40:02 | FromGitter | <alehander42> we'll see how the raku rename works for them |
10:40:18 | * | navin_ quit (Ping timeout: 245 seconds) |
10:40:56 | FromGitter | <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:05 | FromDiscord | <arnetheduck> that's the difference between "released" and "happened" - I'd say python3 happened: people use it more than python2 |
10:41:40 | FromGitter | <alehander42> nitpicking , sorry |
10:42:00 | FromGitter | <alehander42> the fact that it was released after all these years is still interesting from historical viewpoint |
10:42:16 | FromGitter | <alehander42> maybe it was a mistake to not rebrand it from the beginning tho |
10:43:20 | FromGitter | <alehander42> but this renaming is a good idea |
10:46:28 | clyybber | I dont like that you now have to have a space after keywords like if |
10:47:22 | clyybber | So if(condition) isn't allowed in perl6 |
10:48:58 | * | dddddd joined #nim |
10:49:24 | Araq | I dislike the sigils and the only reason they exist is because the older Perl had them |
10:49:56 | Araq | but then if you remove them you would have to admit that they serve no purpose when you have a real type system |
10:50:37 | Araq | what kinds of type is '$' anyway? "string or a number"? well good luck with that idea |
10:51:48 | FromDiscord | <Rika> do partial functions exist in nim |
10:51:50 | FromGitter | <alehander42> i agree, the old perl-isms are not great probably |
10:51:59 | FromGitter | <alehander42> but they probably thought they need to be kinda compatible |
10:52:01 | FromGitter | <alehander42> for a long time |
10:52:25 | FromDiscord | <Rika> wait they should be right; how are they constructed is a better question |
10:54:32 | sealmove | perl 6 is renamed to raku? |
10:55:20 | FromDiscord | <Rika> `Perl 6 (also known as Raku[6])` |
10:55:24 | FromDiscord | <Rika> https://en.wikipedia.org/wiki/Perl_6 lmao |
10:57:26 | FromDiscord | <Kiloneie> does anyone know binary well ? how do you know a number is negative in binary ? |
10:58:14 | FromDiscord | <Kiloneie> i know binary system from school and some college(never finished), but i don't recall any negatives... |
10:58:26 | sealmove | Kiloneie: depends |
10:58:38 | sealmove | there is no one binary |
10:59:24 | FromDiscord | <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:32 | clyybber | Kiloneie: There is two complement and one complement |
11:00:14 | clyybber | But I think explaining how integers work is out of scope for an introduction to nim. |
11:00:24 | FromDiscord | <Kiloneie> im on #3 video.. |
11:00:25 | clyybber | After all it doesn't matter unless you do shift |
11:00:29 | sealmove | typically cpus use 2's complement |
11:00:56 | clyybber | Kiloneie: 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:26 | FromDiscord | <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:33 | clyybber | Nvrmind that |
11:01:41 | clyybber | I dont think endianness affects integers |
11:03:29 | sealmove | Depends 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:40 | narimiran | Kiloneie know thy audience |
11:05:16 | narimiran | if 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:57 | FromDiscord | <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:57 | narimiran | KISS |
11:06:35 | FromDiscord | <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:39 | FromDiscord | <Kiloneie> in most cases NO |
11:07:18 | FromDiscord | <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:37 | narimiran | beginners 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:11 | FromDiscord | <Kiloneie> yeh i know, it's just a draft D:... |
11:08:42 | FromDiscord | <Kiloneie> i do gotta explain use cases when mentioning explaining sometimes, in a simple way |
11:08:48 | FromGitter | <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:00 | FromGitter | <mratsim> But I guess that was a jab at javascript |
11:09:02 | narimiran | @mratsim you're special, you don't count :P :D |
11:09:49 | FromGitter | <mratsim> At this point it is still safe to assume that all nim users are special |
11:10:12 | narimiran | after first two videos like those released by Kiloneie, you cannot suddenly just switch gears |
11:10:39 | FromDiscord | <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:56 | narimiran | it 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:59 | FromDiscord | <Kiloneie> #3 is not about explaining binary lol no... it's variables, comments and stuff |
11:11:37 | FromDiscord | <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:52 | FromDiscord | <Kiloneie> it will come in handy in a later video though, RECYCLE ! |
11:12:43 | narimiran | Kiloneie 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:41 | FromDiscord | <Kiloneie> might be useful |
11:19:36 | FromDiscord | <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:00 | FromDiscord | <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:06 | FromDiscord | <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:54 | FromDiscord | <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:15 | FromDiscord | <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:57 | narimiran | if you're doing your videos because of some statistics.... :'( |
11:22:50 | FromDiscord | <Kiloneie> no no, i just wish for more views D: |
11:23:07 | FromDiscord | <Kiloneie> #2 is slacking |
11:23:24 | narimiran | give it some time, don't expect miracles |
11:23:42 | Araq | success in the real world is as far away from "peer review" as I can imagine |
11:24:01 | FromDiscord | <Kiloneie> i know, its going great compared to my previous videos... |
11:25:34 | FromGitter | <alehander42> arnetheduck what you say makes sense and i think is true in general |
11:25:47 | Araq | not 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:06 | FromGitter | <alehander42> but imo it can solve many problems probably better than classic python/ruby/perl5/php |
11:26:16 | FromGitter | <alehander42> the problem is its baggage |
11:26:17 | FromGitter | <alehander42> imho |
11:26:44 | FromGitter | <alehander42> and the fact that maybe a too dynamic language is not so fashionable as a new lang these days |
11:26:55 | FromGitter | <alehander42> (even if gradually typed) |
11:27:23 | FromGitter | <alehander42> arnetheduck wow discord does that |
11:27:25 | FromDiscord | <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:15 | FromDiscord | <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:28 | clyybber | Its peer review but with ads |
11:35:27 | sealmove | arnetheduck: I've been there :D discord can positively surprise you sometimes |
11:38:10 | FromDiscord | <Kiloneie> well the need is there |
11:38:19 | FromDiscord | <Kiloneie> im just not super man xD... |
11:38:37 | sealmove | guys, 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:54 | sealmove | to lazy to dive into perl6 atm |
11:38:57 | sealmove | too* |
11:44:09 | FromGitter | <alehander42> Araq, how to get the current javascript exception |
11:44:10 | FromGitter | <alehander42> as obj |
11:45:57 | FromGitter | <alehander42> hm lastJSError |
11:46:02 | FromGitter | <alehander42> but not sure why not exposed |
11:46:53 | * | theelous3_ joined #nim |
11:50:49 | FromGitter | <alehander42> ok works |
11:52:17 | FromDiscord | <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:03 | FromGitter | <alehander42> test |
11:54:08 | FromGitter | <alehander42> s/test/e |
11:56:18 | FromDiscord | <arnetheduck> need another slash to terminate maybe |
11:57:49 | FromDiscord | <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:56 | FromGitter | <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:34 | owl | kiloneie 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:08 | FromDiscord | <Kiloneie> okay, you could just youtube kiloneie but okay |
12:08:08 | FromDiscord | <Kiloneie> link: INTRO + setup video: https://youtu.be/5tVIsDYPClA |
12:08:08 | FromDiscord | <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:22 | owl_000 | kiloneie, that is great, specially second part, first part's font is small. |
12:21:18 | FromDiscord | <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:33 | owl_000 | surely 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:11 | FromDiscord | <Kiloneie> it will take me a while to get to templates |
12:26:17 | FromDiscord | <Kiloneie> but templates are very simple |
12:27:07 | leorize | to be fair you don't need templates in python :P |
12:27:33 | FromDiscord | <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:33 | FromDiscord | <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:41 | FromDiscord | <Kiloneie> if you didn't know this already |
12:27:53 | FromDiscord | <Kiloneie> they are REALLY simple |
12:28:03 | * | owl_000 quit (Ping timeout: 240 seconds) |
12:28:12 | leorize | basically templates in Nim are `def` in python :P |
12:28:39 | FromDiscord | <Kiloneie> well python like any language would benefit greatly from templates, dynamic languages less so, but they are amazing, big time saver |
12:28:48 | FromDiscord | <Kiloneie> and you can do some crazy things with them |
12:29:22 | FromDiscord | <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:40 | FromGitter | <alehander42> no, D has metaprogramming, let's keep this realistic |
12:29:53 | FromDiscord | <Kiloneie> not nearly as powerful as in Nim |
12:29:57 | FromDiscord | <Kiloneie> nor easy to use |
12:30:48 | FromDiscord | <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:13 | FromGitter | <alehander42> afaik D's metaprogramming is also powerful |
12:31:40 | FromGitter | <alehander42> i'd agree i prefer the nim macro system |
12:31:57 | FromGitter | <alehander42> but if you're not sure about something, don't really insist on it |
12:32:57 | FromGitter | <alehander42> let's not get you in a discussion with @timotheecour :P |
12:33:46 | FromDiscord | <Kiloneie> yeah ups |
12:34:19 | FromDiscord | <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:24 | FromDiscord | <SrMordred> @Kiloneie iÂīm D programmer, can question me some things if u want :P |
12:38:24 | FromDiscord | <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:22 | FromDiscord | <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:48 | FromDiscord | <Kiloneie> Btw isn't D basically what C++ is to C ? A successor ? |
12:40:23 | FromDiscord | <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:40 | FromDiscord | <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:09 | FromDiscord | <SrMordred> *as a better C++ * |
12:42:10 | livcd | was there the promised video for 1.0 ? :D |
12:43:16 | * | navin quit (Ping timeout: 252 seconds) |
12:43:44 | FromDiscord | <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:31 | clyybber | Also D has a mode where it's just better C |
12:47:14 | clyybber | And gcc is also a D compiler, which is pretty cool |
12:48:03 | * | navin joined #nim |
12:52:07 | Araq | the "better C" is still called Modula 2 as far as I'm concerned |
12:54:34 | FromDiscord | <SrMordred> @clybber yeah D with betterC is C with strong metaprogramming capabilities, which is pretty cool. |
12:54:34 | FromDiscord | <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:28 | Araq | you can pass static tuples around instead but I never felt the need to do that |
13:00:39 | FromDiscord | <SrMordred> @araq probably i dont need it in Nim. I just have to get used to the new paradigm. |
13:00:39 | FromDiscord | <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:39 | FromDiscord | <SrMordred> ```d |
13:00:40 | FromDiscord | <SrMordred> void print( Args... )( Args args ) |
13:00:40 | FromDiscord | <SrMordred> { |
13:00:40 | FromDiscord | <SrMordred> |
13:00:42 | FromDiscord | <SrMordred> static foreach( arg ; args ) |
13:00:42 | FromDiscord | <SrMordred> writeln( arg ); |
13:00:43 | FromDiscord | <SrMordred> } |
13:00:44 | FromDiscord | <SrMordred> print(1, "test", [1,2,3]); |
13:00:46 | FromDiscord | <SrMordred> /*internally expand to: |
13:00:47 | FromDiscord | <SrMordred> writeln(1); |
13:00:49 | FromDiscord | <SrMordred> writeln("test"); |
13:00:50 | FromDiscord | <SrMordred> writeln([1,2,3]); |
13:00:51 | FromDiscord | <SrMordred> */ |
13:00:53 | FromDiscord | <SrMordred> ``` |
13:00:54 | FromDiscord | <SrMordred> (varargs[T] must be the same type, right? |
13:00:56 | FromDiscord | <SrMordred> Unless in macros where it can be untyped .. ? still learning ð ) |
13:01:15 | * | nsf joined #nim |
13:01:26 | FromDiscord | <Shield> lol |
13:01:37 | FromGitter | <zetashift> @SrMordred when pasting several lines of code please use a pastebin, the code block doesn't get rendered on Gitter/IRC |
13:02:08 | FromDiscord | <SrMordred> @zetashift oh, sorry, forgot about it ;/ |
13:02:58 | FromGitter | <zetashift> no problem, fwiw I tried D too but ended up liking Nim more because it's way more readable for me |
13:03:59 | FromDiscord | <SrMordred> @araq probably i dont need it in Nim. I just have to get used to the new paradigm. |
13:03:59 | FromDiscord | <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:59 | FromDiscord | <SrMordred> |
13:03:59 | FromDiscord | <SrMordred> https://run.dlang.io/is/zcv68d |
13:04:00 | FromDiscord | <SrMordred> |
13:04:00 | FromDiscord | <SrMordred> (varargs[T] must be the same type, right? |
13:04:02 | FromDiscord | <SrMordred> Unless in macros where it can be untyped .. ? still learning ð ) |
13:05:07 | Araq | varargs[typed] exists and is what 'echo' uses |
13:05:21 | Araq | the only problem is that you don't get to see its implementation |
13:05:41 | FromDiscord | <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:58 | FromGitter | <zetashift> https://github.com/timotheecour/D_vs_nim |
13:06:00 | FromGitter | <alehander42> varargs[typed, `$`] |
13:06:42 | FromGitter | <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:20 | FromDiscord | <SrMordred> @alehander varargs[typed, $] but this means that the type will be converted to string, right? |
13:07:47 | Araq | yeah but you can leave out the $, varargs[typed] |
13:08:04 | FromGitter | <alehander42> yeah, i mostly meant the echo example where this is fine |
13:08:14 | FromDiscord | <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:54 | FromDiscord | <SrMordred> @araq will try varargs[typed] ð |
13:09:18 | leorize | we at haiku can't even compile rust with our buildbots because of their excessive ram usage |
13:09:29 | leorize | its* |
13:09:43 | Araq | leorize, are you into Haiku? |
13:10:02 | * | dddddd quit (Ping timeout: 245 seconds) |
13:10:14 | Araq | is it too late to tell you Haiku should remove its package manager? |
13:10:25 | leorize | yes, it's too late :P |
13:10:25 | Araq | ah 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:22 | shashlick | @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:05 | FromDiscord | <Kiloneie> based on this D is only a bit less popular than Go 1.220 vs 0.955% |
13:48:07 | FromDiscord | <Kiloneie> https://www.tiobe.com/tiobe-index/ |
13:48:30 | FromDiscord | <Kiloneie> Where in Nim here ? xD.... dont ask |
13:48:33 | Araq | tiobe-index is unreliable crap |
13:48:41 | FromDiscord | <Kiloneie> i know |
13:48:55 | FromDiscord | <Kiloneie> its people who decided to post they use it inn the industry |
13:48:57 | Araq | then why bring it up? |
13:49:05 | FromDiscord | <Kiloneie> as one example |
13:49:22 | FromDiscord | <Kiloneie> not the example |
13:49:54 | Araq | https://www.youtube.com/watch?v=P8oJUGVbOlQ here |
13:50:02 | Araq | as promised |
13:50:23 | Yardanico | lol |
13:50:27 | * | couven92 quit (Ping timeout: 240 seconds) |
13:51:08 | Yardanico | nice video |
13:51:37 | FromDiscord | <Kiloneie> my third viewing on it, i like this music lol |
13:52:09 | Araq | and now I'll lean back and watch it go viral |
13:52:26 | FromDiscord | <Kiloneie> hopefully |
13:52:48 | Araq | the next video will have a special guest, Strawberry Shortcake |
13:52:56 | Yardanico | Araq: what is https://www.youtube.com/watch?v=XcpEHB-snVo btw ? :P |
13:53:03 | * | navin quit () |
13:53:11 | Yardanico | I got two notifications from your youtube channel (yes I have notifications enabled for your channel), there was this video 33mins ago |
13:53:23 | Araq | that one doesn't exist |
13:53:39 | Araq | :P |
13:53:52 | Araq | it was the same video with a broken link |
13:53:55 | Araq | :DD |
13:54:17 | leorize | yes, food is the key factor in attracting viewers :P |
13:55:02 | FromDiscord | <Kiloneie> And boobs |
13:55:04 | FromDiscord | <Kiloneie> xD |
13:56:43 | FromDiscord | <Shield> that music tho |
13:57:29 | Araq | can't argue over music taste |
13:58:42 | FromDiscord | <Kiloneie> it's great |
13:59:02 | FromDiscord | <Shield> it was a bit loud |
13:59:06 | FromDiscord | <Kiloneie> i don't listen to music besides when partying so i don't listen to much, but this is great |
13:59:20 | FromDiscord | <Kiloneie> and my videos are quiet, turn the knob ð |
14:00:00 | leorize | I see "pendulum", I click like |
14:02:05 | * | navinmistry joined #nim |
14:02:19 | FromDiscord | <Shield> the beat was distracting, but good video, i like the focus on benchmarks |
14:02:40 | Zevv | Yesss! |
14:04:11 | FromDiscord | <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:04 | FromGitter | <alehander42> i |
14:05:07 | FromGitter | <alehander42> well |
14:05:08 | FromGitter | <alehander42> wow |
14:05:12 | Yardanico | XD |
14:05:18 | Yardanico | almost like my reaction, yeah |
14:05:24 | Yardanico | I was a bit ... ehm, surprised |
14:05:39 | FromDiscord | <Shield> it needs show up for "nim programming language", gotta cover most keywords |
14:05:52 | FromGitter | <alehander42> good video |
14:06:17 | FromGitter | <alehander42> very |
14:06:27 | FromGitter | <alehander42> happy video |
14:07:03 | FromGitter | <alehander42> a bit DIY but if we're talking fun, it's fun |
14:08:09 | Yardanico | TIL about `bat` |
14:08:19 | FromDiscord | <Shield> i was expecting an X game clip at some point |
14:08:25 | FromDiscord | <Shield> xD |
14:08:31 | leorize | rust is taking over the cli :P |
14:08:57 | clyybber | Araq: I'd suggest putting the song in the video description |
14:08:58 | FromGitter | <alehander42> what is bat |
14:09:02 | clyybber | People like that |
14:09:15 | leorize | https://github.com/sharkdp/bat |
14:09:18 | FromDiscord | <Shield> the song is mentioned in the outro |
14:09:49 | Calinou | also Pastel, https://github.com/sharkdp/pastel |
14:09:56 | Calinou | which does what I did last year in Nim, but 10 times better :( |
14:11:10 | clyybber | Shield: Oh, ok. Nevermind then, I haven't yet watched it till the end |
14:11:25 | leorize | guess 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:49 | Araq | yeah because that's so hard, just some freaking ansi escape stuff |
14:14:03 | FromDiscord | <Kiloneie> add more tags |
14:14:26 | FromDiscord | <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:27 | FromDiscord | <Kiloneie> etc |
14:14:28 | FromDiscord | <Kiloneie> more tags |
14:15:00 | clyybber | I don't know if pastel does that, but simulating the various different color spaces is hard. |
14:15:12 | FromDiscord | <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:33 | FromDiscord | <Kiloneie> ? im talking about YouTube tags |
14:15:42 | FromDiscord | <Kiloneie> what are you talking about ? |
14:15:53 | Araq | ok, added more tags |
14:16:01 | Araq | feels redundant now, but *shrug* |
14:16:48 | FromDiscord | <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:16 | Yardanico | @mratsim youtube needs tags sometimes |
14:20:18 | * | navinmistry quit (Client Quit) |
14:20:23 | Yardanico | for less known videos especially |
14:23:17 | FromDiscord | <Kiloneie> that is the only way low sub, low popularity channels get views |
14:23:25 | FromDiscord | <Kiloneie> besides linking all over the place |
14:27:42 | * | navinmistry joined #nim |
14:28:43 | * | navinmistry is now known as timesurfer |
14:28:49 | Yardanico | lol |
14:31:20 | clyybber | Araq: Is this an intented feature: http://ix.io/1X2R ? |
14:31:45 | clyybber | I 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:54 | Yardanico | btw, 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:59 | disruptek | what's the "feature"? |
14:37:37 | disruptek | i just see generics. |
14:37:55 | FromDiscord | <Kiloneie> my fan ð |
14:38:08 | clyybber | disruptek: `additions: Tarr` is missing the generic param |
14:38:10 | FromDiscord | <Kiloneie> mechanical madness |
14:38:16 | FromDiscord | <Kiloneie> or hammering |
14:38:22 | clyybber | But the compiler figures it out automagically from the argument |
14:38:22 | disruptek | ah. |
14:38:45 | Yardanico | @Kiloneie something like https://www.youtube.com/watch?v=Y-o3pJEhwD4 |
14:38:52 | FromDiscord | <Shield> interdasting |
14:39:58 | FromDiscord | <Kiloneie> is there a way to increaser the font in the VS Code terminal ? |
14:40:03 | Yardanico | yes, in config |
14:40:07 | FromDiscord | <Kiloneie> i don't know how to use magnifier with obs |
14:40:09 | FromDiscord | <Kiloneie> okay |
14:40:40 | disruptek | i 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:49 | Yardanico | also you may like some fancy stuff like themes :P https://i.imgur.com/mE7wAJu.png |
14:40:51 | disruptek | ^it's |
14:40:53 | * | timesurfer quit () |
14:41:35 | Yardanico | @Kiloneie, open user settings, type "font" in search field and you'll find all configuration you need :) |
14:41:54 | narimiran | Yardanico: bold font? why? |
14:41:56 | FromDiscord | <Kiloneie> i found it |
14:42:02 | Yardanico | narimiran: IDK, I like it more that way |
14:42:18 | FromDiscord | <Kiloneie> but imma increase it to only 18 from 14, because man is it gonna be ugly with compiler errors |
14:42:31 | Yardanico | or 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:33 | FromDiscord | <Kiloneie> which i am about to cover ?.... maybe.... i shouldn't... idk. |
14:42:46 | FromDiscord | <Shield> that color scheme with the bold font is quite fuzzy for me |
14:42:49 | Yardanico | I'd suggest you to make a bit longer vids of like 10-15 min or maybe more |
14:43:24 | narimiran | you can split vscode vertically: on the left you have your program, on the right you have the terminal |
14:43:36 | narimiran | so even with the bigger font, lots of lines are shown for both |
14:43:39 | FromDiscord | <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:42 | Calinou | you can split the terminal too since last year |
14:44:06 | FromDiscord | <Kiloneie> how to that ? |
14:44:17 | FromDiscord | <Kiloneie> i probably won't do that for this video, but you know |
14:44:18 | narimiran | top-right of the terminal window |
14:44:53 | FromDiscord | <Kiloneie> how to unsplit ? |
14:44:58 | narimiran | top-right of the terminal window |
14:45:10 | Yardanico | kill terminal directly or press on a trash can |
14:45:18 | Yardanico | (just type "exit" to kill it without having to use the mouse) |
14:45:20 | FromDiscord | <Kiloneie> thank you |
14:45:35 | clyybber | https://www.youtube.com/watch?v=kopoLzvh5jY RL is nothing new, but this visualization is really beautiful |
14:45:54 | FromDiscord | <Kiloneie> btw is font 28 a bit much for writting code ? |
14:45:59 | narimiran | (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:24 | FromDiscord | <Arvest> I am french you can explain the server |
14:46:47 | * | navinmistry joined #nim |
14:47:01 | FromDiscord | <Arvest> Pliz |
14:47:25 | FromGitter | <zetashift> @Arvest what server are you talking about? |
14:48:39 | FromDiscord | <Kiloneie> will font 24 still be viewable enough ? |
14:48:43 | FromDiscord | <Kiloneie> down from 28 ? |
14:49:05 | FromGitter | <zetashift> Do you have a screenshot of both? |
14:49:08 | FromDiscord | <Arvest> that she is the nim language |
14:49:15 | Yardanico | wat |
14:49:35 | FromGitter | <zetashift> @Arvest could say it in french because I'm not getting any of this :( |
14:49:44 | FromDiscord | <Arvest> what is it for |
14:50:05 | FromGitter | <zetashift> Nim is a programming language, it's used to program whatever your mind can think of |
14:50:50 | Calinou | @Kiloneie it depends on the resolution you're recording at |
14:50:58 | Calinou | ideally, you should aim your video to be readable in 720p resolution |
14:51:06 | Calinou | if you record in 1440p, you should set the OS display scale to 200% |
14:51:23 | Calinou | in 1080p, you should set it to 150% (or maybe 125%) |
14:51:56 | FromDiscord | <Kiloneie> did you see video #2 ? |
14:52:00 | Calinou | that said, some tasks require having a lot of real estate available, so that may not alwways be possible |
14:52:06 | FromDiscord | <Kiloneie> was that okay ? i just upped the font |
14:52:59 | FromDiscord | <Arvest> yes but it allows to do what @gitterirc |
14:53:00 | * | uu91 quit (Remote host closed the connection) |
14:53:15 | Calinou | the code font is readable at 720p, but the terminal output is much less so |
14:53:31 | FromDiscord | <Kiloneie> yeah it's at 14, i jsut upped it to 18 |
14:53:47 | FromDiscord | <Kiloneie> but lowered the code font to 24, because i can't look at it O,O |
14:53:53 | Calinou | also, just a suggestion, you could hide the Windows task bar, I find it looks amateurish but that's just me :P |
14:53:56 | FromDiscord | <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:05 | FromDiscord | <Kiloneie> -.- |
14:54:15 | * | uu91 joined #nim |
14:54:19 | FromDiscord | <Kiloneie> okay... |
14:55:36 | FromDiscord | <Kiloneie> i don't think you have seen many programming videos on youtube xD... mine is VERY professional in comparison lol D: |
14:55:47 | Yardanico | oh nice I found sources for my incompleted discord-irc bridge in Nim from a year ago |
14:55:48 | FromDiscord | <Kiloneie> but i will do that |
14:56:02 | FromDiscord | <Arvest> ok should you explain me in mp more precisely please @Yardanico |
14:56:14 | FromGitter | <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:23 | narimiran | by the time you do 347th video, you will have the best looking videos in the world :D |
14:56:32 | FromDiscord | <Yardanico> @Arvest uhhh, I guess you should read https://en.wikipedia.org/wiki/Computer_programming a bit ð |
14:56:45 | Calinou | yeah, 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:18 | FromDiscord | <Arvest> Ok thank you @Yardanico |
14:58:10 | FromDiscord | <Kiloneie> https://justpaste.it/6hv88 |
14:58:10 | FromDiscord | <Kiloneie> 7 is the line and 1 is the ACTION ? |
14:58:26 | narimiran | 1 is the column |
15:00:21 | FromDiscord | <Kiloneie> no action |
15:00:21 | FromDiscord | <Kiloneie> https://play.nim-lang.org/#ix=1X31 |
15:00:36 | FromDiscord | <Kiloneie> or statement ... |
15:01:03 | FromDiscord | <Kiloneie> omg i am dumb.... i didn't share my #2 video's code trough playground LOL |
15:01:40 | FromDiscord | <Kiloneie> maybe for the better, will explain it in this video |
15:02:27 | narimiran | space after `;`, not before. sincerely, my OCD |
15:02:59 | FromDiscord | <Kiloneie> i know, i had the same problem |
15:03:05 | FromDiscord | <Kiloneie> i just wanted to copy pasta quickly |
15:03:19 | FromDiscord | <Kiloneie> i need spaces everywhere xD |
15:07:03 | clyybber | Ooooooh, I managed to create some funky memory corruption |
15:07:31 | clyybber | Without ptr, pointer, ref or anything else unsafe AFAICT |
15:07:35 | * | Hideki_ joined #nim |
15:10:13 | clyybber | And with --newruntime it just works TM \o/ |
15:10:57 | leorize | so, uh, that means you can create memory corruption with newruntime? |
15:11:16 | clyybber | Nono, the memory corruption is only reproducable without --newruntime |
15:11:34 | leorize | now that's a high priority bug :P |
15:11:36 | disruptek | yay? |
15:11:40 | clyybber | yay! |
15:11:52 | clyybber | At least this means that --newruntime is doing something right lol |
15:12:07 | disruptek | now diff those .c |
15:13:02 | clyybber | Thats gonna be a huge diff probably |
15:13:35 | disruptek | once you are able to repro in a small block it should be comparable, i would think. |
15:13:46 | clyybber | I shall try |
15:13:58 | FromDiscord | <SrMordred> where can i read about newruntime? |
15:13:59 | disruptek | you are a badass and you will succeed. |
15:14:02 | FromDiscord | <Shield> can you even corrupt memory in newruntime |
15:14:17 | clyybber | Shield: Of course. But then its your doing. |
15:14:40 | leorize | newruntime used to corrupt global vars :P |
15:14:57 | clyybber | I fixed that :D |
15:15:37 | FromDiscord | <Kiloneie> can you show taskbar only on one monitor ? |
15:16:14 | shashlick | Are tables ported to newruntime |
15:17:11 | * | abm quit (Quit: Leaving) |
15:18:02 | clyybber | disruptek: http://ix.io/1X38 this is the code. Looks safe, right? |
15:18:41 | disruptek | you're cheating with that generic, aren't you. |
15:19:03 | clyybber | I'm pretty sure that shouldn't be the cause |
15:19:19 | disruptek | y'know ima quote you on that later. |
15:20:02 | disruptek | when you have an `...add block:` why do you use parens? doesn't that annoy you? |
15:20:16 | clyybber | The thing is |
15:20:21 | clyybber | It doesn't work without parens |
15:20:28 | clyybber | A bug IMO |
15:21:13 | disruptek | hmm, you can `...add quote do:` but you cannot `...add block:` ? |
15:21:23 | clyybber | It's certainly a bug |
15:21:42 | disruptek | ah, it's because quote is altering the semantics. |
15:22:12 | clyybber | Still that block thing should work, because its documented. It's an expression. It should wherever an expression fits |
15:22:18 | disruptek | i agree it's a bug. |
15:23:54 | clyybber | What amazes me is the amount of different error messages that thing is able to spit out |
15:24:26 | disruptek | what's the deal with `func` these days. araq doesn't like it, is that all? |
15:24:26 | clyybber | AssertionErrors Overflows, DivByZeros, errors in $, errors in newObj |
15:24:53 | clyybber | disruptek: Its just syntactic sugar for {.noSideEffects.} |
15:25:20 | disruptek | i know, but has it fallen out of favor or is it safe? i was wary to use it though i wanted to. |
15:25:29 | disruptek | like so many things... |
15:25:30 | clyybber | Use it it's safe |
15:25:57 | * | Hideki_ quit (Ping timeout: 240 seconds) |
15:26:24 | FromDiscord | <Shield> wait, araq doesn't like it? isn't it recommended |
15:26:46 | clyybber | Shield: You shouldn't care wether he likes it or not |
15:26:53 | narimiran | this ^ |
15:26:58 | clyybber | To quote him "I rarely write user level code anymore" |
15:27:39 | disruptek | it'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:43 | FromDiscord | <Kiloneie> He is part god now D: |
15:28:05 | disruptek | clyybber: i don't see the problem. |
15:28:13 | clyybber | Me neither |
15:28:14 | FromDiscord | <Shield> as long as it doesn't get nuked sometimes in the future |
15:28:40 | clyybber | disruptek: I can't really minify that either |
15:29:47 | FromDiscord | <arnetheduck> > Its just syntactic sugar for {.noSideEffects.} |
15:29:47 | FromDiscord | <arnetheduck> |
15:29:47 | FromDiscord | <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:09 | clyybber | Huh, ok. |
15:30:24 | disruptek | ah, it has a separate overload set. |
15:30:34 | disruptek | i didn't realize that. |
15:30:39 | clyybber | Me neither |
15:30:54 | FromDiscord | <Shield> wow, that's subtle |
15:31:08 | disruptek | gah i'm not even sure what to make of that. |
15:31:30 | disruptek | i guess from the fp perspective, it makes a lot of sense. |
15:32:41 | disruptek | clyybber: if you change your func to proc you get a div0 |
15:32:53 | clyybber | disruptek: Run it again |
15:33:01 | clyybber | Wether you get a div0 or not is random |
15:33:01 | disruptek | omg |
15:33:09 | clyybber | lol |
15:33:49 | clyybber | To be fair, there is a randomize() call there, but still. Pretty cool :) |
15:34:33 | disruptek | well, there are multiple bugs, so i guess it will benefit from more dissection. |
15:34:43 | FromDiscord | <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:17 | FromDiscord | <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:56 | disruptek | i don't understand `prepareTileset`. |
15:37:17 | disruptek | arnetheduck: wow, really? |
15:39:19 | clyybber | disruptek: I don't expect you to :P |
15:39:28 | clyybber | It's not really correct yet either |
15:41:37 | FromDiscord | <Kiloneie> Nim for Beginners #3 Variables, Errors And Comments |
15:41:37 | FromDiscord | <Kiloneie> Too long ? Is this better: Nim for Beginners #3 Variables and Errors ? |
15:41:37 | FromDiscord | <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:18 | FromGitter | <awr1> i suppose yeah |
15:44:02 | disruptek | can't decide if this feels idiomatic: |
15:44:06 | disruptek | while (let nextTiles = result.chooseTilesToCollapse(); nextTiles.len > 0): |
15:44:18 | clyybber | Idiomatic or not, I like it |
15:44:25 | disruptek | it's kinda cute, i admit. |
15:44:44 | FromDiscord | <Kiloneie> looks nice |
15:44:49 | clyybber | It spares me duplicating one line only for the first iteration |
15:55:56 | disruptek | clyybber: 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:09 | clyybber | Yeah, thats a funny one |
15:59:12 | * | dddddd quit (Ping timeout: 245 seconds) |
16:00:45 | * | dddddd joined #nim |
16:01:01 | clyybber | Managed 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:02 | Gnjurac | hmm this kiwi web irc has embeded video player, does irc still not support code formating like |
16:04:02 | Gnjurac | https://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:10 | clyybber | Gnjurac: IRC doesnt "support" any code formatting |
16:09:28 | clyybber | But it also won't do anything to the text you send soo |
16:09:32 | leorize | bold italic bi |
16:09:53 | clyybber | ? |
16:09:58 | leorize | well you do have limited formatting in irc |
16:10:03 | leorize | this is bold |
16:10:11 | clyybber | Not for me :P |
16:10:14 | leorize | this should be italics |
16:10:19 | clyybber | Nope |
16:10:21 | leorize | you need a better terminal :P |
16:10:27 | clyybber | alacritty? |
16:10:32 | clyybber | Is what I use |
16:10:36 | clyybber | It should support it |
16:10:38 | leorize | I'm using it too |
16:10:47 | clyybber | Probably my font |
16:11:12 | leorize | underline! |
16:11:15 | * | narimiran quit (Ping timeout: 265 seconds) |
16:11:20 | disruptek | i tried to like alacritty, but it wasn't as complete as kitty. |
16:11:20 | leorize | reversed |
16:11:31 | leorize | kitty hates iosevka |
16:11:34 | leorize | so I don't use kitty |
16:11:43 | FromDiscord | <arnetheduck> pattern matching would be nice though, so that one can pick out the value without `get` |
16:11:44 | FromDiscord | <arnetheduck> that syntax is useful with `option`: `if (let x = f(); x.isSome): echo x.get()` |
16:11:50 | clyybber | Underline works, but thats because alacritty does underlines independently of the font (and in kind of a hacky way but who cares) |
16:13:01 | leorize | you can't do code blocks on irc though |
16:13:12 | leorize | because pasting more than one line is considered bad practice |
16:13:30 | clyybber | well you *can* |
16:13:48 | clyybber | but you attract the anger of all irc ppl |
16:14:27 | * | solitudesf joined #nim |
16:14:38 | leorize | i'm trying to make asynchttpserver works with newruntime |
16:14:43 | leorize | added a bunch of owned |
16:14:43 | disruptek | tbh, i dunno why it's such a big deal. |
16:14:58 | * | NimBot joined #nim |
16:15:04 | leorize | and now thanks to borked lineinfo I have no idea what's wrong |
16:15:31 | disruptek | how does iosevka compare to firacode? |
16:15:44 | disruptek | take your mind off line numbers and focus on me. |
16:16:16 | leorize | 'r' |
16:16:24 | leorize | there, that's my comparison |
16:16:56 | clyybber | disruptek: Me neither, but there were a few occasions today where I could watch irc ppl begging for the lines to en |
16:16:58 | clyybber | d |
16:17:53 | * | Vladar quit (Remote host closed the connection) |
16:17:55 | disruptek | it 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:31 | Zevv | leorize: 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:54 | Zevv | Araq 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:00 | FromDiscord | <Kiloneie> Aprox. ETA on the new runtime ? What does it do besides being NO GC default Nim ? any possible performance bumps ? |
16:34:07 | leorize | if only Araq would document their differences... |
16:34:36 | * | dddddd joined #nim |
16:34:39 | leorize | in certain cases it's slower :P |
16:35:07 | FromDiscord | <Kiloneie> how so ? |
16:35:19 | * | Vladar joined #nim |
16:35:25 | disruptek | the speed is diminished. |
16:35:38 | FromDiscord | <Kiloneie> i am pretty sure i will be sticking with this nifty GC |
16:35:44 | leorize | the gc can stack up a bunch of small deallocation for a big free |
16:35:47 | leorize | much faster |
16:35:51 | FromDiscord | <Kiloneie> i don't like manual labor D: |
16:36:16 | leorize | so in a rapid alloc scenario, the gc can actually be faster |
16:36:24 | FromDiscord | <Kiloneie> good for games ð |
16:36:29 | FromDiscord | <Kiloneie> one day... |
16:37:01 | FromDiscord | <Kiloneie> man do i want to finish what i tried to do so many years ago... HUGE ambitious game... |
16:37:31 | FromDiscord | <Kiloneie> talk about several FTL games of work |
16:37:46 | * | daddoo quit (Quit: Leaving) |
16:38:11 | leorize | i 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:35 | FromDiscord | <Kiloneie> i worked for a year on one game, that's how i learned so much coding etc |
16:38:49 | FromDiscord | <Kiloneie> but i quit after countless semantic and actual errors |
16:39:01 | FromDiscord | <Kiloneie> my 15 year old brain couldn't grasp it all |
16:40:04 | leorize | i worked on a game engine for several months :P |
16:40:22 | leorize | I quit after freepascal keeps erroring on my generics |
16:40:27 | FromDiscord | <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:32 | leorize | switched to nim but I never restarted my work :P |
16:41:52 | FromDiscord | <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:55 | FromDiscord | <Kiloneie> There's time ^^ |
16:42:18 | FromDiscord | <Kiloneie> all that stuff is after the game is in the polish state ð |
16:42:39 | FromDiscord | <Kiloneie> like, i really would not care about performance unless i actually can't do a feature without it |
16:42:52 | leorize | those are dangerous words :P |
16:43:19 | FromDiscord | <Kiloneie> yeah well, game design doesn't like to get too tehnical D: |
16:44:07 | FromDiscord | <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:23 | leorize | certainly not nim :P |
16:44:33 | FromDiscord | <Kiloneie> well you learn what to do and how, practice a few times, and let's make games D: |
16:45:03 | leorize | once you learned about what can slow a pc down, it's not that easy anymore :P |
16:45:14 | FromDiscord | <Kiloneie> everything does... |
16:45:15 | FromDiscord | <Yardanico> @DeltaPHC nim doesn't have a pause-the-world GC by default |
16:45:19 | FromGitter | <awr1> @leorize that's one of the advantages of GC that i unfortunately never see talked about |
16:45:45 | FromGitter | <awr1> cleanup can be more easily deferred to a more optimal time |
16:45:56 | FromDiscord | <mratsim> memory accesses slow a PC. Let's remove memory. |
16:45:59 | * | drewr joined #nim |
16:46:02 | FromDiscord | <DeltaPHC> lol |
16:46:29 | FromDiscord | <DeltaPHC> Deferred cleanup isn't something that *only* a GC can do, though |
16:46:31 | FromGitter | <awr1> don't you need a VM for stop-the-world? |
16:46:40 | Zevv | no, why? |
16:46:46 | FromGitter | <awr1> or |
16:46:52 | FromGitter | <awr1> maybe i'm confusing it with something else |
16:47:11 | FromDiscord | <mratsim> compile nim wth --gc:mark_and_sweep (not sure about the underscore) |
16:47:31 | FromDiscord | <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:32 | disruptek | markAndSweep |
16:47:37 | leorize | even the default gc can collect small memory chunks |
16:47:38 | FromGitter | <awr1> how exactly does the GC pause execution in a stop-the-world system? threading magic? |
16:47:53 | Zevv | typically on allocations it will also do the GC step |
16:47:57 | disruptek | there's no threads. simple. |
16:48:04 | leorize | there are a bunch of primitives that could force the world to stop |
16:48:22 | FromDiscord | <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:30 | FromGitter | <awr1> @Zevv yeah that's what nim does iirc, on allocations it can decide to pause |
16:48:35 | disruptek | memory access is synchronous. |
16:48:43 | FromDiscord | <mratsim> in Nim, the compiler randomily inserts calls to the GC via genericReset and genericResetAux |
16:48:56 | FromGitter | <awr1> but in a VM it could be like, oh every X VM cycles we could just pause |
16:49:15 | leorize | it's possible in non-vm case also |
16:49:29 | Zevv | disruptek: 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:35 | Zevv | await a = 3 :) |
16:49:56 | FromGitter | <awr1> @mratsim does Nim really do that? |
16:50:04 | FromGitter | <awr1> i thought i heard different |
16:50:04 | disruptek | cool theory, bruh ðĪĢ |
16:50:09 | leorize | not that random :P |
16:50:24 | leorize | only on ref type creation iirc |
16:50:46 | Zevv | which indeed involve an alloc |
16:51:03 | FromDiscord | <mratsim> I remember changing assignations in Arraymancer, and suddenly I have genericRset appearing |
16:51:26 | FromDiscord | <mratsim> so I worked around that by using template instead of proc |
16:51:38 | FromDiscord | <mratsim> because I think the code only checks for the start of procs |
16:52:02 | FromGitter | <awr1> @leorize how would you do a cyclic "timer interrupt" stop-the-world without a VM |
16:52:06 | FromGitter | <awr1> would you just use threads? |
16:52:45 | FromDiscord | <mratsim> example: @Zevv https://github.com/mratsim/Arraymancer/issues/111#issuecomment-336235974 |
16:53:15 | clyybber | You can implement batched deallocation in newruntime too |
16:53:17 | clyybber | bbl |
16:53:21 | disruptek | awr1: or async |
16:53:32 | Zevv | mratsim: well, that is unexpected |
16:54:11 | FromDiscord | <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:55 | Zevv | mratsim: what is the rule of thumb when to expect those? |
16:55:05 | FromGitter | <awr1> that is quite strange |
16:55:11 | leorize | @awr1 you can have one thread managing the heap, then insert sync primitives to all other threads |
16:55:23 | leorize | once all of them reach the sync point you do GC |
16:55:48 | leorize | not the most optimal way :P |
16:56:32 | FromGitter | <awr1> i wonder if you could also use something like `SuspendThread()` |
16:56:46 | FromGitter | <awr1> no real pthreads equivalent |
17:00:51 | * | dddddd quit (Ping timeout: 240 seconds) |
17:06:54 | FromGitter | <awr1> that nim trailer video reminds me of https://www.youtube.com/watch?v=rRbY3TMUcgQ |
17:07:00 | FromDiscord | <mratsim> @Zevv, mmmh no idea, I benchmark. I've only seen them on generics though |
17:07:08 | * | Kiloneie quit (Quit: Leaving) |
17:07:17 | FromDiscord | <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:11 | Zevv | Well, 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:10 | FromGitter | <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:40 | FromDiscord | <Kiloneie> Guys, how long does the link to code in nim's playground exist ? |
17:44:54 | FromDiscord | <Kiloneie> if i put code in those links, will it exists years down the line ? |
17:45:19 | Zevv | we're at the mercy of the ix.io ppl |
17:45:30 | Zevv | not sure if anyone has ever contacted him |
17:46:21 | FromGitter | <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:41 | FromGitter | <alehander42> currently i guess this is not implemented, as i can define var a: NotNilable and deref it |
17:46:46 | FromGitter | <alehander42> and the compiler is happy to let me |
17:47:02 | FromDiscord | <kodkuce> magic |
17:47:02 | FromDiscord | <Kiloneie> idk... i will put it in a link, and also save it in my onenote |
17:47:40 | FromGitter | <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:54 | FromGitter | <matrixbot> `testgovno` ignor me, just testing matrix |
17:50:41 | * | poopBot joined #nim |
17:50:59 | solitudesf | matrix can connect to irc directly, so you can avoid one relay |
17:51:06 | FromGitter | <matrixbot> `testgovno` again |
17:53:09 | * | Hideki_ joined #nim |
17:55:02 | FromGitter | <matrixbot> `testgovno` meybe but this fluffyChat is wierd app |
17:56:08 | leorize | join #freenode_#nim |
17:57:09 | * | testgovno[m] joined #nim |
17:57:23 | FromGitter | <alehander42> @dom96 btw can we have github login for the forum |
17:57:25 | testgovno[m] | hmm |
17:57:37 | testgovno[m] | ok |
17:57:40 | FromGitter | <alehander42> it's really annoying to maintain separate login info |
17:57:42 | FromGitter | <alehander42> for each site |
17:57:43 | * | Hideki_ quit (Ping timeout: 268 seconds) |
17:57:58 | FromGitter | <alehander42> and i basically never login to the forum |
17:58:11 | FromGitter | <alehander42> what i mean is, would such a pr be accepted if i eventually have free time |
17:58:15 | Araq | alehander42: we should be more aggressive |
17:58:15 | FromGitter | <alehander42> one day |
17:58:38 | Araq | 'ref T' is 'ref T not nil', unless written as 'nil ref T' |
17:58:53 | Araq | and it also applies to 'proc' types |
17:59:36 | FromGitter | <alehander42> so how can you define a nilable proc variable, i use that often |
17:59:42 | FromGitter | <alehander42> var e: nil proc : void ? |
17:59:47 | Araq | yeah |
18:00:07 | Araq | maybe we need a different syntax |
18:00:18 | Araq | 'nil | proc ...' |
18:00:23 | Araq | 'nil | ref T' |
18:00:38 | Araq | makes some sense but this '|' then doesn't produce a typeclass |
18:00:49 | Araq | whether that matters I don't know |
18:00:52 | FromGitter | <alehander42> nil / ref T ? |
18:01:02 | FromGitter | <alehander42> or just to reuse the common `?` syntax? |
18:01:11 | FromGitter | <alehander42> i really like it in c# / typescript |
18:01:14 | Araq | but we don't have suffix operators |
18:01:24 | FromGitter | <alehander42> but i guess it might be seen as a additional symbol |
18:01:36 | Araq | so it would be ?(ref T), not really nice |
18:02:24 | Araq | or maybe it's good enough |
18:02:26 | FromGitter | <alehander42> but why dont we have suffix ops |
18:02:27 | FromGitter | <alehander42> tradition? |
18:02:44 | Araq | creates new ambiguities |
18:02:56 | FromGitter | <alehander42> why not ref? T |
18:03:05 | FromGitter | <alehander42> maybe confusing yeah |
18:03:07 | Araq | x @ @ y |
18:03:17 | Araq | (x@) @ y |
18:03:18 | Araq | or |
18:03:26 | FromGitter | <alehander42> yeah, but `?` isn't used at all, so i guess it can't be ambigious |
18:03:30 | Araq | x @ (@ y) |
18:03:45 | Araq | ? is an operator symbol just like + |
18:04:08 | Araq | see the spec, the fact that system.nim doesn't use ? is irrelevant |
18:04:47 | FromGitter | <alehander42> ahh yeah, it's there |
18:05:10 | FromGitter | <alehander42> i imagined that it can be added as syntax just the same way `nil` works now |
18:05:18 | Araq | var foo: nilref T |
18:05:32 | Araq | would work, but looks weird |
18:05:34 | FromGitter | <alehander42> ?A nil A â ?ref A => nil ref A â ?proc: void => nil proc |
18:07:31 | FromGitter | <alehander42> but wouldn't `? ref A` |
18:07:32 | FromGitter | <alehander42> just work |
18:07:38 | FromGitter | <alehander42> from my experiments with + |
18:07:45 | FromGitter | <alehander42> it seems to generate the ast i expect |
18:07:57 | FromGitter | <alehander42> it needs `()` only for combined expressions |
18:07:57 | Araq | yeah, well, also try |
18:08:00 | FromGitter | <alehander42> which is rare |
18:08:10 | Araq | ?ref Table[string, string] |
18:08:43 | Araq | but ok, if it works, ?ref and ?ptr and ?proc is the way to go |
18:08:52 | FromGitter | <alehander42> it's great |
18:08:53 | FromGitter | <alehander42> it works |
18:09:43 | clyybber | its ugly |
18:09:51 | FromGitter | <awr1> what about `ret T can nil` |
18:10:05 | FromGitter | <awr1> to make it more orthagonal to `not nil` |
18:10:05 | * | narimiran joined #nim |
18:10:27 | FromGitter | <alehander42> i think `not nil` wouldn't be used a lot |
18:10:30 | FromGitter | <alehander42> if its going to be default |
18:10:38 | FromGitter | <alehander42> so it's more like `T` vs `nil T` |
18:10:38 | clyybber | Then call it nilref |
18:10:45 | FromGitter | <alehander42> that's why i prefer `T` vs `?T` |
18:10:52 | clyybber | I think those type "modifiers" dont do any good |
18:11:03 | FromGitter | <awr1> *ref |
18:11:10 | FromGitter | <alehander42> clybber, but this is not very orthogonal.. |
18:11:20 | clyybber | orthogonal to what? |
18:11:21 | FromGitter | <alehander42> i can have a nil proc, a nil MyRef etc |
18:11:27 | clyybber | Ah |
18:11:29 | FromGitter | <alehander42> nil ref is just one case |
18:11:34 | clyybber | Yeah, sure |
18:11:56 | FromGitter | <alehander42> i think it's basically `nil T` vs `?T` |
18:12:15 | FromDiscord | <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:41 | FromGitter | <awr1> or `ref T or nil` to make it "boolean", similar what @Araq said but agh the typeclass issue |
18:13:02 | clyybber | `ref T or type(nil)` |
18:13:03 | FromGitter | <alehander42> one point is that iirc typescript did this |
18:13:13 | FromGitter | <alehander42> string | undefined or something similar |
18:13:20 | FromGitter | <alehander42> and i think later they got the string? |
18:13:25 | FromGitter | <alehander42> which became more popular |
18:13:43 | Araq | treeform: nah, it doesn't come up often |
18:13:59 | FromGitter | <awr1> `or nil` could be a special case |
18:14:03 | FromGitter | <alehander42> so we might learn from that (but i might be wrong about the order of things in their story) |
18:14:29 | Araq | `ref T or type(nil)` is too verbose |
18:14:32 | FromGitter | <alehander42> we dont need new special cases sadly |
18:14:47 | FromGitter | <alehander42> i think if we want to have the `nil` thing, `nil T` should be fine |
18:14:50 | FromGitter | <awr1> but if parsing it is too weird why not `can nil`? |
18:15:11 | Araq | please 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:15 | FromGitter | <alehander42> well , why two keywords for one new feature |
18:15:30 | FromGitter | <alehander42> not-very-new* |
18:15:38 | disruptek | ?ugly |
18:15:50 | FromGitter | <awr1> that's just one new keyword |
18:15:53 | FromGitter | <alehander42> also, `isnot` etc , nim usually uses one keyword |
18:15:55 | clyybber | Araq: Where do not nil refs come up then? |
18:15:56 | FromGitter | <awr1> we already use two keywords for `not nil` |
18:15:59 | FromGitter | <alehander42> so `can nil` would be strange |
18:16:15 | FromGitter | <alehander42> @awr1 but the whole point is that now we woudln't need `not nil` in most code |
18:16:30 | Araq | clyybber: in parameters |
18:16:35 | FromGitter | <awr1> so what are you saying? deprecate `not nil`? |
18:16:46 | FromGitter | <awr1> (as a specific syntax) |
18:16:50 | FromGitter | <alehander42> well, if it's the default, people would just not need to write it |
18:16:55 | FromGitter | <alehander42> it doesn't matter if its deprecated |
18:16:55 | clyybber | Araq: And then the compiler will statically determine that its not nil? |
18:17:13 | Araq | clyybber: it will enforce it, yes. no nil derefs at runtime anymore |
18:18:17 | FromGitter | <awr1> I don't like `?`, people will mistake that for the optional chaining stuff you see in swift et al |
18:18:27 | clyybber | Yeah |
18:18:33 | FromGitter | <alehander42> that's not true |
18:18:38 | disruptek | i just don't like the way it reads. |
18:18:42 | FromGitter | <alehander42> c# and typescript use it exactly with the same meaning |
18:18:49 | clyybber | Me neither, it doesn't *feel* nim |
18:19:14 | clyybber | Perhaps because its a postfix operator |
18:19:29 | FromGitter | <alehander42> but it's a prefix operator in our bikeshedding idea |
18:19:40 | FromGitter | <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:40 | clyybber | `nil ref` is better IMO |
18:19:48 | disruptek | how about foo(node: MyNode and nil); ie you might get MyNode and you might get nil. |
18:19:53 | FromGitter | <awr1> i would say `maybe ref T` but again...that could be confused for optionals |
18:20:17 | FromGitter | <alehander42> disruptek this would be confusing .. `and` implies some kind of subtyping imo |
18:20:20 | disruptek | i like `may nil`, too, but don't wanna add an identifier. |
18:20:27 | disruptek | keyword, that is. |
18:20:53 | FromGitter | <alehander42> `maybe` sounds nice as well, but it can be confused with Option imo |
18:20:55 | disruptek | well, it's clearly two types. |
18:21:03 | disruptek | may is more verby. |
18:21:03 | FromGitter | <alehander42> disruptek not really |
18:21:20 | FromGitter | <alehander42> ah sorry, i thought you said it about and |
18:21:31 | FromGitter | <alehander42> theresa may ref |
18:21:38 | clyybber | Perhaps we should really make a nilable ref an Option ? |
18:21:39 | FromGitter | <alehander42> i already miss her |
18:21:39 | disruptek | i think `Foo and nil` are clearly two distinct values. |
18:22:00 | FromGitter | <alehander42> disruptek thats not really how it looks |
18:22:06 | FromGitter | <alehander42> imagine the venn diagram |
18:22:18 | clyybber | Why not embrace Options and make nilrefs an Option? |
18:22:20 | FromGitter | <alehander42> and the types as sets |
18:22:26 | disruptek | clyybber: it's not crazy. |
18:22:28 | FromGitter | <alehander42> A or B includes values from both types |
18:22:39 | FromGitter | <alehander42> A and B only values which are both A and B |
18:22:46 | FromGitter | <awr1> `ref T using nil`? |
18:22:53 | FromGitter | <alehander42> so i would read it like "only nils" |
18:23:05 | disruptek | i guess that's a fair argument. |
18:23:17 | clyybber | disruptek: Right? I feel like thats the most "orthogonal way" |
18:23:24 | FromGitter | <alehander42> `using nil`, `can nil` just seem needlessly long to me |
18:23:26 | clyybber | The Option approach I mean |
18:23:30 | FromGitter | <alehander42> you can have those often |
18:23:36 | FromGitter | <alehander42> the option thing is interesting |
18:23:44 | FromGitter | <alehander42> i admit i often use nilable refs as something like an option |
18:23:48 | disruptek | options might be too heavy though. |
18:24:03 | FromGitter | <alehander42> and especially with flow typing, its easy to "destructure" |
18:24:16 | shashlick | Was trying a git bisect between 0.19.6 and 0.20.0 |
18:24:19 | clyybber | disruptek: WDYM? The bool variable can be optimized away |
18:24:20 | FromGitter | <alehander42> e.g. if not option.isNil: just use option, no need for .get |
18:24:25 | shashlick | Really painful |
18:24:40 | shashlick | Some commits don't even build |
18:24:49 | shashlick | Some crash |
18:25:05 | shashlick | No way to isolate to my issue |
18:25:10 | disruptek | will i be able to have separate dispatch on nilable ref and not-nilable ref? |
18:25:36 | FromGitter | <alehander42> they are different types |
18:25:42 | FromGitter | <alehander42> so i would suppose so |
18:25:42 | disruptek | so, yes. |
18:26:00 | FromGitter | <alehander42> but on the other hand |
18:26:03 | disruptek | it sounds like this is just a macro. |
18:26:47 | clyybber | disruptek: In fact Option[ref] already optimizes the boolean away |
18:27:05 | FromGitter | <alehander42> on the other hand A not nil matches nil A |
18:27:13 | FromGitter | <awr1> yeah that's another point |
18:27:28 | disruptek | hmmm. curiouser and curiouser. |
18:27:57 | FromGitter | <awr1> what if we could just have Options instead of nilables as a lang feature |
18:28:15 | FromGitter | <awr1> i mean |
18:28:23 | FromGitter | <awr1> not have have nilables as a lang feature |
18:28:55 | FromGitter | <alehander42> @awr1 this is a different thing |
18:29:01 | FromGitter | <alehander42> ah, i see what you mean |
18:29:05 | disruptek | having the concept of nothing is kinda integral to the concept of something. |
18:29:24 | FromGitter | <alehander42> well, i guess a problem is that nilable `ref-s` are deeply |
18:29:35 | FromGitter | <alehander42> tied to current nim codebases |
18:29:59 | FromGitter | <awr1> `ontological ref T` |
18:30:03 | FromGitter | <awr1> :P |
18:30:03 | FromGitter | <alehander42> so i doubt you can really remove the concept at this moment |
18:31:06 | FromGitter | <alehander42> otherwise i guess you imagine something like rust's option |
18:31:29 | FromGitter | <awr1> loosely yeah |
18:31:48 | lqdev[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:31 | lqdev[m] | and as I previously stated, I cannot use a seq because that's heap memory and I can't use that. |
18:32:43 | Zevv | why can't you use that, again? |
18:32:56 | lqdev[m] | it crashes the audio thread |
18:33:03 | lqdev[m] | because it does syscalls |
18:33:06 | FromGitter | <alehander42> can you somehow access the stack of older frames |
18:33:13 | FromGitter | <awr1> you can change stack size |
18:33:15 | FromGitter | <awr1> in gcc iirc |
18:33:22 | FromGitter | <alehander42> Araq, what i wonder for the spec is |
18:33:24 | FromGitter | <alehander42> init |
18:33:25 | clyybber | lqdev[m]: Ummm, living without a heap is hard |
18:33:28 | lqdev[m] | how? |
18:33:34 | FromGitter | <alehander42> e.g. var c: NonNilable |
18:33:36 | clyybber | And there is no way to increase the stack size on windows afaik |
18:33:36 | lqdev[m] | yeah |
18:33:46 | FromGitter | <awr1> `--stack,<number>` |
18:33:49 | FromGitter | <alehander42> how do we ensure it is initialized and where |
18:33:52 | FromGitter | <alehander42> until the end of scope? |
18:34:00 | lqdev[m] | worst problem's that I can't stream the audio directly to a single seq |
18:34:19 | Zevv | lqdev[m]: still, what you're trying to do should all be possible |
18:34:21 | FromGitter | <alehander42> i can imagine we keep some internal "temp nilable" flag for it |
18:34:21 | FromGitter | <awr1> also https://docs.microsoft.com/en-us/cpp/build/reference/f-set-stack-size?view=vs-2019 |
18:34:24 | clyybber | lqdev[m]: Nvrmind there is: https://superuser.com/questions/340239/how-to-increase-stack-size-permanently-on-windows-7 |
18:34:40 | clyybber | lqdev[m]: But I really recommend just using another audio lib |
18:34:46 | lqdev[m] | please no |
18:34:52 | lqdev[m] | I did too much work for this to go to waste |
18:34:53 | disruptek | i guess what i want is a separate dispatch sensitivity for runtime values of nil. but, i doubt you want to impl that. |
18:35:06 | lqdev[m] | @awr1 I don't use msvc |
18:35:11 | clyybber | lqdev[m]: Then report it upstream? |
18:35:20 | clyybber | Sounds like a bug in the audio lib to me |
18:35:25 | FromGitter | <awr1> then try `--stack,<number>` |
18:35:29 | lqdev[m] | nope |
18:35:30 | FromGitter | <alehander42> and this is easy for variables, but it gets harder for objects: a = Obj() # now we have to ensure a.nonNilable |
18:35:30 | lqdev[m] | it's not |
18:35:34 | lqdev[m] | it's a bug in my program |
18:35:43 | Zevv | lqdev[m]: what was your lib, I forgot the name |
18:35:53 | lqdev[m] | my buffer size's too small to fit in the whole sample batch |
18:35:55 | lqdev[m] | soundio |
18:36:10 | clyybber | Ah, so decrease the buffer size? |
18:36:14 | FromGitter | <awr1> i don't even understand how you're doing what you're doing |
18:36:23 | FromGitter | <awr1> normally you get audio buffers from the OS |
18:36:42 | FromGitter | <awr1> unless i don't remember how to use DirectSound |
18:36:59 | FromGitter | <awr1> oh wait yeah i dont |
18:37:08 | clyybber | lqdev[m]: Wait, i thought the bugger is too big and the stack too small? |
18:37:10 | FromGitter | <awr1> you allocate and then DirectSound uses |
18:37:12 | FromGitter | <awr1> hmm |
18:37:13 | lqdev[m] | damn I just realized something |
18:37:15 | clyybber | s/bugger/buffer |
18:37:30 | lqdev[m] | clyybber: yes |
18:37:31 | FromGitter | <awr1> still why can't you heap allocate? |
18:37:32 | lqdev[m] | but I have another idea now |
18:37:37 | lqdev[m] | let me try it out |
18:37:57 | lqdev[m] | awr1: the audio thread runs in real time and if it slows down a bit it crashes the whole program |
18:38:12 | lqdev[m] | but give me a second, I have a much better idea in mind |
18:38:14 | clyybber | That sounds like a bug |
18:38:19 | lqdev[m] | it's not |
18:38:20 | * | skoude joined #nim |
18:38:27 | lqdev[m] | it's how audio works |
18:38:29 | lqdev[m] | ÂŊ\_(ã)_/ÂŊ |
18:38:34 | FromGitter | <awr1> are you worried that GC will track the buffer |
18:38:36 | lqdev[m] | brb |
18:38:45 | clyybber | Normally audio can deal with not-full buffers |
18:38:50 | lqdev[m] | awr1: no, it's that I can't use malloc or anything |
18:39:37 | FromGitter | <awr1> then i do not understand what would cause the slowdown |
18:40:22 | FromGitter | <awr1> are you just wary of allocating too much as you composite the buffer? |
18:40:41 | leorize | if underruns crashes your program |
18:40:46 | leorize | you need a better audio libray |
18:40:48 | leorize | library* |
18:40:59 | clyybber | Yeah |
18:41:12 | FromGitter | <awr1> "I can't use malloc or anything" why? |
18:41:24 | FromGitter | <awr1> what systems are you running on |
18:41:47 | Zevv | lqdev[m]: I still don't really see what the root cuase of your problem is |
18:41:59 | Zevv | You have a nim program and a proc that runs in a non-native thread |
18:42:19 | Zevv | so the non-native thread basically cannot do any real nim things |
18:42:28 | lqdev[m] | I realized that I can send the samples in batches of 256 |
18:43:06 | Zevv | but 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:30 | FromGitter | <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:43 | FromGitter | <awr1> but you can malloc without immediately having to free |
18:43:49 | FromGitter | <awr1> you can just hang on to that allocation |
18:43:53 | lqdev[m] | until I send all the required samples |
18:43:58 | * | navinmistry quit (Remote host closed the connection) |
18:44:06 | FromDiscord | <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:16 | Yardanico | Someone 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:40 | FromGitter | <awr1> you can use `distinctBase` from `std / sugar` |
18:53:33 | clyybber | Yardanico: `iterator items(c: someDistinct): someType =\n for p in c.theBaseType.items: yield p` |
18:53:41 | clyybber | That should work afaict |
18:53:44 | narimiran | another 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:44 | FromGitter | <awr1> https://play.nim-lang.org/#ix=1X4C |
18:58:39 | lqdev[m] | @awr1 but then the GC flips out |
18:59:40 | FromGitter | <awr1> if you really want to, why not just `alloc0` |
19:01:33 | Araq | timotheecour: 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:16 | FromGitter | <alehander42> hm, i'll try to prototype my test-dependency idea for nim |
19:19:36 | FromGitter | <alehander42> it would be cool if it optimizes tests for an example project |
19:20:16 | Araq | lqdev[m], you can write a custom seq via Nim's destructors |
19:20:32 | Araq | the manual shows how |
19:20:40 | Araq | I mean the destructors manual |
19:31:20 | zedeus | what'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:00 | FromDiscord | <DeltaPHC> IIRC, newruntime implies gc:destructors |
19:32:08 | FromDiscord | <DeltaPHC> But not the other way around |
19:32:53 | * | adeohluwa joined #nim |
19:33:23 | zedeus | hmm, I supposed newruntime is more about 'owned' then |
19:33:39 | FromDiscord | <mratsim> from Gitter merging all messages is really awful on Discord |
19:34:26 | FromDiscord | <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:56 | FromDiscord | <mratsim> I wonder if it's a question about Hindler-Milner ð |
19:34:57 | Araq | zedeus, I'm writing an article but I can't clone myself |
19:35:13 | Araq | 1. we don't use HM, HM with overloading is NP-complete. |
19:35:29 | Araq | 2. semcheck is symbol lookup + type checking |
19:36:05 | Araq | but the spec is super imprecise about this, I started to write an article about it... |
19:36:39 | zedeus | sadly, looking forward to it :) |
19:36:50 | Araq | I can give you a summary |
19:37:04 | FromDiscord | <mratsim> you can put the summary in a gist and I'll link it |
19:37:18 | rayman22201 | I can try a bad tldr until Araq finishes his article. |
19:37:28 | rayman22201 | oh, or Araq can summarize himself :-P |
19:37:35 | Araq | both modes use destructors for strings/seqs. --newruntime introduces 'owned' |
19:38:07 | Araq | --gc:destructors is still a GC for 'ref' but the syncronization points are non-existent |
19:38:49 | Araq | you need to call collect() on the stack bottom yourself -- well the async framework will do it for you |
19:39:06 | Araq | no need to track stack slots for async as async avoids the stack anyway |
19:39:30 | FromDiscord | <DeltaPHC> When you say "introduces owned", does that include `sink T` and `lent T`? |
19:39:58 | FromGitter | <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:17 | Araq | you 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:37 | Zevv | lqdev[m]: this works for me http://ix.io/1X4Q |
19:40:49 | * | adeohluwa quit (Remote host closed the connection) |
19:40:51 | Zevv | the ringbuffer is a nim object on the heap with it's data in a seq |
19:41:00 | Zevv | which is shared between nim and the audio callback thread |
19:41:01 | Zevv | no magic |
19:41:06 | Zevv | except for the c_printf() inside the thread |
19:41:12 | Araq | DeltaPHC, 'sink T' and 'lent T' are generally available and optimizations |
19:41:25 | Araq | for value-based datatypes |
19:41:27 | FromDiscord | <DeltaPHC> Ahh |
19:41:33 | lqdev[m] | Zevv: try that on a slow machine and see how compatible it is |
19:42:11 | lqdev[m] | it's very likely that you'll have to increase the buffer size to ludicrous amounts |
19:42:13 | lqdev[m] | s/buffer/ring buffer |
19:42:47 | Zevv | but why?! |
19:43:58 | Zevv | works fine with a 4k buffer for me, as long as the nim side takes care to keep the ringbuffer filled up |
19:44:00 | Araq | the 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:28 | Zevv | lqdev[m]: I still do not understand what your underlying problem is |
19:44:56 | lqdev[m] | you don't need to understand, I know how to fix it |
19:45:06 | lqdev[m] | I guess my engine goes against conventions lol |
19:45:45 | Araq | and 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:27 | Zevv | lqdev[m]: ok, good luck then |
19:47:44 | Araq | ok, nobody cares good, back to bugfixing |
19:47:59 | FromDiscord | <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:17 | zedeus | thank you for the summary |
19:49:27 | FromDiscord | <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:39 | lqdev[m] | mratsim: this comes close https://nim-lang.org/docs/manual.html#type-relations |
19:49:48 | Araq | Rust makes entirely different tradeoffs |
19:50:23 | Araq | Rust tracks stack-like memory via its borrowing annotations but heap-like memory is usually refcounted |
19:50:47 | FromDiscord | <DeltaPHC> Only if you make it refcounted, but yeah |
19:50:53 | Araq | as it has no other option, lifetimes don't model a heap |
19:51:12 | FromDiscord | <arnetheduck> Hindler-Milner |
19:51:14 | FromDiscord | <Kiloneie> Does the Rust author talk to his users as much as ours does ? |
19:51:27 | FromDiscord | <DeltaPHC> There isn't a single "Rust author" these days |
19:51:33 | Araq | yup :-) |
19:52:02 | FromDiscord | <DeltaPHC> There is a guy who invented Rust who isn't involved in its development anymore (though he still uses the language) |
19:52:56 | FromDiscord | <DeltaPHC> Dev is managed by a small team, plus whatever contributions they get |
19:54:28 | Araq | dunno about the "small team", Rust feels big |
19:54:49 | Araq | they had a gorilla in their team once |
19:54:58 | FromDiscord | <DeltaPHC> lmao |
19:55:16 | FromDiscord | <Kiloneie> What do you mean by a "gorilla" oO ? |
19:55:36 | * | matlock joined #nim |
19:55:55 | clyybber | Araq: Haskell uses HM and has overloading? Do you have a source where it shown to be NP? |
19:56:23 | FromDiscord | <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:57 | Araq | sure, I'm a bit hand-wavy about it |
20:00:00 | Araq | clyybber, meh, I'm rusty. IIRC HM for ML already is only fixed parameter tractable |
20:00:45 | Araq | and the fixed parameter is the number of let-bindings |
20:00:54 | Araq | but don't quote me on that... |
20:02:08 | lqdev[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:16 | Araq | https://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:30 | Araq | https://pdfs.semanticscholar.org/c57f/35b665caa96743fc9e88e0a8052d53a02e9c.pdf |
20:05:44 | Araq | "s. In Sections 2â7 we will explain in detail why overloading resolution is NP-complete |
20:05:44 | Araq | for an important case: a Îŧ-calculus with overloading." |
20:05:54 | Araq | close enough :P |
20:07:14 | lmariscal | dom96 does the nimble file supports branch specifics? like the nimble isntall |
20:07:23 | FromDiscord | <Shield> @lqdev[m] why would the audio thread crash the whole program? |
20:07:36 | dom96 | lmariscal, nimble file supports everything the nimble install command supports |
20:07:43 | dom96 | just without the `@` |
20:08:00 | clyybber | Araq: Interesting, thanks |
20:09:28 | * | navinmis_ quit (Ping timeout: 245 seconds) |
20:09:32 | lmariscal | it 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:42 | lmariscal | it both happens with @# and just # |
20:10:17 | * | adeohluwa joined #nim |
20:10:37 | lmariscal | requires "nimgl#1.0 >= 1.0.0" to be more specific about the >= |
20:10:58 | dom96 | you're specifying two version requirements |
20:11:00 | dom96 | you can't do that |
20:11:37 | dom96 | You either ask Nimble for a nimgl that's greater than or equal to 1.0 |
20:11:45 | dom96 | or you ask it for a nimgl at commit hash "1.0" |
20:12:05 | lmariscal | that makes so much more sense thank you dom96! |
20:12:07 | * | mwbrown quit (Ping timeout: 245 seconds) |
20:14:08 | dom96 | lock 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:13 | dom96 | I guess that is what you were trying to achieve here |
20:14:21 | * | mwbrown joined #nim |
20:19:46 | FromDiscord | <Kiloneie> @Araq how long did it take for your video to render ? |
20:22:22 | lmariscal | Do 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:32 | FromGitter | <timotheecour> @araq yes, back here |
20:28:48 | dom96 | I can't help but cringe at that commercial still |
20:29:26 | dom96 | Araq, you did improve it according to my feedback though so I am happy |
20:30:52 | dom96 | Araq, can you send me the raw video file so I can tweet it? |
20:31:15 | FromDiscord | <Kiloneie> what did you suggest ? |
20:31:26 | clyybber | dom96: Just tweet the link to youtube |
20:31:35 | clyybber | I think most people would prefer it that way |
20:31:47 | dom96 | I don't think so |
20:31:49 | FromDiscord | <Kiloneie> i told him white clouds for text boxes is not a great idea D:, he improved it some |
20:33:17 | clyybber | dom96: You can't change the video quality on twitter, youtube videos can be embedded into a tweet. |
20:34:30 | dom96 | clyybber, 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:59 | clyybber | Will the target audience not be annoyed by that autoplay? I know I am |
20:35:16 | FromDiscord | <Kiloneie> Same -.-, autoplay should BURN ! |
20:36:27 | * | adeohluwa quit (Remote host closed the connection) |
20:36:34 | dom96 | Yes, 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:54 | FromDiscord | <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:54 | FromDiscord | <Kiloneie> |
20:36:54 | FromDiscord | <Kiloneie> LINK: https://youtu.be/TB5b_AO84U8 |
20:38:24 | clyybber | Whats the most simple way to strip trailing whitespace of a string? |
20:39:10 | FromDiscord | <exelotl> clyybber there's strip in strutils |
20:39:13 | FromDiscord | <exelotl> https://nim-lang.org/docs/strutils.html#strip%2Cstring%2Cset%5Bchar%5D |
20:39:14 | FromGitter | <zetashift> `strip`? |
20:39:25 | FromGitter | <zetashift> ah shit exelotl just a bit faster with the link |
20:39:32 | clyybber | Ah, thanks |
20:39:37 | FromDiscord | <exelotl> yeet |
20:44:42 | lqdev[m] | it works!! I fixed the bugs!!! |
20:44:51 | Zevv | so, what was your problem then |
20:44:56 | Zevv | not your memory, right? :) |
20:45:32 | lqdev[m] | nope, in the end I made the buffer way smaller |
20:45:33 | lqdev[m] | I stream the audio on small chunks of 256 frames now |
20:45:40 | Zevv | that makes sense |
20:45:40 | lqdev[m] | the problem I encountered later was actually way more stupid |
20:46:11 | lqdev[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:24 | lqdev[m] | why the `* 2`? because stereo |
20:46:25 | * | Vladar quit (Remote host closed the connection) |
20:46:35 | Zevv | Yes, and every audio lib has a different notion of 'frame' |
20:46:48 | Zevv | for some a frame is a sample, for some a frame is a bunch of samples for all channels |
20:46:56 | lqdev[m] | well, in soundio it's basically just audio samples |
20:47:08 | Zevv | well, good news then \o/ |
20:47:16 | * | Serrellanos joined #nim |
20:47:30 | lqdev[m] | I still prefer that second definition though |
20:48:05 | Zevv | same here. frame >= sample |
20:49:32 | lqdev[m] | so I'm happy to announce that rapid/audio is actually somewhat usable now https://github.com/liquid600pgm/rapid |
20:49:43 | lqdev[m] | I'd be really happy if someone could test it on their hardware |
20:49:51 | lqdev[m] | `nim c -r tests/taudio` |
20:50:17 | disruptek | holy smokes. |
20:50:19 | Zevv | Beeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep |
20:50:22 | disruptek | i never thought i'd see the day. |
20:50:24 | FromGitter | <alehander42> mratsim i answered with https://discourse.julialang.org/t/version-1-0-released-of-nim-programming-language/29099/53?u=alehander42 |
20:50:32 | disruptek | congrats, lq |
20:50:42 | FromGitter | <alehander42> but it might be not a good answer, so feel free to add another |
20:50:55 | Zevv | actually, it's Beeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeep |
20:51:00 | Zevv | ^ note the whitespace |
20:51:03 | lqdev[m] | ooh that's weird |
20:51:11 | lqdev[m] | it stutters? |
20:51:22 | Zevv | a tad |
20:51:29 | lqdev[m] | maybe it's the latency, I should make it configurable |
20:52:59 | Zevv | Add an underflow_callback as well for diagnostic purposes |
20:53:27 | Zevv | it'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:29 | lqdev[m] | I think I did that some time ago? I don't know where it went lol |
20:53:50 | Zevv | anyway, I'm out. Enjoy! |
20:53:56 | lqdev[m] | I probably removed it to prevent crashes |
20:55:39 | lqdev[m] | I'll add an `underruns` property to RAudioDevice, to help diagnose problems |
20:56:17 | * | narimiran quit (Ping timeout: 245 seconds) |
20:59:55 | FromDiscord | <Pat> So is this lang going to make its way into the industry or what? |
21:00:04 | FromDiscord | <Pat> What's this lang currently most useful for? |
21:00:27 | lqdev[m] | we can only hope that it'll make its way up the charts |
21:00:46 | FromGitter | <zetashift> @Pat 1.0.0 was just released so we're still expanding ecosystem and tooling |
21:00:56 | FromDiscord | <Pat> Once you can build desktop applications with it I bet it wiil |
21:01:04 | lqdev[m] | I personally use it for game and app development |
21:01:29 | Yardanico | @Pat well nobody stops you from building desktop applications with nim right now :) |
21:01:41 | FromDiscord | <Pat> Really? Is there libraries made for that or you reinvent the wheel? |
21:01:46 | clyybber | I also do gamedev and all the related stuff in nim |
21:01:57 | FromDiscord | <Shield> is this the "godots has no games yet therefore i won't use it" argument lol |
21:02:01 | Yardanico | https://github.com/search?o=desc&q=language%3ANim+GUI&s=stars&type=Repositories |
21:02:03 | FromDiscord | <Shield> godot* |
21:02:10 | FromDiscord | <Pat> When I stumbled across this language Im pretty puzzled as to why this isn't being fastracked |
21:02:15 | Yardanico | and https://nimble.directory/search?query=GUI |
21:02:49 | FromDiscord | <DeltaPHC> Well like any language, libraries don't just magically appear. Someone has to code it |
21:03:04 | FromDiscord | <Pat> Right but the concept entirely is solid |
21:03:08 | FromDiscord | <Shield> people in production are very wary of non mainstream languages |
21:03:57 | FromDiscord | <Pat> C and cpp are dinosaur langs with extreme power.. building a high level programming language to act as a transpiler |
21:04:02 | FromDiscord | <Pat> is just genius |
21:04:56 | FromDiscord | <Pat> Doing away with the VM langs and putting work into transpilers could be the way to go? |
21:05:00 | FromDiscord | <DeltaPHC> It's not a new idea |
21:05:08 | FromGitter | <alehander42> careful with the transpiler's thing |
21:05:10 | FromGitter | <alehander42> :P |
21:05:31 | FromGitter | <alehander42> kidding, but more seriously, it doesnt really matter so much it transpiles to C /C++ imo |
21:05:36 | FromDiscord | <Pat> well yeah it's not a new idea NIM has been around a bit |
21:05:39 | FromGitter | <alehander42> its aaaalmost an implementation detail |
21:05:46 | FromGitter | <alehander42> it could target llvm |
21:05:52 | FromGitter | <alehander42> there are pro-s and con-s |
21:06:01 | FromGitter | <alehander42> of targgeting C, but it's really low level C |
21:06:08 | FromDiscord | <Pat> But it generates native code as a high level language correct? |
21:06:20 | clyybber | alehander42: s/could/can |
21:06:23 | FromGitter | <alehander42> it generates native code, yes |
21:06:28 | FromDiscord | <Pat> These kinds of languages are the future I know it. |
21:06:36 | FromGitter | <alehander42> clyybber is right, actually nim does have a llvm backend |
21:06:39 | Yardanico | @Pat Nim has a LLVM backend |
21:06:58 | Yardanico | it's unofficial though, but in the future could maybe become official |
21:07:02 | FromGitter | <alehander42> so targgeting C is nice, but not the most important part of nim |
21:07:59 | FromDiscord | <Pat> Of course not |
21:08:14 | FromDiscord | <Pat> Nim's power lies in the concepts it brings from other langs and the new ones it presents |
21:08:21 | clyybber | Pat: It can even target javascript |
21:08:39 | FromDiscord | <Pat> Yeah I love how its trying to support backend and frontend development |
21:09:03 | FromDiscord | <Pat> I saw crystal-lang and honestly it looks gross to me. |
21:10:12 | FromDiscord | <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:29 | FromDiscord | <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:35 | FromGitter | <alehander42> everything that you'd use go for |
21:10:39 | FromGitter | <alehander42> ok, most of it |
21:11:00 | FromDiscord | <Kiloneie> you can watch my videos to get started :), for beginners... |
21:11:02 | FromGitter | <alehander42> e.g. cli tools/TUI interfaces/some services |
21:11:10 | FromDiscord | <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:43 | FromGitter | <zetashift> Nim even works on the Switch and GBA! |
21:11:48 | FromDiscord | <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:00 | FromDiscord | <DeltaPHC> You still have to make special considerations for constrained/exotic platforms, but that applies to any language |
21:12:10 | FromGitter | <alehander42> you have two options here: nim native ui frameworks and e.g. electron |
21:12:12 | FromDiscord | <Pat> Java got very wishy washy with their "cross-platform" gui libs |
21:12:30 | FromDiscord | <Pat> I am a reinvent the wheel kind of guy and im interested in working on a 2d graphics lib for nim |
21:12:36 | FromGitter | <alehander42> mostly saying it to ensure that nim can be used most of the places where javascript can too |
21:13:09 | FromGitter | <alehander42> guys, i have a weird nimble error |
21:13:10 | FromGitter | <alehander42> Could not read package info file in /home/al/diff/diff.nimble; |
21:13:28 | FromGitter | <alehander42> Invalid field: /home/al/diff/diff_4180.nims. |
21:13:51 | FromDiscord | <DeltaPHC> Well, Nim has bindings for SDL2, GLFW, OpenGL. If you want to reinvent the wheel, the basics are there |
21:13:58 | FromDiscord | <DeltaPHC> And probably vulkan I think? |
21:14:04 | dom96 | alehander42: nimble ver? |
21:14:20 | clyybber | DeltaPHC: Yep, I have vulkan bindings. |
21:14:21 | FromGitter | <alehander42> huh, 0.10.2 |
21:14:23 | FromGitter | <zetashift> Is there a way to update nimble itself? |
21:14:29 | FromDiscord | <treeform> @Pat that is what I am working on UI apps that looks the same on all platforms: |
21:14:30 | FromGitter | <alehander42> isn't `koch nimble` in the 1.0.0 repo enough |
21:14:32 | dom96 | nimble install nimble |
21:14:35 | FromDiscord | <treeform> |
21:14:36 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/626889381529124865/unknown.png |
21:14:54 | FromGitter | <zetashift> sweet thanks dom |
21:14:57 | dom96 | (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:00 | FromGitter | <alehander42> @dom96 nice, thanks |
21:15:02 | dom96 | *make sure |
21:15:36 | FromGitter | <zetashift> I'm just using choosenim so they are all in ~/.nimble/bin right? |
21:15:56 | dom96 | in fact, I think `koch nimble `should put nimble into ~/.nimble/bin |
21:16:24 | FromGitter | <alehander42> the thing is `koch nimble` seemed to generate |
21:16:28 | FromGitter | <alehander42> is nimble a submodule? |
21:16:35 | FromGitter | <alehander42> of the nim repo |
21:16:57 | FromGitter | <alehander42> i probably havent updated the submodule, thats why, nimble install nimble fixed it tho |
21:17:43 | dom96 | it's not |
21:17:55 | dom96 | `koch nimble` clones it |
21:18:20 | * | skoude joined #nim |
21:18:32 | FromGitter | <alehander42> ok, it works now |
21:22:26 | * | skoude quit (Ping timeout: 240 seconds) |
21:22:28 | FromDiscord | <Pat> @treeform That's amazing |
21:23:01 | FromDiscord | <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:41 | disruptek | how many more decades, do you think? |
21:26:11 | FromDiscord | <Kiloneie> less than one please :))))) |
21:30:33 | clyybber | How do I use a string stream at compile time? |
21:30:53 | clyybber | I know that krux02 made it work, but I still get Error: limited VM support for 'addr' |
21:31:07 | FromDiscord | <treeform> @Pat thanks |
21:31:51 | disruptek | i 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:36 | clyybber | disruptek: Its so weird because https://github.com/nim-lang/Nim/pull/10746#issuecomment-468256300 this works |
21:35:03 | disruptek | i know, it's voodoo. |
21:36:03 | * | Hideki_ joined #nim |
21:36:19 | disruptek | btw, 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:14 | disruptek | and 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:56 | FromDiscord | <Pat> A json parser is a fun college project lol |
21:42:18 | disruptek | nim already has at least three. |
21:42:43 | FromDiscord | <Kiloneie> yeah a lot, make a different one xD... |
21:43:25 | FromDiscord | <Kiloneie> Documentation needs work, libraries etc... quite a bit of work, you can have a look there |
21:44:19 | clyybber | Hmm, well I mentioned it in the PR now. |
21:44:26 | clyybber | Good night |
21:44:35 | * | clyybber quit (Quit: WeeChat 2.6) |
21:48:34 | lqdev[m] | zetashift: Nim works on GBA!? hook me up |
21:50:04 | krux02 | clyybber: I don't know about string streams, I just know about parsers that I made work at compile time. |
21:50:16 | krux02 | but it was related to string streams. |
21:50:55 | krux02 | disruptek, what do you want to parse at compile time? |
21:52:14 | * | daddoo quit (Quit: Leaving) |
21:55:18 | FromGitter | <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:11 | FromGitter | <Araq> proc malloc(size: int): pointer {.importc, header: "<stdlib.h>".}Â |
22:01:06 | Araq | don't use allocShared and stuff, if the C lib wants malloc, use malloc |
22:03:32 | Araq | good night |
22:12:19 | * | sealmove joined #nim |
22:12:56 | * | sentreen_ joined #nim |
22:14:51 | * | sentreen quit (Ping timeout: 240 seconds) |
22:18:25 | FromGitter | <jason_koch_twitter> well, it makes sense |
22:18:36 | FromGitter | <jason_koch_twitter> i had wondered if there was a more nim way but malloc will work |
22:19:05 | FromGitter | <jason_koch_twitter> thanks |
22:20:16 | * | Serrellanos quit (Ping timeout: 240 seconds) |
22:21:03 | sealmove | "nimmy way" sounds better |
22:21:29 | sealmove | or "a nimmier way" |
22:21:58 | Araq | "nimish way" |
22:27:27 | FromDiscord | <Rika> how do i expect a proc as an arg |
22:27:40 | FromDiscord | <Rika> the one i tried expects one with a closure pragma |
22:28:05 | Araq | proc p(callme: proc () {.nimcall.}) |
22:28:30 | FromDiscord | <Rika> return type still uses colon? |
22:28:39 | FromDiscord | <Rika> proc (): int {... |
22:28:39 | FromDiscord | <Rika> ? |
22:29:03 | disruptek | you can create a type signature (as a type) and use that. |
22:29:27 | disruptek | (yes, it still uses a colon) |
22:30:24 | rayman22201 | random 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:25 | FromDiscord | <mratsim> I don't think it's low priority |
23:04:12 | FromDiscord | <mratsim> it's a pain with higher order function |
23:04:59 | FromGitter | <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:42 | exelotl | lqdev[m]: yes! here's the framework I'm using: https://github.com/exelotl/nim-tonc |
23:21:03 | FromGitter | <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:32 | FromGitter | <zacharycarter> I am getting a sigsev when attempting to dealloc a cstringarray |
23:38:58 | FromGitter | <awr1> how are you deallocing |
23:39:44 | FromGitter | <zacharycarter> https://gist.github.com/zacharycarter/d9b76f78b2405959edac59b0403fb8f6 |
23:39:51 | FromGitter | <zacharycarter> failing on the last line of that proc |
23:40:04 | FromGitter | <awr1> @rayman22201 how do you mean |
23:40:17 | FromGitter | <awr1> do you mean as a proc literal or just a normal proc decl |
23:41:42 | rayman22201 | as @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:23 | rayman22201 | formal parameter declarations |
23:42:55 | FromGitter | <awr1> ironically @zacharycarter somone had a similar problem to you in a similar context |
23:42:56 | FromGitter | <awr1> https://forum.nim-lang.org/t/3037 |
23:43:24 | FromGitter | <zacharycarter> thanks |
23:47:05 | FromGitter | <awr1> @zacharycarter try after `outExtensions.setLen(extCount)` |
23:47:39 | FromGitter | <awr1> `outExtensions.applyIt(it = VK_MAX_EXTENSION_NAME_SIZE.spaces())` |
23:48:12 | FromGitter | <awr1> remove the `it = `, was accidental |
23:49:31 | FromGitter | <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:36 | FromGitter | <zacharycarter> that seems to work fine and is simpler |
23:49:59 | FromGitter | <awr1> i haven't used the SDL functions for creating vulkan instances but normally you just get a struct back |
23:52:02 | FromGitter | <awr1> Ohhhhhhhhh |
23:52:08 | FromGitter | <awr1> i think SDL allocates for you lol |
23:53:58 | FromGitter | <zacharycarter> weird |
23:54:51 | FromGitter | <awr1> do something like |
23:54:56 | FromGitter | <awr1> `var extNames = cast[pointer](alloc0(sizeof(cstring) * extCount))` |
23:54:57 | FromGitter | <awr1> `dealloc(cast[pointer](extNames))` |
23:56:45 | FromGitter | <awr1> i mean |
23:56:50 | FromGitter | <zacharycarter> that seems to work |
23:56:57 | FromGitter | <awr1> `var extNames = cast[cstringarray](alloc0(sizeof(cstring) * extCount))` |
23:56:58 | FromGitter | <awr1> yeah |
23:57:10 | FromGitter | <zacharycarter> cool thanks |
23:57:23 | FromGitter | <awr1> the reason i think this works is because when you do the `allocCStringArray` nim reserves space multidimensionally |
23:57:45 | FromGitter | <zacharycarter> ah okay |
23:58:11 | FromGitter | <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:39 | FromGitter | <zacharycarter> that makes sense |