00:00:02 | * | junland quit (Quit: %ZNC Disconnected%) |
00:01:18 | * | junland joined #nim |
00:25:55 | * | tane quit (Quit: Leaving) |
00:29:04 | * | zahary quit (Quit: Leaving.) |
00:29:21 | * | zahary joined #nim |
00:29:50 | * | zahary quit (Client Quit) |
00:29:59 | * | clyybber quit (Quit: WeeChat 2.7.1) |
00:44:43 | * | b3ong4o quit (Ping timeout: 260 seconds) |
01:16:55 | * | my_dude joined #nim |
01:17:23 | * | ptdel joined #nim |
01:18:23 | * | skrylar joined #nim |
01:34:34 | * | Hideki_ quit () |
01:36:25 | * | Hideki_ joined #nim |
01:53:31 | * | Hideki_ quit (Remote host closed the connection) |
01:54:27 | * | Hideki_ joined #nim |
01:58:46 | * | Hideki_ quit (Ping timeout: 255 seconds) |
02:04:38 | * | Hideki_ joined #nim |
02:05:54 | * | Hideki_ quit (Remote host closed the connection) |
02:06:43 | * | Hideki_ joined #nim |
02:07:22 | * | Hideki_ quit (Remote host closed the connection) |
02:08:07 | * | Hideki_ joined #nim |
02:12:06 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:12:43 | * | Hideki_ quit (Ping timeout: 255 seconds) |
02:14:29 | * | chemist69 joined #nim |
02:20:20 | * | kungtotte quit (Ping timeout: 265 seconds) |
02:27:24 | * | kungtotte joined #nim |
02:31:06 | * | ptdel quit (Ping timeout: 240 seconds) |
02:31:41 | * | freddy92 quit (Read error: Connection reset by peer) |
02:32:08 | * | freddy92 joined #nim |
02:52:51 | * | Hideki_ joined #nim |
03:17:14 | * | Hideki_ quit (Ping timeout: 240 seconds) |
03:23:09 | * | sagax quit (Quit: Konversation terminated!) |
03:25:07 | * | rockcavera joined #nim |
03:25:51 | * | leorize joined #nim |
03:37:19 | FromDiscord_ | <Winton> Hi |
03:37:21 | FromDiscord_ | <Winton> All |
03:38:05 | FromDiscord_ | <Winton> I would like to contribute to the community where I can? |
03:38:07 | FromDiscord_ | <Winton> lenguaje nim |
03:39:28 | disruptek | i have a feeling you could contribute to translations. |
03:40:32 | FromDiscord_ | <Winton> I heard that I can donate for the development of nim |
03:40:54 | FromDiscord_ | <Winton> I'd like to help |
03:41:20 | disruptek | there are some sponsorship links on the github page. |
03:41:24 | disruptek | !repo nim-lang/Nim |
03:41:26 | disbot | https://github.com/nim-lang/Nim -- 9Nim: 11Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority). 15 8932⭐ 973🍴 7& 29 more... |
03:44:31 | disruptek | have you had and good or bad experiences picking up the language? complaints you want to share? |
03:44:35 | FromDiscord_ | <Winton> I wonder if nim for first programming language is good? |
03:44:42 | disruptek | i think it's pretty good. |
03:45:27 | FromDiscord_ | <Winton> > <disruptek> have you had and good or bad experiences picking up the language? complaints you want to share? |
03:45:27 | FromDiscord_ | <Winton> @gitterirc I respect that, I have really worked with C # never with python or c ++. |
03:45:42 | FromDiscord_ | <Winton> what is really hard for me to learn nim |
03:45:54 | FromDiscord_ | <Winton> I never liked c / c ++ syntax |
03:46:18 | disruptek | well, c# has a fairly modern syntax. |
03:47:38 | FromDiscord_ | <Winton> exactly unlike nim everything seems really new to me and I don't speak a perfect English, I even understand very little about what is another of my disadvantage |
03:47:53 | FromDiscord_ | <Winton> but if I want to continue in my learning with nim |
03:49:53 | disruptek | do not be afraid to play with it. |
03:50:02 | disruptek | do not be afraid to ask questions. |
03:51:02 | FromDiscord_ | <Winton> Yes, thank you very much I'm in a group that help me a lot |
03:51:45 | FromDiscord_ | <Winton> the truth is to think that I have little time, I want to continue learning Nim because I have a project in mind that I think with Nim would be good and to be able to continue contributing in the community |
03:52:20 | FromDiscord_ | <Winton> https://youtu.be/xWMG_1karfM |
03:52:54 | FromDiscord_ | <Winton> I did this |
03:52:59 | disruptek | neat! |
03:53:29 | disruptek | where are you located? |
03:53:41 | FromDiscord_ | <Winton> Dominican Republic |
03:53:51 | disruptek | ah, cool. |
03:54:01 | FromDiscord_ | <Winton> yes |
03:54:22 | disruptek | you have 150 views already. |
03:54:49 | FromDiscord_ | <Winton> yes |
03:55:42 | FromDiscord_ | <Winton> 😄 |
03:55:43 | FromDiscord_ | <Winton> jajaja |
03:55:48 | FromDiscord_ | <Winton> 150 view |
03:56:14 | disruptek | that seems like a lot to me considering you only have 4 subscribers. good job. |
03:58:01 | FromDiscord_ | <Winton> I have shared the information for facebook groups |
03:58:23 | FromDiscord_ | <Winton> Facebook is very good for advertising or sharing information |
03:59:08 | FromDiscord_ | <Elegant Beef> Also good for having an invasive corporation attempt to build a picture of you without using their services |
03:59:35 | FromDiscord_ | <Winton> jajaja |
04:03:18 | shashlick | #head is failing tests |
04:03:32 | shashlick | testament run tests/osproc/texitcode.nim |
04:03:44 | disruptek | hmm. |
04:04:11 | * | freddy92 quit (Read error: Connection reset by peer) |
04:04:36 | * | freddy92 joined #nim |
04:07:27 | disruptek | tests/stdlib/tos.nim failed for me. i'm still running the test. |
04:10:11 | FromDiscord_ | <Winton> what is gc:ar |
04:10:21 | disruptek | ~arc |
04:10:22 | disbot | arc: 11a new memory manager for Nim; see https://forum.nim-lang.org/t/5734 -- disruptek |
04:10:54 | FromDiscord_ | <Winton> yes |
04:10:55 | FromDiscord_ | <Winton> arc* |
04:10:59 | disruptek | that's the only failure i found, other than the docs failure that always happens. |
04:11:42 | FromDiscord_ | <Winton> thanks |
04:13:54 | disruptek | my error is probably due to some of the path changes lately. |
04:15:09 | FromDiscord_ | <Winton> I have a doubt what are the pragma for? and it is so important |
04:16:44 | disruptek | they are used for annotation; they have a very broad application. |
04:17:04 | disruptek | the manual has many examples... |
04:20:13 | FromDiscord_ | <Winton> thanks! |
04:20:24 | FromDiscord_ | <Winton> have a nice night all |
04:20:36 | disruptek | see you next time. |
04:23:13 | * | freddy92 quit (Read error: Connection reset by peer) |
04:23:39 | * | freddy92 joined #nim |
04:30:13 | * | freddy92 quit (Read error: Connection reset by peer) |
04:30:40 | * | freddy92 joined #nim |
04:46:39 | * | freddy92 quit (Ping timeout: 272 seconds) |
05:04:23 | * | opal quit (Ping timeout: 240 seconds) |
05:06:01 | * | sagax joined #nim |
05:07:36 | * | opal joined #nim |
05:10:29 | skrylar | i forgot that you can't just importc enums at all :f |
05:18:06 | * | my_dude quit (Quit: ZZZzzz…) |
05:20:03 | * | muffindrake joined #nim |
05:37:36 | * | hax-scramper quit (Read error: Connection reset by peer) |
05:37:56 | * | hax-scramper joined #nim |
05:51:21 | * | hax-scramper quit (Read error: Connection reset by peer) |
05:51:29 | * | hax-scramper joined #nim |
05:51:33 | * | marmotini_ joined #nim |
05:55:55 | * | marmotini_ quit (Ping timeout: 255 seconds) |
06:05:35 | * | hax-scramper quit (Quit: Quit) |
06:05:56 | * | hax-scramper joined #nim |
06:10:28 | * | sz0 joined #nim |
06:20:44 | * | hax-scramper quit (Remote host closed the connection) |
06:22:27 | * | hax-scramper joined #nim |
06:29:22 | * | hax-scramper quit (Remote host closed the connection) |
06:30:59 | * | hax-scramper joined #nim |
06:55:52 | * | hax-scramper quit (Read error: Connection reset by peer) |
06:56:17 | * | hax-scramper joined #nim |
07:00:44 | * | nsf joined #nim |
07:05:47 | * | dddddd quit (Remote host closed the connection) |
07:14:22 | * | Hideki_ joined #nim |
07:15:55 | * | my_dude joined #nim |
07:16:14 | * | my_dude quit (Client Quit) |
07:18:43 | * | Hideki_ quit (Ping timeout: 255 seconds) |
07:24:34 | * | narimiran joined #nim |
07:28:08 | nixfreak | Is it normal to almost always use assert to test code , I guess I'm used to print the result to make sure it actually works |
07:38:32 | * | solitudesf joined #nim |
07:44:09 | * | fanta1 joined #nim |
07:46:17 | * | Trustable joined #nim |
07:53:22 | * | nixfreak quit (Ping timeout: 255 seconds) |
07:55:12 | FromDiscord_ | <sveri> Hi, I have been liooking into what I can do at compile time and what not. Seems like most filesystem operations like `walkFiles` or `os.getCurrentDir()` don't work at compile time. Is there another way to list files in folders during compile time? |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:02:08 | * | my_dude joined #nim |
08:03:00 | FromDiscord_ | <sveri> For some more context, as its not obvious, I want to go through a list of files and create a const fileTable that contains the contents of these files. |
08:05:00 | * | gmpreussner joined #nim |
08:05:03 | * | neceve joined #nim |
08:10:24 | * | neceve quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
08:10:50 | * | neceve joined #nim |
08:19:27 | FromDiscord_ | <demotomohiro> https://github.com/nim-lang/Nim/blob/devel/lib/pure/oswalkdir.nim |
08:19:27 | FromDiscord_ | <demotomohiro> There is Compile-time only version for walkDir |
08:20:41 | FromDiscord_ | <sveri> @demotomohiro I found that looking through github, but don't understand it as the proc does nothing and just discards. |
08:29:11 | * | Trustable quit (Remote host closed the connection) |
08:35:23 | FromDiscord_ | <demotomohiro> @sveri It works at compile time. |
08:35:23 | FromDiscord_ | <demotomohiro> https://play.nim-lang.org/#ix=2csr |
08:38:19 | FromDiscord_ | <demotomohiro> I guess Nim compiler run walkDir when it found oswalkdir.staticWalkDir. |
08:42:12 | Araq | the implementation is inside the Nim compiler |
08:43:18 | FromDiscord_ | <demotomohiro> https://github.com/nim-lang/Nim/blob/devel/compiler/vmops.nim#L99 |
08:43:41 | * | tefter joined #nim |
08:45:12 | * | zahary joined #nim |
09:06:26 | * | skrylar quit (Remote host closed the connection) |
09:15:53 | * | Hideki_ joined #nim |
09:20:06 | * | Hideki_ quit (Ping timeout: 240 seconds) |
09:40:59 | * | zahary quit (Quit: Leaving.) |
09:41:50 | FromDiscord_ | <sveri> @demotomohiro Araq: thank you, I missed the correct import, I got it working now 🙂 |
10:04:30 | * | zahary joined #nim |
10:15:06 | FromGitter | <kristianmandrup> When will the next version of Nim be released and what new features can we expect? |
10:15:21 | * | lbart quit (Ping timeout: 272 seconds) |
10:23:32 | * | zahary quit (Quit: Leaving.) |
10:23:52 | * | zahary joined #nim |
10:24:19 | * | zahary quit (Client Quit) |
10:35:52 | * | hax-scramper quit (Read error: Connection reset by peer) |
10:35:57 | * | lbart joined #nim |
10:36:26 | * | zahary joined #nim |
10:36:32 | * | hax-scramper joined #nim |
10:48:26 | * | lritter joined #nim |
10:50:25 | FromGitter | <yglukhov> Hey guys, can i install win64 toolchain with choosenim? |
10:53:19 | * | dadada joined #nim |
10:53:43 | * | dadada is now known as Guest69599 |
11:04:11 | * | Ven`` joined #nim |
11:10:33 | lqdev[m] | @kristianmandrup the release date is not certain, but afaik Nim 1.1's major features are going to be incremental compilation and --gc:arc |
11:11:38 | * | Guest69599 is now known as dadada |
11:12:06 | dadada | incremental compilation! holy moly! yeah |
11:14:18 | lqdev[m] | afaik it's implemented on devel, but I haven't tested it yet, so I can't tell if it works |
11:35:25 | * | solitudesf quit (Remote host closed the connection) |
12:00:08 | * | filcuc joined #nim |
12:08:04 | * | filcuc quit (Ping timeout: 265 seconds) |
12:35:56 | * | zahary quit (Quit: Leaving.) |
12:38:45 | * | zahary joined #nim |
12:50:44 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:05:23 | dadada | 12:10 < dadada> incremental compilation! holy moly! yeah |
13:05:31 | dadada | https://totallywearingpants.com/posts/nim-language-highlights/ |
13:06:10 | dadada | definitely belongs in the Tutorials section https://nim-lang.org/learn.html |
13:10:27 | FromGitter | <alehander92> 1) 2 |
13:10:39 | FromGitter | <alehander92> and i think the roadmap was for 2020, not only 1.2 |
13:11:12 | dadada | alehander92: what are you on about? |
13:11:40 | FromGitter | <alehander92> i am not sure if IC is supposed to be in 1.2, or in another 2020 version |
13:11:56 | dadada | okay |
13:12:24 | FromGitter | <alehander92> https://github.com/nim-lang/RFCs/milestone/1 |
13:14:40 | FromDiscord_ | <clyybber> gc:arc is cooler than IC anyways 🙂 |
13:15:15 | dadada | yeah, because you have to pick favorites |
13:15:20 | dadada | ;-) |
13:16:38 | dadada | any progress is great |
13:17:27 | * | Hideki_ joined #nim |
13:19:08 | dadada | it would be cool to have embedded playground instances for all example in https://nim-lang.org/docs/manual.html |
13:19:43 | dadada | learning by doing/playing around is usually best |
13:19:53 | dadada | s/example/examples |
13:20:38 | * | dddddd joined #nim |
13:20:39 | dadada | there should be a button to reset the embedded playgrounds to their default examples |
13:21:52 | * | Hideki_ quit (Ping timeout: 255 seconds) |
13:31:49 | FromGitter | <nhanb> Guys, does karax vdom (C backend) support self closing tag? Seems like it always outputs xml-style tags (e.g. `<input></input>`, which the browser ignores the closing tag anyway, but for, say, `<br></br>`, Firefox interprets that as 2 `<br>`s which screws up my layout. |
13:32:17 | * | freddy92 joined #nim |
13:48:40 | * | nsf quit (Quit: WeeChat 2.7) |
13:59:40 | * | abm joined #nim |
14:07:45 | * | Trustable joined #nim |
14:13:32 | * | salewski joined #nim |
14:13:46 | FromGitter | <nhanb> Huh, turns out I can use `verbatim("<br/>")`, that's neat. |
14:14:38 | * | NimBot joined #nim |
14:15:52 | * | Ven`` joined #nim |
14:16:11 | salewski | NimBot, we have a fresh issue: https://github.com/StefanSalewski/gintro/issues/66 |
14:16:12 | disbot | ➥ [OSX] nimble install gintro fails - unexpected gc |
14:16:16 | salewski | https://github.com/StefanSalewski/gintro/blob/master/tests/gen.nim#L2518 |
14:16:36 | salewski | when compileOption("gc", "arc"): |
14:17:03 | salewski | Seems that arc test does not compile on stable compiler? |
14:17:19 | salewski | And my code ifs full of that test. |
14:17:36 | salewski | Thought it was a plain string test... |
14:18:03 | salewski | So how to fix it? |
14:18:51 | * | xet7 quit (Remote host closed the connection) |
14:19:59 | * | xet7 joined #nim |
14:20:29 | salewski | Is the test "when defined(gcDestructors):" from https://forum.nim-lang.org/t/5965 a better variant for ARC test? |
14:21:13 | salewski | I can not really believe that compileOption("gc", "arc") is an enum test, arguments looks like strings! |
14:21:20 | salewski | over. |
14:36:18 | vegai | hmm, so both snake case and camel case are supported interchangeably |
14:36:33 | vegai | is either recommended by official style guides? |
14:36:59 | vegai | https://nim-lang.org/docs/nep1.html |
14:37:06 | vegai | camel case, it looks like |
14:37:45 | * | nixfreak joined #nim |
14:38:20 | nixfreak | Is anyone getting Karax examples to work ? I have used devel and stable newset editions |
14:38:36 | nixfreak | is the mediaplayer supposed to show a gui |
14:40:50 | FromGitter | <alehander92> vegai camel case! |
14:41:16 | FromDiscord_ | <Rika> camelcase is just easier to type imo\ |
14:41:30 | vegai | snake case is way prettier, but this is an arbitrary thing |
14:41:38 | vegai | I just want somebody to make trivial decisions like that for me :) |
14:41:42 | vegai | so camel it is |
14:42:11 | vegai | I'm bad at reading these docs |
14:42:12 | vegai | https://nim-lang.org/docs/strutils.html |
14:42:33 | FromDiscord_ | <Rika> what do you need help with |
14:42:42 | vegai | apparently strutils has toLowerAscii, okay, but the docs seem to suggest that it works on chars only |
14:43:03 | vegai | nah, no it doesn't sorry. |
14:43:06 | vegai | I was being blind somehow |
14:43:14 | * | my_dude quit (Quit: ZZZzzz…) |
14:43:32 | FromDiscord_ | <Rika> haha, thats fine |
14:43:53 | FromDiscord_ | <Rika> kinda wished that the docs grouped overloads together since sometimes it doesn't |
14:43:59 | FromDiscord_ | <Rika> it isn't* |
14:50:09 | * | zahary quit (Quit: Leaving.) |
14:51:33 | FromDiscord_ | <clyybber> dadada: Thats a great idea! |
14:55:11 | vegai | hmm, also there's a toLower in strutils apparently, not just toLowerAscii |
14:55:14 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:55:24 | vegai | where does that come from |
14:55:36 | vegai | it's documented only as an export |
14:55:51 | vegai | it seems to come from the unicode module |
14:56:02 | leorize | probably it's the old toLowerAscii if they haven't removed it |
14:56:50 | FromDiscord_ | <Rika> its the deprecated one i think |
15:03:25 | * | Trustable quit (Remote host closed the connection) |
15:13:48 | * | nsf joined #nim |
15:14:00 | * | tane joined #nim |
15:17:08 | * | freddy92 quit (Read error: Connection reset by peer) |
15:17:32 | * | freddy92 joined #nim |
15:21:52 | FromGitter | <rishavs> I am struggling a bit with trying to make a scene manager. I want to have a list of scenes which are objects and then pass them to a sceneswitcher proc which then calls the corresponding actions on this given object. ⏎ something like https://play.nim-lang.org/#ix=2cu0 ⏎ How would one go about tackling this problem in Nim? |
15:24:45 | FromDiscord_ | <Rika> https://play.nim-lang.org/#ix=2cu2 ? |
15:27:59 | FromGitter | <rishavs> Thanks! |
15:36:01 | * | zahary joined #nim |
15:36:32 | * | sealmove joined #nim |
15:36:50 | sealmove | is it easier to adjust https://github.com/flyx/NimYAML to work at CT, or rewrite it? |
15:37:18 | disruptek | i feel like we had this conversation a month or two ago. |
15:38:13 | FromDiscord_ | <Rika> why doesnt it work at CT? |
15:41:10 | * | rockcavera quit (Remote host closed the connection) |
15:41:15 | FromGitter | <Vindaar> imo nimyaml is way too complicated. using an OOP approach + its own stack trace for exception handling makes the code really hard to deal with. Still doesn't mean rewriting it is easier, since yaml is so complex. |
15:42:38 | sealmove | I see, thanks Vindaar |
15:43:11 | sealmove | it's a project I really want to do, but too big to find the motivation : |
15:44:26 | FromGitter | <Vindaar> I can imagine it being hard finding the motivation for that. :P Do you actually need yaml or just for fun? |
15:47:13 | * | salewski quit (Quit: WeeChat 2.7) |
15:50:26 | * | tefter quit (Quit: WeeChat 2.7) |
15:52:39 | sealmove | I need it for my project |
15:53:04 | sealmove | and hacking one with npeg didn't work |
15:53:46 | leorize | i heard yaml is unnecessary complicated |
15:54:04 | disruptek | only really from the programmer's perspective. |
15:55:31 | dom96 | sealmove, why do you need it at CT? |
15:55:55 | dom96 | simple solution though: create a simple .exe that parses YAML and output some format you can easily parse like JSON at CT |
15:55:57 | dom96 | then use staticExec |
15:56:07 | disruptek | simple. |
15:56:18 | dom96 | "simple" |
15:56:40 | disruptek | well, that's what i do for openapi, dom. |
15:56:54 | disruptek | sealmove's project demands ct parsing. |
15:57:38 | dom96 | why? :) |
15:57:52 | leorize | it's a parser generator |
15:58:08 | leorize | binary parser generator |
15:59:53 | dom96 | cool. Might want to build it as an exe anyway then |
15:59:59 | dom96 | It'll run faster :P |
16:00:13 | dom96 | just make it output the Nim AST |
16:02:01 | disruptek | then what? |
16:02:36 | dom96 | then parse it at compile-time and construct AST nodes from it :D |
16:02:57 | dom96 | in fact, you could even generate the Nim code and then parse at compile-time |
16:03:27 | disruptek | this is how nimterop works. |
16:04:31 | sealmove | my idea is to do everything as library, not exe |
16:04:43 | sealmove | yaml -> JsonNode |
16:05:39 | leorize | careful or you might bump into the VM exec limit |
16:05:55 | sealmove | we kinda took care of that |
16:06:03 | disruptek | now you can specify the limit. |
16:06:48 | disruptek | you may as well just run yq if you're dom. |
16:09:19 | FromDiscord_ | <mratsim> @sealmove, agree with @Vindaar, NimYAML is really complex. Many times I've wanted a simpler to use implementation. Right now I'm just always using it to load to a JsonNode |
16:12:17 | disruptek | i just don't even bother. i could include nimyaml and make a simple binary to replace yq, but what's the point? |
16:12:17 | * | salewski joined #nim |
16:13:01 | disruptek | eventually we'll have working pegs or whatever but until then, it's just an esoteric format afaic. |
16:13:36 | FromDiscord_ | <Rika> yaml's just a pain for the programmer innit |
16:13:51 | disruptek | yeah, but it's nice to read. |
16:14:03 | disruptek | honestly, it wouldn't bother me so much, but it supports comments. |
16:14:13 | disruptek | comments are a notable omission from json. |
16:14:45 | FromDiscord_ | <Rika> also trailing comma |
16:15:22 | disruptek | well, i care more about generating comments. i'm not so bothered by generating commas. |
16:17:44 | sealmove | I don't know if "working pegs" is the solution to the problem |
16:17:45 | * | leorize quit (Remote host closed the connection) |
16:18:04 | disruptek | why not? |
16:18:14 | * | leorize joined #nim |
16:18:18 | disruptek | ~choosenim |
16:18:19 | disbot | choosenim: 11https://github.com/dom96/choosenim/releases/tag/v0.5.1 -- disruptek |
16:18:19 | sealmove | peg is completely unsuitable for such type of parsing (indentation-based etc) |
16:18:32 | disruptek | ~choosenim is https://github.com/dom96/choosenim/releases/tag/v0.6.0 |
16:18:33 | disbot | choosenim: 11https://github.com/dom96/choosenim/releases/tag/v0.6.0 |
16:18:55 | disruptek | i don't care how it happens, but pegs are much easier for us to consume. |
16:19:03 | disruptek | hence "or whatever". 😉 |
16:19:08 | leorize | i don't know if npeg can be mixed with good old lexbase |
16:19:19 | sealmove | leorize, it's possible now |
16:19:30 | leorize | well then you can keep the indentation state yourself |
16:19:32 | sealmove | zevv made some adjustments and you can seperate lexing and parsing |
16:20:04 | leorize | use npeg to parse more complicated syntax that you don't wanna bother writing code for |
16:20:18 | leorize | but keep track of indentation with your own parser outside instead |
16:21:20 | sealmove | I don't know, my understanding is that yaml is too complicated to get correct with a parser generator, but I could be wrong. |
16:22:35 | disruptek | we found a peg for it, but was it incomplete? i cannot remember. |
16:23:20 | leorize | my idea is that you use it as a parsing aid |
16:23:27 | leorize | not a full fledged parser |
16:23:38 | Zevv | don't do pegs kids. It's bad for you, mmkkaaayyy |
16:24:11 | leorize | kinda like Ar4q's lexim |
16:24:27 | disruptek | oh you woke the bear, now. |
16:24:39 | Zevv | the bear is watching fight club. how come I never saw this before |
16:24:49 | disruptek | omg you're in for a treat. |
16:24:50 | Zevv | it was himself all the time! |
16:25:04 | disruptek | wait till you find the tyler durden site. |
16:25:19 | Zevv | oooh |
16:27:32 | * | arecaceae quit (Remote host closed the connection) |
16:27:55 | * | arecaceae joined #nim |
16:29:04 | Zevv | anyway, I tried yaml a few times but couldn't bother to persist |
16:29:11 | Zevv | it's just messy |
16:29:21 | Zevv | It probably can be done with npeg, but it's no fun |
16:29:35 | disruptek | it will be done eventually. |
16:30:36 | disruptek | maybe a repo to do it in npeg could get enough interest to help facilitate a group effort. |
16:31:07 | Zevv | but why bother, are there no other yaml parsers for nim? |
16:31:14 | disruptek | not for ct. |
16:31:20 | Zevv | bwah |
16:33:27 | disruptek | what are you drinkin', zevv? |
16:34:06 | * | dom96 wonders how to implement DPI for his game |
16:34:26 | dom96 | This is what I get for not using some noob game framework |
16:34:32 | dom96 | have to implement everything myself |
16:34:40 | * | zahary quit (Quit: Leaving.) |
16:35:55 | FromDiscord_ | <Rika> sometimes this chat is impossible for me to decipher |
16:36:09 | FromDiscord_ | <Rika> did you guys drink alcohol or something? |
16:36:15 | Zevv | not yet |
16:37:38 | * | freddy92 quit (Read error: Connection reset by peer) |
16:37:51 | FromGitter | <kristianmandrup> How do I best iterate through a `TableRef` structure (interested the in values being mapped to) |
16:38:02 | * | freddy92 joined #nim |
16:38:11 | Zevv | for k, v in mytable: should do ? |
16:38:26 | dom96 | Rika: I often feel the same way, I think Zevv/disruptek just enjoy to be random sometimes :) |
16:40:13 | disruptek | prefer mytable.pairs because it's more explicit. |
16:41:02 | Zevv | disruptek is just an explicit kind of guy, you know |
16:41:34 | disruptek | it's true. i have parental warnings in four languages tattoo'd across my body. |
16:42:27 | disruptek | speaking of, what should we stream today? |
16:43:00 | Zevv | some Steve Miller band, a bit of Radiohead, some Bob Marley |
16:43:12 | disruptek | radiohead could work. |
16:43:23 | Zevv | and then some guy rambling on top like "What the hell does *this* do?!" |
16:43:33 | disruptek | ooooh now you're talkin' my language. |
16:43:35 | FromGitter | <kristianmandrup> ```code paste, see link``` ⏎ ⏎ How do I add a string to `srcList`for `src: PScrCode` here ? [https://gitter.im/nim-lang/Nim?at=5e52abb7b662483a875d9249] |
16:44:16 | disruptek | ropify your string, obvs. |
16:44:52 | disruptek | i think it's easier to stream muddling through because the alternative is to stream how confused i am by my own code. |
16:45:56 | FromGitter | <kristianmandrup> https://play.nim-lang.org/#ix=2cul |
16:46:25 | FromGitter | <kristianmandrup> So sth like this? |
16:46:29 | FromGitter | <kristianmandrup> ```proc add(self: PSrcCode, code: string) = ⏎ self.srcList.add Rope(code)``` [https://gitter.im/nim-lang/Nim?at=5e52ac653ca8a67fb8131bc3] |
16:46:31 | FromDiscord_ | <Rika> i dont know if Ropes are still recommended because when i used them a few months ago ar()q said to not use them |
16:47:25 | disruptek | they are more specialized than they appear. |
16:47:28 | Zevv | did he mention why? |
16:47:44 | FromGitter | <kristianmandrup> I get `type mismatch: got <string> but expected 'Rope = ref RopeObj'` |
16:47:52 | FromDiscord_ | <Rika> no clue |
16:48:04 | disruptek | kristian: make a rope from your string. |
16:48:10 | FromDiscord_ | <Rika> newRope i think is what you want |
16:48:20 | FromGitter | <kristianmandrup> I also tried making the seq mutable by using `ref seq[Rope]` |
16:48:33 | FromDiscord_ | <Rika> huh |
16:48:34 | disruptek | don't do that. |
16:48:57 | FromGitter | <kristianmandrup> `undeclared identifier: 'newRope'` |
16:49:06 | FromDiscord_ | <Rika> use lowercase `rope` |
16:49:07 | Zevv | it's just rop() |
16:49:10 | Zevv | it's a bit messy I guess |
16:49:15 | Zevv | rope() |
16:49:16 | disruptek | https://www.twitch.tv/disruptek |
16:49:19 | FromDiscord_ | <Rika> apparently rope doesnt use the new/init style |
16:49:26 | FromGitter | <kristianmandrup> `self.srcList.add rope(code)` ?? |
16:49:29 | FromDiscord_ | <Rika> ywa |
16:49:31 | FromDiscord_ | <Rika> yes |
16:50:37 | disruptek | rope"foo" |
16:53:41 | FromGitter | <kristianmandrup> works, thanks :) |
16:58:40 | leorize | disruptek: left ear only mic again :) |
16:59:05 | leorize | meh :p |
16:59:16 | Zevv | As long as radiohead doesn't suffer |
17:01:02 | Zevv | Don't see your problem? You parse the file, run the commands capturing output, and write to a new file on the fly? |
17:01:32 | Zevv | I didn't properly pay attention yesterday so I probably miss essential stuff and am being naive |
17:02:57 | Zevv | right |
17:07:59 | Zevv | the format is crappy already, actuall |
17:08:12 | Zevv | there is no clear separation between sections |
17:12:27 | Zevv | to be able to rewrite you need to have a perfect in-memory representation of the original file |
17:13:03 | Zevv | it's hand written but you are going to machine (re)generate it. Bound to be messy or lossy |
17:18:53 | * | zahary joined #nim |
17:18:59 | * | ptdel joined #nim |
17:19:07 | * | Hideki_ joined #nim |
17:23:31 | * | Hideki_ quit (Ping timeout: 255 seconds) |
17:27:56 | * | zahary quit (Quit: Leaving.) |
17:28:37 | Zevv | you really need to store it all. Make it into a full AST |
17:28:40 | FromGitter | <kristianmandrup> What do I need to import to use `Rope`? |
17:29:04 | FromGitter | <kristianmandrup> ah yes, `ropes` not `rope` |
17:29:27 | Zevv | what does it even mean now. To times 'args' without a 'stodut' in between? |
17:30:25 | Zevv | Hmmmm |
17:30:38 | Zevv | so the other ones are wrong |
17:30:45 | Zevv | because "stdout" comes after "args" |
17:30:54 | Zevv | but you say when it runs on "args" it reuses the previoues "stdout" |
17:31:22 | Zevv | "clever" :) |
17:32:15 | Zevv | make it explict |
17:32:16 | Zevv | really |
17:32:28 | Zevv | if the format is up for discussion, don't do it like this |
17:32:30 | Zevv | make it structured |
17:32:54 | Zevv | don't do that by hand |
17:33:26 | * | zahary joined #nim |
17:33:37 | disruptek | oh, we're talking about you on stream. |
17:33:45 | disruptek | https://www.twitch.tv/disruptek |
17:33:51 | disruptek | maybe you can offer an opinion, zah |
17:34:30 | Zevv | it's better like this because the semnatics are more clear |
17:34:39 | Zevv | I do not like the syntax, but that's a personal opinion |
17:35:09 | Zevv | gimme a sec |
17:35:51 | Zevv | http://ix.io/2cur: this is nimmish imho |
17:36:12 | Zevv | oooh |
17:36:13 | Zevv | ok |
17:36:54 | Zevv | bwah :) |
17:37:18 | Zevv | parsecfg ignores commets, so you lose them if you use that |
17:37:28 | * | zahary quit (Client Quit) |
17:37:49 | Zevv | save offsets |
17:37:52 | Zevv | and replace chunks |
17:37:55 | Zevv | right so |
17:38:29 | Zevv | *Seriously* |
17:38:52 | Zevv | it's awful |
17:39:08 | Zevv | but I get your point, you just want to make it work |
17:39:11 | Zevv | so least effort should be ok |
17:40:05 | Zevv | If you use this syntax, you adhere to the convetions. Comments go into # |
17:40:30 | Zevv | I can whip one up |
17:40:54 | Zevv | not sure, it's duplicating effort as there is already parsecfg |
17:41:45 | * | salewski quit (Quit: WeeChat 2.7) |
17:42:10 | Zevv | you now this, right? https://nim-lang.org/docs/parsecfg.html#examples-modifying-a-configuration-file |
17:43:33 | Zevv | aw :/ |
17:45:16 | Zevv | and then you will use the parsecfg update api? |
17:45:28 | Zevv | test it first :) |
17:49:50 | Zevv | it drops comments |
17:55:00 | FromGitter | <kristianmandrup> `implicit object field construction requires a .partial object, but got TProc` ?? |
17:55:48 | FromGitter | <kristianmandrup> Trying to set a string property `lastVarName` on a `PProc` instance |
17:58:04 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52bd2ca0aa6629f5e99d60] |
18:01:18 | FromGitter | <kristianmandrup> Is this related to https://github.com/nim-lang/Nim/issues/12753 ?? |
18:01:21 | disbot | ➥ assignment of objects erroneously zeroed LHS before object construction on the RHS ; snippet at 12https://play.nim-lang.org/#ix=2cuS |
18:01:55 | Zevv | I'm off disruptek, sorry |
18:02:45 | * | ptdel quit (Ping timeout: 240 seconds) |
18:02:49 | FromGitter | <kristianmandrup> I was in a `var` block |
18:07:46 | * | solitudesf joined #nim |
18:14:42 | FromGitter | <Varriount> @kristianmandrup Look at the C code when running the Nim compiler with linedir:on |
18:14:58 | FromGitter | <Varriount> There might also be an embedsrc flag too |
18:15:40 | sealmove | is this: https://github.com/PMunch/combparser all we have on parser combinators for Nim? |
18:16:06 | FromGitter | <kristianmandrup> @Varriount I sorted it |
18:17:01 | FromGitter | <Varriount> sealmove: Does NPeg count? |
18:17:08 | sealmove | nop |
18:17:25 | Zevv | ;( |
18:19:13 | leorize | !repo lexim |
18:19:14 | disbot | https://github.com/Araq/lexim -- 9lexim: 11Lexer generation and regex implementation for Nim. 15 10⭐ 2🍴 |
18:19:28 | leorize | this one is unmaintained though |
18:27:00 | FromGitter | <zetashift> For choosenim is there a https://github.com/dom96/choosenim/releases 0.6.0 release? |
18:29:03 | disruptek | yep. |
18:29:06 | disruptek | ~choosenim |
18:29:06 | disbot | choosenim: 11https://github.com/dom96/choosenim/releases/tag/v0.6.0 -- disruptek |
18:29:20 | FromGitter | <zetashift> that 404's for me |
18:30:06 | disruptek | ~choosenim is https://github.com/dom96/choosenim/releases/tag/v0.5.1 |
18:30:07 | disbot | choosenim: 11https://github.com/dom96/choosenim/releases/tag/v0.5.1 |
18:32:54 | FromGitter | <kristianmandrup> Can anyone tell me what this means? |
18:33:14 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52c56a8b2d4664ef1ea9f1] |
18:36:49 | FromGitter | <kristianmandrup> When building Nim with my tweaks for `jsgen` |
18:37:26 | FromGitter | <kristianmandrup> So it compiles successfully, but then??? |
18:42:10 | * | zahary joined #nim |
18:42:21 | leorize | @clyybber: can your ryu testsuite do full float range testing? |
18:47:10 | FromGitter | <kristianmandrup> All good :) |
18:49:35 | * | hax-scramper quit (Ping timeout: 258 seconds) |
18:49:45 | * | hax-scramper joined #nim |
18:54:42 | vegai | uint/int are arch-specific length, right? |
19:00:56 | nixfreak | Can anyone install karax and run the examples like mediaplayer and tell me if it works for them please ? |
19:06:01 | leorize | vegai: yep |
19:06:10 | leorize | nixfreak: yes it does work the last time I checked |
19:07:20 | nixfreak | I just a blank screen ? |
19:07:40 | nixfreak | I just get a blank screen ? , what version and branch did you compile with? |
19:08:58 | leorize | master, latest HEAD |
19:09:01 | leorize | nim devel |
19:09:23 | leorize | I get 4 media players |
19:09:34 | leorize | how did you run the example? |
19:11:38 | * | freddy92 quit (Read error: Connection reset by peer) |
19:11:48 | nixfreak | used my browser to opened the playerapp.html |
19:11:51 | * | krux02 joined #nim |
19:12:03 | * | freddy92 joined #nim |
19:14:26 | leorize | did you compile playerapp.nim beforehand? |
19:14:36 | * | Trustable joined #nim |
19:14:53 | nixfreak | yes |
19:15:11 | nixfreak | nim js mediaplayer.nim |
19:15:13 | leorize | the resulting .js is in the same folder, yes? |
19:15:20 | nixfreak | correct |
19:15:42 | Zevv | sealmove: just wondering, why does npeg not count? |
19:15:59 | leorize | nixfreak: maybe check the console for any errors? |
19:17:28 | sealmove | Zevv: because you can't write your own logic for matching stuff. yeah, it's very close to parser combinator, and most of stuff one will need are implemented, but still it's not exactly as flexible, and it's still a DSL, not pure Nim. |
19:17:34 | nixfreak | yeah i did yes permission denied , which is weird |
19:18:23 | nixfreak | but I checked the permissions with the files. Thanks I'm going to figure this , just wanted to know if it was my system or not |
19:18:51 | leorize | sealmove: have you looked at lexim? |
19:19:02 | sealmove | not yet |
19:19:59 | sealmove | what's the idea behind it |
19:20:36 | leorize | https://github.com/Araq/lexim/blob/master/ex1.nim |
19:20:54 | leorize | something that can compose with whatever buffering system you might use |
19:21:35 | sealmove | hmm |
19:23:09 | sealmove | i need an approach that allows one to build a rather complicated parser slowly and steadily without things getting harder and harder as the project progresses |
19:23:48 | leorize | well lexim does look like something that can do so to me |
19:35:50 | nixfreak | @leorize I got it to work now thanks , not sure what happend , it was late last night so I'm sure I screwed something up |
19:40:22 | * | sealmove quit (Quit: WeeChat 2.7) |
19:43:14 | FromGitter | <Varriount> sealmove: Why won't NPeg work? |
19:43:30 | * | solitudesf quit (Remote host closed the connection) |
19:47:39 | * | freddy92 quit (Read error: Connection reset by peer) |
19:48:05 | * | freddy92 joined #nim |
19:49:09 | * | chemist69 quit (Ping timeout: 272 seconds) |
19:49:54 | * | chemist69 joined #nim |
19:50:39 | Zevv | the DSL is just the main representation |
19:50:52 | Zevv | but it actually uses primitives to build the grammar, which can be used by the user as well |
19:50:58 | Zevv | that part is not documented, though |
19:51:35 | Zevv | and you can add your own logic as well, you can make nim procs as atoms |
19:51:42 | Zevv | but fair enought, it's probably not optimal and all |
19:51:53 | Zevv | just wondering why it would or would not be seen as a parser combinator |
19:54:45 | * | nsf quit (Quit: WeeChat 2.7) |
20:03:51 | FromGitter | <kristianmandrup> What is the best way to get more detailed error reporting when running a nim test? |
20:04:02 | disruptek | error reporting? |
20:04:03 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52dab24880f07ed1f43aa4] |
20:05:08 | * | freddy92 quit (Read error: Connection reset by peer) |
20:05:11 | disruptek | js backend... yoyo |
20:05:34 | * | freddy92 joined #nim |
20:07:08 | * | dwdv joined #nim |
20:16:21 | * | zahary quit (Quit: Leaving.) |
20:16:36 | * | zahary joined #nim |
20:17:09 | * | zahary quit (Client Quit) |
20:18:06 | FromDiscord_ | <mratsim> isn't that a compiler crash? |
20:20:39 | FromGitter | <kristianmandrup> yes, a compiler crash... playing with js gen |
20:21:08 | FromGitter | <kristianmandrup> I'm good, how can I run individual test on Nim compiler? |
20:24:37 | leorize | wdym? |
20:27:25 | * | fanta1 quit (Quit: fanta1) |
20:31:42 | * | marmotini_ joined #nim |
20:32:05 | FromDiscord_ | <mratsim> usually "./koch temp c 'testfile'" |
20:32:25 | FromDiscord_ | <mratsim> this will build a temporary Nim compiler with stacktraces enabled |
20:33:32 | FromDiscord_ | <mratsim> and for the nim testsuite itself "./koch tests cat js" to run all the tests in js folder |
20:37:17 | FromGitter | <kristianmandrup> Thanks :) |
20:38:39 | FromGitter | <kristianmandrup> yes, but many tests in js folder/category - too much noise for my case |
20:38:50 | * | Trustable quit (Remote host closed the connection) |
20:41:38 | * | freddy92 quit (Read error: Connection reset by peer) |
20:43:31 | * | couven92 joined #nim |
20:46:42 | * | jjido joined #nim |
20:47:16 | disruptek | is beef in the house? |
20:48:23 | FromDiscord_ | <Elegant Beef> Nah never |
20:48:44 | disruptek | !repo rlipsc/polymorph |
20:48:45 | disbot | https://github.com/rlipsc/polymorph -- 9polymorph: 11Polymorph is a compile-time composable entity component system generator. 15 1⭐ 0🍴 |
20:49:44 | FromDiscord_ | <Elegant Beef> i mean i do have runtime composition 😄 |
20:50:00 | FromDiscord_ | <Elegant Beef> I dont know about "high performance" thought |
20:50:03 | FromDiscord_ | <Elegant Beef> though* |
20:50:23 | disruptek | you might find something useful in there... |
20:51:08 | FromDiscord_ | <Elegant Beef> maybe, i really need to my gpu drawing stuff though |
20:51:32 | FromDiscord_ | <Elegant Beef> right now i have 0 clue how bad my ECS is on a performance level, since all i know is the memory usage for millions of entities |
20:52:10 | FromDiscord_ | <Elegant Beef> think it's 2GiB for 1million entities |
20:52:36 | FromDiscord_ | <Elegant Beef> so probably not close to being ideal |
20:52:59 | FromDiscord_ | <Elegant Beef> but still, just wanna see it running with actual graphics to see how much it needs to improve |
20:53:49 | disruptek | where are you in that process? |
20:54:08 | FromDiscord_ | <Elegant Beef> uhh i tried bgfx but zachs bindings dont seem to work with linux |
20:54:14 | FromDiscord_ | <Elegant Beef> so im debating between learning ogl, or vulkan |
20:54:31 | FromDiscord_ | <Elegant Beef> Clearly OGL is smarter to just get shapes drawn |
20:54:33 | disruptek | wow, that's surprising. |
20:54:40 | FromGitter | <kristianmandrup> How do I ensure a `seq` field is initialised? |
20:54:44 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52e694a0aa6629f5ea2048] |
20:54:54 | FromDiscord_ | <Elegant Beef> `= @[]` |
20:55:09 | disruptek | newSeqOfCap(64)? |
20:55:21 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52e6b9b662483a875e419f] |
20:55:22 | FromDiscord_ | <Elegant Beef> *both* 😄 |
20:56:11 | FromGitter | <kristianmandrup> well, how do I define a `constructor` of some sort so that it scales and avoid having to do it manually for each `PSrcCode`? |
20:56:45 | disruptek | PSrcCode is a pointer (a ref). new(PSrcCode) instantiates one such object. |
20:57:06 | FromGitter | <kristianmandrup> Ah, I see |
20:57:10 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52e725d97c107ed27001ea] |
20:57:50 | FromGitter | <kristianmandrup> so would define and then use `newSrcCode` here for each of those fields |
20:58:08 | FromDiscord_ | <exelotl> @kristianmandrup: yes, that's the usual convention :) |
20:58:24 | disruptek | gitter's ui makes my balls throb. |
20:58:27 | disruptek | i just can't take it. |
20:58:42 | * | filcuc joined #nim |
20:59:46 | FromDiscord_ | <exelotl> 1/3rd of my screen real estate is taken up by "W h e r e c o m m u n i t i e s t h r i v e" |
21:00:46 | disruptek | yeah, i'm fixing it now with stylebot. |
21:01:00 | disruptek | it's like 60% of my page. |
21:05:19 | FromGitter | <kristianmandrup> what is the best way to check if a field is assigned to a seq (`@[]`) or undefined/nil - use `isNil`? |
21:05:39 | disruptek | stylebot saves my ass every damned day. |
21:05:58 | disruptek | kristian: what? |
21:06:15 | disruptek | seqsyField.len > 0? |
21:06:20 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52e94c4609ce3a88203137] |
21:08:19 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52e9c36053e67dc4dfb862] |
21:08:25 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52e9c989f30b126527109d] |
21:09:21 | FromGitter | <kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e52ea0189f30b1265271195] |
21:09:39 | disruptek | do you understand how hard it is for irc people to read this stuff? |
21:10:07 | * | narimiran quit (Ping timeout: 260 seconds) |
21:11:49 | * | skrylar joined #nim |
21:13:43 | FromGitter | <kristianmandrup> simply trying to concatenate a `seq[Rope]` to another `seq[Rope]`. Sorry |
21:14:32 | disruptek | does it work? |
21:15:36 | FromGitter | <kristianmandrup> https://play.nim-lang.org/#ix=2cw6 |
21:15:42 | disruptek | an irc person has to click a link and load gitter to see each and every paste. |
21:15:51 | skrylar | :< |
21:16:34 | disruptek | it looks like, "yes, it works" would have worked better than a url. |
21:16:46 | FromGitter | <kristianmandrup> But I get illegal storage access |
21:16:48 | FromGitter | <kristianmandrup> /Users/kristianmandrup/repos/nim-projects/Nim/compiler/jsgen.nim(174) add ⏎ SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
21:17:02 | FromGitter | <kristianmandrup> when I have a `seq[Rope]` ? |
21:17:29 | disruptek | one side of the add is nil. |
21:17:55 | * | lritter quit (Remote host closed the connection) |
21:18:04 | FromGitter | <kristianmandrup> yes, that must be the case but not even sure how to test for nil yet |
21:18:15 | disruptek | x == nil |
21:18:19 | disruptek | x.isNil |
21:18:23 | FromGitter | <kristianmandrup> yes, I tried |
21:18:40 | disruptek | suggestion: don't guess. know. |
21:18:55 | leorize | I did it |
21:19:00 | leorize | !repo alaviss/nim-ryu |
21:19:01 | disbot | https://github.com/alaviss/nim-ryu -- 9nim-ryu: 11An implementation of the ryū float-to-string conversion algorithm. This version is written from scratch based on the paper. 15 1⭐ 0🍴 |
21:19:12 | FromGitter | <kristianmandrup> https://play.nim-lang.org/#ix=2cw7 |
21:19:14 | leorize | I figured out what the hell does that formula do |
21:19:19 | disruptek | wow, you're the man, leorize! |
21:19:33 | leorize | yea this is just the basic converter :P |
21:19:38 | leorize | I've yet to actually port ryu |
21:20:00 | leorize | though it said that the only modification should be in the step where the shortest float is computed |
21:20:47 | * | Hideki_ joined #nim |
21:20:54 | leorize | damn this basic converter convert even better than the musl libc one |
21:21:11 | leorize | it's slow as hell though, I think |
21:21:15 | leorize | haven't benchmarked it |
21:21:18 | FromGitter | <kristianmandrup> Error: type mismatch: got <seq[string], typeof(nil)> |
21:21:35 | leorize | seq.len == 0 |
21:21:43 | FromGitter | <kristianmandrup> if srcList == nil: ⏎ echo "is nil" |
21:21:57 | FromGitter | <kristianmandrup> ok, will try len |
21:22:07 | FromGitter | <kristianmandrup> weird kinda nil check hack though |
21:22:20 | FromGitter | <kristianmandrup> what if is just empty |
21:22:39 | disruptek | it's more likely that you cannot concatenate an empty seq[Rope] and a full seq[Rope]. |
21:22:52 | leorize | empty is .len == 0 |
21:23:04 | disruptek | ie. if seq[Rope].len == 0: oldrope = newrope else: oldrope &= newrope |
21:23:04 | leorize | nim seq and string don't have a concept of nil anymore |
21:23:25 | disruptek | stop guessing. |
21:23:27 | disruptek | know. |
21:23:42 | FromGitter | <kristianmandrup> aha! Have never seen this syntax `&=` exactly what I was looking for |
21:23:56 | disruptek | equivalent to `add`, usually. |
21:25:07 | FromGitter | <kristianmandrup> but this makes no sense to me: if seq[Rope].len == 0 |
21:25:10 | * | Hideki_ quit (Ping timeout: 255 seconds) |
21:25:14 | disruptek | it's pseudocode. |
21:25:32 | FromGitter | <kristianmandrup> okay |
21:29:08 | Zevv | disruptek: did it work out with the ini files? |
21:29:18 | disruptek | yep. |
21:29:53 | Zevv | good |
21:30:06 | Zevv | but you lose the comments :) |
21:30:35 | FromGitter | <kristianmandrup> can't seem to operate on a field of type `seq[Rope]`, do I need to use `ref`? like in `C` `char*`? |
21:31:11 | disruptek | step 1) find out how to use ropes. what functions exist to operate upon them? |
21:31:24 | disruptek | step next) compose a concatenation using such functions. |
21:31:24 | * | marmotini_ quit (Remote host closed the connection) |
21:31:25 | FromGitter | <kristianmandrup> TSrcCode = ref object of RootObj ⏎ ⏎ ```srcList: seq[Rope] # mutable sequence of ropes/strings``` [https://gitter.im/nim-lang/Nim?at=5e52ef2dff00c664eee0366f] |
21:31:54 | FromGitter | <kristianmandrup> Ah, maybe my TSrcCode must be `ref object` and not simply `object` - been doing JS for too long |
21:31:56 | * | marmotini_ joined #nim |
21:36:25 | * | marmotini_ quit (Ping timeout: 255 seconds) |
21:37:45 | FromGitter | <kristianmandrup> This works fine: https://play.nim-lang.org/#ix=2cwe |
21:39:15 | FromGitter | <kristianmandrup> same with rope: https://play.nim-lang.org/#ix=2cwf must be sth else. I've read the manual page on ropes, didn't say much, but is not the problem in any case |
21:40:10 | * | zahary joined #nim |
21:40:55 | disruptek | life is easier when your variables in different scopes don't share the same name. |
21:41:19 | * | zahary quit (Client Quit) |
21:41:37 | * | zahary joined #nim |
21:41:44 | disruptek | okay, i'm done picking on you. 😉 |
21:42:05 | * | zahary quit (Client Quit) |
21:42:18 | FromDiscord_ | <Elegant Beef> Just name all your variables x and an integer |
21:43:16 | disruptek | nah, just use different emojis. 🥒🍑 |
21:51:49 | disruptek | leorize: i would rather have an idiomatic ryu than a fast one, though it'd be nice if idiomatic nim was fast nim, of course. 😁 |
21:52:50 | leorize | the basic converter is a reference converter :P |
21:52:54 | leorize | it's super slow |
21:53:04 | leorize | 4x libc impl in my case |
21:53:16 | leorize | it's only used to verify any implementation that come after :P |
21:53:31 | * | solitudesf joined #nim |
21:54:21 | leorize | now the big question will be: do we want the lookup table? |
21:54:37 | * | hax-scramper quit (Read error: Connection reset by peer) |
21:54:43 | leorize | it appears to me that a variant without the table is described in this paper |
21:54:47 | * | hax-scramper joined #nim |
21:54:51 | leorize | but I'm not sure how fast will it be without that table |
22:01:33 | * | filcuc quit (Quit: Konversation terminated!) |
22:01:47 | * | filcuc joined #nim |
22:10:43 | * | tane quit (Quit: Leaving) |
22:12:59 | * | azed joined #nim |
22:18:35 | disruptek | i would say the table isn't the problem, as long as it can be disabled for embedded. |
22:19:14 | leorize | bad news, the table is required |
22:19:24 | disruptek | well, the small one isn't very large. |
22:20:00 | disruptek | ima stream modifying disbot to have this radio feature. |
22:21:01 | disruptek | https://www.twitch.tv/disruptek |
22:21:54 | leorize | it said offline :p |
22:22:04 | leorize | ah ok online now |
22:22:38 | leorize | wait offline again |
22:22:46 | disruptek | just gonna fix that audio. i have the mic fixed but.. |
22:24:00 | FromGitter | <kristianmandrup> Why am I getting `unhandled exception: key not found` on `if self.idMap[id] == nil` when `idMap` is a `TableRef[string, ref object]`? |
22:24:25 | disruptek | idMap.hasKey("somekey") == true: |
22:24:33 | disruptek | or "somekey" in idMap: |
22:24:37 | FromDiscord_ | <Elegant Beef> isnt it contains? |
22:24:45 | disruptek | or idMap.contains("somekey") |
22:24:48 | disruptek | sure. |
22:24:56 | FromDiscord_ | <Elegant Beef> ah it has both |
22:25:04 | disruptek | in is a template that calls contains() |
22:25:13 | FromDiscord_ | <Elegant Beef> you probably want hasKeyOrput |
22:25:17 | FromDiscord_ | <Elegant Beef> you probably want hasKeyOrPut |
22:25:26 | FromGitter | <kristianmandrup> if self.idMap[id] == false: ⏎ ⏎ ```self.idMap[id] = newIdTableEntry()``` [https://gitter.im/nim-lang/Nim?at=5e52fbd6d97c107ed270440a] |
22:26:00 | FromDiscord_ | <Elegant Beef> yea i'd say just use hasKeyOrPut and discard the obol |
22:26:02 | FromDiscord_ | <Elegant Beef> bool* |
22:26:17 | FromDiscord_ | <Elegant Beef> but im a mad man 😄 |
22:26:23 | FromGitter | <kristianmandrup> I think I might also need `hasKeyOrput`? |
22:30:23 | * | solitudesf quit (Ping timeout: 258 seconds) |
22:31:32 | * | Hideki_ joined #nim |
22:31:59 | leorize | I see convertToGit disruptek |
22:32:25 | leorize | not all services support the git protocol :P |
22:33:28 | leorize | it said https git.sr.ht over there |
22:33:58 | leorize | you swapped https:// for git:// |
22:34:16 | shashlick | Gosh working on nimterop newalgo is just too hard, totally need unlimited time and zero distractions |
22:37:03 | leorize | you should unify the cases cuz windows |
22:37:23 | * | neceve quit (Ping timeout: 260 seconds) |
22:37:53 | leorize | windows have case-insensitive file system |
22:38:01 | leorize | yep :P disruptek |
22:38:19 | FromDiscord_ | <Elegant Beef> nah we need to make good linux specific software to transition windows users to linux |
22:38:21 | FromDiscord_ | <Elegant Beef> top level iq |
22:39:39 | federico3 | https://news.ycombinator.com/item?id=22399416 Nim Community Survey 2019 Results |
22:41:47 | leorize | disruptek: see the cannot rename above |
22:42:55 | leorize | but if you don't get rid of the directory then libgit won't clone it again |
22:45:20 | dom96 | oh cool, it's on the front page |
22:45:22 | dom96 | took a while |
22:47:12 | dom96 | 1 hour and still no comments huh |
22:48:02 | * | azed quit (Quit: WeeChat 2.7) |
22:59:38 | FromDiscord_ | <Recruit_main70007> Do you think we could make some kind of place to request code examples and post them? Since it’s one of the most wanted things in the survey... and I am to shy and rookie to make an OpenGL series... |
23:02:53 | * | ptdel joined #nim |
23:04:40 | jken | Couldn't be happier using nim, thanks for all that you do core team! |
23:05:33 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:07:39 | disruptek | dude, that's awesome. |
23:07:43 | disruptek | what are you building? |
23:08:32 | disruptek | https://www.twitch.tv/disruptek |
23:08:54 | disruptek | what's the quickest way to convert a string to start with the opposite case. |
23:08:57 | disruptek | ???? |
23:09:13 | leorize | switch to offtopic |
23:09:55 | disruptek | how is that off-topic? |
23:10:16 | leorize | I already gave you an answer there :P |
23:11:13 | * | my_dude joined #nim |
23:16:58 | * | abm quit (Quit: Leaving) |
23:18:21 | jken | disruptek, mind sharing your wallpaper? :) |
23:20:25 | jken | ill take a look, thanks |
23:24:20 | dadada | nushell has some pretty neat ideas ... too bad its implemented in rust |
23:28:07 | * | sekao joined #nim |
23:29:49 | * | couven92 quit (Ping timeout: 255 seconds) |
23:30:51 | leorize | well there's nothing bad about that |
23:32:18 | leorize | toLower the first addition, then toUpper the next one :P |
23:32:33 | leorize | oops wrong channel |
23:32:47 | dadada | I'm not against rust, it's just that if I wanted to bundle nushell scripts with nim applications, I'd need two toolchains, and so a native nim shell would be nicer |
23:33:39 | * | couven92 joined #nim |
23:34:08 | * | Hideki_ quit (Ping timeout: 252 seconds) |
23:35:25 | * | fredrik92 joined #nim |
23:35:32 | sekao | can anyone point to an example of passing a function from Nim to C? i have a C function that receives a function pointer, and i'm calling it from nim and just passing an anonymous proc. so far i'm getting a SIGSEGV. maybe there's something special i need to do... |
23:36:17 | * | freddy92 joined #nim |
23:36:20 | leorize | did you tag the function with {.cdecl.}? |
23:37:45 | sekao | no, that was it! thank you |
23:39:41 | * | couven92 quit (Ping timeout: 272 seconds) |
23:40:19 | * | fredrik92 quit (Ping timeout: 272 seconds) |
23:49:20 | * | sekao quit (Remote host closed the connection) |
23:49:42 | * | zahary joined #nim |
23:54:15 | * | zahary quit (Ping timeout: 272 seconds) |