00:00:24 | sealmove | what WILL happen is unpredictable, but it could also work the other way around. I mean people were attracted to Rust *because* of a new way to do MM |
00:00:51 | * | abm quit (Quit: Leaving) |
00:00:51 | rayman22201 | I can also see a future where the GC sticks around, and you can use Nim like you do today, but when you switch to "newruntime" mode, the compiler gives you warnings, as you say. |
00:01:06 | sealmove | no, I didn't mean that |
00:01:16 | rayman22201 | The thing is, you can easily switch back to GC mode, it just ignores the "owned" stuff. Everything just works fine. |
00:01:22 | rayman22201 | that's one of the cool features. |
00:01:25 | sealmove | I meant messages while using oldruntime |
00:01:42 | * | rnrwashere quit (Ping timeout: 245 seconds) |
00:02:55 | sealmove | if oldruntime throws hints, but still keeps working, maybe people will start listening to hints and quickly realize it's not that hard to change to newruntime. but again, i am not even sure if *those* hints are even possible, |
00:03:48 | rayman22201 | It's totally possible |
00:04:20 | sealmove | yes it's good for transition period... but if GC sticks around then a split will happen :| |
00:04:29 | rayman22201 | idk if it's worth it though. I don't think extra compiler warnings are going to convince me to change what I'm doing lol |
00:04:36 | rayman22201 | it might just make me annoyed. |
00:04:52 | sealmove | hmm dunno, they will be hints not warnings :P |
00:05:10 | sealmove | blue color ftw |
00:06:33 | rayman22201 | lol. Meh. I'm probably the wrong person to ask. I either want the GC, and I want the compiler to STFU, or I want the new runtime, and I expect helpful hints. Eithe way I expect I know what I'm getting myself into. |
00:06:39 | sealmove | i don't know, we need convincing advertising, maybe compare it with the 3 models - C++ style, Rust style, GC style |
00:07:07 | sealmove | will try to make slides, but no promises :P |
00:09:00 | rayman22201 | I do agree about advertising, but this is still early days for this. I'm excited for Araq to get the prototype finished to a point where we can play with it in a real way. |
00:09:23 | rayman22201 | I think at this point it's hard to make any real conclusions without testing it on some real world applications. |
00:09:57 | rayman22201 | slides ftw! lol |
00:10:59 | disruptek | the attraction to rust isn't just about safety; it's about finally having something powerful enough to compete with C. |
00:11:20 | rayman22201 | Nim can be that too :-P |
00:11:29 | disruptek | i don't disagree. ;-) |
00:11:34 | rayman22201 | I have been saying that ever since I found Nim lol |
00:12:56 | sealmove | Nim is thin-layer philosophy, that's why the proposal makes sense |
00:13:05 | sealmove | the leaner the better |
00:14:03 | rayman22201 | agreed |
00:14:06 | sealmove | it can just do much better than a GC... |
00:16:50 | * | theelous3_ quit (Ping timeout: 246 seconds) |
00:23:27 | rayman22201 | The problem is that Araq is too smart. He made a pretty damn good performance GC (especially considering when he built it), and it made people comfortable. Lol |
00:26:18 | * | banc quit (Ping timeout: 250 seconds) |
00:26:50 | * | rnrwashere joined #nim |
00:27:07 | sealmove | Non-determinism is bigger of a problem than performance |
00:29:01 | disruptek | the issue isn't performance at all, in my opinion. it's mapping a model that doesn't hinder while still affording some assertions by the compiler. it's about design. |
00:29:56 | sealmove | yeah GC is fundamentally unideal design, and I want to think that Nim is about thin but perfect abstractions |
00:30:25 | disruptek | this doesn't have to be the last abstraction, but it might be the next. :-) |
00:30:34 | sealmove | but rayman is right, not everyone loves Nim for that, people did get comfortable.. |
00:31:12 | * | rnrwashere quit (Ping timeout: 250 seconds) |
00:33:07 | disruptek | there will be more complaints than compliments. there always is. |
00:36:33 | FromGitter | <samdmarshall> okay this seems like a silly question but how do I perform conditional `import`s based on the compilation target? I have 2 separate implementations of what is the same code but for different platforms and I want it to import/include the right one when built |
00:37:21 | sealmove | use `when` |
00:38:04 | sealmove | https://nim-lang.org/docs/tut1.html#control-flow-statements-when-statement |
00:39:25 | I_Right_I | sealmove: you beat me to it. |
00:39:59 | FromGitter | <samdmarshall> i'm doing that but it really doesn't like that within my `.nim` file |
00:41:32 | sealmove | snippet? |
00:49:00 | FromGitter | <samdmarshall> i get a ` /home/demi/.choosenim/toolchains/nim-0.19.4/lib/pure/distros.nim(144, 54) Error: cannot evaluate at compile time: unameRes` when i try building with the ``` ⏎ when detectOs(Windows): ⏎ import "windows.nim" ⏎ when detectOs(Linux): ⏎ import "linux.nim" ... [https://gitter.im/nim-lang/Nim?at=5ca2b17c31aec969e838ec13] |
00:49:25 | FromGitter | <samdmarshall> wow that code block turned out awful, thanks gitter |
00:53:46 | sealmove | ah, unameres is `var` |
00:53:56 | sealmove | so maybe you actually need ifs instead of whens |
00:55:59 | sealmove | so either `if detectOs(...)` or `when system.hostos == ...` |
01:00:15 | FromGitter | <samdmarshall> if's don't work as the `import` stops being at the top level |
01:00:33 | FromGitter | <samdmarshall> i guess `when hostOs == …` is the way to do it as that compiles at least |
01:03:39 | sealmove | ah right, btw instead of 3 whens, try when ... elif |
01:03:54 | sealmove | maybe it works because unameres seems to be some caching mechanism |
01:04:14 | sealmove | so perhaps you are supposed to call detectOs only once |
01:10:17 | sealmove | mm nevermind, detectOs seems to not work at compile-time as the error message suggests |
01:10:32 | sealmove | but it seems to just wrap `defined` |
01:10:44 | FromGitter | <samdmarshall> hence, my question |
01:10:50 | sealmove | you can do `when defined(windows)` etc to get similar behavior |
01:11:12 | sealmove | idk when detectOs is useful |
01:41:26 | * | lritter joined #nim |
02:01:23 | * | sealmove quit (Quit: WeeChat 2.4) |
02:07:38 | shashlick | that's more for nimscript i think |
02:18:23 | I_Right_I | sealmove: have you gotten the new runtime to compile anything? |
02:19:12 | I_Right_I | i mean he compiler with the newruntime flag? |
02:21:42 | * | noonien quit (Quit: Connection closed for inactivity) |
02:31:59 | FromGitter | <kayabaNerve> I never realized Nim added a define C at the end of last year. |
02:32:11 | FromGitter | <kayabaNerve> I've needed one before. |
02:41:56 | disruptek | are there any decent docs for nim.cfg? anywhere? |
02:43:19 | leorize | I_Right_I: hello world is working with newruntime :p |
02:44:18 | * | lritter quit (Ping timeout: 244 seconds) |
02:44:54 | * | lritter joined #nim |
02:46:58 | * | ptdel joined #nim |
02:47:20 | I_Right_I | leorize: I tried a for loop and got a gcc error - I was just wondering |
02:47:43 | ptdel | Hello, is there something in nim for combining two tables akin to Python's `x = { **y, **z}` or updating the contents of one with the other? |
02:50:04 | * | I_Right_I quit (Remote host closed the connection) |
03:32:51 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:38:38 | * | sealmove joined #nim |
04:07:50 | Tanger | Hey folks, anybody know of an example of the `[]=` operator being overloaded? |
04:15:47 | * | tefter quit (Remote host closed the connection) |
04:16:38 | * | dddddd quit (Remote host closed the connection) |
04:20:12 | * | ptdel quit (Remote host closed the connection) |
04:24:11 | leorize | Tanger: See the `tables` module |
04:32:21 | FromGitter | <Grabli66> Hi! What is the best way to make "interface" in nim? |
04:34:21 | sealmove | I believe this is the most interesting implementation https://github.com/andreaferretti/interfaced |
04:37:34 | Tanger | Thanks leorize |
04:37:42 | * | nsf joined #nim |
04:38:54 | FromGitter | <Grabli66> Thanks |
05:07:27 | * | narimiran joined #nim |
05:41:57 | * | vlad1777d joined #nim |
06:09:55 | * | krux02 joined #nim |
06:31:09 | FromGitter | <mratsim> @samdmarshall when defined() is the way to go |
06:40:53 | * | PMunch joined #nim |
06:53:29 | * | kapil____ joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:50 | * | gmpreussner joined #nim |
07:56:57 | * | Vladar joined #nim |
08:02:57 | * | floppydh joined #nim |
08:06:23 | * | tdc joined #nim |
08:12:16 | * | Tanger quit (Read error: Connection reset by peer) |
08:38:15 | * | neceve joined #nim |
08:59:19 | * | vlad1777d quit (Ping timeout: 268 seconds) |
09:11:07 | * | solitudesf joined #nim |
09:22:13 | * | stefanos82 joined #nim |
10:29:10 | * | vlad1777d joined #nim |
10:35:20 | FromGitter | <Grabli66> How to get address of a procedure? addr someType.someProc - does not work |
10:38:34 | leorize | Grabli66: `let address = someProc` |
10:39:59 | leorize | to get a specific overload: `let address = (proc (a: SomeType))(someProc)` (yea the syntax for this is terrible). |
10:42:23 | * | seni joined #nim |
11:06:05 | * | vlad1777d quit (Ping timeout: 246 seconds) |
11:28:05 | Araq | the syntax makes sense IMO |
11:49:57 | * | vegai_ joined #nim |
11:55:32 | * | mosORadi joined #nim |
11:59:40 | * | Snircle joined #nim |
12:15:29 | * | dddddd joined #nim |
12:17:24 | * | Bob- quit (Quit: bye bye) |
12:46:59 | Zevv | Why is 'address' a tuple? |
12:47:32 | Araq | why not? |
12:47:42 | Zevv | http://paste.debian.net/1075614/ |
12:47:53 | FromGitter | <mratsim> proc + environment, it's a closure by default |
12:48:09 | FromGitter | <mratsim> add {.nimcall.} if you want a plain pointer |
12:48:25 | CcxWrk | posix.fcntl() doesn't have third argument? Or does the varargs thing somehow allow it? |
12:48:28 | FromGitter | <mratsim> actually no, just cast |
12:48:41 | Zevv | ah, makese perfect sense, thanks for pointing that out |
12:59:33 | sealmove | What would you recommend for learning to write lexers/parsers/compilers in general? Is https://images-na.ssl-images-amazon.com/images/I/51Bug87tM%2BL._SX328_BO1,204,203,200_.jpg worth it? |
13:00:59 | Araq | "Modern compiler construction in ML/Java/C" |
13:01:06 | FromGitter | <alehander42> i wouldnt recommend the dragon book |
13:01:17 | FromGitter | <mratsim> isn't dragon book basically a parser book? :p |
13:01:34 | Zevv | http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf |
13:02:02 | FromGitter | <alehander42> if youre into type systems, there is whole another literature field for them |
13:02:06 | FromGitter | <alehander42> about them* |
13:02:22 | FromGitter | <mratsim> *cough* Hindley Milner *cough* |
13:04:29 | sealmove | thanks! |
13:06:38 | * | echotangoecho joined #nim |
13:46:55 | livcd | test |
13:48:23 | FromGitter | <mratsim> work |
13:48:43 | livcd | yeah but my irssi/tmux on cmder is out of place |
13:48:45 | livcd | thanks |
13:51:32 | shashlick | how'd you get tmux running in cmder - wsl? |
13:51:54 | CcxWrk | What is the Nim for Python's partial()? |
13:52:23 | livcd | ah sorry I am already ssh-ed on a remote machine |
13:52:40 | shashlick | okay |
13:52:59 | livcd | but it's bad... |
13:53:09 | livcd | totally messes up with your screen |
13:54:12 | * | Cthalupa quit (Ping timeout: 245 seconds) |
13:55:55 | shashlick | I don't trust anything besides putty |
13:56:23 | livcd | yeah but i wanted to have a tabbed terminal |
13:56:26 | * | Cthalupa joined #nim |
13:56:59 | shashlick | well conemu can embed putty, so maybe cmder can too |
13:57:06 | shashlick | not as seamless but ya |
13:57:10 | shashlick | another option is mremoteng |
13:58:16 | FromGitter | <mratsim> @CcxWrk, there is no partial but there are some currying macro you can borrow. |
13:58:51 | FromGitter | <mratsim> I think that would make your code quite complex though |
13:59:11 | CcxWrk | I think I will do with nested proc closures for now, thanks. |
14:04:18 | livcd | test |
14:05:18 | * | Cthalupa quit (Ping timeout: 250 seconds) |
14:07:00 | * | Cthalupa joined #nim |
14:08:08 | * | PMunch quit (Remote host closed the connection) |
14:11:48 | * | echotangoecho quit (Quit: Changing server) |
14:13:01 | * | echotangoecho joined #nim |
14:21:29 | CcxWrk | How does setLen work internally? realloc() as needed? |
14:21:39 | Araq | sure |
14:23:36 | CcxWrk | Only for growing or does it shrink too? Does it allocate extra (eg. exponentially) to accommodate frequent resizes? |
14:25:21 | * | zahary joined #nim |
14:25:23 | * | Trustable joined #nim |
14:26:50 | FromGitter | <mratsim> it doesn't shrink, it grows geometrically if needed |
14:27:17 | FromGitter | <mratsim> I think it's power of 2. |
14:27:32 | CcxWrk | kthnx |
14:27:38 | Araq | it grows by 1.5 |
14:27:49 | CcxWrk | That's about what I expected, but wanted to check. |
14:28:20 | FromGitter | <mratsim> so Tables grow by power of 2 but seqs by 1.5? |
14:32:57 | Araq | yes |
14:39:50 | Zevv | Everyone knows the best is to grow by 1.618 |
14:40:37 | FromGitter | <mratsim> complex to compute, round, causes alignment/padding issue |
14:41:08 | Zevv | pff who cares |
14:41:24 | Zevv | even pine cones doe it! |
14:41:26 | FromDiscord | <PusiteGA> can i run jester on esp32 ? |
14:47:09 | FromGitter | <mratsim> I'm pretty sure jester uses async which uses closures who use the garbage collector |
14:47:14 | livcd | I did not have the time to look at walkDir it surely is easy to fix that UNC windows issue :/ |
15:02:53 | * | abm joined #nim |
15:42:24 | * | kapil____ quit (Quit: Connection closed for inactivity) |
15:54:37 | * | mosORadi quit (Quit: Connection closed for inactivity) |
16:03:10 | * | neceve quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
16:03:36 | * | neceve joined #nim |
16:04:46 | * | Jesin quit (Quit: Leaving) |
16:15:05 | * | Jesin joined #nim |
16:18:21 | * | rnrwashere joined #nim |
16:29:28 | * | banc joined #nim |
16:31:49 | * | neceve quit (Remote host closed the connection) |
16:31:53 | * | rnrwashere quit (Remote host closed the connection) |
16:32:29 | * | rnrwashere joined #nim |
16:36:32 | federico3 | what's the status with alternative memory managers? |
16:36:47 | * | rnrwashere quit (Ping timeout: 240 seconds) |
16:49:21 | * | jjido joined #nim |
16:54:33 | CcxWrk | Is there a straightforward way to wait on all Futures to complete succesfully or any one failing? |
16:58:21 | Zevv | futures can be 'and'ed and 'or'ed |
16:58:37 | Zevv | returning a new future waiting on all or any. |
16:58:38 | FromGitter | <Varriount> federico3: What do you mean? |
17:16:44 | * | al_t_ joined #nim |
17:16:44 | * | al_t_ is now known as al_ |
17:16:52 | federico3 | Varriount : implementations of https://nim-lang.org/araq/ownedrefs.html or any GC that might run on microcontrollers |
17:21:10 | sealmove | federico3: It's very early state. We are waiting for a prototype by Araq. How much/in what way it will affect semantics is still unclear. |
17:22:28 | * | clyybber joined #nim |
17:24:11 | shashlick | @samdmarshall did you delete your GraphQL.nim wrapper? |
17:24:35 | Araq | federico3: "hello world" works :-) |
17:30:20 | FromGitter | <samdmarshall> yeah I just did, it looked like someone else wrote one that worked and the one I had was just the server lib |
17:32:33 | FromGitter | <samdmarshall> @shashlick is that a problem? |
17:35:15 | shashlick | no no worries, now I'm wondering if https://github.com/genotrance/nimgraphql still works |
17:37:23 | * | nsf quit (Quit: WeeChat 2.4) |
17:38:37 | FromGitter | <samdmarshall> well according to the issue opened on mine, it does moreso than mine did. it was just a c2nim generated file on the graphql C/C++ library header |
17:39:18 | shashlick | okay not sure which one that was |
17:39:30 | shashlick | but just verified that mine still does, though you need python2 installed |
17:40:39 | * | Snircle quit (Read error: Connection reset by peer) |
17:41:08 | * | Snircle joined #nim |
17:52:27 | * | echotangoecho quit (Quit: Lost terminal) |
17:57:17 | * | rnrwashere joined #nim |
17:59:52 | * | rnrwashere quit (Remote host closed the connection) |
18:13:54 | * | floppydh quit (Quit: WeeChat 2.4) |
18:18:48 | * | clyybber quit (Quit: WeeChat 2.4) |
18:21:06 | * | I_Right_I joined #nim |
18:23:48 | * | theelous3_ joined #nim |
18:36:15 | * | stefanos82 quit (Remote host closed the connection) |
18:36:50 | disruptek | where i want to evaluate a statement list as an expression is `let foo = case ...`, not so much `return case ...`. am i missing something obvious? this is a rather elegant feature of coffeescript. do i just use an anon proc? |
18:38:57 | Araq | let foo = case ... does work |
18:39:30 | disruptek | oh, my bad. i got a parse error in vim. o.O |
18:49:47 | * | al_ quit (Quit: al_) |
18:50:13 | * | MightyJoe joined #nim |
18:50:27 | * | cyraxjoe quit (Ping timeout: 245 seconds) |
18:57:43 | * | ng0 joined #nim |
19:00:59 | * | Vladar quit (Remote host closed the connection) |
19:06:46 | * | sealmove quit (Quit: WeeChat 2.4) |
19:16:31 | * | ng0 quit (Remote host closed the connection) |
19:17:00 | * | jjido quit (Quit: Connection closed for inactivity) |
19:17:05 | * | fredrik92 joined #nim |
19:17:34 | * | couven92 quit (Disconnected by services) |
19:17:35 | * | ng0 joined #nim |
19:17:40 | * | fredrik92 is now known as couven92 |
19:18:02 | * | fredrik92 joined #nim |
19:20:10 | * | nsf joined #nim |
19:26:05 | * | narimiran quit (Ping timeout: 250 seconds) |
19:36:14 | * | abm quit (Quit: Leaving) |
19:44:13 | * | couven92 quit (Ping timeout: 246 seconds) |
19:50:22 | * | Trustable quit (Remote host closed the connection) |
20:02:26 | * | nsf quit (Quit: WeeChat 2.4) |
20:03:36 | * | kapil____ joined #nim |
20:26:34 | * | tdc quit (Ping timeout: 246 seconds) |
20:36:18 | * | rnrwashere joined #nim |
20:51:55 | * | rnrwashere quit (Remote host closed the connection) |
21:02:28 | * | Senketsu quit (Read error: Connection reset by peer) |
21:03:11 | * | Senketsu joined #nim |
21:04:28 | * | jakeprem quit (Quit: The Lounge - https://thelounge.chat) |
21:16:24 | BaldEagleX02 | I recently won a Math competition in Italy with my teammates (it was a regional selection), so we will train for the semi-final and, hopefully, for the final. |
21:16:24 | BaldEagleX02 | I will be very busy for at least a month, so I won't work on Arduino-nim for a while. If there is someone interested in developing this project, I will give him the work I did as far and the write access to the repo. I will be back in the mid of May and I will carry on the project. |
21:30:59 | * | Jesin quit (Quit: Leaving) |
21:34:24 | * | noeontheend joined #nim |
21:38:38 | * | Jesin joined #nim |
21:49:24 | * | solitudesf quit (Ping timeout: 250 seconds) |
22:09:10 | * | rnrwashere joined #nim |
22:13:09 | disruptek | BaldEagleX02: cool; congras! |
22:13:12 | disruptek | congrats, too. |
22:18:17 | * | krux02 quit (Remote host closed the connection) |
22:20:20 | * | rnrwashere quit (Remote host closed the connection) |
22:53:34 | * | Snircle quit (Ping timeout: 246 seconds) |
22:55:37 | * | Snircle joined #nim |
23:02:32 | * | kapil____ quit (Quit: Connection closed for inactivity) |
23:04:41 | * | rnrwashere joined #nim |
23:12:47 | * | ricekrispie joined #nim |
23:12:59 | * | rnrwashere quit (Remote host closed the connection) |
23:13:17 | * | lritter quit (Quit: Leaving) |
23:14:28 | * | ricekrispie2 quit (Ping timeout: 250 seconds) |
23:17:30 | * | rnrwashere joined #nim |
23:23:52 | * | theelous3_ quit (Ping timeout: 250 seconds) |
23:34:40 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
23:44:52 | * | rnrwashere quit (Remote host closed the connection) |
23:51:46 | * | seni quit (Quit: Leaving) |
23:52:42 | * | rnrwashere joined #nim |