00:05:52 | FromDiscord | <evoalg> :w |
00:05:57 | FromDiscord | <evoalg> whoops |
00:07:45 | FromDiscord | <evoalg> @ElegantBeef I think this can be done all in a for loop using slicerator? ... https://play.nim-lang.org/#ix=3JRG |
00:11:10 | FromDiscord | <evoalg> (and my code is not optimized) |
00:26:23 | * | vicfred quit (Quit: Leaving) |
01:17:04 | FromDiscord | <TheDarkMode> Trying to run a Pixie example, from Nimble download folder. https://media.discordapp.net/attachments/371759389889003532/925557997978132520/unknown.png |
01:18:20 | FromDiscord | <Yardanico> maybe that demo no longer works, not sure |
01:18:29 | FromDiscord | <Yardanico> also, it's better to test demos by copying the code to your own folder |
01:18:34 | FromDiscord | <Yardanico> and not running the code straight from the .nimble folder |
01:19:47 | FromDiscord | <TheDarkMode> In reply to @Yardanico "also, it's better to": same error |
01:19:59 | FromDiscord | <Yardanico> yeah I didn't say that would fix it, but it's generally what you should do anyway |
01:20:07 | FromDiscord | <Yardanico> looks just like it wasn't tested after some changes in pixie |
01:20:11 | FromDiscord | <Yardanico> or maybe it's missing an import |
01:20:23 | FromDiscord | <Yardanico> that code shows using pixie with GL and not standalone though, there are a lot of tests you can look at |
01:23:02 | FromDiscord | <TheDarkMode> I even downloaded the GIT folder for Pixie and placed it in the Nim folder, running those examples gave many errors https://media.discordapp.net/attachments/371759389889003532/925559503523565599/unknown.png |
01:24:07 | FromDiscord | <Yardanico> What errors for example? |
01:24:30 | FromDiscord | <Yardanico> It's really hard to help with just folder images, it's much better if you always provide the error message |
01:25:06 | FromDiscord | <TheDarkMode> In reply to @Yardanico "It's really hard to": https://media.discordapp.net/attachments/371759389889003532/925560023847927848/unknown.png |
01:25:28 | FromDiscord | <TheDarkMode> I'm not sure what I'm missing - |
01:25:45 | FromDiscord | <Yardanico> as the error says it can't find the image |
01:25:52 | FromDiscord | <Yardanico> because you're supposed to execute this test outside the examples directory |
01:26:10 | FromDiscord | <Yardanico> you're supposed to execute it from the main directory of pixie (so in your case pixie-master) |
01:26:36 | FromDiscord | <Yardanico> so you need to switch to that directory first |
01:28:16 | FromDiscord | <TheDarkMode> In reply to @Yardanico "you're supposed to execute": thanks, will try |
01:30:07 | FromDiscord | <TheDarkMode> In reply to @Yardanico "you're supposed to execute": It built successfully, thanks for the help |
01:38:52 | FromDiscord | <dizzyliam> is there a way to set global compiler flags so you can compile with tcc by default? |
01:42:04 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/nims.html |
01:48:56 | FromDiscord | <dizzyliam> oop missed point one |
01:48:57 | FromDiscord | <dizzyliam> thanks |
01:56:17 | FromDiscord | <Yardanico> In reply to @TheDarkMode "It built successfully, thanks": they actually do stuff though |
01:56:26 | FromDiscord | <Yardanico> as you see in the code they write to an image |
01:56:46 | FromDiscord | <Yardanico> it's just that pixie already has those made in its repo for testing |
01:56:56 | FromDiscord | <Yardanico> try deleting examples/gradient.png and rerunning this program |
02:30:04 | FromDiscord | <retkid> so how stable is the inline asm? |
02:30:39 | FromDiscord | <retkid> anyone here use it? |
02:39:57 | * | neurocyte0132889 quit (Ping timeout: 240 seconds) |
02:50:31 | FromDiscord | <Yardanico> In reply to @retkid "so how stable is": it's literally just inline asm, what can be "stable" or not "stable" about it? |
02:50:41 | FromDiscord | <Yardanico> sure there are nim projects that use it, just search for asm in code |
02:51:43 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/925581820488196146/unknown.png |
02:52:46 | FromDiscord | <retkid> unsafe can have multiple meanings. Pretty sure it just means evaluated but it can have other meanings |
02:52:57 | FromDiscord | <retkid> (edit) "evaluated" => "not-evaluated" |
03:03:38 | NimEventer | New thread by Tmsa04: Would the Nim version number be helpful in deprecation documentation?, see https://forum.nim-lang.org/t/8750 |
03:15:55 | * | arkurious quit (Quit: Leaving) |
03:22:37 | * | noeontheend quit (Ping timeout: 240 seconds) |
03:29:57 | FromDiscord | <Yardanico> In reply to @retkid "unsafe can have multiple": no? unsafe here literally means "not safe", same as cast or raw pointers |
03:49:49 | * | xet7 joined #nim |
04:07:32 | nrds | <Prestige99> Is there a roadmap for concepts 2.0 or is that getting scrapped? |
04:07:35 | FromDiscord | <treeform> In reply to @TheDarkMode "Trying to run a": You appear to have older version of staticglfw |
04:07:55 | * | xet7 quit (Quit: Leaving) |
04:08:12 | FromDiscord | <treeform> In reply to @TheDarkMode "It built successfully, thanks": You need to run it from the root folder |
04:08:25 | FromDiscord | <treeform> In reply to @TheDarkMode "It built successfully, thanks": Do you still have issues? |
04:14:21 | * | rockcavera quit (Remote host closed the connection) |
04:46:51 | FromDiscord | <TheDarkMode> In reply to @treeform "You appear to have": how do I correct that? I appreciate the reply |
04:49:15 | FromDiscord | <TheDarkMode> In reply to @treeform "Do you still have": realtime.glfw seems to be the only real time example that works |
04:55:38 | FromDiscord | <TheDarkMode> In reply to @treeform "Do you still have": The first Error: I deleted the shadow.png file, as was suggested earlier today. The second error shows something went wrong in pixie (what that is Idk) https://media.discordapp.net/attachments/371759389889003532/925613008061857902/unknown.png |
05:38:07 | FromDiscord | <valerga> "Gnu already announced they're rewriting gcc with it" |
05:38:11 | FromDiscord | <valerga> I'm assuming this is not true |
05:38:22 | FromDiscord | <valerga> with nim |
05:47:44 | FromDiscord | <evoalg> ls |
05:51:49 | FromDiscord | <Rika> Of course it is not |
05:56:42 | FromDiscord | <treeform> In reply to @TheDarkMode "The first Error: I": Its trying to write to example folder, do you have an example folder on your path |
05:56:52 | FromDiscord | <treeform> is it writable |
05:57:07 | FromDiscord | <treeform> your last line says you are in `C:\>` |
05:57:20 | FromDiscord | <treeform> and not in the `pixie-master` folder |
05:57:33 | FromDiscord | <treeform> if you cd to the `pixie-master` it should work |
05:58:00 | FromDiscord | <treeform> it will also work if you create `C:\examples` folder but I don't recommend it. |
05:58:33 | FromDiscord | <treeform> instead of running this: |
05:58:34 | FromDiscord | <treeform> https://media.discordapp.net/attachments/371759389889003532/925628839751712768/unknown.png |
05:58:47 | FromDiscord | <treeform> you should cd to the last pixie-master folder |
05:59:04 | FromDiscord | <treeform> and run `nim c -r examples/shadow.nim` |
05:59:13 | FromDiscord | <treeform> that's what we do |
08:53:47 | NimEventer | New thread by Domogled: Enum in macro, see https://forum.nim-lang.org/t/8752 |
08:55:38 | * | Gustavo6046 quit (Quit: Leaving) |
09:01:46 | * | jjido joined #nim |
09:28:56 | FromDiscord | <konsumlamm> In reply to @nrds "<Prestige> Is there a": Prestige: they're on the roadmap (https://github.com/nim-lang/RFCs/issues/437) under stretch goals for 2.x |
10:17:20 | FromDiscord | <hmmm> Erorr: expected 'except' 🤔 |
10:17:57 | FromDiscord | <hmmm> why is it expecting except when I want to use it some lines later? |
10:18:07 | FromDiscord | <hmmm> very suspect |
10:18:12 | FromDiscord | <Elegantbeef> Code is wonderful |
10:18:26 | FromDiscord | <hmmm> not helpful beefy 😃 |
10:18:41 | FromDiscord | <Elegantbeef> I'm asking for the code |
10:18:54 | FromDiscord | <hmmm> there is no code is a proc of 3 lines with parseint lol |
10:19:35 | FromDiscord | <hmmm> okok I see if I can clean it up |
10:31:19 | FromDiscord | <konsumlamm> just posting error messages without code isn't helpful |
10:31:21 | FromDiscord | <konsumlamm> remember, we can't read your mind |
10:31:45 | FromDiscord | <hmmm> you shouldn't want to, my mind is not pretty lol |
10:32:02 | FromDiscord | <hmmm> I had a mini snag, but code is coming in all it's glorious 5 lines |
10:32:51 | FromDiscord | <haxscramper> the code is simple, just one line |
10:32:55 | FromDiscord | <haxscramper> and 10k coumns |
10:32:57 | FromDiscord | <haxscramper> (edit) "coumns" => "columns" |
10:34:06 | FromDiscord | <haxscramper> I think there was a 17-char snippet that crashed the compiler |
10:34:39 | FromDiscord | <hmmm> tadann |
10:34:39 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3JUF |
10:36:37 | FromDiscord | <haxscramper> As usual, adding imports helps .., and I'm not sure if indentation is correct in the first place |
10:37:11 | FromDiscord | <konsumlamm> the `else` should have the same indentation as the corresponding `if` |
10:38:03 | FromDiscord | <haxscramper> `readLine(stdin))` is unclosed |
10:38:11 | FromDiscord | <hmmm> ha! |
10:38:13 | FromDiscord | <haxscramper> or rather, `))` excessively closes |
10:38:38 | FromDiscord | <haxscramper> `var more = readLine(stdin))` |
10:38:40 | FromDiscord | <hmmm> I think it's right |
10:38:46 | * | neurocyte0132889 joined #nim |
10:38:46 | * | neurocyte0132889 quit (Changing host) |
10:38:46 | * | neurocyte0132889 joined #nim |
10:38:46 | FromDiscord | <hmmm> except had nothing to do with it |
10:39:36 | FromDiscord | <hmmm> ty 😋 |
10:39:45 | FromDiscord | <konsumlamm> at least if you use VS code (or any editor with error highlighting) it should point to the unopened ) |
10:40:01 | FromDiscord | <hmmm> I'm using ST |
10:40:08 | FromDiscord | <hmmm> not pointing anything sadl |
10:42:59 | FromDiscord | <Elegantbeef> You can also always use `nim check` if super lost or pass `--errorMax:0` |
10:43:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JUL |
10:46:34 | FromDiscord | <geekrelief> VS Code also has colored brackets https://code.visualstudio.com/blogs/2021/09/29/bracket-pair-colorization |
10:47:52 | FromDiscord | <hmmm> wa nimcheck would be nice to have to run on save, need to see if the ancient ST extension has the option |
10:48:44 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:57:37 | * | mahlon quit (Ping timeout: 240 seconds) |
11:05:43 | * | mahlon joined #nim |
11:17:46 | * | jjido joined #nim |
12:19:56 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
12:22:21 | FromDiscord | <qb> Who has access to https://github.com/nim-lang/opengl/blob/master/src/opengl/glut.nim? |
12:22:26 | FromDiscord | <qb> (edit) "https://github.com/nim-lang/opengl/blob/master/src/opengl/glut.nim?" => "https://github.com/nim-lang/opengl/blob/master/src/opengl/glut.nim ?" |
12:34:32 | * | jjido joined #nim |
13:03:08 | * | rockcavera joined #nim |
13:03:08 | * | rockcavera quit (Changing host) |
13:03:08 | * | rockcavera joined #nim |
13:25:47 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
13:42:03 | FromDiscord | <Shiba> In reply to @Yardanico "https://github.com/nim-lang/Nim/issues/19041#issuec": weird tcc says "dl libary not found" and "m libary not found" |
13:48:40 | FromDiscord | <Shiba> it turns out that the sorting of arguments passed to the nim colmpiler matters |
13:55:23 | FromDiscord | <Shiba> but now i have new errors |
13:55:39 | FromDiscord | <Rika> Which is |
14:18:57 | FromDiscord | <Shiba> it's a tcc specific or maybe another issue with float32 |
14:38:03 | * | arkurious joined #nim |
15:03:09 | * | bindu joined #nim |
15:07:03 | * | bindu left #nim (WeeChat 3.4) |
15:09:33 | * | noeontheend joined #nim |
15:20:50 | * | jjido joined #nim |
15:26:17 | * | noeontheend quit (Ping timeout: 240 seconds) |
15:31:32 | FromDiscord | <retkid> sent a long message, see http://ix.io/3JWG |
15:37:45 | FromDiscord | <konsumlamm> i think they were just confused because you said that unsafe can mean not-evaluated, which makes no sense |
15:39:45 | * | bkay joined #nim |
15:40:07 | * | beshr quit (Ping timeout: 250 seconds) |
15:40:16 | FromDiscord | <retkid> In reply to @Yardanico "it's literally just inline": well he also said this |
15:41:03 | FromDiscord | <retkid> in a very specific tone |
15:41:57 | * | snow joined #nim |
15:42:16 | FromDiscord | <konsumlamm> again, i think it's just confusion about what you mean |
15:42:21 | * | snow is now known as Guest6411 |
15:42:38 | FromDiscord | <retkid> alrighty then |
15:44:19 | * | Guest6411 quit (Client Quit) |
16:03:13 | FromDiscord | <Fish-Face> sent a code paste, see https://play.nim-lang.org/#ix=3JWU |
16:06:00 | * | nrds quit (Remote host closed the connection) |
16:06:49 | FromDiscord | <konsumlamm> it should |
16:07:03 | FromDiscord | <konsumlamm> looks like you're simply not adding that value |
16:07:22 | FromDiscord | <konsumlamm> besides, are you sure that you need a linked list and not just a `seq`? |
16:08:05 | FromDiscord | <Fish-Face> this is an experiment to see if that is the case 😛 |
16:08:25 | FromDiscord | <Fish-Face> it is for aoc, so experimenting to find optimal data structures |
16:09:51 | FromDiscord | <Fish-Face> sent a code paste, see https://play.nim-lang.org/#ix=3JWX |
16:10:34 | FromDiscord | <Fish-Face> there is other stuff that is `add`ing stuff to the list. Is there any dodgy state of the list I can check for? |
16:11:42 | NimEventer | New thread by Hobbyman: JSON - how to edit Jarrays (amongst others), see https://forum.nim-lang.org/t/8753 |
16:14:49 | FromDiscord | <konsumlamm> In reply to @Fish-Face "the actual code is:": do you have a small reproducible example that you can share (preferably through the nim plaground)? |
16:15:14 | FromDiscord | <Fish-Face> I have not attempted to reduce my case yet |
16:15:45 | FromDiscord | <Fish-Face> for now a confirmation that there is at least not something obviously wrong with that snippet is useful |
16:18:37 | * | kayabaNerve quit (Ping timeout: 240 seconds) |
16:20:58 | FromDiscord | <konsumlamm> i don't know your full code, so it's hard to say ¯\_(ツ)_/¯ |
16:25:12 | FromDiscord | <Fish-Face> yeah I will try to put something sensible together |
16:26:16 | FromDiscord | <Fish-Face> something screwy is definitely going on - as I modify the `echo` above I can get things to segfault - or not, but not on the line I'm changing. |
16:28:31 | FromDiscord | <hmmm> what was the magick invocation for default param? proc thingy(x : int = 10) ? |
16:29:56 | FromDiscord | <hmmm> yea it works |
16:30:41 | FromDiscord | <Fish-Face> looks like `list.tail` is getting changed, but `list.head.next` is still `nil` (for the case where this breaks on a length-one list) |
16:35:19 | FromDiscord | <Fish-Face> OK I think the problem is if you add an empty list |
16:37:11 | FromDiscord | <Fish-Face> `a.add(b)` where `b.head == nil` results in the old tail of `a` having `next==nil`, but now `a.tail` is different |
16:40:42 | FromDiscord | <Fish-Face> @konsumlamm https://play.nim-lang.org/#ix=3JX3 |
16:41:18 | FromDiscord | <Fish-Face> If it doesn't off with at least one element, the bug doesn't exist |
16:43:17 | FromDiscord | <Shiba> ok so iam getting errors of "not found files" of my project after i put --cpu:i386 |
16:43:50 | FromDiscord | <Shiba> (edit) "ok so iam getting errors ... of" added "in the exe" |
16:43:57 | FromDiscord | <Shiba> and it's wont compile if ididn't add that argument |
16:47:55 | FromDiscord | <Fish-Face> @konsumlamm I tried to add in stuff to print the addresses but the playground gave me a link to something completely different and I couldn't get back to that so whatever XD |
17:01:53 | FromDiscord | <hmmm> yo what were the rules for breaking up code too large to fit screen |
17:03:37 | FromDiscord | <Solitude> zoom out |
17:04:04 | FromDiscord | <hmmm> ha! |
17:06:14 | FromDiscord | <hmmm> I can't zoom out, I'm a boomer |
17:07:27 | FromDiscord | <Shiba> does 32 bit build affect file reading and accesing directories |
17:15:37 | FromDiscord | <geekrelief> In reply to @Shiba "does 32 bit build": I'm curious what's your OS and hardware? I recall you mentioned you're on a Pentium. Are you mixing 32-bit/64-bit applications? |
17:15:43 | * | Gustavo6046 joined #nim |
17:17:21 | FromDiscord | <Shiba> iam using windows 64 bit |
17:19:12 | FromDiscord | <geekrelief> ah ok my mistake. I thought Pentium's were only 32 bit |
17:26:27 | FromDiscord | <Shiba> it's always generates a .exe in nimcached and complains about not findind the other parts of my projects |
17:28:31 | FromDiscord | <geekrelief> what command are you running? |
17:42:19 | FromDiscord | <QueenFuckingAdrielle> Has anyone had any luck inlining nvidia ptx into nim? |
17:45:08 | FromDiscord | <Shiba> sent a code paste, see https://play.nim-lang.org/#ix=3JXx |
17:51:57 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3JXA |
17:52:00 | FromDiscord | <Require Support> This is probably written somewhere but do I need to do anything to use a global var within a proc? |
17:52:02 | FromDiscord | <Shiba> ?? |
17:52:20 | FromDiscord | <geekrelief> `-r` runs your program. If you want the output, remove that |
17:52:33 | FromDiscord | <geekrelief> I mean the executable |
17:53:04 | FromDiscord | <Shiba> but it's outputs it in nimcahe |
17:53:16 | FromDiscord | <geekrelief> that's what you want? |
17:53:37 | FromDiscord | <Shiba> no like can you change the out directory |
17:54:03 | FromDiscord | <Shiba> (edit) "out" => "output" |
17:54:21 | FromDiscord | <geekrelief> I'm not sure what you're saying |
17:55:44 | FromDiscord | <geekrelief> What's the `F:/slurp` for? |
17:58:40 | FromDiscord | <Shiba> i tried to change the path of the executable |
17:59:14 | FromDiscord | <geekrelief> don't you need `--outdir` for that? |
17:59:54 | FromDiscord | <Shiba> ok thanks |
18:00:10 | NimEventer | New Nimble package! preprod - preprod, see https://github.com/j-a-s-d/preprod |
18:06:35 | * | Gustavo6046 quit (Quit: Leaving) |
18:09:14 | FromDiscord | <Shiba> @geekrelief one more issue , so my nim scripts reads some filles like pngs , but the exe returns and error ofn not found , is that related to the cpu type |
18:09:25 | FromDiscord | <Shiba> (edit) "filles" => "files" |
18:09:33 | FromDiscord | <Shiba> (edit) "and" => "an" |
18:09:42 | FromDiscord | <Shiba> (edit) "ofn" => "of" |
18:09:58 | FromDiscord | <geekrelief> What's the error? I doubt it's related to your cpu type |
18:11:32 | FromDiscord | <konsumlamm> @Fish-Face that looks like a bug, you should open an issue on github |
18:11:56 | FromDiscord | <Shiba> In reply to @geekrelief "What's the error? I": https://media.discordapp.net/attachments/371759389889003532/925813398615232522/Capture.PNG |
18:11:57 | FromDiscord | <konsumlamm> btw, you don't need the `.toSeq` to convert it to a readable form, you can just print linked lists directly |
18:12:11 | NimEventer | New Nimble package! honeycomb - A dead simple, no-nonsense parser combinator library written in pure Nim., see https://github.com/KatrinaKitten/honeycomb |
18:12:48 | FromDiscord | <geekrelief> In reply to @Shiba "": your path is messed up |
18:12:57 | FromDiscord | <Shiba> ? |
18:13:29 | FromDiscord | <geekrelief> you're specifying `F:\slurp\assets` twicw |
18:13:31 | FromDiscord | <geekrelief> (edit) "twicw" => "twice" |
18:14:00 | FromDiscord | <geekrelief> post your code |
18:17:21 | * | noeontheend joined #nim |
18:21:11 | * | noeontheend quit (Client Quit) |
18:21:47 | FromDiscord | <Shiba> fixed thanks again |
18:22:57 | * | noeontheend joined #nim |
18:24:06 | FromDiscord | <geekrelief> @KatrinaKitten Nice work on honeycomb! I was just look at https://github.com/zevv/npeg. I guess this would be a good competitor? |
18:25:56 | FromDiscord | <Rosen> Was about to say, honeycomb looks sweet |
18:26:19 | FromDiscord | <geekrelief> yeah, I'm totally going to use it for my level prototyping |
18:27:08 | FromDiscord | <geekrelief> @haxscramper honeycomb looks like a good addition for this https://gist.github.com/haxscramper/3562fa8fee4726d7a30a013a37977df6 And thanks for writing that up! |
18:28:07 | FromDiscord | <KatrinaKitten> I wasn't aware npeg existed, it looks excellent 🙂 I think the goals of the two are slightly different though, npeg looks like a good option if you're already familiar with PEG syntax and want to convert it directly to Nim, where Honeycomb is aimed at providing a bit more of a high level API by comparison rather than a true DSL. |
18:28:50 | FromDiscord | <geekrelief> In reply to @KatrinaKitten "I wasn't aware npeg": I don't blame you. I only found out about npeg 2 days/yesterday ago? 🙂 |
18:28:54 | FromDiscord | <haxscramper> In reply to @geekrelief "<@!608382355454951435> honeycomb looks like": added |
18:30:59 | FromDiscord | <KatrinaKitten> I will say that if you're familiar with the Parsy library for Python, Honeycomb should feel very familiar, as that's the library I learned parser combinators through and I heavily mimicked the general design principles there. |
18:31:40 | FromDiscord | <geekrelief> I've only used parser combinators with Haskell a decade ago. I sorta recall liking them more than dealing with grammars 🙂 |
18:34:41 | FromDiscord | <KatrinaKitten> PEG-based grammars in particular can be one to one converted to and from typical parser combinators if I'm not mistaken, but the implementation isn't necessarily quite the same. It's definitely nice to be able to kind of hack things together in the language you're writing though, rather than being stuck in the tighter featureset of a dedicated syntax or DSL. |
18:35:00 | FromDiscord | <KatrinaKitten> (edit) "PEG-based grammars in particular can be one to one converted to and from typical parser combinators if I'm not mistaken, but the implementation isn't necessarily quite the same. It's definitely nice to be able to kind of hack things together in the language you're writing though, rather than being stuck in the tighter featureset of a dedicated syntax or ... DSL." added "true" |
18:35:53 | FromDiscord | <KatrinaKitten> The biggest thing I wanted to achieve with Honeycomb was keeping it simple and straightforward, which grammar based libraries often can't be. |
18:36:06 | FromDiscord | <geekrelief> Yeah, the more familiar syntax is the immediate appeal. I'll definitely try out honeycomb first over npeg when I get around to it. |
18:36:43 | FromDiscord | <geekrelief> I wish there was something like parser combinators for writing macros. 🙂 |
18:37:11 | FromDiscord | <geekrelief> (edit) "writing" => "dealing with" |
18:37:29 | FromDiscord | <haxscramper> dealing as in wrigin? |
18:37:33 | FromDiscord | <haxscramper> (edit) "wrigin?" => "writing?" |
18:37:41 | FromDiscord | <haxscramper> or dealing as in unparsing the AST into data? |
18:38:03 | FromDiscord | <geekrelief> I'm writing a DSL that generates inline nim code |
18:38:33 | FromDiscord | <geekrelief> https://github.com/geekrelief/genit so right now I'm just doing a simple replacement for this |
18:38:45 | FromDiscord | <haxscramper> depending on the complexity of the transform it might be possible to implement declarative AST-AST rewritign |
18:39:01 | FromDiscord | <geekrelief> but I've been working on writing a parser so I can extend it's functionality |
18:39:12 | FromDiscord | <geekrelief> (edit) "it's" => "its" |
18:39:23 | FromDiscord | <KatrinaKitten> I think I saw a library floating around somewhere that supports pattern matching over ASTs in macros, if that floats your boat. Not quite the same, but. |
18:39:41 | FromDiscord | <geekrelief> probably PMunch's macroutils? |
18:40:11 | FromDiscord | <geekrelief> I was looking over that again today, but it's not quite what I'm looking for |
18:40:20 | FromDiscord | <haxscramper> for pattern matching it is `fusion/matching` or some other |
18:40:29 | FromDiscord | <Solitude> ast_pattern_matching |
18:40:33 | FromDiscord | <haxscramper> for `quote do` inverse it is a PMunch's macroutils |
18:40:38 | FromDiscord | <haxscramper> also gara/patty |
18:40:47 | FromDiscord | <KatrinaKitten> Might have been either, I don't recall offhand. I'm quite new to Nim and ran across it while researching the language. |
18:42:13 | FromDiscord | <geekrelief> oh is this it? https://github.com/krux02/ast-pattern-matching |
18:44:03 | FromDiscord | <KatrinaKitten> sent a long message, see http://ix.io/3JY0 |
18:45:42 | FromDiscord | <geekrelief> In reply to @KatrinaKitten "The one thing I": No worries. It's clearly early days for the library. Thanks for putting it together. I have quite a bit on my plate, but the idea of a having a parser combiinator library for Nim's AST is enticing me. |
18:46:43 | FromDiscord | <geekrelief> I'm daydreaming about forking honeycomb to tease it apart to see how to go about doing that. |
18:48:10 | FromDiscord | <KatrinaKitten> Feel free, contributions are more than welcome 🙂 (with the caveat I might steal your idea, implement it my way, and credit you instead of merging, but that's just me being weird and picky about things lol) |
18:50:57 | FromDiscord | <geekrelief> In reply to @KatrinaKitten "Feel free, contributions are": sounds good, I don't mind my PRs being rejected as long as the idea is incorporated. 🙂 |
18:51:39 | FromDiscord | <geekrelief> I'll probably take a closer look at gara too. That might work for me. |
18:53:59 | Zevv | hola, what/where is honeycomb? |
18:54:33 | FromDiscord | <geekrelief> In reply to @Zevv "hola, what/where is honeycomb?": https://github.com/KatrinaKitten/honeycomb |
18:54:43 | Zevv | takk |
18:57:46 | Zevv | nice |
19:02:43 | FromDiscord | <KatrinaKitten> The most ironic thing about this entire project has been the fact that, unlike what my naming sense would imply, I'm actually terrified of bees XD |
19:02:48 | FromDiscord | <geekrelief> I forgot I had this bookmarked https://nim-lang.org/blog/2021/03/10/fusion-and-pattern-matching.html @haxscramper thx again! |
19:03:26 | Zevv | KatrinaKitten: cmon, bees are your buddies |
19:03:30 | * | neurocyte0132889 quit (Quit: The Lounge - https://thelounge.chat) |
19:03:34 | FromDiscord | <geekrelief> In reply to @KatrinaKitten "The most ironic thing": some childhood trauma? |
19:04:23 | FromDiscord | <geekrelief> When I was a kid, I drank a coke during a picnic and was stung. A bee flew out of the can. |
19:04:44 | FromDiscord | <geekrelief> I hold no grudges against bees. |
19:07:37 | * | neurocyte0132889 joined #nim |
19:07:37 | * | neurocyte0132889 quit (Changing host) |
19:07:37 | * | neurocyte0132889 joined #nim |
19:08:17 | FromDiscord | <KatrinaKitten> I got stung by a yellow jacket for doing nothing at all when I was about 8, haven't been able to stand anything beelike since. I don't hate bumbles and the like, they're friendly enough, but I have a visceral phobic reaction to them regardless. |
19:10:23 | FromDiscord | <KatrinaKitten> But hey, the pun for Honeycomb was too good to pass up XD |
19:12:23 | FromDiscord | <geekrelief> Also works cause the imagery is of cells packed neatly together. |
19:12:59 | FromDiscord | <geekrelief> break off one chunk and it's still recognizable |
19:15:51 | FromDiscord | <KatrinaKitten> Aye |
19:45:21 | * | bkay quit (Quit: Leaving) |
19:45:46 | * | beshr joined #nim |
20:16:23 | noeontheend | KatrinaKitten: I know I'm late to the party, but nice job with Honeycomb! I'd be impressed if it came from a Nim veteran, let alone someone just starting with the language. |
20:18:11 | FromDiscord | <hmmm> honeycomb looks great! what does the first line do btw |
20:18:16 | FromDiscord | <hmmm> parser = ((s("Hello") | s("Greetings")) << c(',') << whitespace) & (regex(r"\w+") << c("!.")) |
20:18:47 | FromDiscord | <Rika> Make a parser? |
20:19:04 | FromDiscord | <hmmm> yea but explain to peasants like mere in more detail |
20:19:37 | FromDiscord | <Rika> I don’t have the time so hopefully the other does |
20:20:08 | FromDiscord | <hmmm> rika u bad boi, you always have time for hmm |
20:21:23 | FromDiscord | <KatrinaKitten> sent a long message, see http://ix.io/3JYn |
20:22:07 | FromDiscord | <hmmm> 👀 |
20:22:32 | FromDiscord | <hmmm> it sure looks like more readable than regex |
20:22:59 | FromDiscord | <KatrinaKitten> It's 100% overkill for most things a simple regex would do 😅 |
20:23:00 | FromDiscord | <Rika> Depends on you I guess |
20:23:06 | FromDiscord | <KatrinaKitten> But, it is quite simple to work with once you're familiar with it. |
20:23:11 | FromDiscord | <Rika> When you hit some sort of regex proficiency… |
20:23:29 | FromDiscord | <hmmm> 😅 |
20:24:21 | FromDiscord | <hmmm> Kat do you have a simple example of things people do with something like honeycomb / like blogpost etc |
20:25:04 | FromDiscord | <KatrinaKitten> The repo's readme has a few articles about the subject, though in particular I'd recommend Computerphile's video on the topic 🙂↵https://github.com/KatrinaKitten/honeycomb |
20:25:12 | FromDiscord | <KatrinaKitten> (edit) "🙂↵https://github.com/KatrinaKitten/honeycomb" => "🙂↵https://github.com/KatrinaKitten/honeycomb↵https://www.youtube.com/watch?v=dDtZLm7HIJs" |
20:26:00 | FromDiscord | <KatrinaKitten> As for more "list of use cases" type examples, I recently participated in a programming language jam (like a game jam) and used parser combinators in my implementation. |
20:26:45 | FromDiscord | <KatrinaKitten> Any time you have a complex parsing job to do, and nanosecond performance isn't as much of a concern as simplicity for the dev, parser combinators are a good option to consider. |
20:28:13 | FromDiscord | <Rika> If you’re smart in designing them you can still get good performance |
20:28:46 | FromDiscord | <KatrinaKitten> Definitely, it just tends to be a little less unless you have some internal transformation / optimization. Lots and lots of recursive nested function calls. |
20:29:22 | FromDiscord | <KatrinaKitten> Not nearly so huge a difference that it will matter for most use cases. |
20:34:03 | FromDiscord | <hmmm> if c matches a single char what does the dot do in c("!.")) |
20:34:40 | FromDiscord | <KatrinaKitten> When passed a `char`, it matches just that character. When passed a `string` or `Slice[char]`, it matches any character from the string/slice. |
20:35:13 | FromDiscord | <KatrinaKitten> So in the case of `c("!.")`, it matches either a `!` or a `.`. |
20:35:19 | FromDiscord | <hmmm> oh! |
20:42:06 | FromDiscord | <hmmm> kat kat but how does it happen that the things we match in c(',') << whitespace are not showing in the final seq (last dumb question I promise lol) |
20:43:01 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=3JYu |
20:45:41 | FromDiscord | <KatrinaKitten> In reply to @hmmm "kat kat but how": `<<` is the same as `&` in that it expects the parsers one after the other, but it only keeps the result of what's on the left-hand side, instead of both as a `seq`. There's also `>>` which only keeps the result of what's on the right-hand side - think of it as it points to what gets kept. Since the `c(',') << whitespace` is connected to the `s("Hello") | s("Greetings")` via `<<`, only the resu |
20:46:16 | FromDiscord | <hmmm> this is genius lol |
20:46:21 | FromDiscord | <hmmm> ty kat! |
20:46:44 | FromDiscord | <KatrinaKitten> (Actually it really goes more like `(strings << comma) << whitespace` rather than `strings << (comma << whitespace)`, but the result is the same 🙂 ) |
20:51:28 | FromDiscord | <SecureThisShit> sent a long message, see http://ix.io/3JYx |
20:52:30 | FromDiscord | <SecureThisShit> In C++ that’s done with the keyword “using” |
20:53:05 | FromDiscord | <SecureThisShit> using function1 = NTSTATUS(NTAPI)(HANDLE ProcessHandle, PVOID BaseAddress, ULONG_PTR ZeroBits, PULONG RegionSize, ULONG AllocationType, ULONG Protect);↵For example |
20:53:24 | FromDiscord | <Solitude> In reply to @SecureThisShit "Hey, I got a": `typeof function1` |
20:55:01 | FromDiscord | <Elegantbeef> @krisppurg\: there is no `kind` field, it doesnt infer kind |
20:55:02 | FromDiscord | <SecureThisShit> And function1 is still defined like↵↵proc function1(parameters): returnvalue |
20:55:06 | FromDiscord | <SecureThisShit> ? |
20:55:30 | FromDiscord | <krisppurg> In reply to @Elegantbeef "<@222794789567987712>\: there is no": I've added the rename hook already |
20:57:30 | FromDiscord | <Solitude> In reply to @SecureThisShit "And function1 is still": thats depends on you. if it is - use typeof. if you defined it as a type - dont. |
21:02:47 | FromDiscord | <Solitude> In reply to @Elegantbeef "<@222794789567987712>\: there is no": it shouldnt require the kind |
21:13:13 | FromDiscord | <Solitude> In reply to @krisppurg "Hi, whenever I do": but if it wouldnt require discriminator it would fail with FieldDefect instead of JsonError with wrong payload. so, i guess some logic has to be added for parsing only fields from current/default variant branch. |
21:17:35 | FromDiscord | <Solitude> In reply to @krisppurg "I've added the rename": can you test if it works with this check disabled? https://github.com/treeform/jsony/blob/11df6999829a0fa51af353182d35613c9afbf39f/src/jsony.nim#L422 |
21:18:08 | FromDiscord | <krisppurg> nvm I realised I put renameHook in wrong order, it was in bottom of renameHook |
21:18:09 | FromDiscord | <Solitude> fieldPairs should already be guarding from wrong field access |
21:18:15 | FromDiscord | <krisppurg> (edit) "renameHook" => "newGuildChannel" |
21:19:53 | FromDiscord | <SecureThisShit> sent a code paste, see https://play.nim-lang.org/#ix=3JYC |
21:20:53 | FromDiscord | <Solitude> `type function1 = proc(ProcessHandle: PHANDLE): NTSTATUS` |
21:21:32 | FromDiscord | <Solitude> https://nim-lang.org/docs/manual.html#types-procedural-type |
21:26:20 | FromDiscord | <SecureThisShit> sent a code paste, see https://play.nim-lang.org/#ix=3JYE |
21:26:52 | FromDiscord | <Solitude> i dont get the point of casting the value twice |
21:27:53 | FromDiscord | <Solitude> and i for sure dont get what corresponding cpp line does, so we wait for someone more knowledgable |
21:28:52 | NimEventer | New thread by Shirleyquirk: Unicode Operators: How Do we Choose Which To Include?, see https://forum.nim-lang.org/t/8754 |
21:37:12 | FromDiscord | <kaddkaka> https://nim-by-example.github.io/procvars/ mentions do notation as being "a bit shorter". But surely there must something else to it than just saving 1 character 😆 |
21:37:35 | FromDiscord | <kaddkaka> (edit) "do" => "`do`" | "shorter"." => "shorter" than `proc`." |
21:38:36 | FromDiscord | <kaddkaka> (edit) "character" => "character?" |
21:42:37 | FromDiscord | <Solitude> In reply to @kaddkaka "https://nim-by-example.github.io/procvars/ mentions": https://nim-lang.org/docs/manual_experimental.html#do-notation↵you can pass multiple blocks of code to macro with it |
21:47:39 | FromDiscord | <kaddkaka> thanks I have to get to macros 🙂 (newbie here 🙋♂️) |
21:53:49 | FromDiscord | <Elegantbeef> @evoalg\: eh a normal for loop is sufficient for that, store the last three entries and you're golden |
21:54:17 | FromDiscord | <evoalg> ahh ok that's makes sense |
21:54:49 | FromDiscord | <evoalg> How are your dogs btw? |
21:55:09 | FromDiscord | <Elegantbeef> Cold been like -40 and below for the past few weeks |
21:57:01 | FromDiscord | <evoalg> woah ... oh that's not celsius ... my wife is from Siberia and it get's to -40 celsius 😉 |
21:57:19 | FromDiscord | <Elegantbeef> I'm Canadian bud |
21:57:42 | FromDiscord | <evoalg> still too bloody cold for a kiwi |
21:57:48 | FromDiscord | <Elegantbeef> -40 is the same in Fahrenheit as Celsius, but i do use centigrade |
21:58:21 | FromDiscord | <Elegantbeef> I was trying to point out that it was Celsius 😛 |
21:59:18 | FromDiscord | <ynfle (ynfle)> > Canadian bud↵I see what you did there |
21:59:27 | FromDiscord | <Elegantbeef> Lol |
22:02:23 | * | xet7 joined #nim |
22:07:41 | FromDiscord | <evoalg> ahh of course it's the same ... oh and I should have known that Canada is more progressive in this regard than the US ... but is it really -40 there? |
22:08:56 | * | PMunch joined #nim |
22:11:35 | FromDiscord | <Elegantbeef> Yes |
22:21:56 | PMunch | Evening @Elegantbeef :) |
22:23:30 | FromDiscord | <Elegantbeef> Hello |
22:32:33 | FromDiscord | <kaddkaka> Southern Sweden is back to plus celsius tomorrow, bye bye snow 😦 👋 |
22:33:16 | FromDiscord | <hugogranstrom> In reply to @kaddkaka "Southern Sweden is back": 😦 It was a white christmas for us at least |
22:52:34 | PMunch | Here it's still -9 and loads of snow.. |
22:59:06 | * | nrds joined #nim |
23:02:21 | * | PMunch quit (Quit: leaving) |
23:13:24 | FromDiscord | <tandy> can the nim compiler itself be compiled to c? |
23:13:57 | FromDiscord | <tandy> im jus wondering whether u could have the compiler compiled to wasm |
23:18:31 | NimEventer | New Nimble package! nimfmt - Configurable Nim code linter / formatter / style checker with heuristics, see https://github.com/FedericoCeratto/nimfmt |
23:25:55 | FromDiscord | <Elegantbeef> https://www.jasonbeetham.com/snake/nicoscripter.html the VM can compile! 🙂 |
23:26:19 | FromDiscord | <Elegantbeef> Compiling the compiler doesnt make much since since you also need a C compiler built for wasm, but it's probably doable |
23:36:33 | FromDiscord | <tandy> ohh this is coool |
23:36:43 | FromDiscord | <tandy> so you can write and compile nim in the browser |
23:37:04 | FromDiscord | <Elegantbeef> Well you can write and evaluate nim |
23:37:07 | FromDiscord | <tandy> someone needs to integrate that into browser vscode |
23:37:10 | FromDiscord | <Elegantbeef> That's on the Nim vm not the compiler |
23:37:18 | FromDiscord | <tandy> close enough \:) |
23:40:10 | FromDiscord | <frankzig> hallo, I've got an iterator for a custom type, is there a way to raise a compilerror if a `when` clause fails' |
23:40:18 | FromDiscord | <frankzig> sent a code paste, see https://play.nim-lang.org/#ix=3JZk |
23:40:49 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JZl |
23:40:58 | FromDiscord | <frankzig> thankyou! |
23:49:53 | FromDiscord | <dizzyliam> thinking of using nimscript as a kind of markup language for typesetting... let |
23:49:59 | FromDiscord | <dizzyliam> (edit) "let" => "let's see how this goes" |
23:50:58 | FromDiscord | <Elegantbeef> If you need help i know a guy |
23:54:07 | FromDiscord | <dizzyliam> haha, someone else who's twisted nimscript into markup? |
23:54:34 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
23:55:50 | FromDiscord | <Elegantbeef> No someone that knows how to easily interop |
23:56:35 | FromDiscord | <Elegantbeef> I dont know if you've seen https://github.com/beef331/nimscripter but it pretty much makes it seemless |
23:58:26 | FromDiscord | <Elegantbeef> Thanks to Nim's macro magic and command syntax it really doesnt take much to make it seem like a MD language |
23:58:32 | FromDiscord | <Elegantbeef> Or MU if you prefet 😛 |
23:58:35 | FromDiscord | <Elegantbeef> prefer\ |