<< 10-12-2018 >>

00:01:24*wildlander quit (Quit: Konversation terminated!)
00:03:53PMunchYay, my part 2 had finished :P
00:04:04PMunch141m9.331s runtime :P
00:04:21FromDiscord_<technicallyagd> lol, you used seq for it?
00:04:36PMunchYup, I started the part1 with just the basic
00:04:46PMunchSeq with insert and delete
00:04:49FromDiscord_<technicallyagd> I also did that at first
00:05:05PMunchAnd I've been out of the house all day so I didn't have time to rewrite it for part 2
00:05:19PMunchSo I just added *100 to the input and let it run while I was gone :P
00:05:23FromDiscord_<technicallyagd> lol
00:06:20FromDiscord_<technicallyagd> I spent 2.5 hours looking for patterns behind the scores
00:06:36FromDiscord_<technicallyagd> then realized I just needed to use doublylinked ring
00:06:37PMunchI tried to throw together a solution with a DoublyLinkedRing before I had to leave, but didn't have time to finish it
00:06:45PMunchHaha, exactly
00:06:48*martin__ quit (Ping timeout: 246 seconds)
00:06:52PMunchHow fast did that actually run?
00:07:05FromDiscord_<technicallyagd> in a blink
00:07:10PMunchOh wow, nice
00:07:14FromDiscord_<technicallyagd> yeah
00:07:16PMunchSo I had the right idea then :P
00:07:34FromDiscord_<technicallyagd> I almost wanted to punch myself in the face after seeing that
00:08:02FromDiscord_<technicallyagd> yeah, you had the right idea
00:12:21FromDiscord_<technicallyagd> @dom96 I thought I made a PR about the `--nimblePath` a while back.
00:12:41PMunchDid you get the lists module DoublyLinkedRing to work?
00:13:04M37[m]PMunch: Yeah, it works.
00:13:20FromDiscord_<technicallyagd> @dom96 ah yes, is there any problem with it? https://github.com/nim-lang/nimble/pull/554
00:13:23dom96a PR for what?
00:13:44xaceThanks dom, ill look it up
00:13:58dom96still didn't fix what I asked
00:14:24*fthe joined #nim
00:14:29FromDiscord_<technicallyagd> @dom96 really?
00:14:40FromDiscord_<technicallyagd> which part?
00:15:00FromDiscord_<technicallyagd> @PMunch yes I got it to work
00:15:13PMunchHmm, I feel like it could have some better support for insert and delete
00:15:37PMunchWell remove works fine
00:16:27PMunchAnd I guess I could just set the ring head to get prepend/append to work as insert..
00:16:37FromDiscord_<technicallyagd> yeah
00:18:30*platoff quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:18:55FromDiscord_<technicallyagd> insert and delete with index is quite inefficient on linked lists
00:19:27PMunchYeah that's true
00:19:36PMunchI guess it's a good thing they don't exist
00:20:29dom96see my comments
00:21:24M37[m]PMunch: I think it's okay, but somebody should probably add some examples to the docs.
00:21:32M37[m]I didn't see any tests in the source file either.
00:25:05M37[m]Which meant that ring.head = ring.head.next wasn't completely trivial to work out.
00:25:12dom96technicallyagd: oh, oops, I never submitted my review. Apologies
00:25:19dom96should see it now
00:25:21dom96good night
00:25:55FromDiscord_<technicallyagd> @dom96 I see. Good night!
00:27:20PMunchAah, that's a better runtime 0m0.572s
00:28:43M37[m]PMunch: Did you try --gc:boehm or --gc:regions? Was noticably faster for me.
00:30:58PMunchboehm: 0m0.346s, regions: 0m0.189s
00:31:21PMunchmarkAndSweep seemed like it just spun forever
00:31:25PMunchKilled it after 25s
00:31:53M37[m]Yup.
00:32:27PMunchHuh, curiously none takes longer than regions
00:32:47PMunchAnd of course doesn't clean memory
00:33:32*lritter quit (Remote host closed the connection)
00:33:49PMunchOh well, time for bed :)
00:34:42PMunchM37[m], I guess those makes sense when you've worked with linked lists before
00:35:01PMunchWould be cool to try some pseudo-seq
00:35:35PMunchA DoublyLinkedRing of seqs
00:35:53PMunchStarts as just the one seq, but for every delete it splits into two seqs
00:35:57PMunchOr something like that
00:36:04PMunchInserts would still be pretty bad though..
00:36:34PMunchOr well, depends on the split-factor I guess
00:36:52*PMunch quit (Remote host closed the connection)
00:38:31FromDiscord_<technicallyagd> https://github.com/technicallyagd/ringDeque
00:39:03FromDiscord_<technicallyagd> I actually wrote a package yesterday to make working with deque a bit easier
00:39:45M37[m]PMunch: I mean, I knew enough about lists and rings to recognise it on my first look at today's problem.
00:39:55M37[m]And my new friend the list module seems great.
00:40:35M37[m]It just felt noticably under-documented compared to all the other modules I've used this AoC.
00:40:54M37[m](algorithm, intsets, math, sequtils, sets, strscans, strutils, tables, times).
00:41:27M37[m]And in the past: md5, deques
00:41:34FromDiscord_<technicallyagd> yeah, took me a bit to realize how to use it correctly
00:42:25M37[m]Just a one-line example would've been enough, pretty much
00:43:57M37[m]Anybody feel free if you wanna make a pull request for it. Otherwise I'll get round to it eventually.
00:44:35FromDiscord_<technicallyagd> haha, I was thinking of doing that, but ended up making a separate package instead.
00:47:48*jakob0094 quit (Remote host closed the connection)
00:47:57*ftsf joined #nim
00:49:42M37[m]I wonder who has the best nim AoC speedrunning library by now.
00:50:04M37[m]I made toDeque() yesterday :D
00:51:32FromDiscord_<technicallyagd> speed as in performance or coding speed?
00:52:05M37[m]The latter. Leaderboard speed.
00:53:36M37[m]Maybe the answer is "nobody", since nobody has really been placing on the global leaderboard.
00:54:34FromDiscord_<technicallyagd> but some people got on the global leader boards on individual tasks though
00:57:44M37[m]Mostly jamie. He got 5th on part 1 for day 9, which I thought was pretty impressive.
00:58:16M37[m]I guess I want some confirmation that he actually did it in nim, though.
00:58:24FromDiscord_<technicallyagd> ah that's right
00:59:01FromDiscord_<technicallyagd> well, this task is not that hard if you knew how to use DoublyLinkedRing though
00:59:49FromDiscord_<technicallyagd> But seeing him took 27+ min for second part, I am guessing he also solved the first part with seq
01:00:08FromDiscord_<technicallyagd> or something similar in other language
01:00:33*vlad1777d joined #nim
01:02:10M37[m]Yeah, other days have been harder for me.
01:02:55*fthe quit (Ping timeout: 246 seconds)
01:03:00M37[m]I'm watching this pull request pretty closely https://github.com/nim-lang/Nim/pull/9881
01:03:53M37[m]Because that'd really help for AoC.
01:04:09FromDiscord_<technicallyagd> It helps with EVERYTHING lol
01:04:24FromDiscord_<technicallyagd> This is great!
01:06:40M37[m]Yeah. Would be a great quality-of-life improvement.
01:10:03M37[m]Gotta go. See ya.
01:10:15M37[m]Hope you get to #1 globally tomorrow with ringDeques :D
01:11:49FromDiscord_<technicallyagd> nah, it probably won't be useful for a while now
01:12:05FromDiscord_<technicallyagd> but thank you, and see you!
01:34:58*lucasb quit (Quit: Connection closed for inactivity)
02:11:29FromGitter<zacharycarter> It confuses me why everyone wants to compare Nim and Rust and D, to the degree that they do...
02:12:02FromGitter<zacharycarter> these languages are trying to evolve modern systems programming languages
02:12:23FromGitter<zacharycarter> so wouldn't a better comparison be Nim vs C/C++
02:13:59FromGitter<zacharycarter> I don't care about D and I don't really care about Rust - I'm not looking at existing Rust apps and trying to figure out if Nim is a suitable language to move to
02:14:28FromGitter<zacharycarter> one is generally looking at Nim from two perspectives - Python programmer that wants more performance or C++ programmer that's tired of C++
02:15:07FromGitter<zacharycarter> and lately I feel that Nim suits the former much better than the latter
02:15:22FromGitter<zacharycarter> due to GC / TLS
02:18:50*martin__ joined #nim
02:24:05FromGitter<zacharycarter> a D vs Nim topic is near the top of the forum though - and the discussion no longer seems fruitful... it'd be nice though to stop having the mentality that languages and their communities are at odds with one another and appreciate problem solving
02:25:04*martin2 joined #nim
02:26:44*dddddd quit (Quit: Hasta otra..)
02:27:47*martin__ quit (Ping timeout: 240 seconds)
02:43:32*martin2 quit (Ping timeout: 250 seconds)
03:08:44*banc quit (Quit: Bye)
03:10:42*matti joined #nim
03:10:42*matti quit (Changing host)
03:10:42*matti joined #nim
03:25:09*banc joined #nim
04:12:02*nsf joined #nim
04:31:27*vlad1777d quit (Ping timeout: 240 seconds)
04:49:36*endragor joined #nim
04:50:53*snowolf quit (Ping timeout: 268 seconds)
04:58:05*narimiran joined #nim
05:05:12*snowolf joined #nim
05:14:50*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
06:57:54*narimiran quit (Ping timeout: 250 seconds)
07:02:03ZevvThat's a nice thought for christmas :/
07:02:34*krux02 joined #nim
07:23:54*snowolf quit (Ping timeout: 252 seconds)
07:41:02*Gertm left #nim ("Leaving")
07:43:39*snowolf joined #nim
07:48:06*snowolf quit (Ping timeout: 252 seconds)
07:51:34*snowolf joined #nim
07:57:19*snowolf quit (Ping timeout: 250 seconds)
08:00:54*ftsf quit (Quit: Leaving)
08:10:16*stefanos82 joined #nim
08:19:16*kapil____ quit (Quit: Connection closed for inactivity)
08:33:55FromGitter<gogolxdong> ping @mratsim , what do you think of the implementation of HKDF? I think I' v done exactly the same as the RFC instructs, but haven't solved this issue by far.
08:34:43FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c0e2523e4787d16e372af17]
08:44:50FromGitter<gogolxdong> http://ix.io/1vGE
08:45:11FromGitter<gogolxdong> There is expected result and got result.
08:47:04FromGitter<gogolxdong> initialSecret and qlabel is the same as expected, only expand result varies.
08:52:32*Vladar joined #nim
09:00:01*dom96_w joined #nim
09:06:27*dom96_w quit (Ping timeout: 240 seconds)
09:06:44*ng0 joined #nim
09:10:52Araqhttps://blogs.msdn.microsoft.com/vcblog/2016/05/04/new-code-optimizer/ yay VCC is getting SSA... I wonder if they really lacked it before
09:18:53*lucasb joined #nim
09:22:18Araqoh it's from 2016, my bad
09:34:17*dddddd joined #nim
09:34:51stefanos82lol
09:43:27*PMunch joined #nim
09:46:08*floppydh joined #nim
09:55:33FromGitter<gogolxdong> @mratsim you were right, I remember you mentioned using the array value instead of string, which I am aware of what you meant.
09:56:37FromGitter<mratsim> ah it’s been a while and I had a long weekend I don’t remember :P
09:57:13FromGitter<gogolxdong> no problem.
09:58:57FromGitter<alehander42> of course, that's if you dont actually need to store normal text in it, e.g. unicode text
10:08:41FromGitter<gogolxdong> It's just subtle, and didn't cause any side effect except different result.
10:27:07*abm joined #nim
10:50:02*hoijui joined #nim
10:57:04sendell[m]is there a compile-time boolean used to know if asserts are enabled? I need it for "when assertsEnabled:" blocks
10:59:09FromGitter<narimiran> @technicallyagd are you here maybe?
11:04:09Araqwhen compileOption("assertions") or similar, check system.nim
11:05:52*martin2 joined #nim
11:07:19*platoff joined #nim
11:10:06*martin2 quit (Ping timeout: 250 seconds)
11:21:29FromGitter<narimiran> lets say i have `tuple[x, y, z: int]`, can i somehow pass to a proc which field i would like to operate on?
11:22:38FromGitter<narimiran> e.g. i want to print `myTuple.y`, can i have something like `proc printField(a: MyTuple, b: TupleField) = echo a.b`?
11:24:25*NimBot joined #nim
11:25:20Araqtemplate printField(a: MyTuple; b: untyped) = echo a.b
11:31:23FromGitter<narimiran> thanks Araq! i've managed to make it work in my (a bit more complicated) example.
11:37:14*kapil____ joined #nim
11:46:37sendell[m]Thx Araq :)
12:03:03*vlad1777d joined #nim
12:18:07ZevvHi; I'd like to map a given type passed to a generic to an int. I now use the long way with a Table[string,int] and using 'var.type.name' as key. Is there a way to do this without the string conversion?
12:24:46leorizeZevv: I can't imagine your usecase, do you have an example?
12:27:08ZevvI'm serializing objects into a protocol (using msgpack4nim, but that's not relevant). Each message is serialized into a binary blob, which also needs a header indicating what the serialized type is.
12:27:44Zevvmsgpack4nim has a generic 'pack[T]()' which does the hard work for me, but I also need to lookup the index for each T
12:28:20Zevvand bail out when trying to add a type which is not known in the protocol
12:29:25leorizewell, since typedesc are strictly compile time values, you'd have to use it in a `const` context, or convert it to string...
12:30:13Zevvright, that makes sense
12:30:52leorizefor runtime type info, there's the typeinfo module
12:31:01leorizeit's unsafe though
12:31:41Zevvok, I'll do some reading up. I'll stick to strings for now, thanks for the pointer!
12:31:48FromGitter<alehander42> sounds interesting!
12:37:57*hoijui quit (Ping timeout: 252 seconds)
12:38:56*Snircle joined #nim
12:39:15*tiorock joined #nim
12:39:15*tiorock quit (Changing host)
12:39:15*tiorock joined #nim
12:39:15*rockcavera is now known as Guest17804
12:39:15*Guest17804 quit (Killed (hitchcock.freenode.net (Nickname regained by services)))
12:39:15*tiorock is now known as rockcavera
12:56:33*fthe joined #nim
12:58:50*jakob0094 joined #nim
12:59:09*fthe quit (Remote host closed the connection)
13:08:45*Vladar quit (Remote host closed the connection)
13:10:16*PrimHelios joined #nim
13:21:57*Perkol joined #nim
13:23:03Perkolhttps://bpaste.net/show/1bfd46bc9054 So i wanna repeat dostuff function for three times (if it returns errors). Am I doing it right?
13:23:57leorizeno
13:24:17leorizeyou `break` after `dostuff()`, which will stop the loop immediately
13:24:57leorizeoops, re-read the thing :P
13:25:08leorizeseems fine
13:25:12*hoijui joined #nim
13:26:27*dom96_w joined #nim
13:56:47*nsf quit (Quit: WeeChat 2.3)
14:02:10FromDiscord_<j$> Im trying to use the stb_image pkg and there's a compilation error, some missing file in nimcache, I was wondering if anyone was having this issue or I'm just brain dead
14:03:43*endragor quit (Remote host closed the connection)
14:07:36FromGitter<mratsim> not brain dead, I struggled for a couple hours to get it to compile as well
14:08:03FromGitter<mratsim> basically and that’s true for all header only library, Nim doesn’t copy them to nimcache
14:08:47FromGitter<mratsim> so either you use a dummy .c file that just includes the header and then in your nim file you do {.compile “your dummy.c”.}
14:09:35FromGitter<mratsim> or you {.passL: “pathToHeader”.}
14:10:16FromGitter<mratsim> now regarding the stb package, for me the following as been working for months: https://github.com/mratsim/Arraymancer/blob/master/src/io/io_image.nim#L5-L37
14:14:32Araqthere is no such thing as a "header only library" as far as Nim is concerned
14:14:45Araqbut I agree, it should probably copy the header files around just in case
14:18:54FromGitter<arnetheduck> Araq, what do we do with the ast rename branch? it's the kind that doesn't age well.. `handleX` is short, sweet, and distinct - `genNode` works well for `nlvm` (but I'll update `nlvm` to follow whatever the cgen does...)
14:19:42*hoijui quit (Ping timeout: 252 seconds)
14:19:56Araqstill want genX, it's in my finger muscles
14:20:21Araqbut you're right we should merge it already
14:21:44FromGitter<arnetheduck> know the feeling :) like that box of cables you keep in the attic, knowing exactly where in the spaghetti the one you need is
14:24:56FromGitter<mratsim> I call that Last Used First Out :P
14:25:57FromGitter<arnetheduck> anyway, I included the sed needed to change it to anything you'd like, really.. it works as long as you use a unique prefix.. also, having separate and unique prefixes for ast and magics should be nice for the future, so that the magic implementations can be grouped together - that creates a nice implicit bonding between what you see in the std lib code and what goes on in the cgen and elsewhere
14:26:03FromGitter<mratsim> “This is a mess” - “No I know exactly where things are, the more I use them the more rpobable they are at the top"
14:26:39shashlickDidn't need anything special for nimfuzz which is also a single header lib
14:26:52shashlickYou need to set STB_IMAGE_IMPLEMENTATION at compile time
14:27:35shashlickSee https://github.com/genotrance/nimfuzz/blob/master/nimfuzz.nimble
14:28:19FromGitter<mratsim> you don’t have any compile or passC:”-L…”?
14:28:41FromGitter<mratsim> just proc foo {.importc, header: “bar.h”.} is enough?
14:30:17*rokups joined #nim
14:33:25FromDiscord_<j$> mratsim, I tried your solution (or at least what I understood from it) and no luck, am I supposed to put the compile pragma somewhere specific
14:50:45FromDiscord_<j$> okay so I tried what I think you meant shashlick via command line but I dont think I did it correctly
14:57:03*hwallann quit (Remote host closed the connection)
14:58:37shashlick@mratsim: it was good enough to have the -D set - I presume it could be added with {.passC.} as well
14:59:11FromGitter<mratsim> @j$ if you can post a gist that would help
15:00:36*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:04:17*dom96_w joined #nim
15:08:37*PrimHelios quit (Quit: Leaving)
15:09:21shashlick@j$: http://nimgen.genotrance.com/nimfuzz/fts_fuzzy_match.nim.html is how the wrapper looks like
15:12:02FromGitter<mratsim> so there is a passC with the includes: {.passC: "-I\"" & sourcePath & "\"".}
15:12:19FromGitter<mratsim> if you remove it you should see the same error as j$
15:14:17*snowolf joined #nim
15:15:25*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:19:16*snowolf quit (Ping timeout: 268 seconds)
15:19:55FromDiscord_<j$> I gotta sleep been up for like 20 hours can no longer mentally function, I did find this tho, which leads me to believe there's a way without the workaround https://forum.nim-lang.org/t/2668
15:29:10FromGitter<mratsim> either the 2 solutions I gave you, or using {.emit: “”” pasteyourheader “””.}
15:35:37*kapil____ quit (Quit: Connection closed for inactivity)
15:48:04edcragga simple question... i have a problem with mutability of struct (tuple) members, for which i'm not sure why they can't be modified (yes, aoc again ;)) http://paste.debian.net/1055157/
15:48:41edcraggs/struct/type/
15:49:47leorizethe default items() iterator does not allow modifying
15:50:01leorizeuse `for p in mitems points:` instead
15:50:41*narimiran joined #nim
15:51:46edcraggah, nice, thanks :) couldn't find an alternative iterator, but probably needed to look beyond sequtils
15:52:43leorizethe mitems() iterator is a part of `system` ;)
15:52:52edcraggyep, that did the trick
15:56:31edcragghmm :P
16:01:37*dom96_w joined #nim
16:08:29*Trustable joined #nim
16:11:36FromGitter<arnetheduck> @zacharycarter the reason why it's more interesting to compare nim to rust and D is because there exists a large base of c++ developers that are curious about other languages and are shopping around for the next language to learn - it's a given that c++ is a rational language to learn, but not so with the "startups"
16:12:32FromGitter<yglukhov> Araq: can you remind me if there's a 2000 functions stack limit? Can't find it in the code...
16:12:39FromGitter<zacharycarter> @arnetheduck - makes sense
16:13:37FromGitter<yglukhov> My major stops on the way to nim were C++ and D as well. :)
16:13:48Araqyglukhov: it exists in excpt.nim, proc nimFrame
16:14:32FromGitter<yglukhov> right. thanks.
16:33:22*Perkol quit (Ping timeout: 250 seconds)
16:34:19stefanos82@arnetheduck: I personally believe that most C++ developers want to test other tools as well for simpler reasons, such as better toolchain, less code used that more or less produces the same speed and output, and to borrow schematic logic for their own craft that could help them become wiser engineers.
16:34:23stefanos82that's my thought though
16:39:03FromGitter<arnetheduck> @stefanos82 for sure! but there are a lot of attractive languages out there and limited time to try them, so ideally you want to optimize that process somehow
16:39:16stefanos82definitely
16:40:18shashlicki've been fortunate enough to avoid C++. C# and Java for most of my career, too lazy for the verbosity they demand
16:42:43FromGitter<mratsim> ugh, the C++ build system … CMake is a mess.
16:46:32FromGitter<arnetheduck> what doesn't kill you makes you stronger
16:46:46*endragor joined #nim
16:47:19*Perkol joined #nim
16:48:05stefanos82meson builder is a lot cleaner than CMake
16:48:28stefanos82*build system that is
16:50:14FromGitter<arnetheduck> similar to languages, build systems generally need to provide a 10x advantage at least to be worth the leap.. ie modern cmake+ninja is decent enough and has enough of a network effect going for it that switching to anything else is a hurdle
16:50:37FromGitter<arnetheduck> modern being 3.x+ when they changed a lot of how library deps are expressed
16:51:51*endragor quit (Ping timeout: 268 seconds)
16:52:32FromGitter<mratsim> There is hunter as well in C++
16:53:41*hoijui joined #nim
17:12:17*Vladar joined #nim
17:15:55*Vladar quit (Remote host closed the connection)
17:19:07*snowolf joined #nim
17:19:21*Ven`` joined #nim
17:21:44*gmpreussner_ quit (Ping timeout: 246 seconds)
17:21:45*gmpreussner joined #nim
17:28:43*Tyresc joined #nim
17:29:02*kapil____ joined #nim
17:30:42FromGitter<zurs> Hi all, I'm currently building a small web application using httpbeast, but there is one thing I can't seem to figure out. I want a table which stores some data, and this table should be "global"(all threads should be able to access this in some way). But obviously the gc-safety gets in the way and httpbeast creates the threads for me which means I don't control what data is sent to the threads. How should I proceed to
17:30:42FromGitter... solve this problem? Is it even possible without modifying the httpbeast code in some way?
17:34:17shashlickyou could try https://nim-lang.org/docs/sharedtables.html
17:39:47FromGitter<zacharycarter> the HCR fork seems to be coming along nicely
17:39:54FromGitter<zacharycarter> I might try to play around with it this evening if I can get it to build
17:41:54FromGitter<zetashift> HCR?
17:41:54FromGitter<zurs> I found that after a while but haven't tried it yet. Won't the compiler complain about gc-safety when accessing the sharedtable in the main thread from the httpbeast thread? I did try a similar solution at first with locks and stuff, but maybe I messed up the ref-objects or something
17:44:27dom96_wAFAIK sharedtable is specifically created to be shared across threads
17:44:55shashlickit does the locking/unlocking for you
17:45:50leorizebut the module description discourage you from using GC-ed values as key and/or value...
17:46:55FromGitter<mratsim> because GC is thread local
17:48:27shashlick@zurs: a simpler way to do this, if it makes sense, is to build the table at startup and pass it to every thread on startup
17:48:35shashlickon startup of that thread
17:48:50FromGitter<zurs> Hmm, so a shared heap is the solution in this case
17:49:28FromGitter<zurs> Yeah, but httpbeast makes the threads, so haven't found a way to pass my own variables
17:49:31shashlickof course, you probably don't get to create the thread - httpbeast does, so maybe you could use a channel to pass the data over, but there too it might not work since you might not be able to tell when a thread is created
17:50:06shashlickwhat is this shared content? is it on the file system?
17:51:18FromGitter<zurs> How do you mean? It's just a key-value table that all threads should be able to access
17:52:10shashlickare you just reading the content in each thread or exchanging data between threads (i.e. threads write to the table)
17:52:56FromGitter<zurs> Threads do writes to the table too
17:56:05FromGitter<zurs> This is how it goes when one is just jumping into a language without reading stuff. Had no idea about a shared heap :P
17:56:37FromGitter<mratsim> Well, some lang don’t give you threading, that eliminates a big class of problems ;)
17:57:44FromGitter<mratsim> others hide the complexity, so it’s easy to get started with a baseline. And some like Nim are pretty raw, but once you get right it’s good. And also you don’t need to fight the “common case” when you have exceptional need.
17:57:54FromGitter<mratsim> i.e. pick your tiger
18:02:33FromGitter<zurs> Yeah, PHP is my main language, but async, threads and a good type-system is very appealing. I really like Nim so far, that's for sure
18:11:55*Ven`` quit (Ping timeout: 246 seconds)
18:16:54*Ven`` joined #nim
18:21:02*floppydh quit (Quit: WeeChat 2.3)
18:22:50*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:27:46*Ven`` quit (Ping timeout: 250 seconds)
18:34:36*gangstacat quit (Ping timeout: 252 seconds)
18:38:22*platoff quit (Read error: Connection reset by peer)
18:38:54*Ven`` joined #nim
18:50:13*gangstacat joined #nim
18:59:53*nsf joined #nim
19:04:20FromDiscord_<Virepri> but yeah responding to older messages I pretty much had my C++ and my golang phases before I got to nim, though I did try a couple JVM languages in between
19:04:30FromDiscord_<Virepri> I was hesitant to try nim because of the more python like syntax
19:04:41FromDiscord_<Virepri> but so far I'm rather liking it
19:05:44*lucasb left #nim (#nim)
19:07:17*Vladar joined #nim
19:11:58FromGitter<arnetheduck> stuff like `sharedtable`/ collection-level locking is rarely the right solution, in general
19:13:11*masquino quit (Quit: WeeChat 1.9.1)
19:18:06*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:22:48*Ven`` joined #nim
19:22:52*Ven`` quit (Remote host closed the connection)
19:26:06FromGitter<mratsim> no borrow for generics is really annoying :/
19:30:14FromGitter<arnetheduck> I thought it was the other way around.. that borrow is annoying and should go away :)
19:35:18FromGitter<mratsim> I think it’s good.
19:35:51FromGitter<mratsim> that’s actually one of the loved feature in Ada, and I would guess it would be very useful for physics of to model currencies
19:35:58FromGitter<mratsim> or*
19:36:06FromGitter<mratsim> i.e. don’t add miles and meters
19:36:22FromGitter<Vindaar> Heh, AoC day 10 was fun :D
19:44:01FromGitter<arnetheduck> oh, that kind of borrow.. I was thinking about the seq-borrow kind that let's you create aliases
19:52:01narimiran@Vindaar i liked the previous days more
19:52:32*Perkol quit (Ping timeout: 268 seconds)
19:53:23*dom96_w joined #nim
19:58:03*rokups quit (Quit: Connection closed for inactivity)
19:59:47*dom96_w quit (Ping timeout: 240 seconds)
20:05:35*nsf quit (Quit: WeeChat 2.3)
20:08:10*Trustable quit (Remote host closed the connection)
20:09:46FromGitter<mratsim> that’s the same borrow
20:10:03FromGitter<mratsim> type MyTree[T] = distinct seq[T]
20:10:36FromGitter<mratsim> but you can use it to do `type Meters = distinct float`
20:13:35FromGitter<alehander42> I only think of borrowing a reference to something
20:13:47FromGitter<alehander42> it's a really confusing term clash :D
20:14:53*zachk joined #nim
20:15:21*lritter joined #nim
20:15:29FromGitter<arnetheduck> oops, nevermind, confused with shallow
20:15:49FromGitter<Vindaar> @narimiran: I did day 9 und 10 in direct succession. Day 9 was really fun too, but I had some initial problems with the doubly linked ring, which took most of the time to sort out. Slight damper. But I really wondered what the deal was with part 2 of day 9. Long run times in e.g. Python?
20:16:16Zevv!eval let a = [ int ]
20:16:18NimBotCompile failed: in.nim(1, 11) Error: internal error: expr(skType); unknown symbol
20:16:49*zachk quit (Changing host)
20:16:49*zachk joined #nim
20:18:43FromGitter<alehander42> Zevv that needs to be a better error message, e.g. "you can't construct an <array> of types"
20:18:55ZevvVindaar: my initial part I solution was naive using seqs and modulo arithmatic. Even a -d:release Nim build was not able to spew the part II answer in 15 minutes
20:19:08Zevvalehander42: that was kind of my point :)
20:19:32FromGitter<Vindaar> @Zevv: ouch, I wasn't aware a naive solution would be *that* slow. Interesting :)
20:20:06Zevvkind of limited by memory bandwith I suppose. Every insert or delete is a memcpy
20:20:33Zevvthe list version runs in 500 msec
20:20:41FromGitter<Vindaar> yep, about the same here
20:21:16Zevvthe seq version with 10 times the marbles takes me about (still waiting....)
20:21:50Zevv58 seconds
20:22:31FromGitter<Vindaar> *know your algorithms....*
20:22:50Zevv*dont optimize without measuring*
20:22:54FromGitter<Vindaar> hehe
20:23:30Zevvwow measuring some timing with the seq code, interesting results
20:23:32Zevvlet me graph that
20:23:43FromGitter<Vindaar> please do
20:25:22Zevvhttps://zevv.nl/div/graph.png. x axis is nr of marbles calculated, y axis is time used in seconds
20:26:04Zevvis that my L2 cache size showing up, or is this a Nim thing?
20:26:23FromGitter<Vindaar> interesting shape indeed
20:31:04leorizeZevv: internal errors are always bugs, so please file an issue for that
20:31:51ZevvThere already is one in github
20:31:57Zevvalbeit more complex example, I added the oneliner
20:33:25Zevvvindaar: the shape is in the algorithm. If I skip 11 marbles instead of 7, the widht of the curve scales
20:33:28Zevvfunny stuff
20:34:37FromGitter<Vindaar> hehe, I see
20:35:38*kapil____ quit (Quit: Connection closed for inactivity)
20:36:41*miran joined #nim
20:39:08*narimiran quit (Ping timeout: 246 seconds)
20:46:36*enthus1ast quit (Ping timeout: 252 seconds)
20:58:34*miran quit (Ping timeout: 250 seconds)
20:59:33*enthus1ast joined #nim
21:40:31*PMunch quit (Remote host closed the connection)
21:46:54*Jesin joined #nim
21:48:51*Vladar quit (Remote host closed the connection)
21:49:42*vlad1777d quit (Ping timeout: 250 seconds)
21:50:52*Jesin quit (Remote host closed the connection)
21:57:44*stefanos82 quit (Remote host closed the connection)
22:07:27*hoijui quit (Remote host closed the connection)
22:07:48*Jesin joined #nim
23:24:32FromGitter<zacharycarter> @arnetheduck - what is the right solution then for sharing data across threads? using lock free data structures?
23:29:10*druonysus quit (Quit: druonysus)
23:29:26*druonysus joined #nim
23:29:26*druonysus quit (Changing host)
23:29:26*druonysus joined #nim
23:31:03*ng0 quit (Quit: Alexa, when is the end of world?)
23:53:02*druonysus quit (Ping timeout: 246 seconds)
23:59:16*d10n-work joined #nim