<< 02-04-2019 >>

00:00:24sealmovewhat 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:51rayman22201I 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:06sealmoveno, I didn't mean that
00:01:16rayman22201The thing is, you can easily switch back to GC mode, it just ignores the "owned" stuff. Everything just works fine.
00:01:22rayman22201that's one of the cool features.
00:01:25sealmoveI meant messages while using oldruntime
00:01:42*rnrwashere quit (Ping timeout: 245 seconds)
00:02:55sealmoveif 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:48rayman22201It's totally possible
00:04:20sealmoveyes it's good for transition period... but if GC sticks around then a split will happen :|
00:04:29rayman22201idk 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:36rayman22201it might just make me annoyed.
00:04:52sealmovehmm dunno, they will be hints not warnings :P
00:05:10sealmoveblue color ftw
00:06:33rayman22201lol. 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:39sealmovei don't know, we need convincing advertising, maybe compare it with the 3 models - C++ style, Rust style, GC style
00:07:07sealmovewill try to make slides, but no promises :P
00:09:00rayman22201I 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:23rayman22201I think at this point it's hard to make any real conclusions without testing it on some real world applications.
00:09:57rayman22201slides ftw! lol
00:10:59disruptekthe attraction to rust isn't just about safety; it's about finally having something powerful enough to compete with C.
00:11:20rayman22201Nim can be that too :-P
00:11:29disrupteki don't disagree. ;-)
00:11:34rayman22201I have been saying that ever since I found Nim lol
00:12:56sealmoveNim is thin-layer philosophy, that's why the proposal makes sense
00:13:05sealmovethe leaner the better
00:14:03rayman22201agreed
00:14:06sealmoveit can just do much better than a GC...
00:16:50*theelous3_ quit (Ping timeout: 246 seconds)
00:23:27rayman22201The 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:07sealmoveNon-determinism is bigger of a problem than performance
00:29:01disruptekthe 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:56sealmoveyeah GC is fundamentally unideal design, and I want to think that Nim is about thin but perfect abstractions
00:30:25disruptekthis doesn't have to be the last abstraction, but it might be the next. :-)
00:30:34sealmovebut rayman is right, not everyone loves Nim for that, people did get comfortable..
00:31:12*rnrwashere quit (Ping timeout: 250 seconds)
00:33:07disruptekthere will be more complaints than compliments. there always is.
00:36:33FromGitter<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:21sealmoveuse `when`
00:38:04sealmovehttps://nim-lang.org/docs/tut1.html#control-flow-statements-when-statement
00:39:25I_Right_Isealmove: you beat me to it.
00:39:59FromGitter<samdmarshall> i'm doing that but it really doesn't like that within my `.nim` file
00:41:32sealmovesnippet?
00:49:00FromGitter<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:25FromGitter<samdmarshall> wow that code block turned out awful, thanks gitter
00:53:46sealmoveah, unameres is `var`
00:53:56sealmoveso maybe you actually need ifs instead of whens
00:55:59sealmoveso either `if detectOs(...)` or `when system.hostos == ...`
01:00:15FromGitter<samdmarshall> if's don't work as the `import` stops being at the top level
01:00:33FromGitter<samdmarshall> i guess `when hostOs == …` is the way to do it as that compiles at least
01:03:39sealmoveah right, btw instead of 3 whens, try when ... elif
01:03:54sealmovemaybe it works because unameres seems to be some caching mechanism
01:04:14sealmoveso perhaps you are supposed to call detectOs only once
01:10:17sealmovemm nevermind, detectOs seems to not work at compile-time as the error message suggests
01:10:32sealmovebut it seems to just wrap `defined`
01:10:44FromGitter<samdmarshall> hence, my question
01:10:50sealmoveyou can do `when defined(windows)` etc to get similar behavior
01:11:12sealmoveidk when detectOs is useful
01:41:26*lritter joined #nim
02:01:23*sealmove quit (Quit: WeeChat 2.4)
02:07:38shashlickthat's more for nimscript i think
02:18:23I_Right_Isealmove: have you gotten the new runtime to compile anything?
02:19:12I_Right_Ii mean he compiler with the newruntime flag?
02:21:42*noonien quit (Quit: Connection closed for inactivity)
02:31:59FromGitter<kayabaNerve> I never realized Nim added a define C at the end of last year.
02:32:11FromGitter<kayabaNerve> I've needed one before.
02:41:56disruptekare there any decent docs for nim.cfg? anywhere?
02:43:19leorizeI_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:20I_Right_Ileorize: I tried a for loop and got a gcc error - I was just wondering
02:47:43ptdelHello, 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:50TangerHey 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:11leorizeTanger: See the `tables` module
04:32:21FromGitter<Grabli66> Hi! What is the best way to make "interface" in nim?
04:34:21sealmoveI believe this is the most interesting implementation https://github.com/andreaferretti/interfaced
04:37:34TangerThanks leorize
04:37:42*nsf joined #nim
04:38:54FromGitter<Grabli66> Thanks
05:07:27*narimiran joined #nim
05:41:57*vlad1777d joined #nim
06:09:55*krux02 joined #nim
06:31:09FromGitter<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:20FromGitter<Grabli66> How to get address of a procedure? addr someType.someProc - does not work
10:38:34leorizeGrabli66: `let address = someProc`
10:39:59leorizeto 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:05Araqthe 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:59ZevvWhy is 'address' a tuple?
12:47:32Araqwhy not?
12:47:42Zevvhttp://paste.debian.net/1075614/
12:47:53FromGitter<mratsim> proc + environment, it's a closure by default
12:48:09FromGitter<mratsim> add {.nimcall.} if you want a plain pointer
12:48:25CcxWrkposix.fcntl() doesn't have third argument? Or does the varargs thing somehow allow it?
12:48:28FromGitter<mratsim> actually no, just cast
12:48:41Zevvah, makese perfect sense, thanks for pointing that out
12:59:33sealmoveWhat 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:59Araq"Modern compiler construction in ML/Java/C"
13:01:06FromGitter<alehander42> i wouldnt recommend the dragon book
13:01:17FromGitter<mratsim> isn't dragon book basically a parser book? :p
13:01:34Zevvhttp://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf
13:02:02FromGitter<alehander42> if youre into type systems, there is whole another literature field for them
13:02:06FromGitter<alehander42> about them*
13:02:22FromGitter<mratsim> *cough* Hindley Milner *cough*
13:04:29sealmovethanks!
13:06:38*echotangoecho joined #nim
13:46:55livcdtest
13:48:23FromGitter<mratsim> work
13:48:43livcdyeah but my irssi/tmux on cmder is out of place
13:48:45livcdthanks
13:51:32shashlickhow'd you get tmux running in cmder - wsl?
13:51:54CcxWrkWhat is the Nim for Python's partial()?
13:52:23livcdah sorry I am already ssh-ed on a remote machine
13:52:40shashlickokay
13:52:59livcdbut it's bad...
13:53:09livcdtotally messes up with your screen
13:54:12*Cthalupa quit (Ping timeout: 245 seconds)
13:55:55shashlickI don't trust anything besides putty
13:56:23livcdyeah but i wanted to have a tabbed terminal
13:56:26*Cthalupa joined #nim
13:56:59shashlickwell conemu can embed putty, so maybe cmder can too
13:57:06shashlicknot as seamless but ya
13:57:10shashlickanother option is mremoteng
13:58:16FromGitter<mratsim> @CcxWrk, there is no partial but there are some currying macro you can borrow.
13:58:51FromGitter<mratsim> I think that would make your code quite complex though
13:59:11CcxWrkI think I will do with nested proc closures for now, thanks.
14:04:18livcdtest
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:29CcxWrkHow does setLen work internally? realloc() as needed?
14:21:39Araqsure
14:23:36CcxWrkOnly 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:50FromGitter<mratsim> it doesn't shrink, it grows geometrically if needed
14:27:17FromGitter<mratsim> I think it's power of 2.
14:27:32CcxWrkkthnx
14:27:38Araqit grows by 1.5
14:27:49CcxWrkThat's about what I expected, but wanted to check.
14:28:20FromGitter<mratsim> so Tables grow by power of 2 but seqs by 1.5?
14:32:57Araqyes
14:39:50ZevvEveryone knows the best is to grow by 1.618
14:40:37FromGitter<mratsim> complex to compute, round, causes alignment/padding issue
14:41:08Zevvpff who cares
14:41:24Zevveven pine cones doe it!
14:41:26FromDiscord<PusiteGA> can i run jester on esp32 ?
14:47:09FromGitter<mratsim> I'm pretty sure jester uses async which uses closures who use the garbage collector
14:47:14livcdI 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:32federico3what's the status with alternative memory managers?
16:36:47*rnrwashere quit (Ping timeout: 240 seconds)
16:49:21*jjido joined #nim
16:54:33CcxWrkIs there a straightforward way to wait on all Futures to complete succesfully or any one failing?
16:58:21Zevvfutures can be 'and'ed and 'or'ed
16:58:37Zevvreturning a new future waiting on all or any.
16:58:38FromGitter<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:52federico3Varriount : implementations of https://nim-lang.org/araq/ownedrefs.html or any GC that might run on microcontrollers
17:21:10sealmovefederico3: 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:11shashlick@samdmarshall did you delete your GraphQL.nim wrapper?
17:24:35Araqfederico3: "hello world" works :-)
17:30:20FromGitter<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:33FromGitter<samdmarshall> @shashlick is that a problem?
17:35:15shashlickno 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:37FromGitter<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:18shashlickokay not sure which one that was
17:39:30shashlickbut 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:50disruptekwhere 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:57Araqlet foo = case ... does work
18:39:30disruptekoh, 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:24BaldEagleX02I 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:24BaldEagleX02I 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:09disruptekBaldEagleX02: cool; congras!
22:13:12disruptekcongrats, 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