<< 09-11-2015 >>

00:01:42*BitPuffin|osx quit (Read error: Connection reset by peer)
00:08:59*Varriount-Laptop quit (Read error: Connection reset by peer)
00:22:38*Demon_Fox joined #nim
00:53:30*girvo joined #nim
00:53:54girvohey all :)
00:55:58girvoquick q: what's the state of C++ interop in nim these days? Anything tricky i need to be aware of?
00:58:21*jaco60 quit (Ping timeout: 246 seconds)
01:06:29*makoLine quit (Ping timeout: 252 seconds)
01:08:40Varriountgirvo: Well, there are pragma's to help wrap things, it's all detailed in the manual for the most part.
01:09:12VarriountC2Nim supports C++ code to a certain degree (C++ is a big, complex language)
01:10:51Varriountgirvo: What's your opinion on Nim's strings?
01:11:29VarriountI mean, with regards toi the whole copy-on-assignment semantics
01:20:00*makoLine joined #nim
01:25:46*brson joined #nim
01:27:17*makoLine quit (Ping timeout: 250 seconds)
01:35:26*vqrs quit (Ping timeout: 272 seconds)
01:36:21*vqrs joined #nim
01:44:09*makoLine joined #nim
01:52:38dtscodenim strings are COW?
02:08:53*ephja quit (Ping timeout: 250 seconds)
02:13:35*vendethiel joined #nim
02:20:39*jakesyl quit (Ping timeout: 240 seconds)
02:27:39*makoLine quit (Read error: Connection reset by peer)
02:28:19*makoLine joined #nim
02:33:54*jakesyl joined #nim
02:36:14*vendethiel quit (Ping timeout: 272 seconds)
02:44:13*brson quit (Quit: leaving)
03:04:07*desophos_ joined #nim
03:08:13*desophos quit (Ping timeout: 265 seconds)
03:18:24*linkedinyou quit (Quit: linkedinyou)
03:48:13*zepolen quit (Remote host closed the connection)
04:04:43*darkf joined #nim
04:25:28*ulyssesdwolfe quit (Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421])
04:31:09*polde quit (Ping timeout: 246 seconds)
04:35:09Varriountdtscode: No, they are copy on assignment/move
04:36:16VarriountI'm writing up a proposal to introduce immutable strings into Nim, as they are far more efficient for non-string-manipulation tasks.
04:38:00*polde joined #nim
04:43:42dtscodeVarriount: oh
04:45:42Varriountdtscode: What do you think?
04:46:15dtscodeI haven't written nim in a while to know
04:49:54makoLine''{ I think immutable strings are something everyone can agree with
04:50:49VarriountmakoLine: I'm also trying to measure how much extra copying is currently done in various parts of the compiler/standard library due to string copying.
05:26:29*polde quit (Ping timeout: 250 seconds)
06:03:31*nande quit (Read error: Connection reset by peer)
06:21:42*xificurC quit (Ping timeout: 260 seconds)
06:28:11*desophos_ quit (Read error: Connection reset by peer)
06:44:56*strcmp1 quit (Remote host closed the connection)
06:48:49*Kingsquee joined #nim
06:50:51*cyraxjoe_ joined #nim
06:54:01*cyraxjoe quit (Ping timeout: 250 seconds)
06:54:06*cyraxjoe_ quit (Read error: Connection reset by peer)
06:54:48*cyraxjoe joined #nim
06:56:40*girvo quit (Quit: Lost terminal)
07:00:34*lyro quit (Read error: Connection reset by peer)
07:15:14*Matthias247 joined #nim
07:24:47*gour joined #nim
07:25:09*Matthias247 quit (Read error: Connection reset by peer)
07:45:24*strcmp1 joined #nim
07:50:30*strcmp1 quit (Ping timeout: 260 seconds)
08:03:26*vqrs quit (Ping timeout: 240 seconds)
08:04:53*vqrs joined #nim
08:08:03*yglukhov joined #nim
08:11:05*strcmp1 joined #nim
08:14:06AraqVarriount: good idea but keep these things in mind:
08:14:47Araq* we can introduce COW strings without affecting semantics except perhaps for super low level code
08:15:21Araq* patching Nim strings is far better than just introducing another string
08:15:29*antoniomo joined #nim
08:16:43Araq* 'shallow(mystr)' is under used and should have been named 'freeze'
08:17:20Araqif immutability is the default, it would be nice to introduce 'mutate(mystr)' so that I can get an old fashioned mutable string
08:17:54Araqso ... yeah, better fix the language rather than just introducing ImmutableString.
08:19:10*gokr joined #nim
08:24:20*amvtek joined #nim
08:31:01*Trustable joined #nim
08:37:19*vqrs quit (Ping timeout: 240 seconds)
08:37:22*jaco60 joined #nim
08:38:20*yglukhov quit (Remote host closed the connection)
08:39:25*yglukhov joined #nim
08:41:24*vqrs joined #nim
08:42:58*jaco60 quit (Ping timeout: 240 seconds)
08:43:59*yglukhov quit (Ping timeout: 264 seconds)
08:55:06*makoLine quit (Ping timeout: 240 seconds)
08:57:29*yglukhov joined #nim
09:19:35*zepolen joined #nim
09:22:42*zepolen quit (Remote host closed the connection)
09:25:27*mindriot101 joined #nim
09:28:29*zepolen joined #nim
09:29:11*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
09:37:49*yglukhov quit (Remote host closed the connection)
09:42:57*coffeepot joined #nim
09:43:03*zepolen quit (Remote host closed the connection)
09:45:39*zepolen joined #nim
09:46:31*zepolen quit (Remote host closed the connection)
09:54:31*zepolen joined #nim
09:56:14*zepolen quit (Remote host closed the connection)
09:58:21*yglukhov joined #nim
10:02:26*yglukhov quit (Ping timeout: 240 seconds)
10:05:59*vqrs quit (Ping timeout: 250 seconds)
10:09:06*vqrs joined #nim
10:12:31*yglukhov joined #nim
10:13:20*girvo joined #nim
10:16:56*yglukhov quit (Remote host closed the connection)
10:17:49*yglukhov joined #nim
10:21:30*M-max quit (Ping timeout: 246 seconds)
10:28:36*kulelu88 joined #nim
10:29:30*kulelu88 left #nim (#nim)
10:37:29*Kingsquee joined #nim
10:39:39*Kingsquee quit (Client Quit)
10:54:31*strcmp1 quit (Remote host closed the connection)
10:55:06amvtekHello, newbie here seing lot of potential for nim lang. We have a question concerning streams module : what byteorder is used (bigendian, littleendian or host ?)
10:56:30*mindriot_ joined #nim
10:56:36*mindriot_ quit (Remote host closed the connection)
10:59:22*mindriot_ joined #nim
11:00:22*mindriot101 quit (Ping timeout: 272 seconds)
11:01:31*mindriot_ quit (Remote host closed the connection)
11:06:24*xificurC joined #nim
11:10:47*strcmp1 joined #nim
11:13:13*yglukhov quit (Remote host closed the connection)
11:14:07*yglukhov joined #nim
11:26:23*yglukhov quit (Remote host closed the connection)
11:29:29*yglukhov joined #nim
11:42:46*yglukhov quit (Remote host closed the connection)
11:44:13*matkuki joined #nim
11:46:43*xificurC quit (Ping timeout: 244 seconds)
11:47:10*matkuki quit (Client Quit)
11:56:09*elrood joined #nim
11:56:17*yglukhov joined #nim
11:57:20*yglukhov quit (Remote host closed the connection)
12:01:59*Demon_Fox quit (Read error: Connection reset by peer)
12:02:13*Demon_Fox joined #nim
12:06:27*zepolen joined #nim
12:08:22*yglukhov joined #nim
12:09:42*yglukhov quit (Remote host closed the connection)
12:09:54*yglukhov joined #nim
12:10:30*zepolen quit (Ping timeout: 240 seconds)
12:10:51*ephja joined #nim
12:19:21*polde joined #nim
12:24:43*Demon_Fox quit (Quit: Leaving)
12:27:04*mindriot101 joined #nim
12:38:31*lyro joined #nim
12:57:12yglukhovamvtek: native, but sould be easy to write the swapping counterparts on top of std ones.
13:00:29amvtekyglukhov: thank you for your help
13:00:40yglukhovanytime :)
13:02:33*yglukhov quit (Remote host closed the connection)
13:02:49*yglukhov joined #nim
13:05:33*yglukhov quit (Remote host closed the connection)
13:18:32*yglukhov joined #nim
13:25:00*gokr quit (Quit: Leaving.)
13:25:13*yglukhov quit (Remote host closed the connection)
13:31:34*BitPuffin joined #nim
13:34:47*yglukhov joined #nim
13:36:06*gokr_ joined #nim
13:55:23*lokulin quit (Ping timeout: 264 seconds)
14:00:18*zepolen joined #nim
14:02:17*zepolen quit (Remote host closed the connection)
14:05:00*zepolen joined #nim
14:05:27*zepolen quit (Remote host closed the connection)
14:06:02*zepolen joined #nim
14:07:10*yglukhov quit (Ping timeout: 240 seconds)
14:12:47*gokr joined #nim
14:13:32*lokulin joined #nim
14:21:26*antoniomo quit (Quit: WeeChat 1.3)
14:25:00*mindriot_ joined #nim
14:25:37*mindriot_ quit (Read error: Connection reset by peer)
14:26:12*mindriot_ joined #nim
14:27:20*mindriot_ quit (Remote host closed the connection)
14:28:26*mindriot101 quit (Ping timeout: 244 seconds)
14:30:32*drewsrem joined #nim
14:43:56*strcmp1 quit (Ping timeout: 272 seconds)
14:53:32*pregressive joined #nim
14:53:45*mindriot101 joined #nim
14:53:49*mindriot101 quit (Remote host closed the connection)
14:57:12*strcmp1 joined #nim
15:00:22*xificurC joined #nim
15:20:28*strcmp1 quit (Remote host closed the connection)
15:29:53*gokr quit (Read error: Connection reset by peer)
15:30:21*gokr joined #nim
15:35:56*amvtek quit (Quit: Page closed)
15:40:19*mindriot101 joined #nim
15:44:39*mindriot101 quit (Ping timeout: 252 seconds)
15:46:11*strcmp1 joined #nim
15:46:40*Sk1LLb0X joined #nim
15:47:22*Sk1LLb0X quit (Client Quit)
15:58:15*pregressive quit (Read error: Connection reset by peer)
15:58:23*pregressive joined #nim
16:08:17*mindriot101 joined #nim
16:11:19*strcmp1 quit (Remote host closed the connection)
16:11:59*strcmp1 joined #nim
16:15:35*strcmp1 quit (Remote host closed the connection)
16:25:44*strcmp1 joined #nim
16:30:27*darkf quit (Quit: Leaving)
16:57:20*gmpreussner|work joined #nim
16:57:53*bamorim joined #nim
17:05:42*brson joined #nim
17:17:07*barosl_ joined #nim
17:18:57*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:20:29*barosl quit (Ping timeout: 244 seconds)
17:24:21*secretlives joined #nim
17:24:42*strcmp1 quit (Remote host closed the connection)
17:25:23*secretlives quit (Client Quit)
17:27:40*strcmp1 joined #nim
17:43:44*strcmp2 joined #nim
17:44:46*brson quit (Ping timeout: 250 seconds)
17:46:59*strcmp1 quit (Ping timeout: 264 seconds)
17:49:25*gokr quit (Ping timeout: 244 seconds)
17:52:33*brson joined #nim
17:58:50*drewsrem quit (Quit: Leaving)
18:01:35*james joined #nim
18:01:59*james is now known as Guest22668
18:09:34*Gonzih joined #nim
18:22:26*mindriot_ joined #nim
18:25:30*mindriot101 quit (Ping timeout: 240 seconds)
18:25:55*pregressive quit (Remote host closed the connection)
18:27:30*mindriot_ quit (Ping timeout: 272 seconds)
18:30:06*brson quit (Ping timeout: 240 seconds)
18:31:44*desophos joined #nim
18:33:41*brson joined #nim
18:36:36*Guest48911isaway is now known as Guest48911
18:36:44*Guest48911 is now known as Guest48911isaway
18:41:03*bamorim quit (Ping timeout: 255 seconds)
18:45:39*matkuki joined #nim
18:45:40*jaco60 joined #nim
18:53:57matkukidom96: I made quick observation. When compiling my program with "--threads:off" it uses 6-16% CPU, but the same program with "--threads:on" changes to 9-22% CPU usage.
18:53:59matkukiIs this a known thing?
18:54:41*vendethiel joined #nim
18:55:13matkukiThe program doesn't use any threading, btw.
19:00:19*Matthias247 joined #nim
19:09:01*zepolen quit (Read error: Connection reset by peer)
19:18:25Araqhi matkuki
19:18:45matkuki Hey, Araq
19:19:23matkukiDid you see the question a couple of lines up?
19:19:32Araqyeah
19:19:37*pregressive joined #nim
19:19:53AraqI don't know your program though
19:20:14*zepolen joined #nim
19:20:18Araqthere is nothing in Nim's runtime that uses more cores with --threads:on
19:20:47Araqbut I bet 22% doesn't imply it uses more than one core
19:21:06Araqso you only measure the overhead of the thread local storage perhaps
19:22:31*pregressive quit (Remote host closed the connection)
19:22:56matkukiIt doesn't bother me, but as it's a game I check CPU usage from time to time, it startled me when I finished the threaded build and the CPU usage jumped.
19:22:58*pregressive joined #nim
19:25:28matkukiThen I removed the threading and CPU usage stayed the same at 9-22%. Only when the thread flag was changed to '--thread:off' did the usage drop back down.
19:25:49matkukisorry, '--threads:off'
19:26:55*pregressive quit (Ping timeout: 240 seconds)
19:27:38*brson quit (Ping timeout: 240 seconds)
19:27:46*yglukhov joined #nim
19:38:05matkukiAraq: Why would thread local storage cause a CPU overhead?
19:44:13Araqcause relative is more expensive than absolute addressing
19:44:19*askatasuna joined #nim
19:44:39Araqdepends on your platform though
19:44:41matkukithanks
19:44:51Araqwhat is your platform?
19:44:54matkukiI'm on wondows
19:45:14matkukiwindows vista
19:45:22Araqok, try --tlsEmulation:off
19:45:42matkukiok, let me try...
19:50:44matkukiAraq: That's it! It's back down.
19:50:50matkukiWhat is the '--tlsEmulation' flag?
19:51:56*bamorim joined #nim
19:52:03Araqsome bullshit we had to come up with as many plaforms don't support C's __thread keyword addition
19:52:34Araqon some OSes like Windows it's still the default
19:52:48Araqwhen you activate --threads
19:53:11*Araq looks at Haiku ...
19:53:23*Araq looks at Mac OS X
19:53:30*desophos quit (Remote host closed the connection)
19:54:25Araqso as its name says, it emulates thread local storage
19:56:44*gokr_ quit (Read error: Connection reset by peer)
20:02:53*yglukhov quit (Remote host closed the connection)
20:03:50*bamorim quit (Remote host closed the connection)
20:03:58matkukiAraq: btw, dom96 showed me how to use channels for passing objects between threads, but mentioned that channels are slow. Are there any alternatives?
20:04:52*desophos joined #nim
20:05:37Araqplenty, but you dont want to use them ;-)
20:06:22Araqif channels are too slow, I usually start with passing stuff by 'ptr' to the channel
20:06:30*desophos quit (Remote host closed the connection)
20:06:55Araqthis way no deep copies are made and channels are actually quite fast
20:07:33gouri haven't arrived to channels (yet) in the docs, but are they resemble those in go?
20:07:51Araqif you only need parallelism and no concurrency I would use the parallel and spawn constructs
20:07:58Araqthey are really nice to work with
20:08:38Araqgour: no, they are quite different beasts
20:09:23gourthnaks
20:09:31Araqdifferences:
20:09:50ldleworkAre Nim threads interruptable?
20:10:01Araq* perform deep copies for safety, no races possible (unless you use 'ptr' but 'ptr' is unsafe to begin with so there)
20:10:17*xificurC quit (Read error: Connection reset by peer)
20:10:18Araq* need to 'close' them to free their resources
20:10:49*desophos joined #nim
20:10:50Araq* don't support anything like Go's select statement yet
20:11:24Araq* are unbounded queues, no need to give them a size and so are not prone to deadlocks
20:11:48gourcool, cool
20:12:34Araqldlework: no.
20:12:51ldleworkYou can at least set them to daemon threads right?
20:13:08gourAraq: as i wrote the other, i hope you'll find in the future to write "The Nim Programming Language" ;)
20:13:31gour*the other day
20:13:38Araqyeah me too ...
20:14:11Araqldlework: not sure what this implies. if the main thread dies, all the others die too. I think.
20:14:21ldleworkAraq: not unless they are set as daemon threads against the OS
20:14:33ldleworkmaybe you're doing that by default
20:14:48Araqhrm I don't think so, but I'm quite sure about this behaviour
20:14:52ldleworkJust went through this with Python
20:15:00ldleworkand learned all about them
20:15:08ephjatime to use channels again, while that sleepAsync bug remains
20:15:34ephjaldlework: have you done anything with libtcod yet?
20:15:46ldleworkephja: a little
20:15:52ldleworksomeone helped me get a nim wrapper going for it
20:15:59ldleworkbut I haven't looked in many months
20:16:06*brson joined #nim
20:16:23Araqldlework: you can inject code that makes your thread interruptible via .injectStmt ...
20:16:24ephjathat was me. I felt like changing my nick
20:16:55gourAraq: if you have to write gui app in nim, which bindings would you use: gtk2, gtk3 or wx?
20:17:10ephjato something less pronounceable
20:17:21Araqbut I don't think that's particularly wise as that was designed as a debugging tool
20:19:02Araqephja: you didn't succeed. I can spot some vowels in your nick.
20:19:28*Demon_Fox joined #nim
20:19:32ldleworkI don't want to interrupt them I just want them to die when the main process dies without having to implement cooperation
20:19:32ephjaoops
20:20:35Araqgour: that pretty much depends on what kind of widgets I need
20:21:01ephjaldlework: speaking of which, do you play any roguelikes? I've only played Tales Of Maj'Eyal. it's pretty good
20:21:10Araqand whether I need native look and feel on macs etc etc
20:21:34ldleworkephja: I've play dozens and the two I continue to go back to regularly are Dungeon Crawl Stone Soup and Catacylsm Dark Days Ahead
20:21:44ldleworkthe latter more than the former these days
20:22:00ephjaok
20:22:09Araqah tomorrow is the day
20:22:09gourAraq: hmm...ok. are any of those bindings take advantage of nim's features or are mostly thin wrappers?
20:23:23*desophos quit (Remote host closed the connection)
20:23:27gourwhen do you fly?
20:23:49Araqwxnim uses Nim's c++ codegen which usually implies that memory management is easier
20:24:16Araqbut I haven't looked at Nim's gtk3 wrapper which might offer some higher level stuff
20:24:40AraqI was underwhelmed by wx's API though... left a bad taste in my mouth
20:25:19Araqgour: I was referring to some game that is about to be released which I cannot name cause they don't pay me to name it
20:25:19*yglukhov joined #nim
20:25:55Araq;-)
20:25:58gourAraq: np. thanks for the answer
20:26:21*desophos joined #nim
20:26:46*Araq thinks blizzard should pay him ...
20:27:17ldleworklol
20:27:24ephjasure
20:27:54ldleworkephja: I'm working on a roguelike, are you?
20:27:58*gokr joined #nim
20:29:15desophosare we talking about game programming in Nim???
20:29:18ephjaldlework: no, just some compiler thingie and a chat server
20:29:33ldleworkdesophos: well I'm not using Nim
20:29:46ldleworkMaybe I would if I understood how to use its JS backend with other JS libraries and the browser apis
20:29:46desophosoh :/
20:29:56desophosooh that would be neat
20:29:57ldleworkSince I'm writing in JS
20:30:01ephjaI'll probably start writing games again. not that I ever got far
20:30:18ephjaI was thinking of maybe porting löve (lua framework) to nim
20:30:26ldleworkIt'd be cool to have a Nim graphics library that used SFML natively and Phaser in the web or something
20:30:28desophoswow, that would be quite a task
20:30:51desophosi'm writing a game in Nim
20:30:56desophoswith just SDL2 :/
20:31:19desophosi don't think i'm competent enough to write an actual engine
20:31:28desophosor a port of something existing
20:33:02ephjait's more boring than complicated
20:34:18ephjaporting, of course
20:36:51desophosldlework: you mean graphics abstractions that compile to different apis for different platforms?
20:37:53desophosa library abstraction that compiles to use different library apis
20:38:00ldleworkdesophos: yes
20:38:13desophosthat would be interesting
20:39:57ephjano, I can't just use the socket in 2 threads. oh well
20:40:09desophoslike many popular engines do, like cocos2d
20:40:30*BitPuffin quit (Ping timeout: 260 seconds)
20:40:45ephjaI think löve runs in the browser, and I heard something about an android port
20:46:36ephjaI have about 1 << 8 projects in the pipeline, so I just need to figure out what people want :-P
20:46:52ephjawell, every other user seems to be interested in game development
20:47:30*gour is interested in just desktop apps
20:49:03ldleworkNim is awesome for game-development but I want to put my games on the web
20:49:34*makoLine joined #nim
20:53:06Araqldlework: Nim's JS backend is quite stable these days
20:53:36yglukhovhey guys, i'm writing a game in Nim as well. the "engine" is in github/yglukhov/rod. the gui part is yglukhov/nimx. both designed to be compiled to js. so feel free to contribute ;)
20:54:14*pregressive joined #nim
20:54:50ldleworkAraq: sure I just don't quite understand how to use it
20:54:54ldleworkhow do I call browser API's?
20:55:20ephjaAraq: do exceptions work properly now? I found some JS app so I assume that's the case
20:56:00ephjaraising an exception resulted in a type error before I think
20:56:03AraqI think so
20:56:24Araqldlework: you importc them
20:56:34ldleworkAraq: is there an example of that anywhere?
20:56:40ldleworkLike using the canvas api or something
20:56:57desophosyglukhov: seems like several people are writing games in Nim but not collaborating :|
20:58:21*xet7 joined #nim
21:07:56*Ven_ joined #nim
21:08:47*Ven_ quit (Read error: Connection reset by peer)
21:08:51*Ven__ joined #nim
21:11:43Araqldlework: not sure, but please just ask me
21:20:05*Ven__ quit (Read error: Connection reset by peer)
21:21:29*Ven_ joined #nim
21:22:43*yglukhov quit (Remote host closed the connection)
21:27:11*gour quit (Quit: WeeChat 1.3)
21:40:29*gokr quit (Ping timeout: 276 seconds)
21:41:04*gokr joined #nim
21:49:25*Ven_ quit (Read error: Connection reset by peer)
21:51:42*Ven_ joined #nim
21:57:46*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:07:41*zepolen quit (Read error: Connection reset by peer)
22:08:22*Demon_Fox quit (Quit: Leaving)
22:11:24*zepolen joined #nim
22:12:33*girvo quit (Ping timeout: 255 seconds)
22:16:04*elrood quit (Quit: Leaving)
22:16:37*Demos joined #nim
22:21:35*Varriount-Laptop joined #nim
22:21:55Varriount-LaptopAraq: You here?
22:23:05Araqyes
22:24:50*Guest22668 is now known as coopernurse
22:25:37Varriount-LaptopAraq: Why would I be getting an 'identifier expected, but found len(s)' error when compiling this code: https://gist.github.com/Varriount/362603db9864d9deec05
22:25:55Varriount-LaptopI thought templates accepted expressions, not just identifiers.
22:27:17Araqresult.length = length#
22:27:33Araqlength is also expanded in the 'result.length'
22:27:47Araqit's a gotcha, but it's also a feature I use all the time
22:28:06*Matthias247 quit (Read error: Connection reset by peer)
22:28:20*coopernurse quit (Quit: WeeChat 1.1.1)
22:28:38*coopernurse joined #nim
22:29:01*desophos quit (Remote host closed the connection)
22:30:01Varriount-LaptopAraq: But that's what I want? It should expand to 'result.length = len(s)', shouldn't it?
22:30:17Araqno, it expands to
22:30:25Araqresult.len(s) = len(s)
22:30:32Araqwhich is not valid Nim code
22:30:41Varriount-LaptopAh.
22:31:11*desophos joined #nim
22:31:16*desophos quit (Remote host closed the connection)
22:31:19Varriount-LaptopIt would be nice if the compiler could display the invalid line with the expanded code.
22:31:32*desophos joined #nim
22:32:37*strcmp2 quit (Remote host closed the connection)
22:36:21*desophos quit (Remote host closed the connection)
22:37:35Araqit does
22:37:46Araqit told you exactly what was wrong and where
22:39:29Varriount-LaptopAraq: Not quite. The compiler only points to the invocation site - "immstr.nim(32, 32) Error: identifier expected, but found 'len(s)'"
22:40:08Varriount-LaptopWhich is odd, because I could have sworn that the compiler used to display the point in the template that the error occurred as well.
22:40:27Araqyeah, I recently changed this logic
22:40:34Araqfor better nimsuggest support
22:40:39AraqI need to investigate
22:40:47*strcmp1 joined #nim
22:43:45Varriount-LaptopAraq: While it might make for better nimsuggest support, it greatly hampers manual usage of the compiler.
22:44:43Araqwell fortunately 0.12.0 doesn't have this bug and it's easy to restore the old behaviour
22:45:09Araqbut I wonder why you don't get an "instantiation from here" message. cause you should.
22:45:17*zepolen_ joined #nim
22:45:22*julian37 joined #nim
22:45:26*strcmp1 quit (Ping timeout: 240 seconds)
22:45:34Araqhi julian37
22:45:49Varriount-LaptopHey zepolen
22:46:27julian37hi Araq :-)
22:46:36Varriount-LaptopAraq: If I create a new string via newString() then cast it to a type with an identical structure, are any of the garbage collectors going to complain?
22:46:58*zepolen quit (Ping timeout: 260 seconds)
22:47:02Araqno I don't think so
22:47:58*vendethiel quit (Ping timeout: 240 seconds)
22:55:13*strcmp1 joined #nim
22:59:49*solidsnack joined #nim
23:03:24*desophos joined #nim
23:07:48*desophos_ joined #nim
23:07:58*desophos quit (Ping timeout: 260 seconds)
23:10:09*Trustable quit (Ping timeout: 252 seconds)
23:12:30*desophos_ quit (Ping timeout: 260 seconds)
23:13:30*matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421])
23:19:03Varriount-LaptopOh yay, we have unsafeAddr now.
23:19:17Varriount-LaptopNo more abusing casts for me!
23:21:50*askatasuna quit (Quit: WeeChat 1.3)
23:23:22*zepolen joined #nim
23:26:25*zepolen_ quit (Ping timeout: 276 seconds)
23:34:25julian37hey I've made this: https://jscheid.github.io/nim-sandbox/index.html
23:34:41julian37very first version... lots of little issues
23:34:54Varriount-Laptopjulian37: Neat!
23:35:01julian37code is here: https://github.com/jscheid/nim-sandbox
23:35:14*desophos_ joined #nim
23:35:33Heartmenderis that seriously the nim compiler compiled to javascript?
23:35:39julian37yup
23:35:45Varriount-LaptopO_o
23:35:47Heartmenderlol
23:35:51julian37:-)
23:36:10*dtscode is now known as nchambers
23:36:21Varriount-Laptopjulian37: How did you get all the system-specific calls working? Patch the compiler"
23:36:24Varriount-Laptop*?
23:38:16julian37I probably didn't
23:38:20julian37but emscripten handles quite a few
23:38:43julian37no patching whatsoever
23:38:49julian37this is vanilla 0.12
23:38:59julian37(with a little wrapper around it)
23:39:24julian37this here: https://github.com/jscheid/nim-sandbox/blob/master/emscripten_compiler.nim
23:39:45Varriount-LaptopAh, the magic of emscripten.
23:39:53Varriount-LaptopImpressive nevertheless.
23:39:57julian37which still needs some love... I'd like to get rid of resetAllModulesHard for speed
23:40:14Varriount-Laptopjulian37: If you polish it up... we could host it on the Nim website.
23:40:19julian37oh, I see... you thought it's self hosted. no, I didn't want to go there :-)
23:40:41julian37yeah sure, that would be great
23:41:04julian37so far it's just a weekend project so don't hold your breath re: polish... but would be nice to get it there of course
23:41:16julian37I'll need some help with fixing the memory issues
23:41:25julian37right now if you click "compile" a few times it'll break
23:41:34julian37something's leaking...
23:41:48julian37or the GC isn't working
23:41:59julian37will GC_fullCollect collect after GC_disable?
23:42:20julian37do I need to GC_enable;GC_fullCollect;GC_disable?
23:42:37Varriount-Laptopjulian37: I think so.
23:42:43julian37let me try that
23:43:00Varriount-Laptopjulian37: Remember that the default GC is conservative, meaning that if a pointer to a GC'd object is in memory, it won't collect it.
23:43:25Varriount-LaptopEr, 'memory' in this case is the stack, I think.
23:43:49Varriount-LaptopIt still uses refcounting to track references in the heap.
23:44:07julian37but resetAllModulesHard would forget the data from previous compile runs, right?
23:44:20julian37i.e. remove any references from the stack and heap?
23:45:11Varriount-Laptopjulian37: Are there any comments associated with that procedure?
23:45:51julian37not sure what you mean. my code is devoid of any comments so far, it's a quick weekend hack... if that's what you mean
23:46:24julian37the recompilation logic is loosely based on compiler/service.nim
23:46:33julian37and compiler/nim.nim
23:47:11julian37plus a dusting of black magic ;-)
23:48:19julian37Varriount-Laptop: hmm no, wrapping it in GC_enable/GC_disable doesn't help
23:49:51julian37to phrase the problem coherently: I'd like to do efficient (re)compilation using the cache hinted at here: https://github.com/nim-lang/Nim/blob/60e5a2b2f53c0bfaa57a48f53b0b3dfcca1bef76/compiler/service.nim#L19
23:50:18julian37yet I don't want to keep stale cache entries around forever because memory is precious, especially with emscripten
23:50:53*zepolen_ joined #nim
23:51:08julian37at first I tried resetAllModules(), but that seemed to accumulate script code rather than replacing it (e.g. compiling 'echo "foo"', then 'echo "bar"' would produce code that echoes both foo and bar)
23:51:36julian37using resetAllModulesHard instead fixed that issue, but at the expense of some performance (I think)
23:51:50*zepolen quit (Ping timeout: 265 seconds)
23:52:13julian37and it doesn't truly seem to flush the cache or it wouldn't run out of memory so quickly (assuming the GC works in this emscripten hack, generally, but I don't see why it wouldn't)
23:52:34Varriount-LaptopAraq might know.
23:53:07Varriount-LaptopIn other news, I have a serviceable ImmutableString type.
23:55:13*gokr quit (Ping timeout: 244 seconds)
23:56:52*zepolen joined #nim