00:11:08 | * | D_ quit (Ping timeout: 260 seconds) |
00:14:27 | * | eburk quit (Quit: WeeChat 2.9) |
00:31:00 | * | abm quit (Quit: Leaving) |
00:35:58 | FromDiscord | <19> is this how i bind this c struct to nim? https://pastebin.com/YCxenvT0 |
00:41:52 | FromDiscord | <shashlick> Just run c2nim on it and see the output |
00:58:58 | FromDiscord | <Elegant Beef> Is there a tool like c2nim for js? |
01:04:09 | FromDiscord | <19> @shashlick is it supposed to give usable code instantly? |
01:04:36 | FromDiscord | <19> it needs some tweaking right? i am using it in fact to generate |
01:09:38 | * | CcxWrk quit (Remote host closed the connection) |
01:09:53 | * | CcxWrk joined #nim |
01:10:14 | * | my_dude quit (Quit: ZZZzzz…) |
01:15:45 | * | Tanger joined #nim |
01:21:47 | * | Tanger is now known as Tanker |
01:27:47 | * | apahl quit (Ping timeout: 240 seconds) |
01:29:59 | * | apahl joined #nim |
01:36:51 | * | Zectbumo quit (Remote host closed the connection) |
01:45:50 | FromDiscord | <shashlick> @19 sure it works great for simple stuff like your snippet |
01:46:12 | FromDiscord | <shashlick> @Elegant Beef not to my knowledge |
02:02:36 | * | matlock joined #nim |
02:32:01 | * | Zectbumo joined #nim |
02:35:51 | * | bozaloshtsh_ quit (Quit: ZNC 1.7.5 - https://znc.in) |
02:36:03 | * | bozaloshtsh joined #nim |
02:36:03 | * | bozaloshtsh quit (Changing host) |
02:36:03 | * | bozaloshtsh joined #nim |
02:37:11 | * | muffindrake quit (Ping timeout: 272 seconds) |
02:38:58 | * | muffindrake joined #nim |
02:57:22 | * | sagax quit (Quit: Konversation terminated!) |
03:35:31 | * | rockcavera quit (Remote host closed the connection) |
03:48:18 | * | arecacea1 quit (Remote host closed the connection) |
03:49:10 | * | arecacea1 joined #nim |
04:02:48 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:33 | * | supakeen joined #nim |
04:06:56 | FromDiscord | <juan_carlos> Ive seen a "ts2nim" on github I think... |
04:09:09 | FromDiscord | <Elegant Beef> Yea i've seen it aswell, i was curious if there was something to autogenerate bindings |
04:10:32 | * | thomasross quit (Ping timeout: 256 seconds) |
04:12:01 | * | gangstacat quit (Quit: Ĝis!) |
04:12:55 | * | kinkinkijkin joined #nim |
04:22:43 | * | vicfred quit (Quit: Leaving) |
04:24:22 | * | vicfred joined #nim |
04:26:12 | * | gangstacat joined #nim |
04:31:01 | * | sagax joined #nim |
04:31:17 | FromDiscord | <flywind> It is also in vscode extension. |
04:31:48 | * | shad0w_ joined #nim |
04:33:54 | FromDiscord | <flywind> If you search `nim` in vscode-extension, you can find many Nim extensions. |
04:35:40 | FromDiscord | <JSGRANT> @juan_carlos Seems somewhat active https://github.com/bung87/ts2nim |
04:37:33 | * | gour joined #nim |
04:41:34 | * | my_dude joined #nim |
04:50:38 | FromDiscord | <Avatarfighter> The rust backend is going to be so good guys amirite |
04:51:20 | FromDiscord | <Rika> ? |
04:51:30 | FromDiscord | <Avatarfighter> what rika |
04:51:42 | FromDiscord | <Avatarfighter> you havent heard of this totally real and upcoming backend!? |
04:51:46 | FromDiscord | <Rika> whos making a rust backend |
04:51:56 | FromDiscord | <Avatarfighter> idk |
04:52:05 | FromDiscord | <Avatarfighter> but since ur offering as of now when is ETA 😛 |
04:52:42 | FromDiscord | <Rika> `since ur offering as of now when is ETA`↵this is shortcircuiting my english processing |
04:52:51 | FromDiscord | <Rika> what does this mean |
04:53:09 | FromDiscord | <Rika> "since you're offering, as of now, when is ETA" |
04:53:09 | FromDiscord | <Rika> okay |
04:53:10 | FromDiscord | <Rika> got it |
04:53:21 | FromDiscord | <Avatarfighter> Sorry about that I should've included proper grammar |
04:54:47 | * | solitudesf joined #nim |
04:58:14 | FromDiscord | <JSGRANT> Think pas2nim is pretty much dead sadly; Was toying around with the idea of trying to port some of Castle as learning-project for game-engine architecture |
05:00:23 | FromDiscord | <JSGRANT> Find the idea of C2Nim prety funny, step-wise. Going C -> Nim -> C lol |
05:00:32 | FromDiscord | <Rika> lol |
05:01:09 | FromDiscord | <JSGRANT> I get the intent is for the actual 'interaction level' is to be in Nim (moved from C) but the actual steps is a bit quirky / cute. |
05:09:28 | * | narimiran joined #nim |
06:01:36 | * | kenran joined #nim |
06:04:42 | * | my_dude quit (Quit: ZZZzzz…) |
06:09:53 | * | my_dude joined #nim |
06:12:55 | * | DecentDev joined #nim |
06:19:25 | * | NimBot joined #nim |
06:20:28 | * | bung joined #nim |
06:20:33 | * | mmohammadi9812 joined #nim |
06:24:45 | * | DecentDev quit (Quit: DecentDev) |
06:25:56 | * | mmohammadi9812 quit (Ping timeout: 272 seconds) |
06:27:23 | * | shad0w_ quit (Ping timeout: 240 seconds) |
06:30:32 | * | my_dude quit (Ping timeout: 260 seconds) |
06:31:00 | * | Cthalupa quit (Ping timeout: 272 seconds) |
06:31:45 | * | Cthalupa joined #nim |
06:34:29 | * | PMunch joined #nim |
06:53:43 | FromDiscord | <flywind> Can I make docs search work? |
06:53:51 | FromDiscord | <flywind> https://planety.github.io/prologue/coreapi/prologue/core/application.html |
06:55:02 | * | shad0w_ joined #nim |
06:55:50 | * | DecentDev joined #nim |
06:55:57 | FromDiscord | <flywind> Is there easy way to generate/host multiple versions of API docs? |
06:56:46 | FromDiscord | <hobbledehoy> to make the search work you need to build the index html file from the idx files |
06:57:11 | FromDiscord | <hobbledehoy> https://nim-lang.org/docs/docgen.html↵it is shown in the second code block here |
07:01:33 | FromDiscord | <flywind> Thanks, But I don't know which code block? |
07:02:16 | FromDiscord | <flywind> sent a code paste, see https://play.nim-lang.org/#ix=2yzp |
07:02:32 | FromDiscord | <flywind> This is my nimble task to generate docs. |
07:02:38 | FromDiscord | <hobbledehoy> that should work |
07:03:18 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/758584325297143818/unknown.png |
07:03:24 | FromDiscord | <hobbledehoy> if you open up the requests tab in developers tool and try to search on your docs page↵you should see theindex.html be loaded in a xhr request |
07:04:02 | FromDiscord | <hobbledehoy> yup 404 |
07:04:43 | FromDiscord | <hobbledehoy> it is trying to load theindex.html relative to the page↵I tested https://planety.github.io/prologue/coreapi/prologue/core/application.html↵and this was the 404↵https://planety.github.io/prologue/coreapi/prologue/core/theindex.html |
07:04:56 | * | Zectbumo_ joined #nim |
07:05:08 | * | LuckyMan joined #nim |
07:05:50 | * | Zectbumo_ quit (Remote host closed the connection) |
07:05:52 | FromDiscord | <flywind> Maybe I generate theindex docs to wrong directories, I will check it. Thanks! |
07:06:18 | FromDiscord | <hobbledehoy> I think this might be an issue with the dochack.js or whatever does the searching |
07:06:22 | * | LuckyMan quit (Quit: Leaving) |
07:06:42 | FromDiscord | <alehander42> hey! |
07:09:16 | FromDiscord | <hobbledehoy> wait, wouldn't a 404 would still occur if it loaded at the root wouldn't it?↵cause it is located at https://planety.github.io/prologue/coreapi/theindex.html |
07:09:28 | PMunch | @flywind, you can use jsondoc to generate the docs in JSON format |
07:09:44 | PMunch | That should make it easier to ingest into a database and serve it how you like it |
07:09:51 | PMunch | If that is what you're trying to do |
07:14:18 | FromDiscord | <flywind> I just want to use the basic function of docs 🙂 |
07:15:40 | * | shad0w_ quit (Remote host closed the connection) |
07:15:48 | FromDiscord | <hobbledehoy> now this is a terrible idea but it might be worth a shot↵you could read the dochack.js file, a replace `theindex.html` which `https://planety.github.io/prologue/coreapi/theindex.html`, then write the updated file back |
07:15:56 | FromDiscord | <hobbledehoy> (edit) 'which `https://planety.github.io/prologue/coreapi/theindex.html`,' => 'with`https://planety.github.io/prologue/coreapi/theindex.html`,' |
07:16:51 | FromDiscord | <hobbledehoy> (edit) removed 'a' |
07:17:47 | FromDiscord | <flywind> Thanks, I will check it. |
07:19:24 | * | nyd joined #nim |
07:24:04 | * | shad0w_ joined #nim |
07:43:09 | * | vicfred quit (Remote host closed the connection) |
07:43:30 | * | vicfred joined #nim |
07:44:24 | * | DecentDev quit (Quit: DecentDev) |
07:45:14 | * | hobbledehoy joined #nim |
08:02:05 | * | shad0w_ quit (Ping timeout: 240 seconds) |
08:05:52 | FromDiscord | <flywind> Fortunately, I find `dochack.js` will be only built once, it is safe to hack it. |
08:06:11 | FromDiscord | <flywind> return absolute path to dochack.js, rebuilding if it doesn't exist or if↵ `forceRebuild`. |
08:06:45 | * | shad0w_ joined #nim |
08:09:09 | * | shad0w_ quit (Remote host closed the connection) |
08:09:31 | * | shad0w_ joined #nim |
08:10:37 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:12:08 | * | krux02 joined #nim |
08:24:46 | FromDiscord | <flywind> wait, it still rebuilds dohack.js |
08:42:09 | * | abm joined #nim |
08:43:03 | * | hobbledehoy quit (Quit: hobbledehoy) |
08:44:01 | Araq | benchmark time |
08:44:28 | Araq | markAndSweep: Requests/sec: 518.46 |
08:44:37 | Araq | ORC: Requests/sec: 13799.44 |
08:45:04 | Araq | my benchmark is carefully crafted to make a point :P |
08:45:23 | FromDiscord | <Vindaar> Ehm, that is ridiculous in a good way, haha. well done 🙂 |
08:45:58 | Araq | Latency 764.22us 677.35us |
08:46:11 | Araq | (Orc) |
08:46:12 | Araq | vs |
08:46:13 | FromDiscord | <Rika> looks insane |
08:46:16 | Araq | Latency 60.14ms 72.18ms (M&S) |
08:46:27 | FromDiscord | <Rika> whats this benchmarking exactly |
08:46:30 | FromDiscord | <Rika> like |
08:46:31 | FromDiscord | <Rika> rather |
08:46:39 | FromDiscord | <Rika> how is the benchmark done or smth |
08:47:25 | Araq | https://gist.github.com/Araq/7c17558d216488ad45fd6190507a9ad4 |
08:48:00 | Araq | async hello world when you also have a liveset of about 130MB |
08:49:51 | FromDiscord | <flywind> does orc work with threads? |
08:50:02 | FromDiscord | <flywind> (edit) 'threads?' => 'threads well?' |
08:50:47 | Araq | see my RFC for its limitations, but it does work better than the old GCs |
08:50:54 | Araq | with threads |
08:53:47 | * | kenran quit (Ping timeout: 260 seconds) |
08:57:02 | FromDiscord | <flywind> I can't compile jester with `orc`. |
08:57:12 | Araq | why not? |
08:57:59 | FromDiscord | <flywind> (edit) 'compile' => 'use' | 'usejester with `orc`. ... ' => 'usejester with `orc`.It causes SIGSEGV: Illegal storage access..' |
08:58:05 | * | superbia1 joined #nim |
08:59:57 | Araq | ah so what, use the stdlib |
09:00:18 | Araq | or give me a tiny program demonstrating the problem |
09:01:09 | FromDiscord | <flywind> https://github.com/planety/prologue/blob/devel/tests/test_readme/b_jester.nim |
09:01:22 | FromDiscord | <flywind> Just a simple program. |
09:01:25 | * | superbia quit (Ping timeout: 264 seconds) |
09:01:27 | Araq | thanks |
09:01:40 | Araq | what version of jester? |
09:01:54 | FromDiscord | <flywind> jester@#head |
09:03:25 | FromDiscord | <flywind> Nim Compiler Version 1.3.7 [Linux: amd64]↵Compiled at 2020-09-21 |
09:03:55 | Araq | your Nim is 3 days old! you're living in the past! |
09:04:00 | FromDiscord | <alehander42> 😄 😄 |
09:04:23 | FromDiscord | <flywind> Ok, I will update Nim compiler and try again. |
09:04:25 | FromDiscord | <Recruit_main707> yikes, i am on 1.3.5 |
09:04:28 | * | Trustable joined #nim |
09:06:11 | Araq | flywind: no need, we didn't change orc in these three days |
09:06:22 | FromDiscord | <flywind> lol |
09:06:48 | Araq | but I'm fixing my cursor inference... so you can retry tomorrow |
09:07:43 | FromDiscord | <flywind> all right |
09:10:05 | * | Tanker quit (Remote host closed the connection) |
09:10:57 | FromDiscord | <ShalokShalom> Orc is the new garbage collector? |
09:12:35 | Araq | yeah |
09:12:50 | FromDiscord | <ShalokShalom> Thanks a lot |
09:14:32 | FromDiscord | <flywind> more info |
09:14:33 | FromDiscord | <flywind> https://play.nim-lang.org/#ix=2yA1 |
09:14:44 | FromDiscord | <flywind> It crashed when I benchmark jester with orc. |
09:16:51 | FromDiscord | <flywind> It's ok when I use default gc or make threads off. |
09:17:58 | FromDiscord | <hobbledehoy> import segfaults↵might give more info |
09:18:27 | Araq | you can also run it under valgrind with -d:useMalloc -g |
09:19:40 | FromDiscord | <- D I S A S T E R> hello |
09:20:27 | FromDiscord | <- D I S A S T E R> how do i post a multipart data via https and download the file i recive then? |
09:21:10 | FromDiscord | <flywind> with `-d:useMalloc -g` and it works now. |
09:21:43 | Araq | hah, I'm sure the bug is real |
09:22:47 | FromDiscord | <- D I S A S T E R> sent a code paste, see https://play.nim-lang.org/#ix=2yA3 |
09:23:10 | FromDiscord | <- D I S A S T E R> i am new to nim lel |
09:26:35 | FromDiscord | <- D I S A S T E R> here the server code i want to write that client for |
09:26:38 | FromDiscord | <- D I S A S T E R> https://git.ucode.space/Phil/youtubedl-webui/src/branch/master/main.py |
09:26:51 | Oddmonger | maybe starting with simpler things… |
09:27:16 | FromDiscord | <- D I S A S T E R> not an option |
09:27:31 | FromDiscord | <lqdev> does {.experimental.} only enable experimental features for a specific scope, eg. in a proc? |
09:27:42 | Araq | it's module-wise |
09:27:48 | FromDiscord | <lqdev> ok |
09:28:29 | FromDiscord | <- D I S A S T E R> i just want to pass a youtube url and get the file |
09:28:42 | FromDiscord | <- D I S A S T E R> "should" be simple |
09:29:00 | Araq | sure, everything should be simple, especially programming |
09:29:05 | Oddmonger | you cannot get youtube videos that simple, anyway |
09:29:07 | FromDiscord | <lqdev> why not just use youtube-dl? |
09:29:11 | Oddmonger | use a dedicated tool |
09:30:03 | FromDiscord | <- D I S A S T E R> ? |
09:30:19 | Oddmonger | like youtube-dl, as lqdev suggests |
09:30:33 | FromDiscord | <- D I S A S T E R> dude read what i wrote |
09:30:57 | FromDiscord | <- D I S A S T E R> i want to write a client for our downloader |
09:31:11 | FromDiscord | <hobbledehoy> yeah↵`youtube-dl https://www.youtube.com/watch?v=dQw4w9WgXcQ` |
09:31:15 | FromDiscord | <- D I S A S T E R> (((that is using ytdl serverside))) |
09:31:22 | FromDiscord | <Rika> yall not listening to the poor lad |
09:31:30 | FromDiscord | <hobbledehoy> why make a downloader that downloads from a downloader? |
09:31:46 | Araq | please change your nick, helps to take you more seriously |
09:31:47 | FromDiscord | <- D I S A S T E R> because ffmpeg |
09:32:11 | Oddmonger | Araq, i think the nick is well chosen |
09:32:12 | FromDiscord | <alehander42> but what do you want to do with the video |
09:32:16 | Araq | P L E A S E C H A N G E Y O U R N I C K |
09:32:24 | FromDiscord | <Rika> i dont think the nick is an issue |
09:32:28 | FromDiscord | <alehander42> Araq is woke now |
09:32:35 | FromDiscord | <Rika> he angery |
09:32:44 | Oddmonger | normal state |
09:32:48 | FromDiscord | <hobbledehoy> ok I see now↵you are doing extra processing for like mp3 and stuff |
09:32:52 | Araq | it's annoying to read |
09:32:59 | * | hobbledehoy joined #nim |
09:33:08 | bung | the http response has bodyStream property you can save that stream to file |
09:34:13 | FromDiscord | <hobbledehoy> https://nim-lang.org/docs/streams.html↵relevant documentation to help |
09:36:55 | bung | the nick name problem is it wasting viewport, and take much more attension that real content |
09:37:34 | FromDiscord | <ucodeLukas> well It was my nick for 2 years but well |
09:37:38 | bung | as sent from discord, more worse |
09:38:08 | Araq | thank you |
09:39:05 | FromDiscord | <ucodeLukas> sure mr woke |
09:40:36 | FromDiscord | <ucodeLukas> how do i get the string/stream from the response https://media.discordapp.net/attachments/371759389889003532/758623911175782410/Bildschirmfoto_von_2020-09-24_11-39-42.png |
09:40:38 | Araq | "woke" has nothing to do with it, the typography was unpleasant |
09:41:17 | Araq | could have named yourself "Disaster" and I wouldn't have said anything |
09:42:01 | FromDiscord | <ache of head> https://tenor.com/view/jon-stewart-eat-eating-popcorn-watching-gif-5102037 |
09:42:05 | FromDiscord | <hobbledehoy> `postContent` just returns a string↵`post` returns a Response which has a `bodyStream` |
09:43:19 | * | krux02_ joined #nim |
09:43:20 | * | hobbledehoy quit (Quit: hobbledehoy) |
09:43:25 | FromDiscord | <ucodeLukas> oh i see |
09:43:39 | * | hobbledehoy joined #nim |
09:45:21 | * | krux02__ joined #nim |
09:46:15 | FromDiscord | <ucodeLukas> and how do i get the bodyStream from the Response type? |
09:46:17 | * | krux02 quit (Ping timeout: 260 seconds) |
09:48:02 | * | krux02_ quit (Ping timeout: 260 seconds) |
09:48:16 | FromDiscord | <hobbledehoy> ```nim↵let response = client.post("url". , multipart=data)↵let body = response.bodyStream↵``` |
09:49:16 | FromDiscord | <ucodeLukas> ah so a client.post(x,y).bodyStream does it ? lemme try |
09:50:36 | * | krux02__ quit (Ping timeout: 244 seconds) |
09:51:20 | bung | ah? could be dot chained ? |
09:52:09 | * | hobbledehoy quit (Quit: hobbledehoy) |
09:53:39 | bung | I dont think so, .post returns Promise |
09:53:47 | * | krux02 joined #nim |
09:56:32 | FromDiscord | <ucodeLukas> indeed tried it hah |
09:56:33 | FromDiscord | <hobbledehoy> ucodeLukas is using the sync httpclient |
09:57:13 | FromDiscord | <hobbledehoy> oh it didn't work? never mind then |
09:59:13 | bung | I only know js can have Promise.then().then() |
10:02:53 | FromDiscord | <Rika> you can do `(await someFut).field` |
10:03:15 | FromDiscord | <Rika> depends on the programmer if they find it nice to look at or not |
10:05:21 | FromDiscord | <lqdev> or `await(someFut).field` |
10:14:05 | * | superbia1 quit (Quit: WeeChat 2.9) |
10:30:42 | * | arecacea1 quit (Read error: Connection reset by peer) |
10:31:15 | * | arecacea1 joined #nim |
10:31:44 | FromDiscord | <ucodeLukas> ok thanks so far helped me much |
10:32:08 | FromDiscord | <ucodeLukas> but how do i get the stream to save to a file? |
10:32:40 | FromDiscord | <ucodeLukas> the docs dont get me far |
10:36:11 | FromDiscord | <lqdev> use a FileStream |
10:36:29 | FromDiscord | <lqdev> https://nim-lang.org/docs/streams.html#openFileStream%2Cstring%2CFileMode%2Cint |
10:38:35 | FromDiscord | <exelotl> I'm guessing you would do like `while not bodyStream.atEnd: fileStream.writeStr(bodyStream.readStr())` |
10:40:17 | FromDiscord | <exelotl> ok I'm a little wrong there: it's `write` not `writeStr`, and `readStr` should take a max length |
10:40:22 | * | Zectbumo quit (Remote host closed the connection) |
10:44:06 | FromDiscord | <ucodeLukas> i dont get it |
10:45:11 | FromDiscord | <alehander42> you open a file stream to the file you need |
10:45:25 | FromDiscord | <alehander42> or create a new file with a certain name |
10:45:28 | FromDiscord | <alehander42> and open a stream to it |
10:45:42 | FromDiscord | <ucodeLukas> sent a code paste, see https://play.nim-lang.org/#ix=2yAp |
10:45:43 | FromDiscord | <alehander42> and then you start writing to it in a loop |
10:46:00 | FromDiscord | <alehander42> ok man: obviously you need to provide a path to the file stream |
10:46:25 | FromDiscord | <ucodeLukas> i know but where |
10:46:43 | FromDiscord | <alehander42> please read the examples in the docs |
10:46:51 | FromDiscord | <alehander42> they show very well what to do |
10:47:36 | FromDiscord | <alehander42> https://nim-lang.org/docs/streams.html#basic-usage-filestream-example |
10:47:45 | FromDiscord | <alehander42> browse a bit for the different methods |
10:48:45 | FromDiscord | <alehander42> newFileStream takes a path 🙂 |
10:48:57 | FromDiscord | <ucodeLukas> ok and still got the same error |
10:49:20 | FromDiscord | <alehander42> what is the error telling you |
10:49:27 | FromDiscord | <ucodeLukas> sent a code paste, see https://play.nim-lang.org/#ix=2yAq |
10:49:32 | * | kenran joined #nim |
10:49:54 | FromDiscord | <ucodeLukas> missing parameter "result" |
10:50:05 | FromDiscord | <ucodeLukas> what is "result"? |
10:50:34 | FromDiscord | <alehander42> ah i see |
10:50:43 | FromDiscord | <alehander42> well ok, look at the signature |
10:50:48 | FromDiscord | <alehander42> and the docs of the read function |
10:50:56 | FromDiscord | <alehander42> that's how you debug errors |
10:51:35 | FromDiscord | <alehander42> the read function stores its result in a second variable (to reuse a buffer ? ) |
10:51:52 | FromDiscord | <alehander42> so you'd need to add a `var chunk` |
10:52:11 | FromDiscord | <alehander42> `var chunk: string` |
10:53:21 | FromDiscord | <ucodeLukas> so i have to count the chunks and do a for loop on it? |
10:53:49 | FromDiscord | <alehander42> no |
10:54:08 | FromDiscord | <alehander42> you do a while loop |
10:54:12 | FromDiscord | <alehander42> but you need two steps inside |
10:54:19 | FromDiscord | <alehander42> `stream.read(chunk)` |
10:54:25 | FromDiscord | <alehander42> and then `file.write(chunk)` |
10:55:08 | * | kenran quit (Ping timeout: 260 seconds) |
10:56:47 | FromDiscord | <alehander42> ugh this video is horrible |
10:59:55 | federico3 | https://facebook.github.io/zstd/ |
11:08:17 | Araq | federico3, nice :-) |
11:08:27 | Araq | exactly what we need for IC |
11:08:49 | FromDiscord | <dom96> pleasently surprised to see a nim library listed 😄 |
11:09:15 | * | opal quit (Remote host closed the connection) |
11:10:23 | FromDiscord | <dom96> it looks like a high quality wrapper too |
11:10:31 | * | opal joined #nim |
11:12:22 | FromDiscord | <ShalokShalom> https://github.com/wltsmrz/nim_zstd |
11:15:37 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
11:19:19 | * | ehmry joined #nim |
11:28:20 | Araq | bah a wrapper. I need native Nim code |
11:49:32 | FromDiscord | <alehander42> what is the opposite of dependency |
11:49:37 | FromDiscord | <alehander42> is dependant the right word |
11:50:03 | FromDiscord | <alehander42> (e.g. a <- b : b is a dependency for a, but a is ? for b) |
11:50:20 | FromDiscord | <alehander42> dependent is the relationship |
11:50:25 | FromDiscord | <alehander42> i was looking for a nou |
11:50:27 | FromDiscord | <alehander42> (edit) 'nou' => 'noun' |
11:51:55 | * | rockcavera joined #nim |
11:51:59 | narimiran | dependee? |
11:52:53 | narimiran | https://english.stackexchange.com/questions/25575/what-is-the-correct-word-for-dependee |
11:54:05 | narimiran | https://en.wiktionary.org/wiki/dependee#English |
11:54:07 | FromDiscord | <alehander42> https://english.stackexchange.com/questions/25575/what-is-the-correct-word-for-dependee |
11:54:08 | FromDiscord | <alehander42> haha same |
11:54:31 | FromDiscord | <ShalokShalom> dependee sounds cute 🥰 |
11:54:34 | FromDiscord | <shirleyquirk> Checked usage in pacman. You can see a list of "dependencies" or what the package is "required by". Alternatively you search for "reverse dependencies" |
11:55:33 | FromDiscord | <alehander42> it looks confusing tho |
11:55:50 | FromDiscord | <alehander42> the dependee thing because .. we need a dictionary to figure it out 😄 |
11:56:10 | FromDiscord | <alehander42> requiredBy sounds a bit more clear but not for my usage |
11:56:34 | FromDiscord | <shirleyquirk> It's all horrible. dependee is a constructed word. Can we steal a word from German or something? |
11:56:53 | FromDiscord | <alehander42> maybe i need to use just ``dependent`` or ``derived`` |
11:57:43 | FromDiscord | <alehander42> i want to name the relationship between X and stuff based on X e.g. X -> [X.field, X()] |
11:58:30 | FromDiscord | <alehander42> in the manual/code |
11:59:59 | FromDiscord | <Clyybber> german doesn't have a better word either: Abhaengiger |
12:00:02 | FromDiscord | <ShalokShalom> #discoveryoftheday |
12:00:05 | FromDiscord | <ShalokShalom> https://amulet.works/ |
12:00:15 | FromDiscord | <ShalokShalom> @Clyybber Oh, you are German? |
12:00:19 | FromDiscord | <Clyybber> Yeah |
12:00:29 | FromDiscord | <ShalokShalom> Austria 🇦🇹 here |
12:00:33 | FromDiscord | <Clyybber> nice |
12:00:55 | FromDiscord | <ShalokShalom> Soon US 🇺🇸 |
12:02:26 | FromDiscord | <Clyybber> freiwillig? |
12:02:57 | FromDiscord | <alehander42> Bulgaria 🇧🇬 |
12:03:49 | Araq | what's wrong with Abhängiger? |
12:04:02 | FromDiscord | <ShalokShalom> @Clyybber Frau |
12:04:03 | FromDiscord | <Clyybber> its no better than dependee |
12:04:18 | FromDiscord | <ShalokShalom> I would rather stay here 😱 |
12:04:29 | FromDiscord | <ShalokShalom> And I see it as challenge and opportunity |
12:04:48 | FromDiscord | <alehander42> there should be a language term |
12:04:56 | FromDiscord | <alehander42> about it, i am going to aks |
12:04:58 | FromDiscord | <alehander42> ask around |
12:05:56 | FromDiscord | <ShalokShalom> @Clyybber Did you get documentation wise something along, like to discussed size of the gaps? |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:08 | FromDiscord | <ShalokShalom> (edit) 'to' => 'the' |
12:06:13 | FromDiscord | <shirleyquirk> The problem is the English words are 'dependent' and 'dependency' |
12:06:24 | FromDiscord | <alehander42> but i think they are not great for this particular thing |
12:06:33 | FromDiscord | <Clyybber> @ShalokShalom I'm working on other things ATM |
12:06:38 | FromDiscord | <shirleyquirk> But in software the meaning is already reversed |
12:06:44 | * | supakeen joined #nim |
12:06:55 | FromDiscord | <Clyybber> @ShalokShalom Feel free to have a try at it :D |
12:07:04 | FromDiscord | <alehander42> maybe its more prefix and thigns with the same prefix |
12:07:10 | FromDiscord | <alehander42> prefix-siblings? |
12:07:14 | FromDiscord | <alehander42> prefix-children? |
12:07:27 | FromDiscord | <ShalokShalom> I would rather change the whole thing... |
12:07:29 | FromDiscord | <Clyybber> @ShalokShalom I also don't know too much about webdev, so it was all just ideas basically |
12:07:36 | FromDiscord | <ShalokShalom> And especially an index. |
12:08:27 | FromDiscord | <alehander42> uh? |
12:08:29 | FromDiscord | <alehander42> (edit) 'uh?' => 'eh?' |
12:09:04 | FromDiscord | <alehander42> ah sorry, probably other topic |
12:11:37 | FromDiscord | <ShalokShalom> @alehander42 Yes, I am still fighting for a cleaner documentation |
12:11:59 | FromDiscord | <ShalokShalom> Especially an index, that sums it all up |
12:12:26 | FromDiscord | <ShalokShalom> Now, it's pretty scattered across different places |
12:24:59 | * | shad0w_ quit (Quit: shad0w_) |
12:33:04 | * | nyd quit (Quit: nyd) |
12:33:38 | Araq | well Nim is a programming language. Maybe it's documented in different places like C++, Python, ... is. |
12:35:28 | FromDiscord | <mratsim> https://nim-lang.org/docs/theindex.html |
12:35:43 | FromDiscord | <mratsim> though it would help if goole returned that more often |
12:35:59 | FromDiscord | <ShalokShalom> No, I mean spread across the own homepage and not sorted very well |
12:36:12 | FromDiscord | <ShalokShalom> I think the documentation harder than the language. |
12:36:38 | Araq | https://nim-lang.org/learn.html |
12:36:39 | FromDiscord | <ShalokShalom> It gives me more headache and more reason to quit then the language, the community or any other aspect of Nim. |
12:36:45 | Araq | https://nim-lang.org/documentation.html |
12:36:47 | FromDiscord | <ShalokShalom> Yeah, yeah.... |
12:37:08 | Araq | make a productive suggestion |
12:37:09 | * | kenran joined #nim |
12:37:22 | FromDiscord | <shirleyquirk> The search box is pretty great imho |
12:38:02 | FromDiscord | <ShalokShalom> @Araq[IRC]#0000 I did speak about that with @Clyybber |
12:38:21 | FromDiscord | <ShalokShalom> Yesterday |
12:38:36 | Araq | alright |
12:38:42 | FromDiscord | <ShalokShalom> Thanks |
12:39:30 | Araq | clyybber: any progress on https://github.com/nim-lang/Nim/issues/14844 ? |
12:39:31 | disbot | ➥ Illegal symbol reuse in template with method call syntax ; snippet at 12https://play.nim-lang.org/#ix=2qtK |
12:40:42 | * | pangey quit (Ping timeout: 260 seconds) |
12:41:48 | FromDiscord | <ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/758669512965881916/IMG_20200924_144133.jpg |
12:42:26 | * | pangey joined #nim |
12:42:52 | FromDiscord | <Clyybber> Araq: I just thought about picking it up again |
12:42:54 | FromDiscord | <ShalokShalom> All content is in this index. It is not spread across 49 million pages. It is all *accessible* from here and I can use one search function, that doesn't call thousands of unrelated API docs and stuff like that. |
12:43:14 | FromDiscord | <alehander42> ehh, this is only the book |
12:43:20 | FromDiscord | <alehander42> the reference is separate |
12:43:49 | FromDiscord | <ShalokShalom> It is sorted, by categories and I can see immediately all the content |
12:44:04 | FromDiscord | <alehander42> this is very separate https://doc.rust-lang.org/std/ |
12:44:07 | Araq | how do you know if you see "all" the content |
12:44:14 | FromDiscord | <ShalokShalom> No need to exit, look across different tabs, reading, clicking, exiting again. |
12:44:14 | Araq | you can never know that. ;-) |
12:44:19 | FromDiscord | <alehander42> so it's not "all the content" |
12:44:24 | FromDiscord | <ShalokShalom> @Araq[IRC]#0000 I scroll |
12:44:31 | FromDiscord | <ShalokShalom> All the content I am interested in |
12:44:37 | FromDiscord | <ShalokShalom> It is a complete package |
12:45:00 | FromDiscord | <ShalokShalom> All modern languages do it like that, tons of projects and frameworks. |
12:45:04 | FromDiscord | <Rika> again, that is the book, not the reference |
12:45:16 | FromDiscord | <alehander42> ok, but this is https://nim-lang.org/docs/manual.html |
12:45:19 | FromDiscord | <ShalokShalom> @Rika Where is the Nim book? |
12:45:25 | FromDiscord | <alehander42> ^ |
12:45:27 | FromDiscord | <lqdev> @ShalokShalom the nim book doesn't exist |
12:45:28 | FromDiscord | <alehander42> literally |
12:45:33 | FromDiscord | <lqdev> there's the manual |
12:45:33 | FromDiscord | <alehander42> is a similar format |
12:45:45 | FromDiscord | <alehander42> i agree: maybe not as nice stylistically |
12:45:51 | FromDiscord | <alehander42> but it describes most features |
12:45:53 | FromDiscord | <ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/758670542994931722/Screenshot_2020-09-24-14-45-47-45_3aea4af51f236e4932235fdada7d1643.jpg |
12:45:57 | FromDiscord | <alehander42> has a content section in left |
12:45:58 | FromDiscord | <lqdev> and can be opened without CSS |
12:46:00 | FromDiscord | <ShalokShalom> Please show me the index |
12:46:00 | FromDiscord | <lqdev> and doesn't have any bloat |
12:46:13 | FromDiscord | <ShalokShalom> @alehander42 I cant see it |
12:46:16 | FromDiscord | <alehander42> it's in the left, but hm |
12:46:18 | FromDiscord | <alehander42> in the browser |
12:46:19 | FromDiscord | <lqdev> @ShalokShalom yeah the index doesn't appear on mobile for some reason |
12:46:26 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/758670682296549396/unknown.png |
12:46:29 | FromDiscord | <lqdev> i noticed that too |
12:46:36 | FromDiscord | <lqdev> but how often do you program on mobile anyways |
12:46:44 | Araq | probably a feature of our CSS |
12:46:44 | FromDiscord | <Rika> thats not a valid argument |
12:46:51 | FromDiscord | <Rika> a lot of people open docs on phone |
12:46:56 | FromDiscord | <exelotl> I look at the nim docs often on mobile and yes this is a real problem |
12:47:04 | narimiran | PRs welcome |
12:47:09 | FromDiscord | <lqdev> @Rika i'm not using this as an argument, just pointing out facts |
12:47:14 | FromDiscord | <Rika> okay |
12:47:14 | FromDiscord | <ShalokShalom> Ok, then we have some point. |
12:47:15 | FromDiscord | <shirleyquirk> Yes, for that search bar available on mobile would be great |
12:47:15 | FromDiscord | <alehander42> ok this is a valid thing |
12:47:19 | narimiran | hacktoberfest starts soon ;) |
12:47:43 | Araq | it's probably a concious design decision of the one who updated the CSS to do just that |
12:47:56 | Araq | but surely we can change it. |
12:48:16 | narimiran | if index was there at the top, we would hear "i don't want to scroll through whole index to get to the content i'm interested in" |
12:48:29 | FromDiscord | <alehander42> how does it look in rust book on mobile? |
12:48:33 | FromDiscord | <alehander42> i forgot how to check on firefox |
12:48:51 | FromDiscord | <exelotl> of course, but it should be possible to reveal it on mobile |
12:48:52 | FromDiscord | <ShalokShalom> And I would still argue, that a combined Learn and Documentation section makes sense. Just lower the font size, gap size and order it differently. |
12:49:05 | FromDiscord | <shirleyquirk> cppreference.com is defacto c++ reference and that's not single page |
12:49:12 | FromDiscord | <alehander42> but the manual is literally the equivalent of rust book |
12:49:13 | FromDiscord | <alehander42> imho |
12:49:16 | FromDiscord | <ShalokShalom> > how does it look in rust book on mobile?↵@alehander42 I send that screenshot above from mobile |
12:49:39 | FromDiscord | <alehander42> ah i see, thanks |
12:49:51 | FromDiscord | <ShalokShalom> The search in the Nim version is looking for more than just the manual |
12:50:16 | FromDiscord | <ShalokShalom> Which is highly confusing, when you are looking in the manual, and then you get API design and whatnot. |
12:50:27 | FromDiscord | <alehander42> yeah this is a bit strange i admit |
12:50:33 | FromDiscord | <alehander42> i usually use ctrl+f |
12:50:37 | FromDiscord | <alehander42> but no ctrl+f on mobile probably |
12:50:44 | FromDiscord | <ShalokShalom> Those are all little issues, who pile up |
12:50:53 | FromDiscord | <alehander42> i just open it in my editor 😄 😄 |
12:50:59 | FromDiscord | <ShalokShalom> There is a find in my browser. |
12:51:32 | FromDiscord | <alehander42> ok, this is much more useful now: so a way to access index on mobile |
12:51:48 | FromDiscord | <alehander42> and seach only in manual |
12:51:51 | FromDiscord | <alehander42> two concrete issues |
12:52:10 | FromDiscord | <alehander42> that's why concrete feedback is important |
12:52:57 | FromDiscord | <ShalokShalom> @alehander42 Yeah, the thing is that I also prefer the look and feel of something like Gitbook, readthedocs and so on and this is why I wanted to port over all |
12:53:13 | FromDiscord | <ShalokShalom> I saw 7 tiny issues and thought I solve them all in one swap |
12:53:18 | FromDiscord | <ShalokShalom> And to standardize |
12:53:19 | FromDiscord | <Clyybber> Araq: https://github.com/nim-lang/Nim/issues/15324 has been fixed, cooldomes project compiles |
12:53:21 | disbot | ➥ Symbols lookup regression ; snippet at 12https://play.nim-lang.org/#ix=2yB1 |
12:53:43 | FromDiscord | <alehander42> @ShalokShalom i see |
12:55:52 | FromDiscord | <ShalokShalom> Araq: Did you really name it according to a King? Since there is Nimrod, a computer that beat a human in the Nim game, and it was demonstrated first in Germany, the country of your origin https://media.discordapp.net/attachments/371759389889003532/758673051856011264/Screenshot_2020-09-24-14-55-25-62_3aea4af51f236e4932235fdada7d1643.jpg |
12:56:19 | FromDiscord | <ShalokShalom> So I was very surprised to see, that you choose it for the seemingly unrelated King |
12:57:30 | FromDiscord | <ShalokShalom> Looks like Python, who was initially named according to the comedians and then swifted in its meaning over time. |
12:57:33 | FromDiscord | <shirleyquirk> Surely both named for the king |
12:57:43 | FromDiscord | <ShalokShalom> Yeah, thats true. |
12:59:24 | FromDiscord | <ShalokShalom> I assumed that the fact that an early computer beat a human in a game, is an early reminiscence of DeepBlue and Co, and so a fitting name. I found it actually very clever, until I discovered its not the cause for the naming 😅 |
12:59:57 | FromDiscord | <alehander42> sadly not |
13:00:47 | FromDiscord | <shirleyquirk> https://unrememberedhistory.com/2017/01/09/the-nimrod-effect-how-a-cartoon-bunny-changed-the-meaning-of-a-word-forever/ |
13:02:39 | FromDiscord | <alehander42> i am not sure if it was really positive before as well |
13:04:38 | FromDiscord | <shirleyquirk> Shackleton wouldn't named his boat Nimrod if it wasn't positive I reckon |
13:14:04 | FromDiscord | <Clyybber> @alehander42 let me guess, you don't like prometheus as well? :p |
13:17:45 | FromDiscord | <alehander42> meh |
13:17:49 | FromDiscord | <alehander42> i dislike it obviously |
13:17:58 | FromDiscord | <alehander42> but i don't really use it 😄 |
13:18:05 | FromDiscord | <Clyybber> oh, I meant the fiture |
13:18:10 | FromDiscord | <Clyybber> *character |
13:18:15 | FromDiscord | <Clyybber> not the program :P |
13:18:27 | FromDiscord | <alehander42> the greek character? |
13:18:53 | FromDiscord | <Clyybber> yeah, or as depicted in goethes poem |
13:19:16 | FromDiscord | <alehander42> i haven't read the goethe's poem |
13:19:23 | FromDiscord | <alehander42> i dislike greek mythology as a whole , yes |
13:19:28 | FromDiscord | <alehander42> him included |
13:20:09 | FromDiscord | <Clyybber> he is rebellious against god, is what I'm getting at |
13:20:33 | FromDiscord | <alehander42> i honestly didn't remember exactly his story |
13:20:44 | * | d_ment joined #nim |
13:21:06 | FromDiscord | <alehander42> well, his god is not really a god anyway probably |
13:21:15 | FromDiscord | <alehander42> so i don't really care for that |
13:25:42 | * | d_ment left #nim (#nim) |
13:26:32 | * | _M quit (Quit: _M) |
13:26:52 | * | eburk joined #nim |
13:27:31 | FromDiscord | <alehander42> do you like it? |
13:27:48 | * | waleee-cl joined #nim |
13:29:58 | * | dgb quit (Quit: WeeChat 2.7.1) |
13:36:14 | FromGitter | <iffy> `newConsoleLogger` only flushes the file for errors and fatal messages; I'd like to change that to be configurable -- any objections? |
13:38:45 | FromDiscord | <ucodeLukas> the code still doesnt ↵↵work i think nim is not the right tool for me |
13:39:49 | FromDiscord | <shirleyquirk> Send the current code? |
13:40:04 | FromGitter | <iffy> ah nevermind, I'll just `setStdioUnbuffered()` |
13:40:40 | FromDiscord | <ucodeLukas> sent a code paste, see https://play.nim-lang.org/#ix=2yBd |
13:41:02 | FromDiscord | <ucodeLukas> i switched from ruby btw |
13:42:59 | FromGitter | <iffy> ucodeLukas: when you compile it, add `-d:ssl` to the compile flags |
13:43:21 | FromGitter | <iffy> like this: `nim c -d:ssl nameofyourfile.nim` |
13:44:49 | FromDiscord | <ucodeLukas> did that |
13:45:17 | FromDiscord | <ucodeLukas> the error is ↵SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
13:47:44 | FromDiscord | <Rika> are there no other error lines |
13:50:29 | * | Vladar joined #nim |
13:53:05 | FromGitter | <iffy> ucodeLukas, instead of using read, use stream.readData or stream.readDataStr: https://nim-lang.org/docs/streams.html#readDataStr%2CStream%2Cstring%2CSlice%5Bint%5D |
13:53:08 | * | shad0w_ joined #nim |
13:54:39 | FromDiscord | <shirleyquirk> I was just using io, no streams, and client.postContent |
13:55:31 | FromDiscord | <shirleyquirk> but http request error bad request |
13:58:13 | * | Kaivo quit (Ping timeout: 246 seconds) |
14:00:21 | Yardanico | Araq: believe it or not, combparser tests still crash with orc :P so I'll try to minimize it again |
14:00:33 | FromDiscord | <shirleyquirk> You forgot data["qal"] |
14:00:49 | * | Kaivo joined #nim |
14:00:54 | Araq | Yardanico, ok, I don't care much but ok |
14:02:38 | Yardanico | well, as I |
14:02:52 | Yardanico | as I understand in we end we'll want to run important packages with orc (of course not now, but later) |
14:02:59 | Yardanico | and combparser is in important pkgs list |
14:03:02 | PMunch | What's the easiest way of turning an array[N, char] into a string? |
14:03:33 | Araq | Yardanico, sure |
14:05:35 | FromDiscord | <shirleyquirk> @ucodeLukas and response is "Error no valid YouTube link" |
14:07:12 | FromDiscord | <shirleyquirk> data["url"] wants string, not encodeUrl |
14:10:15 | FromDiscord | <shirleyquirk> play.nim-lang.org/#ix=2yBl |
14:10:45 | FromDiscord | <shirleyquirk> you definitely need to handle all the myriad exceptions that will almost certainly happen. |
14:10:58 | FromDiscord | <shirleyquirk> Just as you would in python |
14:11:19 | * | eburk quit (Quit: WeeChat 2.9) |
14:11:21 | Araq | PMunch, newString + a loop |
14:11:39 | PMunch | Ah, there is no casting and $ I can use? |
14:12:14 | Araq | $cast[cstring](addr arr) |
14:12:23 | Araq | if it's zero terminated |
14:12:44 | PMunch | It is :) |
14:13:04 | PMunch | Ah, I cast that to ptr cstring and tried to access it |
14:17:41 | * | PMunch quit (Quit: leaving) |
14:20:23 | Araq | Yardanico, does it work without cursor inference? |
14:47:27 | * | Vladar quit (Quit: Leaving) |
15:10:37 | * | hnOsmium0001 joined #nim |
15:21:00 | * | Vladar joined #nim |
15:24:48 | FromDiscord | <haxscramper> @alehander42 I updated draft with some clarification about types of injected variables, but otherwise I think it is more or less complete at this point. Potential expansion points might be discussed later, but I don't think it is necessary in the initial version. |
15:25:34 | FromDiscord | <haxscramper> I will redesign my current implementation to make it match the behaviour described in the RFC |
15:25:48 | * | shad0w_ quit (Ping timeout: 260 seconds) |
15:26:07 | FromDiscord | <haxscramper> Maybe something else should be clarified, but most likely I will do additional edits when I will have more or less conforming implementation |
15:27:35 | FromDiscord | <haxscramper> I replaced `opt @var ? "default"` with `opt @var or "default"` because it just looks more natural. |
15:28:27 | FromDiscord | <haxscramper> If some additional functionality is added it can be done via more keywords. Not all of them are self-contained (e.g. there is no `any ..., until`) |
15:28:38 | FromDiscord | <pygoscelis> hi. What is ARC ? |
15:29:01 | FromDiscord | <haxscramper> Memory management |
15:29:03 | FromDiscord | <haxscramper> ~arc |
15:29:03 | disbot | arc: 11a new memory manager for Nim; see https://forum.nim-lang.org/t/5734 |
15:29:15 | FromDiscord | <pygoscelis> thanks |
15:31:55 | * | bung quit (Quit: Lost terminal) |
15:33:23 | FromDiscord | <pygoscelis> What kind of stuff do you guys build with Nim? |
15:34:11 | Prestige | so far, just a window manager |
15:34:48 | FromDiscord | <pygoscelis> "just" |
15:34:50 | FromDiscord | <haxscramper> Mostly parsers and helper tools |
15:35:19 | FromDiscord | <haxscramper> It is better than python/perl/bash for any kind of quick one-time-use programs |
15:37:38 | FromDiscord | <pygoscelis> the way I see it, the languages of the future are: kotlin, dart(flutter), julia and nim |
15:37:46 | * | shad0w_ joined #nim |
15:37:57 | FromDiscord | <haxscramper> And wrapping C++ libraries into something useful. But that is mostly WIP |
15:42:00 | FromDiscord | <lqdev> @pygoscelis i'm trying to make video games with it, so far i released one |
15:44:58 | * | gour_ joined #nim |
15:45:46 | FromDiscord | <pygoscelis> @lqdev what is it called? |
15:46:08 | FromDiscord | <lqdev> https://lqdev.itch.io/memrecall |
15:46:15 | FromDiscord | <lqdev> and right now i'm working on another onw |
15:46:16 | FromDiscord | <lqdev> (edit) 'onw' => 'one' |
15:48:05 | * | gour quit (Ping timeout: 240 seconds) |
15:52:38 | * | kenran quit (Ping timeout: 256 seconds) |
15:54:22 | FromDiscord | <pygoscelis> ahaha it's nice |
15:54:34 | FromDiscord | <pygoscelis> but it's hard to play |
15:54:53 | FromDiscord | <pygoscelis> thank god I have infinite lifes |
15:58:26 | FromDiscord | <pygoscelis> Strangely when I pressed ESC it freezed, music still playing. I had to force quit the terminal. |
15:58:35 | FromDiscord | <pygoscelis> or the window |
15:59:22 | FromDiscord | <lqdev> yea it's glitched |
15:59:36 | FromDiscord | <lqdev> because it's stuck on an outdated window of GLFWW |
15:59:37 | FromDiscord | <lqdev> (edit) 'GLFWW' => 'GLFW' |
15:59:47 | FromDiscord | <lqdev> which doesn't properly clean up resources on segfault |
16:00:13 | FromDiscord | <lqdev> that's right; segfault. it's intentional. https://github.com/liquid600pgm/memrecall/blob/master/src/memrecall.nim#L39 |
16:02:44 | * | noonien quit (Quit: Connection closed for inactivity) |
16:05:00 | FromDiscord | <pygoscelis> so, I've been trolled |
16:05:54 | FromDiscord | <pygoscelis> what does zeromem do? |
16:06:08 | Araq | set the memory to 0 |
16:10:30 | FromDiscord | <pygoscelis> Overwrites the contents of the memory at p with the value 0. |
16:11:02 | FromDiscord | <pygoscelis> Strangely it didn't show any side effects yet outside the game |
16:12:55 | Araq | maybe your OS provides process isolation |
16:13:44 | * | shad0w_ quit (Remote host closed the connection) |
16:14:22 | FromDiscord | <lqdev> ↑ |
16:14:27 | FromDiscord | <lqdev> the game expects the OS to do that |
16:14:34 | FromDiscord | <lqdev> any modern OS has this behavior |
16:15:18 | FromDiscord | <lqdev> after all, address 0 is the null pointer. reading/writing to it is most likely not what you want |
16:15:20 | FromDiscord | <Rika> have fun if it doesnt lol |
16:16:34 | FromDiscord | <lqdev> @Rika it's just a zeroMem, shouldn't cause any trouble *i hope* |
16:16:34 | FromDiscord | <lqdev> it quits the program and tells you your OS is broken if it doesn't crash anyways, so at least there's that |
16:16:42 | Araq | Linux allows you to remap 0 to a valid address. And then they blame the C compiler optimizer for not handling this case |
16:18:21 | FromDiscord | <pygoscelis> I'm on Linux |
16:18:39 | FromDiscord | <pygoscelis> it only freezed the window of the game |
16:19:26 | FromDiscord | <pygoscelis> I started it by simply executing the file |
16:19:28 | * | kenran joined #nim |
16:19:39 | FromDiscord | <pygoscelis> on nautilus |
16:20:35 | FromDiscord | <pygoscelis> well at least it looks like a nice game, it will be fun hacking it to see how it's done |
16:21:25 | FromDiscord | <lqdev> good luck with that |
16:21:38 | FromDiscord | <lqdev> because i haven't updated it since last year |
16:21:48 | FromDiscord | <lqdev> and the source code uses an outdated version of my engine |
16:22:04 | FromDiscord | <lqdev> so it probably doesn't even compile nowadays |
16:22:08 | FromDiscord | <lqdev> but contributions are welcome :) |
16:23:06 | FromDiscord | <pygoscelis> I'm new to Nim, so it anything seems good as a start point 😄 |
16:24:15 | FromDiscord | <pygoscelis> I'm actually learning flutter at the same time |
16:24:15 | * | natrys joined #nim |
16:24:26 | * | kenran quit (Ping timeout: 272 seconds) |
16:24:50 | FromDiscord | <lqdev> you can start by fixing this. it should specify a static version `rapid 0.1.0` https://github.com/liquid600pgm/memrecall/blob/master/memrecall.nimble#L18 |
16:26:56 | FromDiscord | <lqdev> i think i'll be porting this game over to a newer version of my engine at some point, but not yet. i want the engine to at least be usable |
16:27:17 | FromDiscord | <ShalokShalom> How does factorial look like in Nim in the most concise way? |
16:27:32 | FromDiscord | <ShalokShalom> fac n = product [1..n] is it in Haskell |
16:28:13 | FromDiscord | <lqdev> hm, let's see |
16:29:30 | FromDiscord | <ShalokShalom> There is a fac 👀 |
16:29:44 | FromDiscord | <lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2yBZ |
16:29:50 | FromDiscord | <lqdev> that would be a simple imperative approach |
16:29:57 | FromDiscord | <ShalokShalom> Is this also possible with type inference? |
16:30:01 | FromDiscord | <lqdev> wdym? |
16:30:09 | FromDiscord | <lqdev> like, without specifying types? |
16:30:13 | FromDiscord | <lqdev> you can use `auto` |
16:30:27 | FromDiscord | <haxscramper> You can have `[T]` generic parameter, but nim uses inferred types |
16:30:27 | FromDiscord | <ShalokShalom> Yeah, I mean with functional ways? |
16:30:45 | FromDiscord | <ShalokShalom> @haxscramper Yeah, so I can simply omit them? |
16:31:01 | FromDiscord | <haxscramper> no |
16:31:20 | FromDiscord | <haxscramper> You either specify concrete type or use `func fac[T]()` |
16:31:22 | Prestige | I like using ! like this https://play.nim-lang.org/#ix=2yC0 |
16:31:48 | FromDiscord | <lqdev> nim doesn't have a complex type inference algorithm in place so there isn't really a more concise way of doing this |
16:31:49 | FromDiscord | <haxscramper> There is no ocaml-like type inference when you can omit types everywhere and make compiler figure it out |
16:31:50 | FromDiscord | <ShalokShalom> As said, I would prefer if each type would just get inferred based on the name, but in this case fac is essentially anonymous, so.. |
16:31:59 | FromDiscord | <ShalokShalom> @haxscramper Oh sorry |
16:32:12 | FromDiscord | <ShalokShalom> 😢 |
16:33:02 | FromDiscord | <haxscramper> ```nim↵ func fac(n: int): int = (if n <= 1: 1 else: n * fac(n - 1))↵ echo fac 1↵``` |
16:33:04 | FromDiscord | <haxscramper> Recursive |
16:33:12 | FromDiscord | <ShalokShalom> @Prestige[IRC]#0000 Oh, that looks cool |
16:33:36 | FromDiscord | <ShalokShalom> So [T] does what? |
16:33:41 | FromDiscord | <Yardanico> generics |
16:33:50 | FromDiscord | <Yardanico> Don't you know Nim? :P |
16:33:52 | FromDiscord | <ShalokShalom> Sorry, I am new to programming. |
16:34:00 | FromDiscord | <ShalokShalom> No, just a little. |
16:34:18 | FromDiscord | <ShalokShalom> I know what Generics are: What Go is missing 😋 |
16:34:42 | Prestige | Is there a way to have a generic (like other langs) like: [T extends int] or something similar? |
16:34:42 | FromDiscord | <haxscramper> Go is missing about 95% of the normal language, so this isjust minor detail |
16:34:56 | FromDiscord | <Yardanico> What does that mean? |
16:35:21 | FromDiscord | <ShalokShalom> [T] is like a placeholder? |
16:35:22 | Prestige | where T would have to be an int type. Maybe int was a bad example |
16:35:27 | FromDiscord | <ShalokShalom> Or does anything specific? |
16:35:42 | FromDiscord | <Yardanico> @ShalokShalom well you were talking about Nim docs quite a lot so I thought that you read them :) |
16:35:43 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#generics |
16:36:16 | FromDiscord | <ShalokShalom> @Yardanico Yes I did, but I stumbled across couple of interesting things |
16:36:35 | Prestige | ah Yardanico thanks - it would be [T: Foo] |
16:36:43 | FromDiscord | <ShalokShalom> Ok, this doesn't tell me anything |
16:36:55 | FromDiscord | <ShalokShalom> So [T] does something |
16:37:16 | FromDiscord | <Yardanico> It tells the compiler that this type or a proc is generic |
16:37:32 | FromDiscord | <haxscramper> > Sorry, I am new to programming.↵@ShalokShalom Oh, by the way, maybe your argument is mostly based on nim tutorial being not really good for beginner /programmers/? because generic section is just 7 lines of text and 30+ lines of code for generic binary tree. |
16:37:36 | FromDiscord | <Yardanico> And T is the generic type |
16:37:58 | FromDiscord | <haxscramper> Which is good if you know what generic is in general, but not really helpful if you are starting with programming in general |
16:38:06 | FromDiscord | <ShalokShalom> @haxscramper How most of the documentation is |
16:38:18 | FromDiscord | <Yardanico> For a complete programming newbie? |
16:38:20 | FromDiscord | <Yardanico> Maybe |
16:38:20 | FromDiscord | <ShalokShalom> The beginner tutorial is quite nice, everything after is noise. |
16:38:32 | FromDiscord | <Yardanico> But not for people who already do programming :) |
16:38:47 | FromDiscord | <lqdev> i never had problems with the docs |
16:38:50 | Prestige | Maybe we should make more beginners tuts |
16:39:00 | FromDiscord | <lqdev> they're at least as good as the MDN is on HTML/CSS/JS |
16:39:03 | FromDiscord | <lqdev> the layout is similar |
16:39:11 | FromDiscord | <lqdev> easy to navigate |
16:39:37 | FromDiscord | <haxscramper> Writ series of useless articles like "getting started with nim procs". Although i can easily see how this gets converted into 10-page essay |
16:39:56 | FromDiscord | <haxscramper> Because pragmas, side effects, raise annotations, static parameters, binding rules, generics |
16:40:00 | FromDiscord | <ShalokShalom> > And T is the generic type↵@Yardanico What does this mean |
16:40:02 | Prestige | nitpicking, but I wish the links on the left side of the page scrolled so they are always in view |
16:40:05 | FromDiscord | <ShalokShalom> I know what types are |
16:40:12 | FromDiscord | <Yardanico> Google it :) |
16:40:13 | FromDiscord | <ShalokShalom> Generic means, it can be any type? |
16:40:19 | FromDiscord | <ShalokShalom> Thats not helping. |
16:40:20 | FromDiscord | <haxscramper> And tons of little details, like when exactly proc will be checked for correctnes |
16:40:20 | FromDiscord | <Yardanico> Generics aren't exclusive to Nim |
16:40:27 | FromDiscord | <ShalokShalom> Yeah, I know. |
16:40:37 | FromDiscord | <Yardanico> Well, Nim docs aren't meant to cover every possible CS question |
16:41:02 | FromDiscord | <pygoscelis> Generic means the procedure can be called with any type |
16:41:11 | FromDiscord | <ShalokShalom> Nim is suitable for simple code due to its simple syntax and quite convenient features |
16:41:14 | FromDiscord | <Yardanico> Generic procedures/types have at least one argument/field which is generic |
16:41:17 | FromDiscord | <ShalokShalom> And it can grow with you |
16:41:33 | Prestige | maybe https://dev.to/designpuddle/coding-concepts---generics-34cf would be a good read ShalokShalom |
16:41:41 | FromDiscord | <ShalokShalom> > Generic means the procedure can be called with any type↵@pygoscelis So I essentially make soft typing from it? |
16:41:46 | FromDiscord | <ShalokShalom> Like Javascript? |
16:41:57 | FromDiscord | <Yardanico> But I wouldn't go as far as saying "Nim has bad documentation" if what you actually mean is "Nim has bad documentation for people who didn't program before" |
16:41:57 | FromDiscord | <ShalokShalom> Thanks a lot Prestige |
16:42:06 | FromDiscord | <Yardanico> @ShalokShalom not at all |
16:42:13 | FromDiscord | <Yardanico> Generics are still type checked |
16:42:17 | Prestige | np |
16:42:35 | FromDiscord | <pygoscelis> > @pygoscelis So I essentially make soft typing from it?↵@ShalokShalom You have to choose a type when you call it |
16:42:36 | FromDiscord | <Yardanico> It just allows to makes your code work for multiple types without repetition |
16:42:59 | FromDiscord | <Rika> sometimes you dont need to choose a type |
16:43:15 | FromDiscord | <pygoscelis> > sometimes you dont need to choose a type↵@Rika true |
16:43:23 | FromDiscord | <Yardanico> Yeah, if one of the arguments is the generic one |
16:44:07 | FromDiscord | <ShalokShalom> > @ShalokShalom You have to choose a type when you call it↵@pygoscelis Aaaah, ok |
16:44:18 | FromDiscord | <ShalokShalom> That doesn't help me further with my case |
16:44:36 | FromDiscord | <ShalokShalom> I would need a real, HMD type system |
16:44:52 | FromDiscord | <ShalokShalom> Is there anything in plan? 😋 |
16:44:55 | FromDiscord | <Yardanico> A type system doesn't have to be HMD to be "real" |
16:44:56 | FromDiscord | <Yardanico> No |
16:45:04 | FromDiscord | <ShalokShalom> Yeah, for me it does |
16:45:10 | FromDiscord | <ShalokShalom> Doesn't help me, if not |
16:45:10 | FromDiscord | <Yardanico> Well, then Nim isn't for you |
16:45:15 | FromDiscord | <ShalokShalom> Yes, sorry |
16:45:38 | FromDiscord | <Yardanico> Nim doesn't have a HM type system, you need to specify types in procedures or objects |
16:45:56 | FromDiscord | <Yardanico> There is no return type overloading or similar things |
16:46:05 | FromDiscord | <Yardanico> But there are generics, macros, templates, etc |
16:47:37 | * | mmohammadi98127 joined #nim |
16:47:42 | FromDiscord | <ShalokShalom> Sad |
16:47:55 | FromDiscord | <Yardanico> But are you sure that you actually need a HM type system? |
16:48:02 | FromDiscord | <ShalokShalom> A type system that infers its types, helps me to keep my code clean |
16:48:05 | FromDiscord | <Yardanico> I'm asking because you said you are new to programming |
16:48:09 | FromDiscord | <Yardanico> Does it? |
16:48:18 | FromDiscord | <ShalokShalom> Its the same reason, why I choose indentation for block building |
16:48:24 | FromDiscord | <ShalokShalom> Yes, clearly |
16:48:33 | FromDiscord | <ShalokShalom> Do you not think so? |
16:48:35 | FromDiscord | <Yardanico> No |
16:48:37 | FromDiscord | <Yardanico> Not at all |
16:48:41 | FromDiscord | <ShalokShalom> Why no HM type system? |
16:48:43 | FromDiscord | <ShalokShalom> Aha, ok |
16:48:49 | FromDiscord | <ShalokShalom> Then we are very different people. |
16:48:53 | FromDiscord | <Yardanico> Exactly |
16:48:59 | FromDiscord | <ShalokShalom> I want so less noise in my code as possible |
16:49:08 | FromDiscord | <ShalokShalom> Nothing that doesn't belong there. |
16:49:25 | FromDiscord | <haxscramper> > A type system that infers its types, helps me to keep my code clean↵@ShalokShalom Never understood how HMD can actually help doing anything. Certainly not a helper for readability. When I tried to undestand earley parser written in ocaml I spent about 50% of the time just figuring out actual types; |
16:49:30 | FromDiscord | <ShalokShalom> Could I just infer from the name of the binding, etc? |
16:49:48 | FromDiscord | <Rika> omitting types makes it faster to write code but much slower to read it |
16:49:57 | FromDiscord | <Yardanico> Well, maybe @ShalokShalom only cares about writing code, not reading it |
16:50:00 | FromDiscord | <ShalokShalom> @haxscramper You can hover over the code and it shows them |
16:50:01 | FromDiscord | <Yardanico> Like Rika said :) |
16:50:02 | FromDiscord | <haxscramper> You have to know where function is called to understand what type it operates on |
16:50:06 | FromDiscord | <Rika> you're adding extra load for certain programmers to figure types out |
16:50:06 | * | thomasross joined #nim |
16:50:18 | FromDiscord | <ShalokShalom> F# does it all the time 🤷♂️ |
16:50:43 | FromDiscord | <ShalokShalom> And Haskell has HM despite its annotation |
16:50:49 | FromDiscord | <Rika> "hover over the code" sounds like an IDE specific feature |
16:50:49 | FromDiscord | <haxscramper> > @haxscramper You can hover over the code and it shows them↵@ShalokShalom well, yes, of course, my favourite argument - you can isntall like "REAL" IDE to actually get some work done with this "very readable" programming language |
16:50:56 | FromDiscord | <ShalokShalom> It helps to keep track of the type order |
16:51:04 | * | opal quit (Quit: i'm never coming back) |
16:51:06 | FromDiscord | <haxscramper> I dumped types used ocamlc |
16:51:16 | FromDiscord | <ShalokShalom> @haxscramper I dont like an IDE that doesnt can this |
16:51:24 | FromDiscord | <Rika> thats a preference thing |
16:51:26 | FromDiscord | <lqdev> @ShalokShalom i'd actually argue that specifying types explicitly makes code much more readable |
16:51:29 | FromDiscord | <haxscramper> But i would prefer that language is readable anywhere, not only in specific IDE |
16:51:32 | FromDiscord | <ShalokShalom> Heck, there is even a gist webpage that can do that |
16:51:36 | FromDiscord | <haxscramper> That has support for particular language |
16:51:47 | FromDiscord | <ShalokShalom> @lqdev Yes, lots of people feel so |
16:51:53 | FromDiscord | <ShalokShalom> I just dont like that. |
16:53:13 | FromDiscord | <Rika> then as someone said already, maybe nim isnt for you |
16:53:21 | * | mmohammadi98127 quit (Quit: I quit (╯°□°)╯︵ ┻━┻) |
16:53:54 | FromDiscord | <haxscramper> And on top of that - generic types don't make code **that** more unreadable. You dont' have to specify types in most cases in variable assigment |
16:53:59 | Araq | if you cannot goto definition with a single click or less you're burning money |
16:54:05 | * | mmohammadi9812 joined #nim |
16:54:17 | FromDiscord | <Yardanico> Well, we're talking about types :) |
16:54:20 | FromDiscord | <ShalokShalom> @haxscramper I am not against generic types |
16:54:22 | Araq | I cry everytime it doesn't work |
16:54:29 | FromDiscord | <haxscramper> Well I just have 4 screens and I always have definition for everything at once |
16:54:31 | FromDiscord | <Yardanico> And if it's good to not specify them so they're inferred |
16:54:39 | FromDiscord | <ShalokShalom> I just dont think they are capable to replace me a HM type system |
16:54:42 | FromDiscord | <pygoscelis> without types how would you create objects? |
16:54:59 | FromDiscord | <ShalokShalom> If you dont have one, cuz you can't or won't implement it, thats fine |
16:55:06 | FromDiscord | <lqdev> araq we need to hire someone to fix nimsuggest |
16:55:16 | FromDiscord | <lqdev> everybody wants it to be fixed but nobody wants to fix it |
16:55:25 | FromDiscord | <haxscramper> For example I don't understand how to code on <3 screens, so I need IDE that can handle this workflow well |
16:55:26 | FromDiscord | <Yardanico> Hey i PRed a few fixed |
16:55:32 | FromDiscord | <Yardanico> Fixes* |
16:55:34 | FromDiscord | <ShalokShalom> > then as someone said already, maybe nim isnt for you↵@Rika Which is said, since it looks so perfect otherwise |
16:55:38 | FromDiscord | <lqdev> @Yardanico coolio |
16:55:43 | FromDiscord | <Yardanico> and nimsuggest is closely tied to the compiler |
16:55:47 | FromDiscord | <lqdev> it's on devel, i guess? |
16:56:02 | FromDiscord | <Yardanico> It was a few months ago |
16:56:37 | FromDiscord | <haxscramper> > Which is said, since it looks so perfect otherwise↵@ShalokShalom you only used functional languages with HM type system before? |
16:56:44 | FromDiscord | <ShalokShalom> Yes |
16:56:51 | FromDiscord | <ShalokShalom> F# mostly |
16:57:01 | FromDiscord | <ShalokShalom> I love all of them 🥳 |
16:57:30 | FromDiscord | <ShalokShalom> But F#'s .Net integration is so tedious and badly implemented in Godot |
16:57:32 | FromDiscord | <Yardanico> Well Nim is mostly an imperative language |
16:57:40 | FromDiscord | <Yardanico> Although you can do functional style of course |
16:57:43 | FromDiscord | <ShalokShalom> And I really like the syntax here even more than in F# |
16:57:49 | FromDiscord | <haxscramper> Well, you get generics in pretty much any non-functional programming language. Rust has type inference, but you still have to write `<T>` so |
16:57:57 | FromDiscord | <ShalokShalom> Yes, I am actually fine with the functional support here |
16:58:10 | FromDiscord | <ShalokShalom> Since func is truly functional |
16:58:13 | FromDiscord | <Yardanico> Oh right, Rust has a variant of an HM type system |
16:58:20 | FromDiscord | <Yardanico> Yet they use types :) |
16:58:27 | FromDiscord | <Yardanico> Even in function arguments!!11 |
16:58:41 | FromDiscord | <ShalokShalom> I dont need all the hugely complicated Haskell abstractions and tons of functional features |
16:58:54 | FromDiscord | <ShalokShalom> Yes, Rust is just too strict |
16:59:11 | FromDiscord | <Rika> which is their selling point |
16:59:15 | FromDiscord | <ShalokShalom> And I dont like curly braces and they also ask for annotations left and right |
16:59:37 | FromDiscord | <ShalokShalom> @Rika Strict in the sense of letting me create no new operators and stuff |
16:59:42 | FromDiscord | <Rika> the language is safe because you're put on basically programmer's training wheels or smth |
16:59:43 | FromDiscord | <ShalokShalom> I am very flexible here |
16:59:52 | FromDiscord | <haxscramper> Well, this is a ~85% functional language, so it really fits this good spot where you can write in functional style without actually *forcing* you to do so |
16:59:54 | FromDiscord | <ShalokShalom> What is impossible in Rust, is one line in Nim. |
17:00:02 | FromDiscord | <haxscramper> https://prog21.dadgum.com/55.html |
17:00:16 | FromDiscord | <ShalokShalom> @haxscramper Yes, I am actually fine with 60% already |
17:00:22 | FromDiscord | <ShalokShalom> That is not the problem |
17:00:31 | FromDiscord | <ShalokShalom> Persistent data structures would be fine |
17:00:40 | FromDiscord | <ShalokShalom> While I could live without them |
17:00:49 | * | Vladar quit (Quit: Leaving) |
17:01:02 | FromDiscord | <haxscramper> we have immutable variables and deep immutability for ref objects |
17:01:07 | FromDiscord | <Yardanico> But why are you so keen on not having to specify types of arguments |
17:01:10 | FromDiscord | <pygoscelis> @ShalokShalom have you peeked red lang? |
17:01:25 | FromDiscord | <Yardanico> In procedures at definition |
17:01:41 | FromDiscord | <ShalokShalom> Could I just infer types like this:↵↵const name = 1 |
17:01:45 | FromDiscord | <haxscramper> yes |
17:01:48 | FromDiscord | <ShalokShalom> In this case, name would be the type |
17:01:50 | FromDiscord | <ShalokShalom> Not int |
17:01:57 | FromDiscord | <ShalokShalom> I could live with this |
17:01:58 | FromDiscord | <haxscramper> !eval const name = 1; echo typeof(name) |
17:02:00 | FromDiscord | <ShalokShalom> Actually prefer it |
17:02:01 | NimBot | int |
17:02:35 | FromDiscord | <ShalokShalom> @pygoscelis No? Isnt that a gpu language? |
17:02:43 | FromDiscord | <ShalokShalom> But I need something with Godot bindings. |
17:02:54 | FromDiscord | <Yardanico> lol |
17:03:00 | FromDiscord | <ShalokShalom> > But why are you so keen on not having to specify types of arguments↵@Yardanico Because it keeps the code clean |
17:03:08 | FromDiscord | <Yardanico> How?!?11 |
17:03:14 | FromDiscord | <Yardanico> it makes it less clean |
17:03:15 | FromDiscord | <haxscramper> Very dubious statement |
17:03:21 | FromDiscord | <ShalokShalom> Not putting noise in |
17:03:26 | FromDiscord | <Yardanico> you have to hover over arguments to see their types |
17:03:29 | FromDiscord | <ShalokShalom> Type annotations are just noise to me |
17:03:31 | FromDiscord | <Yardanico> You're not putting noise |
17:03:34 | FromDiscord | <ShalokShalom> I dont wanna see yhem |
17:03:38 | FromDiscord | <Yardanico> You're putting actual valuable info |
17:03:38 | FromDiscord | <ShalokShalom> Yes 👌 |
17:03:41 | FromDiscord | <ShalokShalom> I like that |
17:03:44 | FromDiscord | <Yardanico> about what you expect |
17:04:06 | FromDiscord | <Yardanico> meh, whatever, I'm out of this discussion |
17:04:15 | FromDiscord | <ShalokShalom> You like the annotations in code, I like them in IDE, why do you wanna cut me head off over this? |
17:04:47 | FromDiscord | <Rika> hey man whatever, its a preference thing |
17:04:59 | FromDiscord | <haxscramper> Well, this is really pointless discussion indeed, but IDE is should not be a part of a language. |
17:05:14 | FromDiscord | <ShalokShalom> > !eval const name = 1; echo typeof(name)↵@haxscramper So, in which case works the inference and in which cases not? |
17:05:26 | FromDiscord | <pygoscelis> > @pygoscelis No? Isnt that a gpu language?↵@ShalokShalom it's a full-stack language, but it has types 😄 |
17:05:33 | FromDiscord | <ShalokShalom> @pygoscelis Ok, thanks a lot |
17:05:38 | FromDiscord | <ShalokShalom> I will see. |
17:05:45 | FromDiscord | <ShalokShalom> Out of curiosity 👀 |
17:06:08 | FromDiscord | <haxscramper> for `let/var/const` you don't have to specify the types. If you call generic proc `func gen[T](a: T)` with `gen(12)` or something else it will automatically infer type for `T` as `int` (or something else) |
17:06:09 | FromDiscord | <ShalokShalom> See what I found today: https://amulet.works/ |
17:06:20 | FromDiscord | <ShalokShalom> @haxscramper thanks a lot |
17:06:38 | FromDiscord | <haxscramper> so you have to write type only in **declarations** |
17:07:05 | FromDiscord | <haxscramper> it is not like in C++ where you have `std::vector<uniuque_pointer<T>>::iterator` all over the place |
17:07:12 | FromDiscord | <ShalokShalom> But when I annotate it with [T] do I need to do anything else when I later interact with it? |
17:07:14 | FromDiscord | <haxscramper> And even C++11 has `auto` |
17:07:21 | FromDiscord | <haxscramper> > But when I annotate it with [T] do I need to do anything else when I later interact with it?↵@ShalokShalom no |
17:07:22 | FromDiscord | <ShalokShalom> Yes, I know that |
17:07:26 | FromDiscord | <pygoscelis> > See what I found today: https://amulet.works/↵@ShalokShalom reminds me of haskell |
17:07:28 | FromDiscord | <ShalokShalom> Ok, thanks |
17:07:36 | FromDiscord | <ShalokShalom> @pygoscelis Yes, totally. |
17:07:45 | FromDiscord | <ShalokShalom> The whole ML family looks like this. |
17:07:51 | FromDiscord | <haxscramper> You can explicitly specify `gen[T]()` if there is no parameters to infer type from |
17:07:55 | FromDiscord | <ShalokShalom> They all have it from Miranda and SML. |
17:08:34 | FromDiscord | <ShalokShalom> I will read about generic functions |
17:08:50 | FromDiscord | <ShalokShalom> > for `let/var/const` you don't have to specify the types. If you call generic proc `func gen[T](a: T)` with `gen(12)` or something else it will automatically infer type for `T` as `int` (or something else)↵@haxscramper Why gen*12*? |
17:08:58 | FromDiscord | <ShalokShalom> (edit) 'gen*12*?' => 'gen*(12)*?' |
17:09:06 | FromDiscord | <ShalokShalom> So, explicitly 12 |
17:09:42 | FromDiscord | <Rika> no, can be any int |
17:09:47 | FromDiscord | <ShalokShalom> https://nim-lang.org/docs/manual.html#generics |
17:09:53 | FromDiscord | <haxscramper> `gen(@[("hello, 3), ("world", 2)]` will make `seq[(string, int)]` |
17:09:55 | FromDiscord | <Rika> so like `gen(aVal)` if aVal were an int would work too |
17:10:01 | FromDiscord | <ShalokShalom> fun gen brings me no results |
17:10:07 | FromDiscord | <ShalokShalom> gen has like 136 |
17:10:09 | FromDiscord | <Rika> its just an example |
17:10:28 | FromDiscord | <ShalokShalom> Where would I find docs on func gen now? |
17:10:29 | FromDiscord | <Rika> the generic part is the `[T]` part |
17:10:34 | FromDiscord | <ShalokShalom> (edit) 'fun' => 'fuc' |
17:10:38 | FromDiscord | <ShalokShalom> I know |
17:10:44 | FromDiscord | <ShalokShalom> (edit) 'fuc' => 'func' |
17:10:59 | FromDiscord | <ShalokShalom> I am now trying to find documentation on func gen |
17:11:06 | FromDiscord | <ShalokShalom> gen is a keyword? |
17:11:10 | FromDiscord | <Rika> uh noi |
17:11:14 | FromDiscord | <Rika> its just the function name |
17:11:16 | FromDiscord | <ShalokShalom> Ah, ok |
17:11:20 | FromDiscord | <Rika> just an example |
17:11:29 | FromDiscord | <Rika> the important part is the `[T`] |
17:11:31 | FromDiscord | <Rika> (edit) '`[T`]' => '`[T]`' |
17:11:49 | FromDiscord | <ShalokShalom> > for `let/var/const` you don't have to specify the types. If you call generic proc `func gen[T](a: T)` with `gen(12)` or something else it will automatically infer type for `T` as `int` (or something else)↵@haxscramper Aaah, so generic proc is it called, because it has a generic type |
17:11:58 | FromDiscord | <ShalokShalom> I thought the gen is doing that. |
17:12:10 | FromDiscord | <ShalokShalom> Thanks a lot. |
17:12:54 | FromDiscord | <ShalokShalom> Is there an option type in Nim? |
17:13:13 | solitudesf | https://nim-lang.org/docs/options.html |
17:13:16 | FromDiscord | <Rika> https://nim-lang.org/docs/options.html ? |
17:13:19 | FromDiscord | <Rika> fuck, im slow |
17:13:24 | FromDiscord | <Rika> damn you solitude |
17:13:28 | solitudesf | i even gave you a head start |
17:13:32 | FromDiscord | <Rika> smh |
17:13:49 | * | superbia joined #nim |
17:14:02 | FromDiscord | <ShalokShalom> https://github.com/vegansk/nimfp |
17:14:14 | FromDiscord | <ShalokShalom> This one has also one |
17:17:44 | FromDiscord | <ShalokShalom> Hnn, I am confused |
17:17:50 | FromDiscord | <ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/758738980933206026/Screenshot_2020-09-24-19-17-30-69_3aea4af51f236e4932235fdada7d1643.jpg |
17:17:58 | FromDiscord | <ShalokShalom> Isn't var declaring it? |
17:18:27 | FromDiscord | <ShalokShalom> Thats from the examples. I am aware, that they are not meant, to be running like that. |
17:18:28 | FromDiscord | <Rika> import options |
17:18:32 | FromDiscord | <ShalokShalom> Ok |
17:18:35 | FromDiscord | <Rika> thats all you need to change |
17:18:35 | FromDiscord | <ShalokShalom> Of course |
17:18:38 | FromDiscord | <Rika> should work after that |
17:18:38 | FromDiscord | <ShalokShalom> Ah, oo |
17:18:49 | FromDiscord | <ShalokShalom> But why isn't the error saying that? |
17:18:57 | FromDiscord | <Rika> it is, just in a roundabout way |
17:19:04 | FromDiscord | <ShalokShalom> Because some become a keyword? |
17:19:10 | FromDiscord | <Rika> no |
17:19:11 | FromDiscord | <ShalokShalom> (edit) 'become' => 'becomes' |
17:19:14 | FromDiscord | <ShalokShalom> So why? |
17:19:17 | FromDiscord | <Rika> its just saying that `some` doesnt exist |
17:19:54 | FromDiscord | <ShalokShalom> It can not import option |
17:20:04 | FromDiscord | <ShalokShalom> Seems like the playground has no access to it |
17:20:27 | FromDiscord | <ShalokShalom> Yeah, but why is importing option "declaring" some? |
17:20:59 | FromDiscord | <Rika> no, `options`, not `option` |
17:21:02 | FromDiscord | <Rika> with an s |
17:21:02 | solitudesf | `some` is a function in options module |
17:21:49 | FromDiscord | <ShalokShalom> Ah |
17:21:56 | FromDiscord | <ShalokShalom> @solitudesf[IRC]#0000 thats what I meant |
17:22:08 | FromDiscord | <ShalokShalom> > Because some becomes a keyword?↵@ShalokShalom |
17:22:13 | FromDiscord | <ShalokShalom> Or doesn't it? |
17:22:23 | FromDiscord | <Rika> no, some is not a keyword |
17:22:24 | solitudesf | no, your terminology is all kinds of fucked up |
17:22:34 | solitudesf | please, read the tutorial |
17:22:41 | FromDiscord | <Rika> yeah, i think you have wrong definitions |
17:23:15 | FromDiscord | <ShalokShalom> So what is some called in this instance? |
17:23:28 | FromDiscord | <Yardanico> A procedure |
17:23:37 | FromDiscord | <ShalokShalom> Thanks a lot |
17:23:48 | FromDiscord | <ShalokShalom> Ah, as a lib. |
17:23:59 | FromDiscord | <haxscramper> `proc some[T](val: T): Option[T] {...}` - the word `proc` means it is a procedure |
17:23:59 | FromDiscord | <ShalokShalom> Like, could I also import just some? |
17:24:01 | FromDiscord | <Yardanico> https://nim-lang.org/docs/options.html#some%2CT |
17:24:06 | FromDiscord | <Yardanico> Yes, you can |
17:24:06 | FromDiscord | <Vindaar> on my phone, someone link PMunch's option utils lib |
17:24:07 | FromDiscord | <ShalokShalom> And not whole options? |
17:24:14 | FromDiscord | <ShalokShalom> Ah, understand |
17:24:31 | FromDiscord | <Yardanico> but there wouldn't be any difference in performance |
17:24:35 | FromDiscord | <ShalokShalom> I still think, it should have its own distinctive color then |
17:24:38 | FromDiscord | <Yardanico> ?? |
17:24:45 | FromDiscord | <haxscramper> just install emacs |
17:24:46 | FromDiscord | <Yardanico> it's just a normal procedure call |
17:24:50 | FromDiscord | <ShalokShalom> When its not just another name that I give it |
17:24:58 | FromDiscord | <Solitude> every function should have its own color? |
17:25:02 | FromDiscord | <Yardanico> You can create your own some |
17:25:03 | FromDiscord | <Yardanico> Easily |
17:25:07 | FromDiscord | <ShalokShalom> Yeah, but its not something that I specify |
17:25:25 | FromDiscord | <Avatarfighter> https://github.com/PMunch/nim-optionsutils |
17:25:28 | FromDiscord | <haxscramper> And then `(" \\(some\\)" . 'font-lock-keyword-face)` - problem solved |
17:25:30 | FromDiscord | <ShalokShalom> No, just import functions could have the color of import functions. |
17:25:39 | FromDiscord | <Yardanico> Wat |
17:25:39 | FromDiscord | <ShalokShalom> Or anything, just not white |
17:25:51 | FromDiscord | <ShalokShalom> @haxscramper Thanks a lot |
17:25:56 | FromDiscord | <Avatarfighter> I hope that was what Vindaar meant by PMunch's option helper lib |
17:26:01 | FromDiscord | <ShalokShalom> Those things work really nice in Nim |
17:26:09 | FromDiscord | <ShalokShalom> @Avatarfighter Thanks a lot |
17:26:23 | FromDiscord | <Avatarfighter> I did nothing 😛 |
17:27:15 | FromDiscord | <Solitude> why, in generic context its not even known if function is imported or local |
17:28:06 | FromDiscord | <Vindaar> yes, thank you! |
17:28:15 | FromDiscord | <ShalokShalom> I know, I am asking for too much, but could I use it that way: https://media.discordapp.net/attachments/371759389889003532/758741601349664768/Screenshot_2020-09-24-19-27-46-66.jpg |
17:28:48 | FromDiscord | <Yardanico> hasVal is already there |
17:28:49 | FromDiscord | <haxscramper> Pattern matching is WIP |
17:28:54 | FromDiscord | <Rika> look at `withSome` in PMunch's `optionsutils` library |
17:29:26 | FromDiscord | <haxscramper> Oh, I actually need to special-case options |
17:29:35 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/758741934226669578/unknown.png |
17:29:39 | FromDiscord | <ShalokShalom> Ah, ok |
17:29:44 | FromDiscord | <ShalokShalom> I am fine now |
17:29:47 | FromDiscord | <ShalokShalom> Thanks a lot |
17:30:11 | FromDiscord | <Yardanico> @haxscramper ah right wanted to ask you - are there any plans for some user defineable hooks to pattern matching? |
17:30:21 | FromDiscord | <ShalokShalom> > Oh, I actually need to special-case options↵@haxscramper You mean to consider uppercase, as in this example? |
17:30:22 | FromDiscord | <Yardanico> So people can add other extensions like json or ootions |
17:30:38 | FromDiscord | <Yardanico> @ShalokShalom no |
17:30:48 | FromDiscord | <ShalokShalom> I think jsons are possible by default? |
17:30:55 | FromDiscord | <Yardanico> To add additional support to options |
17:30:59 | FromDiscord | <Yardanico> For* |
17:31:11 | FromDiscord | <haxscramper> Well, the issue is that I don't really know how it would look like exactly. If you have any specific use case in mind then I might try to think about it |
17:31:18 | FromDiscord | <haxscramper> You can use key-value pairs |
17:31:23 | FromDiscord | <haxscramper> And custom predicates |
17:31:37 | FromDiscord | <haxscramper> But for user hooks I first need to know at least some use cases |
17:31:53 | FromDiscord | <haxscramper> Because I personally don't really have anything of that sort |
17:31:57 | * | superbia quit (Read error: Connection reset by peer) |
17:32:16 | FromDiscord | <haxscramper> So I need an example of what/how you would like to do it |
17:32:22 | FromDiscord | <haxscramper> And then play around it |
17:33:03 | FromDiscord | <haxscramper> like you can already do `{"name": _(it.startsWith("hello"))` |
17:33:08 | FromDiscord | <ShalokShalom> How you mean special case options. |
17:33:14 | FromDiscord | <ShalokShalom> (edit) 'options.' => 'options?' |
17:33:18 | FromDiscord | <Yardanico> Add additional code |
17:33:18 | FromDiscord | <haxscramper> And `{"name": @val is JString()}` |
17:33:23 | FromDiscord | <Yardanico> To support options better |
17:33:34 | FromDiscord | <Yardanico> That's what "special case something" means |
17:33:41 | FromDiscord | <Yardanico> To add support specifically for something |
17:34:03 | FromDiscord | <haxscramper> Yes, I though you had some ideas for user-defined extensions |
17:34:05 | FromDiscord | <ShalokShalom> Ah, ok ^^ |
17:34:17 | * | mmohammadi9812 quit (Ping timeout: 256 seconds) |
17:34:24 | FromDiscord | <ShalokShalom> I am actually quite pleased |
17:34:45 | FromDiscord | <ShalokShalom> I need to bend somewhat, but Nim looks really very bendable |
17:34:59 | FromDiscord | <ShalokShalom> Lots of other languages either support those things, or they dont |
17:35:09 | FromDiscord | <haxscramper> For options I might just rewrite `Some(x)` to `(isSome: true, get: @x)` |
17:35:41 | FromDiscord | <ShalokShalom> Nim is somehow the very first language that lets me do all those things with one line of code or by simply importing a library |
17:35:54 | * | rockcavera quit (Remote host closed the connection) |
17:36:08 | FromDiscord | <haxscramper> And this is will make it support things like `[all (Some(@vals) | _)]`, `Some(@x)` etc. |
17:36:12 | FromDiscord | <haxscramper> Basically for free |
17:36:17 | FromDiscord | <ShalokShalom> And also: I dont need so much annotations and everything explicit, since I write very simple code |
17:36:44 | FromDiscord | <ShalokShalom> I can understand, that when I add up 10.000 lines, that I will enjoy these type annotations |
17:36:53 | FromDiscord | <ShalokShalom> But not, if I write a simple script. |
17:36:57 | FromDiscord | <ShalokShalom> 🤷♂️ |
17:37:24 | FromDiscord | <haxscramper> Might fuck up your day a little if you have something like `enSome` or en `enNone()`, but whatewher |
17:37:25 | FromDiscord | <ShalokShalom> That was specifically, what I disliked about Rust. |
17:37:41 | FromDiscord | <ShalokShalom> There was/is no way to keep the language concise. |
17:37:55 | FromDiscord | <ShalokShalom> Nim seems to bend. |
17:38:17 | FromDiscord | <haxscramper> Just write macro that implements HM type inference |
17:38:30 | FromDiscord | <haxscramper> I'm sure it might be possible to implement |
17:38:40 | FromDiscord | <ShalokShalom> Haha |
17:38:50 | FromDiscord | <ShalokShalom> I am not capable of doing that |
17:38:55 | FromDiscord | <ShalokShalom> And you know that |
17:39:00 | FromDiscord | <haxscramper> Good first project |
17:39:05 | FromDiscord | <ShalokShalom> Haha |
17:39:19 | FromDiscord | <ShalokShalom> Good first project is something in Godot. |
17:39:19 | FromDiscord | <haxscramper> My first thing I wrote in nim was ipynb -> word/latex converter |
17:39:38 | FromDiscord | <ShalokShalom> Yeah nice |
17:39:46 | FromDiscord | <ShalokShalom> You first thing in programming? |
17:40:20 | FromDiscord | <haxscramper> Don't remember. Something related to Arduino |
17:40:44 | FromDiscord | <ShalokShalom> Comparable to the implementation of a HM type system? |
17:40:44 | FromDiscord | <ShalokShalom> 😅 |
17:42:01 | FromDiscord | <ShalokShalom> Thanks a lot. I will see, I think I can live with it, how it is now. Pattern matching is available as library, did you look at that: |
17:42:01 | FromDiscord | <ShalokShalom> https://github.com/andreaferretti/patty |
17:43:11 | FromDiscord | <ShalokShalom> I also dont want to think about types 😳 |
17:43:34 | FromDiscord | <ShalokShalom> It should just run in the background and warn me, when I am about to do shit. |
17:44:13 | * | NimBot joined #nim |
17:44:42 | Araq | there you go, no thinking required, you simply look even less at the screen |
17:45:46 | * | shad0w_ joined #nim |
17:45:57 | Araq | you can do even better than that by switching off your computer and watching TV instead |
17:46:06 | FromDiscord | <ShalokShalom> Semi funny |
17:52:59 | Araq | what isn't funny is a decade of experience with "I don't want to think" "programmers" |
17:54:15 | FromDiscord | <ShalokShalom> Its not about that |
17:54:22 | shad0w_ | look's like Araq's seem some shit (if that's alright to say here?) |
17:54:28 | FromDiscord | <ShalokShalom> I dont want to think about it right from the start |
17:54:29 | shad0w_ | seen* |
17:54:38 | FromDiscord | <ShalokShalom> I dont plan to start on that level |
17:54:57 | FromDiscord | <Yardanico> Uh wat |
17:54:58 | FromDiscord | <Rika> youre not making yourself sound any less like what araq described |
17:55:04 | FromDiscord | <ShalokShalom> But that's what support wheels are for |
17:55:22 | FromDiscord | <ShalokShalom> @Rika I dont plan to. I dont wanna think about everything |
17:55:24 | FromDiscord | <Yardanico> Support wheels exist in Nim |
17:55:27 | FromDiscord | <Yardanico> auto type |
17:55:37 | FromDiscord | <ShalokShalom> Most here dont wanna think about manual memory control |
17:55:54 | FromDiscord | <Yardanico> Apples and oranges yay |
17:55:59 | FromDiscord | <ShalokShalom> If you would be the opposite of what he describes, what you all coding in machine code |
17:56:06 | FromDiscord | <ShalokShalom> No, just extending the example. |
17:56:10 | FromDiscord | <ShalokShalom> I am a newbie. |
17:56:16 | * | mmohammadi9812 joined #nim |
17:56:32 | FromDiscord | <Yardanico> Yes, and it's much better to learn the correct way from the start |
17:56:38 | FromDiscord | <ShalokShalom> I don't wanna think about the same complexity than a decade long coder |
17:56:47 | FromDiscord | <Yardanico> Well you don't have to |
17:56:50 | FromDiscord | <Yardanico> You do simple programs |
17:56:57 | FromDiscord | <ShalokShalom> Yeah, correct is what feels correct to me |
17:57:39 | FromDiscord | <Yardanico> Not to the compiler? |
17:57:52 | FromDiscord | <Rika> well, use a language that's 100% conforming to what you deem correct |
17:58:12 | FromDiscord | <haxscramper> https://play.nim-lang.org/#ix=2yCs why converter doesn't work if I use it on multiple arguments at once |
17:58:13 | FromDiscord | <Rika> and if you cant, then the only other option is to make that language or deal with a language that is less conforming |
17:58:50 | FromDiscord | <ShalokShalom> That language has no bindings to Godot |
17:59:10 | FromDiscord | <Rika> see second option |
17:59:38 | FromDiscord | <Rika> @haxscramper second failing line gives an internal error, likely a compiler bug? |
17:59:58 | FromDiscord | <Rika> fun stuff |
18:00:16 | FromDiscord | <Yardanico> <@208199869301522432> sorry, but it's just starting to feel like you're blaming _Nim_ because it's not the language suitable for _you_ |
18:02:03 | FromDiscord | <Yardanico> Also real world is real world, you might not be able to find exactly what you want, so you'll have to give up some of your requirements |
18:06:12 | FromDiscord | <haxscramper> How can I put `array` in typeclass together with other types that don't have generic parameters? Like `A = int | array[int, N]` - but I can't omit `N`. `openarray` seems not to be working - https://play.nim-lang.org/#ix=2yCv |
18:06:28 | FromDiscord | <haxscramper> Just different approach to implicit conversion |
18:07:21 | FromDiscord | <Yardanico> Well, i know your issue there I think |
18:08:00 | FromDiscord | <Yardanico> Ah no, I get what I mean |
18:08:10 | * | gmaggior joined #nim |
18:08:54 | FromDiscord | <Yardanico> you* |
18:09:19 | FromDiscord | <Yardanico> You'll probably have to use overloads there? |
18:09:35 | * | muffindrake quit (Ping timeout: 272 seconds) |
18:11:34 | * | opal joined #nim |
18:13:11 | FromDiscord | <haxscramper> https://play.nim-lang.org/#ix=2yCA for different parameters I need to explicitly specify that I have different generic types |
18:13:31 | * | NimBot joined #nim |
18:13:59 | Araq | what's common between int and array? |
18:14:15 | * | superbia joined #nim |
18:14:40 | FromDiscord | <haxscramper> My real use case is `char`, `set[char]` and `openarray[string]` but I just have habit of using `int` for all exambles |
18:14:56 | FromDiscord | <haxscramper> And also just `string` |
18:15:03 | FromDiscord | <Yardanico> @haxscramper you can do the same with "a: StrIn, b: StrIn", no? |
18:15:10 | FromDiscord | <haxscramper> No |
18:15:43 | * | superbia quit (Client Quit) |
18:15:47 | FromDiscord | <haxscramper> Like, I would expect it to work like this too, but - https://play.nim-lang.org/#ix=2yCB |
18:18:56 | FromDiscord | <haxscramper> `StrPartConv[T] = char | set[char] | string | seq[string] | openarray[string] | array[T, string]` seems to just kill compiler too |
18:20:21 | * | muffindrake joined #nim |
18:21:59 | FromDiscord | <haxscramper> @Yardanico my `Some(@x)` idea is close enough to what you had in mind or there is something else? I just got impression you want to have some kind of mechanism for completely arbitrary user-defined matching mechanisms |
18:22:13 | FromDiscord | <Yardanico> Well I don't have any specific in mind :( |
18:22:21 | FromDiscord | <Yardanico> anything* |
18:23:34 | * | muffindrake quit (Client Quit) |
18:24:03 | * | muffindrake joined #nim |
18:32:03 | * | opal quit (Ping timeout: 240 seconds) |
18:37:06 | * | shad0w_ quit (Remote host closed the connection) |
18:37:56 | * | opal joined #nim |
18:38:27 | Araq | wow system.add(var seq[T], openArray[T]) is really extensively used in npeg |
18:44:23 | federico3 | Araq: for "IC"? |
18:44:27 | federico3 | wht's IC? |
18:44:36 | Araq | incremental compilation |
18:44:48 | federico3 | using... zstd? |
18:45:45 | Araq | storing the internal datastructures to disk using some compression cannot be a bad idea |
18:45:48 | FromDiscord | <Yardanico> For compressing data? |
18:46:01 | FromDiscord | <Yardanico> @Araq we have pure Nim snappy compression |
18:46:04 | * | Zectbumo joined #nim |
18:46:42 | federico3 | I wonder what's the level of redundancy of a binary-packed AST |
18:47:00 | FromDiscord | <Yardanico> https://github.com/status-im/nim-snappy and https://github.com/guzba/supersnappy |
18:48:05 | FromDiscord | <Yardanico> Second one has no dependencies outside of the stdlib |
18:48:54 | Araq | federico3, reduced by a factor of 4, iirc |
18:49:52 | * | a_chou joined #nim |
18:50:20 | federico3 | then I wonder what AST structures are most common |
18:50:37 | Araq | dot expressions and function calls |
18:56:07 | * | aenesidemus quit (Quit: Leaving) |
19:09:54 | Zevv | Araq: how is this "wow"? |
19:10:51 | Araq | proc `+`*(p: Patt): Patt = |
19:10:51 | Araq | result.add p |
19:10:51 | Araq | result.add *p |
19:11:14 | Araq | feels strange to me but ok |
19:11:32 | Zevv | haha |
19:11:42 | Zevv | '*p' is 'zero or more' |
19:11:57 | Zevv | '+p' is 'one or more'. So that's first one, followed by zero or more |
19:12:00 | Zevv | makes perfect sense |
19:15:06 | * | kenran joined #nim |
19:26:24 | federico3 | Araq: zstd makes it easier to share a pregenerated dictionary to compress small chunks of data efficiently |
19:40:53 | Zevv | Araq: npeg has no AST, it has an IR that gets recursively built, each operator takes one or more chunks of 'child IR' which gets encapsulated in some more IR, and at the end there's some simple peephole optimizations done. |
19:41:05 | Zevv | it's not efficient at all, but it's done at compile time only once. |
19:48:09 | leorize | @haxscramper how's your libclang project going? |
19:48:13 | FromDiscord | <haxscramper> Because pattern matching is not implemented using keywords mostly (like `all`, `until`, `opt`) and so on, it might be possible to adapt it into some kind of higher-level abstraction while retaining all syntax. Like `linq` for exampl |
19:48:56 | FromDiscord | <haxscramper> > @haxscramper how's your libclang project going?↵@leorize Clang itself is usable, right now I'm writing own wrapper generator to find out missing parts in the API↵Basically trying to provide helper procs that will make C++ less horrible to work with↵But parsing itself is done completely |
19:51:19 | leorize | that's nice \o/ |
19:51:35 | leorize | hopefully this can be made into a nimterop backend or as a standalone tool |
19:52:15 | * | rockcavera joined #nim |
19:52:16 | * | kenran quit (Ping timeout: 260 seconds) |
19:54:06 | FromDiscord | <shashlick> i was just chatting with @haxscramper about it |
19:54:13 | FromDiscord | <shashlick> one less thing for me to worry about 😉 |
19:55:44 | * | narimiran quit (Ping timeout: 256 seconds) |
19:56:37 | * | superbia joined #nim |
19:56:39 | * | superbia quit (Client Quit) |
19:58:25 | FromDiscord | <haxscramper> > hopefully this can be made into a nimterop backend or as a standalone tool↵Most likely a nimterop backend, because this way we would have to deal with C++ build """"system"""" only once (like nimterop already has integration with conan) |
19:58:40 | FromDiscord | <haxscramper> Although right now I can't handle macros *at all* |
19:59:02 | FromDiscord | <haxscramper> E,g. can't wrap macros |
20:04:13 | leorize | isn't there a way to access macros from clang ast? |
20:07:38 | FromDiscord | <haxscramper> no |
20:08:18 | FromDiscord | <haxscramper> There are preprocessor callbacks in libtooling, but you can't just access macros |
20:08:31 | leorize | https://github.com/niosus/EasyClangComplete/issues/251 |
20:08:32 | disbot | ➥ No tooltips available for macros |
20:08:38 | leorize | ^ so I found that |
20:09:13 | leorize | looks like if you pass PARSE_DETAILED_PROCESSING_RECORD then clang will encode MACRO_DEFINITON/MACRO_INSTANTIATION to the AST |
20:15:04 | * | NimBot joined #nim |
20:15:36 | * | livcd quit (Ping timeout: 272 seconds) |
20:17:00 | * | livcd joined #nim |
20:20:06 | FromDiscord | <Yardanico> WinXP sp1 source got leaked lol |
20:20:14 | FromDiscord | <Yardanico> real this time |
20:20:15 | FromDiscord | <haxscramper> leorize: Looks *really* interesting, thanks a lot |
20:20:33 | Prestige | does it matter now Yardanico ? lol |
20:20:43 | FromDiscord | <Yardanico> yes |
20:21:08 | FromDiscord | <Yardanico> you think that there are no companies running win xp now? |
20:21:16 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/758785129459744858/20200924_232023.jpg https://media.discordapp.net/attachments/371759389889003532/758785129958604830/20200924_232025.jpg https://media.discordapp.net/attachments/371759389889003532/758785130130047026/20200924_232027.jpg |
20:21:20 | FromDiscord | <Yardanico> From one of the people in telegram |
20:21:23 | FromDiscord | <Rika> its their fault if theyre still running it |
20:21:27 | Prestige | ^ |
20:21:45 | FromDiscord | <Elegant Beef> Hospitals tend to run older software due to the tech and support |
20:21:46 | FromDiscord | <haxscramper> I have some windows version that predates *95* on some computers in my university |
20:22:12 | FromDiscord | <haxscramper> the computer is so old I could literally hear how it is saving my files |
20:22:19 | Prestige | lmao |
20:22:48 | FromDiscord | <haxscramper> And I'm not joking in the slightest, I really heard the hard drive noises on each Ctrl-S |
20:23:46 | FromDiscord | <Yardanico> Well you can hear that on modern PCs too |
20:23:50 | FromDiscord | <Yardanico> With an old hdd |
20:24:43 | FromDiscord | <haxscramper> <@!208199869301522432> are you familiar with active patterns in F# - I'm mostly interested in how they can be used for matching sequences. If you have any recommendations/links for it? Aside from default google search. I'm not familliar with `F#`, so maybe you can recommend something |
20:24:50 | FromDiscord | <haxscramper> For pattern matching |
20:27:58 | * | gour_ quit (Remote host closed the connection) |
20:29:53 | * | natrys quit (Quit: natrys) |
20:31:27 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/2yDd |
20:32:11 | Araq | Zevv, https://github.com/nim-lang/Nim/pull/15320 makes your npeg fail, any help would be appreciated |
20:32:12 | disbot | ➥ fixes #14983 |
20:32:25 | Araq | my toy example now works but it fails for your real-world code |
20:32:28 | Araq | good night |
20:32:48 | FromDiscord | <haxscramper> Although if you help with tree construction it would be extremely good, because then I will be able to plug the whole thing into parser generator and we would get parser for ambiguous/left-recursive grammars |
20:34:10 | FromDiscord | <haxscramper> If I understand correctly Earley parser is one of the best algorithms in terms of grammars it can handle |
20:34:49 | FromDiscord | <haxscramper> And the article in question is http://loup-vaillant.fr/tutorials/earley-parsing/parser |
20:35:21 | Zevv | so the only change is the `move`, right |
20:44:10 | * | smitop joined #nim |
20:49:41 | * | mmohammadi9812 quit (Quit: I quit (╯°□°)╯︵ ┻━┻) |
20:50:44 | * | solitudesf quit (Ping timeout: 260 seconds) |
21:34:49 | * | a_chou quit (Ping timeout: 265 seconds) |
21:34:56 | * | Kaivo quit (Ping timeout: 258 seconds) |
21:37:17 | * | Kaivo joined #nim |
21:41:50 | * | Trustable quit (Remote host closed the connection) |
21:43:10 | * | a_chou joined #nim |
21:54:57 | FromDiscord | <Avatarfighter> What's good everyone |
21:55:19 | FromDiscord | <Avatarfighter> I may or may not be bored and without something to do so if anyone has a project and needs a partner lmk 👍 |
22:25:13 | * | apahl quit (Ping timeout: 260 seconds) |
22:25:57 | * | apahl joined #nim |
22:31:46 | * | a_chou quit (Ping timeout: 272 seconds) |
22:34:48 | * | abm quit (Read error: Connection reset by peer) |
22:38:07 | FromDiscord | <Elegant Beef> Help me waste time making a js nim wrapper 😛 |
22:38:42 | FromDiscord | <Elegant Beef> My stupid single file parser sorta works https://play.nim-lang.org/#ix=2yDC |
23:24:03 | * | opal quit (Ping timeout: 240 seconds) |
23:36:12 | * | a_chou joined #nim |
23:38:22 | * | opal joined #nim |
23:39:11 | * | gmaggior quit (Quit: Leaving) |