<< 23-09-2017 >>

00:02:01FromGitter<genotrance> @Varriount: using -flto on Windows mingw32 gives me an error gcc.exe: error: '-flto': No such file or directory
00:03:24FromGitter<Varriount> Hm. Was it passc, or passl
00:04:12FromGitter<Varriount> https://forum.nim-lang.org/t/2049
00:04:41*relax quit (Ping timeout: 240 seconds)
00:07:41*def-pri-pub joined #nim
00:13:23FromGitter<genotrance> either I don't know how to do this or sha3 is broken, I get the wrong hash compared to the other algorithms
00:14:38FromGitter<genotrance> nim c --debugger:native --stackTrace:on --lineTrace:on -r sha256test.nim sha256test.exe ⏎ ⏎ EA97F6267C7123BAE97B801E139DB6D75A866677F73D0BAE4D8D2A2C5F505528 ⏎ CPU Time [nimSHA2] 0.817s ⏎ ff89deab79e7f23a008ea96af34b210cf62cbe4454ad8da9c55b5dae7fcac7dd ... [https://gitter.im/nim-lang/Nim?at=59c5a76d177fb9fe7ef24a09]
00:15:25FromGitter<genotrance> nim c -r sha256test.nim sha256test.exe ⏎ ⏎ 97B5DE89D505727819DB391A023FFCD86E9024729584049719243C1A517C1798 ⏎ CPU Time [nimSHA2] 0.228s ⏎ fee677008a4e79fc07663b35a5bd09baf90d990588e4fb419d6b33258d445960 ... [https://gitter.im/nim-lang/Nim?at=59c5a79db59d55b8232a13b7]
00:16:07FromGitter<genotrance> nim c -d:release -r sha256test.nim sha256test.exe ⏎ ⏎ 08FE58673EDA0C9667642310E30866B1ED531A27A2B2E0DD3CBCDE76AA43B31E ⏎ CPU Time [nimSHA2] 0.006s ⏎ 8d75767ca2cbc5184f24f571dd6664ce084ab5897883f098de5701c5040a60bc ... [https://gitter.im/nim-lang/Nim?at=59c5a7c7c101bc4e3afaf0b4]
00:17:09*vlad1777d quit (Remote host closed the connection)
00:17:54*adeohluwa quit (Quit: Connection closed for inactivity)
00:19:39FromGitter<genotrance> I retried the test with a 33MB file, nimSHA2 can only compete if in -d:release mode, else it is 10 times slower
00:21:04FromGitter<genotrance> https://gist.github.com/genotrance/664bb868fdac570504ad0717fd86970a
00:21:56*yglukhov_ quit (Remote host closed the connection)
00:40:21*vivus quit (Quit: Leaving)
00:52:21*dhalinar quit (Ping timeout: 252 seconds)
00:53:04*adeohluwa joined #nim
00:53:07adeohluwahere I am
00:53:46adeohluwaare process managers like pm2 & supervisor language specific ?
00:53:57adeohluwaif so does nim have any?
00:56:32adeohluwaso basically I want to run my nim lang script on the vps as a background service so when it stops the process manager starts it again
01:03:51*rauss joined #nim
01:03:57*ketralnis joined #nim
01:04:04*arnetheduck joined #nim
01:06:47*enthus1ast joined #nim
01:07:04FromGitter<Varriount> @genotrance It might be NimSHA, it was giving me odd results too
01:07:42FromGitter<Varriount> @genotrance I assume you wrote bindings to sha256sum? If so, could I see them?
01:07:42*ipjk quit (Quit: Leaving)
01:10:12*vendethiel- joined #nim
01:11:41*Ven`` quit (Ping timeout: 240 seconds)
01:21:17*arnetheduck quit (Remote host closed the connection)
01:22:28*yglukhov joined #nim
01:27:35*yglukhov quit (Ping timeout: 240 seconds)
01:53:10*chemist69 quit (Ping timeout: 264 seconds)
02:03:18*arnetheduck joined #nim
02:03:35FromGitter<genotrance> @Varriount: actually nimSHA2 is giving correct results, it's sha3 which is off
02:05:16*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:06:16*def-pri-pub quit (Ping timeout: 240 seconds)
02:06:18FromGitter<genotrance> @Varriount: here's a link (https://www.dropbox.com/s/tv2yk4suyq2nf7k/hash.zip?dl=0) to the entire test project, contains the sha256.c code as well which i got from here (https://sourceforge.net/p/mailfs/svn/50/tree/trunk/mailfs/modules/hash/sha256.c)
02:06:53*chemist69 joined #nim
02:07:18*relax joined #nim
02:22:44*Ven`` joined #nim
02:24:12*vendethiel- quit (Ping timeout: 260 seconds)
02:36:02*Snircle joined #nim
02:46:12*dddddd quit (Remote host closed the connection)
02:52:12*jsgrant quit (Quit: jsgrant)
02:52:32*jsgrant joined #nim
02:55:06*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:57:09*jsgrant quit (Client Quit)
02:57:28*jsgrant joined #nim
02:59:40*Serenit0r joined #nim
03:03:05*Serenitor quit (Ping timeout: 240 seconds)
03:10:39*def-pri-pub joined #nim
03:26:10*yglukhov joined #nim
03:29:19*skrylar joined #nim
03:30:42*yglukhov quit (Ping timeout: 260 seconds)
03:47:54*adeohluwa quit (Quit: Connection closed for inactivity)
03:51:06*libman quit (Quit: Connection closed for inactivity)
04:06:33*endragor joined #nim
04:08:37*relax quit (Ping timeout: 260 seconds)
04:14:09*bjz joined #nim
04:14:45*bjz quit (Client Quit)
04:26:04FromGitter<Varriount> adeohluwa: pm2 is language specific it seems (nodejs), supervisor appears to be agnostic.
04:27:50skrylarprocess supervisors?
04:27:57skrylarthere's also god and i think circus
04:39:32FromGitter<mratsim> Nimprof maybe?
04:39:35*mahmudov quit (Ping timeout: 240 seconds)
04:40:47FromGitter<mratsim> Or @genotrance use the ruby script from kostya benchmarks, it checks time+ memory
04:41:41*mahsav quit (Ping timeout: 240 seconds)
04:58:52*def-pri-pub quit (Quit: leaving)
05:07:20FromGitter<genotrance> @mratsim: this (https://stackoverflow.com/questions/36577570/how-to-benchmark-few-lines-of-code-in-nim) worked very well. I'll have to learn how to use Nimprof soon though
05:08:27FromGitter<mratsim> Same for me :p
05:09:31FromGitter<genotrance> @zacharycarter: there's something broken in match_fingerprints2() in acoustid_compare.c that's crashing the program. If I use match_fingerprints() which is far simpler, it doesn't crash on me.
05:10:27FromGitter<genotrance> @zacharycarter: also, you'll need the fpcalc executable for autodup to get the fingerprints in the first place
05:28:00*yglukhov joined #nim
05:32:37*yglukhov quit (Ping timeout: 260 seconds)
05:42:45FromGitter<mratsim> @yglukhov very nice post btw, the no friction while prototyping and then optimizing without porting is totally true. I tried Rust before Nim for a go playing not project and instead of thinking of algorithms and the best way to store data I was fighting the borrow checker every two lines.
05:43:03FromGitter<mratsim> Bot*
05:55:41FromGitter<genotrance> @yglukhov: I agree, great post. My biggest complaint with Nim is that it makes you want to code all the time!
06:20:29skrylarhuh, someone actually put a whole bunch of comments on a thing i uploaded
06:20:34skrylari'll have to look in to that tomorrow
06:21:23*skrylar quit (Quit: Leaving)
06:28:41*mahmudov joined #nim
06:30:47*solitudesf joined #nim
06:43:18*claudiuinberlin joined #nim
07:01:00*mahmudov quit (Quit: Leaving)
07:01:15*mahmudov joined #nim
07:13:27*rauss quit (Quit: WeeChat 1.9)
07:25:23*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:30:17*yglukhov joined #nim
07:35:59*yglukhov quit (Ping timeout: 248 seconds)
07:37:28*Vladar joined #nim
07:38:33*gour joined #nim
07:38:34*claudiuinberlin joined #nim
07:43:54FromGitter<mratsim> Is it possible to feed a tuple[a: T, b: T] to a procT (a, b: T) without destructuring in temporary variables?
08:04:57*salewski joined #nim
08:07:42salewskiHas somebody an idea what these error messages may indicate?
08:07:46salewskihttp://ssalewski.de/tmp/AQ.txt
08:08:00FromGitter<mratsim> @dom96, somehow I got this in a branch but not in master (choosenim telemetry breaking Travis by asking a question). What can/doesn’t trigger a question? https://travis-ci.org/mratsim/Arraymancer/jobs/278874831
08:08:21salewskiWhen the compiler says "got" why than a long list with OR?
08:08:51salewskiIt should olways only got one proc, and than say what it would expect?
08:09:02FromGitter<mratsim> ah no it’s stalled in master as well, sorry
08:09:33salewskiExample is from https://github.com/StefanSalewski/gintro/blob/master/examples/button.nim
08:09:56FromGitter<mratsim> @salewski, I get this kind of errors when I try to inline a proc that contains a closure
08:10:21salewskiInteresting.
08:11:00FromGitter<mratsim> for example this, literally tried 10min ago
08:11:01FromGitter<mratsim> https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/operators_blas_l1.nim#L36-L43
08:11:34FromGitter<mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c61736b59d55b8232b54a4]
08:13:03FromGitter<mratsim> Ah, only if the closure allocates a new result, if it’s a closure that works in place on the arg there is no error
08:15:48salewskiWe wonder if the lock unknown may be a problem for the compiler? As it says {.gcsafe, locks: <unknown>.}
08:16:51*nsf joined #nim
08:17:03salewskiFor myself that strange behaviour is not a big problem, I know that I only have to add module name profix to handler proc and all is fine.
08:18:28salewskiBut for other GTK users it may be too confusing: Yesterday I gave someone an axample like connect(app, "activate", button.activate)
08:19:26salewskias file name was button.nim. But that file name was a bad choise, he thought button prefix was refering to widget...
08:51:03*yglukhov joined #nim
08:53:49FromGitter<mratsim> Travis update on the macOS outage: https://blog.travis-ci.com/2017-09-22-macos-update, tldr only 2 concurrent macOS builds allowed for OSS projects
08:55:53*salewski quit (Quit: WeeChat 1.9)
09:01:35*thomasross_ joined #nim
09:03:41*thomasross quit (Ping timeout: 240 seconds)
09:21:41*vlad1777d joined #nim
09:57:37FromGitter<Yardanico> The guy with stupid comment got -44 points:
09:57:41FromGitter<Yardanico> https://www.reddit.com/r/programming/comments/71ruk1/making_reel_valley_a_game_built_using_nim/
09:58:19FromGitter<Yardanico> And free +20 karma for dom96 :D
10:11:47*Serenitor joined #nim
10:13:05*Serenit0r quit (Ping timeout: 240 seconds)
10:25:35*solitudesf quit (Ping timeout: 240 seconds)
10:35:56*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:36:06FromGitter<Yardanico> @Araq: are nested macros supported or not?
10:36:30FromGitter<Yardanico> https://forum.nim-lang.org/t/3189 nested macro still works, but then throws an error
10:40:57*claudiuinberlin joined #nim
10:42:06*mahmudov quit (Remote host closed the connection)
10:44:32Araqnested macros are rather pointless, just use an inner proc
10:45:38*yglukhov quit (Remote host closed the connection)
10:50:05*gour left #nim ("Leaving")
10:53:54FromGitter<Yardanico> well it's not my issue, @Udiknedormin reported it
10:55:17dom96mratsim: you should be doing this: https://github.com/dom96/choosenim/blob/master/.travis.yml#L17
10:55:24*mahmudov joined #nim
10:55:55FromGitter<Yardanico> yeah, he figured it out himself
10:56:16FromGitter<mratsim> Yeah I spammed all watchers of my repo but done ;)
10:58:37dom96good :)
10:59:33*mahsav joined #nim
11:31:25*dddddd joined #nim
11:33:09FromGitter<mratsim> mmmh I have 2 proc/macro with signature ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Nim says ambiguous call. Any way to tell Nim to not match the second declaration if there are no args? [https://gitter.im/nim-lang/Nim?at=59c64675bac826f054ee6796]
11:35:38FromGitter<Yardanico> well "varargs" means 0 or more arguments
11:37:09FromGitter<mratsim> so no {magic} `macro unsafeView(t: Foo, args: varargs[untyped]{magic}) = …`
11:37:37FromGitter<Yardanico> It's not "magic", it's overloading based on node type
11:38:29FromGitter<Yardanico> oh wait
11:38:45FromGitter<Yardanico> ah, no
11:40:04FromGitter<Yardanico> why do you need to have a macro like this?
11:40:08FromGitter<mratsim> I meant {magic} as something similar to {call} which detects if the arg is not used anymore and Nim can do move optimization
11:40:55FromGitter<mratsim> For slicing without copy: tensor.unsafeView(4, \_, 1..10)
11:41:34FromGitter<mratsim> and no args for just taking a shallow copy
11:42:08FromGitter<Yardanico> maybe tensor.unsafeView([4, _, 1..10]) ?
11:44:25FromGitter<Yardanico> and openarray instead of varargs
11:44:56FromGitter<Yardanico> or call unsafeView from your macro
11:45:02FromGitter<Yardanico> and name it other way :)
11:45:38FromGitter<Yardanico> @mratsim well {call} is overloading based on a node type :)
11:45:45FromGitter<Yardanico> almost
11:47:33FromGitter<mratsim> one will be called unsafeView and the other unsafeSlice
11:48:05FromGitter<mratsim> mmm i’ll have to do tests to understand how {call} works
11:49:18FromGitter<Yardanico> call The matching AST must be a call/apply expression.
11:49:27FromGitter<Yardanico> you can check compiler source :)
11:51:56FromGitter<Yardanico> So AST node must be one of these node types: {nnkCall, nnkInfix, nnkPrefix, nnkPostfix, nnkCommand, nnkCallStrLit}
11:52:31*ShalokShalom_ joined #nim
11:52:52FromGitter<Yardanico> ah, no
11:52:59FromGitter<Yardanico> nkCallKinds* = {nkCall, nkInfix, nkPrefix, nkPostfix, nkCommand, nkCallStrLit, nkHiddenCallConv}
11:55:39*ShalokShalom quit (Ping timeout: 252 seconds)
12:00:36dom96Araq: So building the tools (in particular Nimble) fails on a 1GB server because it runs out of memory :\
12:03:05FromGitter<Yardanico> so we should really have a build server :(
12:03:20dom96yep
12:03:39dom96I think that's the best option
12:03:59dom96I'll need to get travis to deploy binaries to a server somewhere
12:04:15FromGitter<Yardanico> you can configure it to deploy binaries to github
12:04:28FromGitter<Yardanico> and appveyor has the same thing
12:04:51dom96Yes, I know. I already did so for choosenim.
12:04:58dom96Still a lot of work though
12:06:40dom96I also will need to create a server to store build failure logs because Google Analytics can only store 500 bytes of data :\
12:06:43*xzd joined #nim
12:07:18FromGitter<Yardanico> lol
12:07:21*Serenitor quit (Ping timeout: 240 seconds)
12:09:50FromGitter<ephja> there are some great compression algorithms out there. one particular source file had a packed size of 0, apparently
12:10:08FromGitter<ephja> though it could have been a winrar bug
12:13:33FromGitter<Bennyelg> Someone ear about this amazing thing? ⏎ https://github.com/facebook/osquery/blob/master/README.md
12:13:46FromGitter<ephja> that's how the simplest lossy compression algorithm works, I guess
12:14:13FromGitter<ephja> cat foo > /dev/null
12:16:20FromGitter<Yardanico> @Bennyelg no
12:16:33FromGitter<Bennyelg> Try it, it's freaking brilliant
12:16:50FromGitter<Yardanico> well why do I need to try it ? :) I don't need a thing like that :)
12:17:23FromGitter<Bennyelg> Well, anyone who uses is system and want to monitoring it , need it
12:20:32dom96that is very cool
12:22:39FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/HdgP/Screen-Shot-2017-09-23-at-8.22.20-AM.png)
12:22:45FromGitter<zacharycarter> zengine working w/ emscripten
12:22:47FromGitter<zacharycarter> wasm
12:23:33FromGitter<Yardanico> wasm or asm.js ?
12:24:43FromGitter<zacharycarter> web assembly
12:24:46FromGitter<zacharycarter> w/ emscripten
12:25:11FromGitter<Yardanico> try asm.js too :)
12:25:17FromGitter<Yardanico> not every browser supports wasm sadly
12:25:27FromGitter<zacharycarter> alright will do
12:26:01*FromGitter * zacharycarter is stoked :D
12:39:06*ShalokShalom_ quit (Ping timeout: 252 seconds)
12:46:13*yglukhov joined #nim
12:50:16*yglukhov quit (Ping timeout: 240 seconds)
12:55:52*obadz- joined #nim
13:00:53FromGitter<Yardanico> @mratsim https://github.com/nim-lang/Nim/issues/6423#issuecomment-331632968
13:02:56FromGitter<mratsim> @Yardanico Okay, the doc wasn’t clear at all
13:03:42FromGitter<Yardanico> well doc clearly describes what "call" is
13:04:00FromGitter<Yardanico> and "move optimization" section just describes what "call" can be useful for
13:05:57FromGitter<Yardanico> @mratsim btw, how you would optimize "let seq"? getting unsafeAddr of it?
13:08:41FromGitter<mratsim> It’s more for my Tensors, let’s say I want to reshape from [a, b, c, d] to [[a, b], [c, d]], by default I copy everything, data included, but if the original one is a `let` and can use a view instead of a copy
13:09:27FromGitter<Yardanico> @mratsim yeah, maybe in future "let" will be used for optimizations in Nim itself
13:10:09FromGitter<mratsim> @edubart did a benchmark of a full machine learning algorithm using my lib and changing copies to views in single location reduce computation from over a minute to 3 seconds
13:10:30FromGitter<Yardanico> yeah, I saw it
13:10:37FromGitter<Yardanico> ah, full machine learning
13:11:55FromGitter<mratsim> it’s the one you think of ;)
13:12:21FromGitter<Yardanico> well yeah, I saw his "arraymancer-demos" directory
13:12:24FromGitter<Yardanico> should try it !
13:13:51*Yardanico joined #nim
13:16:23FromGitter<Yardanico> @edubart are you here?
13:16:42FromGitter<Yardanico> you should change "nimble install arraymancer-vision" in readme of arraymancer-vision to "nimble install arraymancer_vision"
13:17:16FromGitter<edubart> ah ok
13:17:58FromGitter<Yardanico> @edubart also https://github.com/edubart/arraymancer-demos/blob/master/logistic_regression.nim doesn't seem to work for me
13:18:04FromGitter<edubart> I think you have problems my arraymancer-vision does not work with arraymancer 0.13, will work on 0.2, and currently is not working with arraymancer head too, some of the last commits made a regression
13:18:20FromGitter<Yardanico> ah, ok
13:19:42*solitudesf joined #nim
13:20:12FromGitter<mratsim> 1) 2.0 is for tonight or tomorrow. Depending if I drown in documentation or not
13:20:26FromGitter<Yardanico> well I installed both arraymancer and arraymancer-vision head
13:22:50FromGitter<edubart> if you really want to run, rollback arraymancer to commit 18f36b93b8e9
13:27:45Araqdom96: that's been a problem for a long time
13:28:24Araqwe could make 'nim --lowmem' call 'nim --compileOnly' and then run the .json build file to finish the build
13:28:44Araqthis way the mem is freed before GCC is invoked
13:28:44dom96we're better off providing binaries
13:29:03Araqfor 10+ platforms? no way.
13:30:54FromGitter<Yardanico> well providing builds for windows, macos, and ubuntu would be enough :)
13:32:01dom96indeed.
13:32:40Araqno. BSD is the foundation for the PS4 iirc and that makes it more valuable than Ubuntu, ymmv
13:33:00FromGitter<Yardanico> :D
13:33:55Araqlet me give --lowmem a shot, I'm bored anyway
13:34:26federico3Yardanico: ubuntu is already getting packages from Debian
13:34:40Yardanicofederico3, well yeah
13:34:43Yardanicoso for windows and macos ? :)
13:35:06Araqwe already give you windows binaries
13:35:24federico3FWIW CircleCI can build and *publish* artifacts for OSX
13:39:01*ipjk joined #nim
13:40:31dom96travis can too
13:41:13FromGitter<mratsim> Nim on PS4, did I hear right?
13:41:40FromGitter<Yardanico> yes
13:41:50adam12I think FreeBSD support is crucial. I was happy to see nim / nimble in ports.
13:42:12*yglukhov joined #nim
13:42:50Araqwe have writeJsonBuildInstructions
13:42:59Araqwe need runJsonBuildInstructions anyway
13:43:23Araqand once we have that, '--lowmem' is a piece of cake
13:43:52Araqplus IMO 1GB should always be enough to build Nim.
13:44:39dom96well...
13:44:47dom96maybe this should be the default behaviour then?
13:45:12federico3dom96: publish as in: upload to GH or other services or host the file for you? CircleCI does the latter by default
13:47:21Araqdom96: maybe, we'll see
13:52:07FromGitter<mratsim> Quitting VScode (with nimsuggest) frees 1.1GB of disk space hum
13:53:35*libman joined #nim
13:56:14FromGitter<zacharycarter> :/
13:57:06libmanLooks like the LLVM / Clang relicensing is happening after all. That is the final nail in my coffin...
13:58:33FromGitter<zacharycarter> ?
13:59:05FromGitter<zacharycarter> I've never met anyone more concerned with licensing than you libman :P
13:59:13FromGitter<zacharycarter> maybe it's for good reason though
13:59:27FromGitter<mratsim> There is the Facebook React, Immutable.js relicensing to MIT
13:59:44FromGitter<zacharycarter> heard about ^
13:59:47FromGitter<zacharycarter> welcome change
14:00:17FromGitter<zacharycarter> @mratism I think technically my old engine (frag) could run on ps4
14:00:25FromGitter<zacharycarter> I never tried though
14:00:29libmanGo to BSDcan. There are much higher-functioning zealots than I.
14:00:31FromGitter<zacharycarter> I'd need a dev kit I magine
14:00:32FromGitter<mratsim> Believe me, libman is tame compared to FSF, tried to get a call with them for work, no Skype, no Hangouts, no nothing that isn’t super secure
14:03:33libmanI will not code until I have a clear plan for my OS.NAP project, the world's first full-stack OS (probably based on BSD Unix) that doesn't violate the Non-Aggression Principle.
14:04:15federico3please use #nim-offtopic for this
14:05:10FromGitter<zacharycarter> federico3: there's not much other conversation going on :)
14:05:30libmanGood thing I didn't start coding in Rust or Julia (the latter being the only major language package ecosystem more copyfree than Nim)...
14:06:01FromGitter<Yardanico> ported simple recursive math expression parser from java to nim: https://gist.github.com/Yardanico/f31aa29632e1bae24b360c9182c85e28
14:06:03FromGitter<Yardanico> source: https://stackoverflow.com/questions/3422673/evaluating-a-math-expression-given-in-string-form
14:06:19FromGitter<Yardanico> also it seems it's easy to add functions with multiple arguments here :)
14:07:06FromGitter<Yardanico> will also try to make some functions accept any number of args (this is not hard I think)
14:07:15FromGitter<Yardanico> and it's not that slow btw
14:07:32FromGitter<Yardanico> 1) 4 million iterations per second on evaluating "((4 - 2^3 + 1) * -sqrt(3*3+4*4)) / 2"
14:07:40libmanI'm sorry if I'm annoying anyone, but this can lead to a constructive conversation about Nim backend targets. Looks like some people will be using an old Clang version / fork from now on.
14:07:51Yardanicowhy?
14:08:15FromGitter<zacharycarter> because of the relicensing libman mentioned ^
14:09:03FromGitter<zacharycarter> I guess they're possibly moving to Apache 2.0
14:09:47libmanI wonder if DMD D would make a better target compiler than the remaining copyfree C alternatives (not that this should distract from 1.0 priorities).
14:10:01*adeohluwa joined #nim
14:10:02FromGitter<Yardanico> oh yeah, it's VERY easy to add any number of arguments to this parser
14:10:56libmanI was hoping that nonsense would go away, but it isn't - http://lists.llvm.org/pipermail/llvm-dev/2017-August/116266.html
14:16:51Yardanicobtw, just for fun: is there a way to not copy a slice of a string? e.g. in my case I don't need a copy since I only need to read a sliced string
14:21:34Yardanicoalso why there's no "array unpacking" thing ? :) array size is known at compile-time too
14:23:47AraqYardanico: unfortunately Nim is connected to reality and so features start in the state "not implemented"
14:25:18AraqYardanico: cstring(addr(s[i]), len and then see you can do something with the cstring
14:25:26Yardanicook, thanks
14:31:02FromGitter<zacharycarter> grrr I can't get assimp to compile into a static lib
14:31:03FromGitter<zacharycarter> annoying
14:38:39Araqdom96: 'nim jsonscript project.nim' works, but 'nim --lowmem' is complex lol
14:39:16Araqit's easier to solve this externally like 'nim c --compileOnly project.nim && nim jsonscript project.nim'
14:39:21dom96It would be nice if we could somehow detect that OOM killer killed the C compiler
14:39:40dom96In fact, it's a bit odd that Nim is using the most memory and yet OOM killer decides to kill the C compiler...
14:39:58AraqNim uses 330MB peak mem
14:40:11Araqit doesn't use more than GCC.
14:40:41*Serenitor joined #nim
14:41:12Araqnimble execs 'nim' for building, it can easily do 'nim c --compileOnly ... && nim jsonscript '
14:41:41Araqother scripts can do the same
14:41:48dom96lol
14:41:54Araqisn't that good enough? :P
14:41:55dom96This sounds really sloppy
14:42:09dom96Just forget about it
14:42:17*yglukhov quit (Remote host closed the connection)
14:42:25Araqwell the feature works, *Shrug*
14:42:33Araqif you run OOM, you now know what to do
14:43:50*yglukhov joined #nim
14:44:17dom96or you could just add some swap to your system
14:45:55Araqthey may not be under your control.
14:46:31Araqnim c
14:46:47Araq|___ nim c compileOnly
14:46:55Araq|___ nim jsonscript
14:47:18Araqthat's the only setup that avoids the OOM problem
14:47:44Araqthe problem is if I get it wrong, nim runs itself infinitely
14:48:07Araqthat's why I'm "sloppy"
14:48:37Araqit's begging for trouble.
14:48:40dom96I feel like you're just asking for a bigger maintenance burden with this.
14:49:05*yglukhov quit (Ping timeout: 240 seconds)
14:49:08FromGitter<cabhishek> I have a simple file with one line ```echo("hello, world")``` in hello.nim and when I try to invoke JS backend ```nim js hello.nim``` I am getting ```lib/system/jssys.nim(56, 6) Error: 'getCurrentException' is not GC-safe as it accesses 'lastJSError' which is a global using GC'ed memory ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59c67464c101bc4e3afd8237]
14:49:17FromGitter<cabhishek> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c6746dbac826f054ef0b97]
14:49:39dom96Providing binaries will solve this issue for 99% of people
14:49:47dom96The remaining 1% can enable swap
14:49:51FromGitter<cabhishek> Any ideas what I am doing wrong?
14:50:23YardanicoAraq, so how I should call this? cstring(addr(s[i]), len) doesn't work
14:51:01Araqcabhishek: no idea, I have used 0.17.2 extensively with the JS target
14:51:30Yardanicoah, sorry
14:52:12Araqdom96: I don't think people like binaries that they cannot rebuild on their own
14:52:24dom96why?
14:52:36Araqprogrammers are control freaks.
14:52:53Araqand we can always use "security" as a reason
14:54:00dom96Some programmers are.
14:54:02*Serenit0r joined #nim
14:54:04dom96They can build it manually
14:54:15Araqbut my --compileOnly && jsonscript solution is good enough for everybody anyway, so ... victory!
14:54:16jonhgood ol "security"
14:54:18jonhhehe
14:54:29dom96Most people just want things to work
14:55:04Araqthey shouldn't use 1GB machines without swap then
14:55:29Araqbut if they want to, now they can
14:55:38Araqit's only slightly more inconvenient
14:55:59federico3a use-case for pulling a binary release is using a 3rd party buildbot service
14:56:57*dhalinar joined #nim
14:57:26*Serenitor quit (Ping timeout: 255 seconds)
15:01:22*yglukhov joined #nim
15:04:05YardanicoAraq, hmm, I still can't figure out how to make an unsafe slice from a string, even if I have len
15:04:36AraqYardanico: you get a pointer to a[i] and pass the length independently
15:07:54*Vladar quit (Remote host closed the connection)
15:07:57YardanicoAraq, pass length to "cstring" converter procedure? or pass it to another proc?
15:08:20Araqit depends, just let it be and live with the copy
15:08:28Yardanicook :)
15:10:18FromGitter<zacharycarter> hrm I'm trying to link a static lib using dynliboverride and passL
15:10:31FromGitter<zacharycarter> but apparently the exported symbols from the static lib I'm trying to link have underscores in front of their names?
15:10:41FromGitter<zacharycarter> and this isn't the case with the dynamic library I'm guessing
15:10:44FromGitter<zacharycarter> has anyone ever run into this?
15:13:42FromGitter<zacharycarter> oh the dynamic library has underscores too - I guess it's just not linking the static lib for some reason
15:13:57*chemist69 quit (Ping timeout: 246 seconds)
15:14:45dom96it doesn't depend, `cstring` is a type not a converter procedure unless I am missing something
15:18:00*Vladar joined #nim
15:18:53*pilne joined #nim
15:20:42*Trustable joined #nim
15:23:35*SerenityStyle joined #nim
15:26:33*Serenit0r quit (Ping timeout: 246 seconds)
15:31:44*chemist69 joined #nim
15:33:24FromGitter<genotrance> looking for how strings are implemented in Nim, looks like NimString is just an array of chars? and what's .magic. do and how's LengthStr implemented?
15:33:41dom96magic means the proc is implemented in the compiler
15:33:56dom96search for the magic string in the compiler code
15:36:03*Serenit0r joined #nim
15:38:11FromGitter<tanis2000> Wondering... what’s the current best practice for cross compiling to linux, win, macos, android and ios?
15:38:30Yardanicouse corresponding compilers?
15:38:33Yardanicoe.g. for windows - mingw
15:38:48*SerenityStyle quit (Ping timeout: 240 seconds)
15:39:11FromGitter<tanis2000> Is it possible with just nim and nake? Would you need to compile the windows binary on a windows box or is there a chance of cross compiling from macos/linux?
15:39:17FromGitter<zacharycarter> @tanis2000 you can use docker for this and avoid having to install cross compile toolchains
15:39:29FromGitter<zacharycarter> you can cross compile for windows on linux / osx
15:39:33Yardanicotanis2000: why do you use nake at all?
15:39:36FromGitter<zacharycarter> I'd highly recommend docker for this though
15:39:39FromGitter<tanis2000> @zacharycarter right! Good idea
15:39:42Yardanicoand no, it's not possible with just nim itself
15:39:51Yardanicoyou would also need a cross-compiler for needed platform
15:40:09FromGitter<zacharycarter> I have an example in frag of cross compiling to windows with docker
15:40:11FromGitter<zacharycarter> let me try to find it
15:40:12FromGitter<tanis2000> Ok so docker sounds like the easiest path to go through
15:41:40FromGitter<zacharycarter> https://github.com/fragworks/frag/blob/master/Dockerfile + https://github.com/fragworks/frag-samples/blob/master/desktop/space-shooter/dist/win64/Dockerfile
15:41:52FromGitter<zacharycarter> sets up a debian base image and then cross compiles with that to windows
15:44:22FromGitter<tanis2000> That looks good, and it looks like you’re packaging the sdl and openal dynamic libraries with it and it makes it much easier to live with without having to compile sdl/openal together with your project
15:44:42FromGitter<zacharycarter> yup!
15:45:09FromGitter<zacharycarter> if you run into any problems trying to get things working, just ping me I've been through this rodeo before :)
15:45:37FromGitter<tanis2000> Have you tried to add some sort of dll/dlyb support ot sny other smart way of turning your engine into a player so that you can just recompile the gameplay code to iterate quickly?
15:45:52adeohluwaFromGitter: hiya
15:45:52FromGitteradeohluwa, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
15:46:05FromGitter<zacharycarter> hi adeohluwa
15:46:10adeohluwayup wanted to poke u
15:46:19FromGitter<tanis2000> Yeah I know the feeling.. been doing that for a long time both with C/C++ and haxe
15:47:03adeohluwaZacharycarter: a bot is my next nim escapade
15:47:04FromGitter<tanis2000> And I’m always looking for alternatives to iterate over gameplay code quickly
15:47:31FromGitter<zacharycarter> oooo social networking bot right adeohluwa?
15:47:37adeohluwa@Yardanico: noted I can do everything simply making requests to an API that spits json
15:47:41FromGitter<zacharycarter> @tanis2000 yeah docker is magical and the best I've found
15:47:43Yardanicoadeohluwa, yes
15:47:47FromGitter<tanis2000> (But still trying to find something that is statically typed)
15:48:06FromGitter<zacharycarter> once someone gets hot reloading down with Nim
15:48:09adeohluwaZacharycarter: most definitely, something pseudo intelligent
15:48:15adeohluwafeels & acts real
15:48:16Yardanicozacharycarter: it's already possible
15:48:30Yardanicoyou just need to mess with dll's and stuff like that yourself
15:48:46FromGitter<tanis2000> Nim seems quite nice when it comes to recompile code. Hotreloading should be doable by separating the code you want to reload into a dynamic library, just like with C
15:48:47FromGitter<zacharycarter> @Yardanico yeah I've played with def-pri-pub's solution and it doesn't really work all that well
15:49:04Yardanicowhat do you mean "doesn't work well" ?
15:49:06FromGitter<zacharycarter> it becomes tricky when you have multiple threads
15:49:11Yardanicooh
15:49:13FromGitter<zacharycarter> I mean it doesn't work well :P
15:49:15FromGitter<tanis2000> I managed to get something like that working with Rust too
15:49:16Yardanicoit's the same in C/C++ though :)
15:49:32adeohluwanimcr doesnt work with compile flags
15:49:35FromGitter<zacharycarter> alright then today I will make an example with zengine
15:49:38FromGitter<zacharycarter> with hot reloading
15:49:38adeohluwawill be nice if it did
15:49:40FromGitter<zacharycarter> and show you waht I mean
15:49:45FromGitter<tanis2000> :)
15:50:11FromGitter<zacharycarter> totally off topic but I am picking this beast up today from the shop: https://www.youtube.com/watch?v=WX9L395ZMss :D
15:50:15FromGitter<tanis2000> How far have you got with zengine btw?
15:50:27FromGitter<zacharycarter> I just got emscripten support / wasm support working
15:50:43FromGitter<zacharycarter> I'm running into troubles trying to statically link assimp though
15:52:28yglukhovzacharycarter: wasm? any pitfalls there?
15:53:02FromGitter<zacharycarter> @yglukhov it was pretty straightforward - I even made it work with sdl2 | the opengl Nim bindings
15:53:13FromGitter<zacharycarter> just have to be careful about what opengl functions you're using
15:53:21yglukhovcool, will have to try it.
15:53:27FromGitter<zacharycarter>
15:53:30FromGitter<tanis2000> As long as you stick to opengl es 2 you should be safe
15:53:36FromGitter<zacharycarter> yup!
15:54:09FromGitter<zacharycarter> I thought I could just compile assimp statically with clang and then link to it via emscripten
15:54:18FromGitter<zacharycarter> but apparently that's not working :/
15:54:20FromGitter<tanis2000> Are you going to add other backends later on like metal and vulkan?
15:54:36FromGitter<zacharycarter> I'm either going to have to do that or resurrect frag :P
15:54:46FromGitter<zacharycarter> and then bgfx enters the picture again
15:54:51FromGitter<tanis2000> I’m not using assimp as my engine is just 2D and I never needed it, so no clue
15:55:06FromGitter<zacharycarter> which is the main reason I stopped with frag - people had way too many issues compiling bgfx when they wanted to use frag
15:55:48FromGitter<tanis2000> Yeah, the easiest way is to just stick to OpenGL ES 2 so far. But you might want to keep that door open for the future
15:55:54FromGitter<mratsim> When your asm.js or WebGL is done I will use zengine to do tensor computations in the browser :D
15:56:10FromGitter<zacharycarter>
15:57:05FromGitter<mratsim> then I’ll develop a JS crypto miner in some random site, reddit/HN a link to it and become a millionnaire
15:57:26FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/1unV/cool.gif)
15:59:34*nsf quit (Quit: WeeChat 1.9)
16:01:21FromGitter<genotrance> @dom96: I don't see LengthStr implemented anywhere (https://github.com/nim-lang/Nim/search?utf8=%E2%9C%93&q=LengthStr&type=)
16:01:52Yardanicogithub search isn't always the best
16:02:18FromGitter<genotrance> okay will check my local copy
16:05:04*sz0 joined #nim
16:20:20FromGitter<mratsim> @Araq, I’m sorry to insist again on issue https://github.com/nim-lang/Nim/issues/6387. ⏎ Beyond identifier resolution, it seems like macros are not doing expected things at all with generics ⏎ Test case (compile the second one, it calls the first) ⏎ ⏎ ``` ⏎ Should I open a new issue, reopen and rename the first one, or is it not a bug?``` [https://gitter.im/nim-lang/Nim?at=59c689c4210ac269206469b8]
16:23:10*dhalinar quit (Ping timeout: 264 seconds)
16:26:07FromGitter<mratsim> Sorry only foo1 and foo3 output something, two lines. foo2 and foo4 output nothing
16:27:18FromGitter<mratsim> foo1 and foo2*
16:30:10FromGitter<mratsim> argh forget it, I compiled the wrong file
16:36:16*solitudesf quit (Remote host closed the connection)
16:41:09*relax joined #nim
16:42:44*linsword13 joined #nim
16:44:34*linsword13 quit (Client Quit)
16:45:21*linsword13 joined #nim
16:50:33*relax quit (Ping timeout: 246 seconds)
16:59:15*linsword13 quit (Ping timeout: 252 seconds)
17:02:11*yglukhov quit (Remote host closed the connection)
17:03:22FromGitter<mratsim> After testing, if I understand properly resolution for the compiler happens in this order for generic procs ⏎ ⏎ 1) identifier resolution ⏎ 2) macros ⏎ 3) proc symbol resolution ... [https://gitter.im/nim-lang/Nim?at=59c693da210ac26920648cd5]
17:14:57*zachk joined #nim
17:15:32YardanicoIf someone wants a simple math expression evaluation: https://gist.github.com/Yardanico/9fcdb067c9f52330e1aabb469f77dd60
17:15:44Yardanicoand you can easily add new functions
17:22:54*linsword13 joined #nim
17:31:16*BigEpsilon joined #nim
17:32:32*salewski joined #nim
17:35:19salewskiAraq, finally I have been able to delete my macro nearly completely, and get still a similar error:
17:35:21salewskihttps://forum.nim-lang.org/t/3192
17:35:54salewskiNo GTK involved, no string hacks.
17:36:14salewskiBut I have still no idea what is wrong.
17:38:30*Trustable quit (Remote host closed the connection)
17:41:29YardanicoRootRef ?
17:41:32Yardanicowhat is it?
17:43:03salewskihttps://nim-lang.org/docs/system.html#RootRef
17:45:30Yardanicoehm
17:46:53Yardanicoahh
17:47:09Yardanicosalewski, the issue here - isDigit is defined both in your module and in strutils
17:47:37*obadz- quit (Ping timeout: 260 seconds)
17:47:37Yardanicochanging isDigit to yourfilename.isDigit works
17:47:39salewskiSure -- that is the core of the problem.
17:48:03Yardanicosalewski, nim really can't understand what proc is needed here
17:48:37salewskiWe know that. The problem is the connect macro of GTK, beople do not want module name prefix for handler proc.
17:49:00Yardanicosalewski, well then they would name their procs not like stdlib ones ? :)
17:49:21salewskiAnd Error message is so confusing that GTK users will have trouble.
17:49:58salewskiThe problem started some days ago, when you told me how to investigate proc parameters in macro.
17:50:25*linsword13 quit (Ping timeout: 248 seconds)
17:50:35salewskiFor that I have to pass the handler proc typed, and compile error occured. Untyped no error.
17:50:40Yardanicoyes
17:50:53Yardanicobecause with untyped you just pass "isDigit" unbound identifier
17:51:01Yardanicoand with "typed" you pass actual procedure
17:52:00FromGitter<mratsim> You can have an outer macro untyped, do some stuff and dispatch to a typed macro
17:52:12salewskiIs not standard lib name conflict only, indeed it was handler name identical with procs in GTK lib.
17:52:20*thomasross_ is now known as thomasross
17:53:08*def-pri-pub joined #nim
17:53:09Yardanicoyeah, this is a solution too
17:53:10Araqsalewski: an overloaded proc name produces an "OR" type
17:53:12FromGitter<mratsim> can’t you import “except isDigits” ?
17:53:44Araqif you tell me how to improve the error message I might do it, not sure how difficult that is
17:54:12salewskimratsin: That is interesting, can you explain. I tried that, and also asked.
17:54:13FromGitter<mratsim> if it’s the one from this morning, it’s a scary multiline error message
17:54:41salewskiYes, it is that message.
17:55:10*linsword13 joined #nim
17:55:15salewskihttp://ssalewski.de/tmp/AQ.txt
17:55:50Yardanicowell as Araq said it just produces an OR type with all procedures
17:56:06FromGitter<mratsim> @salewski: https://nim-lang.org/docs/manual.html#modules-import-statement
17:56:13FromGitter<mratsim> import strutils except `%`, toUpper
17:56:21Yardanicowell this wouldn't always help
17:56:31Yardanicobecause he probably would need "activate" proc
17:56:43*gokr joined #nim
17:56:46Yardanicosalewski, btw, did you talked with PMunch about his genui macro ? :)
17:56:48Yardanico*talk
17:57:07gokrdom96: The forum seems a tad "off"
17:57:11FromGitter<mratsim> or rename the proc with “as" ?
17:57:16Yardanicogokr, what do you mean?
17:57:37salewskiNo, I never used genui.
17:57:37gokrI can't seem to see the latest thread called "lambda capture in Nim"
17:57:48gokrSearch for "lambda" - then click on the first hit
17:57:53Yardanicogokr, maybe it's not approved yet?
17:58:08gokrI can search for it, I did get it via RSS, but I can't view it
17:58:13def-pri-pubzacharycarter: heyas. You here?
17:58:13Yardanicoyeah
17:58:15Yardanicohttps://forum.nim-lang.org/profile/woggioni
17:58:19Yardanicostatus: "moderated"
17:58:25Yardanicobut yeah, these posts should be hidden from search
17:58:38gokrAha, moderated
17:58:43*xzd quit (Quit: Lost terminal)
17:58:53Yardanicogokr, you can make an issue on nimforum repo
17:58:57Yardanicohttps://github.com/nim-lang/nimforum
17:59:04Yardanicoah
17:59:04Yardanicohttps://github.com/nim-lang/nimforum/issues/104
17:59:16salewskiFor my problem rename will not really help, GTK and related stuff has thousands of procs, so name conflict with handler names will occor often.
17:59:30FromGitter<mratsim> Moderated post in an existing thread will also bring it up at the top but without the moderated post
18:00:09*def-pri-pub quit (Quit: leaving)
18:00:16*obadz- joined #nim
18:02:46*nitely joined #nim
18:03:48dom96gokr: fixed
18:05:23*def-pri-pub joined #nim
18:05:53Yardanicodom96, wow, that was fast
18:06:01dom96how so?
18:06:01Yardanicodom96, also close https://github.com/nim-lang/nimforum/issues/104 ?
18:07:54*pilne quit (Quit: Quitting!)
18:08:01def-pri-pubOh, I did a 10 minute talk on Nim last Monday to a group of game devs
18:08:06def-pri-pubAnyone want to see the slides?
18:08:12Yardanicodef-pri-pub, yes please
18:08:52Araqsalewski:
18:08:55Araqproc f(x: int) = echo "takes int"
18:08:56Araqproc f(x: float) = echo "takes int"
18:08:56Araqproc g(f: proc(x: int)) = f(3)
18:08:57Araqg(f)
18:09:08Araqworks.
18:09:10def-pri-pubIt was more of an overview of the language and what it provides, no so much syntax. They were supposed to be lighting talks, but nobody really cared
18:10:05def-pri-pubhttps://docs.google.com/presentation/d/1gclE7dqEFCSqHa0aCYOGq0d9bdi-rxJz7whLSHboq3Q/edit?usp=sharing
18:10:06Calinou<libman> Looks like the LLVM / Clang relicensing is happening after all. That is the final nail in my coffin...
18:10:10Calinouthere's some good news at least, libman :) https://code.facebook.com/posts/300798627056246/relicensing-react-jest-flow-and-immutable-js/
18:10:14Calinou(not very related to Nim, but still)
18:10:17def-pri-pub(I hope what I wrote down was correct)
18:10:31*ShalokShalom_ joined #nim
18:11:56def-pri-pubSome people were quite interested in taking a look at Nim, mostly for the UE4 bindings.
18:12:36Yardanicodef-pri-pub, were there any questions?
18:12:54def-pri-pubPeople asked about the GC a little
18:12:59*yglukhov joined #nim
18:13:03*SerenityStyle joined #nim
18:13:05def-pri-pubAnd I got the question "And how does this relate to Rust?"
18:13:57Calinourelevant: https://github.com/pragmagic/godot-nim
18:14:07Yardanicoyeah, we saw it :)
18:14:08Calinoudef-pri-pub: hah, Rust vs Nim is a fun fight :')
18:14:30def-pri-pubI kind of blanked at that question because I've never touched Rust at all.
18:14:57def-pri-pubMy boss is also one of the Rust contributors, so it's always fun to bring up Nim around him.
18:15:05Yardanico:P
18:15:10Calinouhmm, nice, one of the guys who works on godot-nim sent many pull requests to Godot itself :)
18:16:47*Serenit0r quit (Ping timeout: 260 seconds)
18:19:33*BigEpsilon quit (Ping timeout: 252 seconds)
18:20:05FromGitter<zacharycarter> Def-
18:20:45FromGitter<zacharycarter> Def-pri-pub ill be back home and online in an hour or so
18:20:52def-pri-pubsure thing.
18:21:38Yardanicotime to check gc v2 again! :D
18:22:02*obadz- quit (Ping timeout: 260 seconds)
18:32:32salewskiAraq, I do not understand if or how your g(f) example above is related to my connect macro.
18:32:47dom96def-pri-pub: no mention of my book? D:
18:33:17salewskiAt least now I know that is not a direct bug in my macro code, and using the AST API would
18:33:28def-pri-pubI'll do it next time, but give me a referral code that gets me a 35% kickback.
18:33:39Yardanico:D
18:33:40def-pri-pubI don't use my good name to peddle things for free. : D
18:34:02def-pri-pubIn fact, make it 45%
18:34:19Yardanicomaybe 100 ? :)
18:34:24salewskinot help to solve this issue. So the only solution for now is to point GTK users to this issue in BIG RED LETTERS.
18:34:45def-pri-pubYardanico: what cut does dom96 then get?
18:34:53def-pri-pub"Free exposure."
18:35:22dom96lol. I don't even get that much
18:36:09def-pri-pubCan I ask how much of a cut you actually do get from your book?
18:37:42*mahmudov quit (Ping timeout: 252 seconds)
18:38:31libmanIt's Nim vs D now; as far as I'm concerned Rust is dead.
18:38:46Yardanicolol, why?
18:38:47*adeohluwa quit (Quit: Connection closed for inactivity)
18:38:52Yardanicojust curious why it's dead
18:38:59YardanicoI don't use it at all
18:39:27libmancopyfree.org license zealotry.
18:39:56YardanicoRust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
18:40:11Yardanicohttps://github.com/rust-lang/rust/blob/master/COPYRIGHT
18:41:09dom96def-pri-pub: I can't honestly even remember, but it's definitely less than 30%
18:41:19def-pri-pubthat sucks
18:41:45def-pri-pubBut I'm guessing they take a hit on things like printing and distribution. Do you get more form digital sales since it costs less resources?
18:42:00dom96nope, I get the same cut for digital sales.
18:42:11Yardanicolol
18:42:13dom96AFAIK the margins are pretty thin.
18:42:21dom96the profit margins that is
18:42:33def-pri-pubI remember that was a big thing with digital music sales a couple of years ago. Labels were considering digital sales the same as physical sales, though they didn't have the same costs.
18:43:11def-pri-pubSo their artists still were getting the same cut. They wanted to move digitals to be some sort of "lesser licensing," or something like that.
18:45:02def-pri-pubYeah, I don't think there's much money in writing books on Nim.
18:45:08def-pri-pubIt's a fairly niche thing now.
18:46:05libmanSome (very poorly organized) notes on the language copyfreedom rankings drama, written back when I thought LLVM relicensing was not a sure thing... https://github.com/lbmn/libman.org/blob/master/piki/tiole.md
18:46:11Yardanicodef-pri-pub, btw, what is "rstdin" ?
18:46:26def-pri-pubrstdin? Where are you getting that from?
18:46:54dom96I like to think that a book gives it a certain legitimacy
18:47:32Yardanicodef-pri-pub, https://docs.google.com/presentation/d/1gclE7dqEFCSqHa0aCYOGq0d9bdi-rxJz7whLSHboq3Q/edit#slide=id.g254fedaa32_0_70
18:47:34yglukhovdef-pri-pub: nice presentation, reading it now. although if i were you, i would not state "Anything is subject to change" as a warning. because thats simply not true. "new release will break your app" - hey, why not look at swift here?
18:47:38Yardanicofrom your presentation
18:47:45Yardanico"rstdin" module
18:47:47Yardanicoah
18:47:50Yardanicordstdin
18:47:53def-pri-pubYeah, that's not my code
18:48:05def-pri-pubI copied and reformatted it from Rosetta Code
18:48:25Yardanicoah
18:48:26Yardanicohttps://nim-lang.org/docs/rdstdin.html
18:49:24def-pri-pubyglukhov: I've had one or two things break on me (or marked for deprecation before) when updating.
18:49:32Yardanicoseems to be a nice module
18:49:36Yardanicobut I didn't know it exists :D
18:50:00def-pri-pubI think it's a fair warning to give, though it hasn't happened a lot to me (and others) and the fixups were really minor
18:51:12def-pri-publibman: that's a fairly interdasting list. Never thought too much about some language projects like that.
18:52:53def-pri-pubWhat code in Nim is MS-PL licensed?
18:54:55yglukhovdef-pri-pub: deprecation in a non breaking manner is not breaking. so doesnt count. breaking may happen, but "anything is subject to change" is just way far from truth. i'd say that from what I see 95% language is pretty well defined and not going anywhere. may Araq correct me if im wrong
18:55:10Yardanicoyglukhov, yeah, nim has things that were deprecated more than a year ago
18:55:52*vlad1777d quit (Ping timeout: 260 seconds)
18:56:07*ShalokShalom_ is now known as ShalokShalom
18:57:09dom96yeah, I agree with yglukhov
18:57:35dom96There is 8 year old code out there that still works
18:57:39yglukhovdef-pri-pub: but apart from this very statement, i tend to agree
18:58:34def-pri-pubFair enough. If I give another talk, I'll lay off that.
19:02:08*vlad1777d joined #nim
19:03:07*Vladar quit (Quit: Leaving)
19:06:17*salewski quit (Quit: WeeChat 1.9)
19:18:41*linsword13 quit (Ping timeout: 246 seconds)
19:18:54*Elronnd is now known as vile_sewer_pygmy
19:19:04*vile_sewer_pygmy is now known as Elronnd
19:19:22Yardanicowat
19:19:25Yardanicovile_sewer_pygmy
19:19:52*linsword13 joined #nim
19:21:54*nitely quit (Ping timeout: 260 seconds)
19:23:12*def-pri-pub quit (Quit: Leaving.)
19:25:22FromGitter<zacharycarter> def-pri-pub: back
19:28:18*vlad1777d quit (Ping timeout: 252 seconds)
19:29:48*linsword13 quit (Ping timeout: 240 seconds)
19:32:23libmandef-pri-pub: I'm not in front of a computer right now. grep / jq the nimble modiles json file.
19:33:05*linsword13 joined #nim
19:42:23*linsword13 quit (Ping timeout: 248 seconds)
19:46:47Yardanicoah bah, this java parser is so simple that it evaluates "3/2/4" as 6.0, not 0.375
19:46:48Yardanicoeeeh
19:48:23Yardanicoah wwwaait
19:48:24Yardanicono
19:48:27Yardanicoit's my fault somewhere
19:48:39*Jesin joined #nim
19:48:58FromGitter<edubart> @Araq now to have non initialized memory essentially I have to do newSeqOfCap followed by setLen, won't setLen initializes the memory? Or it will because of string/seq as they always have to be initialized to zeros? In my case I'm working with floats/ints
19:50:12FromGitter<alehander42> @Yardanico that would be a very sophisticated wrong simple way : )
19:50:26Yardanicowell I thought it wasn't my fault, but it is :P
19:50:45YardanicoI did something wrong while porting it to nim
19:55:25*solitudesf joined #nim
19:58:11FromGitter<alehander42> :D
19:58:30Araqedubart: just wait a couple of hours, I'm gonna give you newSeqOfCap that doesn't initialize
20:00:34FromGitter<edubart> :D
20:00:51*PMunch joined #nim
20:01:40*Jesin quit (Quit: Leaving)
20:08:52Yardanicoyeah
20:09:05YardanicoI just simply re-typed this java example in nim
20:09:13Yardanicoand it works as expected - 3/2/4 is 0.375
20:11:46FromGitter<zacharycarter> anyone here compiled any libraries with emcc? I'm trying to compile assimp with it and running into issues
20:13:15*mahmudov joined #nim
20:21:18*Jesin joined #nim
20:24:44Yardanicoohhh
20:24:46YardanicoI found the error
20:25:06YardanicoI was calling parseTerm in parseTerm function, but I needed to call parseFactor in parseTerm function instead
20:25:06Yardanico:(
20:25:20Yardanicoyay, it works now
20:25:43FromGitter<zacharycarter> \o/
20:27:03mahmudovgenotrance is there any directory shasum finder?
20:33:23*linsword13 joined #nim
20:33:52*linsword13 quit (Client Quit)
20:36:04*BigEpsilon joined #nim
20:40:16FromGitter<Bennyelg> Hey, when Im using Async {.async.} Pragma. ⏎ Assuming I have 2 procs which result a Future[int] ⏎ Dont they need to be executed at the same time if Im doing something like: ⏎ var x = await callbackA() ⏎ var y = await callBackB() ... [https://gitter.im/nim-lang/Nim?at=59c6c6b0614889d47530abdf]
20:42:35*nhywyll joined #nim
20:43:25Araqthey don't need to but they can
20:43:53FromGitter<Bennyelg> I always missing to point of Async uses and parallel uses
20:44:01FromGitter<Bennyelg> i'ts freaking driving me crazy
20:44:30Araqasync is for IO bound problems, threads for CPU bound problems
20:44:37Araqsimple.
20:44:58FromGitter<Bennyelg> Thanks, Do we have some practical simple examples written on nim ? :D
20:45:18FromGitter<zacharycarter> not really
20:45:21FromGitter<zacharycarter> dom96's book
20:45:44FromGitter<Bennyelg> I'm now starting chapter 6
20:49:23FromGitter<zacharycarter> grrr I finally thought I had assimp compiling with emscripten but then I hit : error: use of undeclared identifier 'malloc'
20:49:27FromGitter<zacharycarter> wtfffff
20:50:11Yardanicohttps://github.com/assimp/assimp/issues/1133
20:51:07FromGitter<zacharycarter> I've read through that, not sure it addresses my issue
21:05:11*nsf joined #nim
21:09:30*Ven`` quit (Ping timeout: 252 seconds)
21:11:00*Ven`` joined #nim
21:15:11FromGitter<citycide> where are the procs for going to / from char codes, ie `fromCode(65) == "A"` and `toCode("A") == 65`?
21:16:21FromGitter<zacharycarter> errr just echo A.int
21:16:23Araqord('A') chr(65)
21:16:34FromGitter<zacharycarter> or that
21:16:45Araqyeah or use type conversions
21:17:16Araqthinking about it, ord and chr should be deprecated, old Pascal'isms
21:17:38*vlad1777d joined #nim
21:20:11*jonh is now known as walri
21:22:04FromGitter<citycide> ok, `'A'.int` works but `65.string` doesn't
21:22:10FromGitter<zacharycarter> 1) char
21:22:13FromGitter<citycide> oh damn
21:22:13FromGitter<citycide> yep
21:22:15FromGitter<citycide> you're right
21:22:41FromGitter<citycide> still getting used to that
21:22:49FromGitter<zacharycarter> :)
21:24:23*sz0 quit (Quit: Connection closed for inactivity)
21:25:12FromGitter<citycide> definitely works, thanks!
21:25:46AraqVS code doesn't highlight 'func' as keyword :-(
21:26:02YardanicoAraq, because it's not an official keyword yet ? :)
21:26:20YardanicoI mean it's not really used yet
21:26:37Araqkeywords.txt lists it
21:26:43Yardanicowell I know
21:26:56Yardanicobut it's not a "real" keyword yet
21:27:09Yardanicomaybe it's easy to add though
21:27:20Yardanicoyeahg
21:27:21YardanicoAraq, https://github.com/pragmagic/vscode-nim/blob/master/syntaxes/nim.json
21:27:30Yardanicohttps://github.com/pragmagic/vscode-nim/blob/master/syntaxes/nim.json#L186
21:27:40Yardanicojust add "func" here?
21:28:07Araqfunc f(x: float; n: Node) =
21:28:07Araq n.next.x = "value"
21:28:30AraqError: write access to non-var parameter: n
21:28:35YardanicoAraq,wwwait
21:28:38Yardanicoyou implemented it?
21:28:56Araqtry it out.
21:29:27Yardanicoohh
21:29:29YardanicoI see two last commits!
21:30:06YardanicoAraq, it seems you really want 1.0 in this year :P
21:31:41Araq'func' is not for v1 but it's weekend
21:31:46AraqI'm allowed to have fun :P
21:32:19YardanicoAraq, ohh, it works!
21:32:31YardanicoAraq, "func" is almost "fun" - just remove one char!
21:32:44Araqyeah we all know ML here
21:32:59YardanicoAraq, what kind nimsuggest returns for a "func"?
21:33:05Yardanico"skProc" too ?
21:33:12AraqskFunc
21:33:29Araqthe docgen has a "funcs" section too
21:34:33Araqthe power of static typing and 'nimgrep' :P
21:34:43Araqdidn't have to think
21:37:28Araqnow we only need to get the semantics right ... should 'func' really imply .noSideEffect?
21:38:45PMunchWhat else should it imply?
21:39:29FromGitter<zacharycarter> wait what is func?
21:39:36FromGitter<zacharycarter> what's the difference between func and proc?
21:39:49FromGitter<zacharycarter> now we have func proc and method?
21:39:55Yardanicofunc can't change other variables
21:40:04Yardanicoit's a real mathematical "function" IIRC
21:41:20FromGitter<zacharycarter> gotcha thanks
21:41:22Araqfunc in my head means 2 things:
21:41:36Araq- no side effects (aka no access to globals)
21:41:56Araq- writes only to parameters marked as 'var'
21:42:53Araqand potentially: - no aliasing in the function calls
21:46:37FromGitter<zacharycarter> gotcha
21:47:35FromGitter<zacharycarter> thanks both of you for the explanations
21:48:26YardanicoI hope this is all we need - https://github.com/pragmagic/vscode-nim/pull/60
21:49:50YardanicoAraq, I really didn't know that you can add new features that fast
21:49:59Yardanicohow long did it take you to implement?
21:50:18Yardanicoah, it seems these changes are just to add new actual keyword
21:50:22Araqit's not finished
21:52:28*yglukhov quit (Remote host closed the connection)
21:52:56Yardanicoalso I pass almost all of these in my simple evaluator: https://github.com/codeplea/tinyexpr/blob/master/test.c#L43
21:53:26PMunch"No aliasing in the function calls", what do you mean by this?
21:55:21*solitudesf quit (Ping timeout: 240 seconds)
21:55:52AraqPMunch: f(a, a.field)
21:56:13Araqfor 'var' parameters
21:56:31Araqin other words, there is only one path to a mutable location
21:56:53PMunchAha
21:57:10PMunchWhy would that matter?
22:00:29Araqautomatic parallelization
22:01:18Araqsay f is of type func (x: var Obj; y: var string)
22:01:28Yardanicow-w-w-ait, automatic parallelization?!
22:01:42Araqand does something like f(x) || g(y)
22:02:01Araqthat is safe if x and y are distinct locations
22:02:22*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
22:02:36Araqbut x,y are parameters and so the burden is also on the caller of 'f'
22:04:26*nsf quit (Quit: WeeChat 1.9)
22:06:22*BigEpsilon quit (Remote host closed the connection)
22:06:34*BigEpsilon joined #nim
22:06:50Araqif we add 'func' to the language we might as well do it right and make the semantics support parallelization
22:08:22*BigEpsilon quit (Remote host closed the connection)
22:08:34*BigEpsilon joined #nim
22:09:02PMunchYeah, that would be really neat
22:10:22*BigEpsilon quit (Remote host closed the connection)
22:10:34*BigEpsilon joined #nim
22:12:22*BigEpsilon quit (Remote host closed the connection)
22:12:34*BigEpsilon joined #nim
22:20:01FromGitter<genotrance> @mahmudov there is a sha256sum directory in the zip file, is that what you are saying?
22:23:00Yardanicoit's a hell to both handle "10^5*5e-5" and "3-2-4" at the same time :P
22:23:20Yardanicoor.. a special case
22:27:17*PMunch quit (Quit: leaving)
22:31:53FromGitter<Varriount> It would be interesting to see a language that supports automatic personalization
22:32:03FromGitter<Varriount> *parallelization
22:33:39*BigEpsilon quit (Ping timeout: 252 seconds)
22:44:55*endragor quit (Remote host closed the connection)
22:51:15YardanicoYay! https://gist.github.com/Yardanico/97bfcba67f2c728dee826d70b49ec11c
22:51:25Yardanicoonly ~150 loc
22:52:42Yardanicooh, sorry, two not needed imports
22:54:48*Jesin quit (Quit: Leaving)
22:54:57FromGitter<zacharycarter> bleh I get this error w/ emscripten and assimp loading models : TypeError: Cannot perform TypedArrayCreate on a detached ArrayBuffer
22:55:24FromGitter<zacharycarter> about to give up on assimp :/
23:01:28Yardanicowow, my nimcalc also works at compile-time! yay!
23:01:47Yardanicohmm, maybe check it at JS backend?
23:02:19FromGitter<zacharycarter> what do you mean?
23:02:39Yardanicowell my simple math expression evaluator also works at compile-time and in JS backend
23:02:57FromGitter<zacharycarter> oh I thought you were talking about my assimp woes hehe
23:03:06FromGitter<zacharycarter> but that is very cool :D
23:03:10YardanicoI can't help you with it sadly :(
23:03:12FromGitter<zacharycarter> at least one of us is making progress on something today
23:03:18FromGitter<zacharycarter> I fear no one can LP
23:03:20FromGitter<zacharycarter> :P
23:08:31*libman really likes the idea of `func`.
23:08:58Yardanicobah, why there's no "stdout" in JS backend (even with -d:nodejs) ? :)
23:09:05*gokr quit (Remote host closed the connection)
23:09:11Yardanicook, maybe I can do it with some importc
23:11:19FromGitter<zacharycarter> bind to console.log
23:11:42Yardanicowell I need process.stdout.write in this case :)
23:11:47YardanicoI don't want "\n"
23:11:59FromGitter<zacharycarter> https://nimble.directory/ seems down
23:12:09FromGitter<zacharycarter> hrmmm
23:12:27FromGitter<zacharycarter> not sure how to do that
23:12:46Yardanicowell "process.stdout.write" works
23:12:46libmanGlobals are evil. One good idea that PHP had was requiring you to mark what globals you access at the top of the proc.
23:13:46FromGitter<zacharycarter> I disagree - I don't think globals are evil in a module focused programming language
23:13:55FromGitter<zacharycarter> you have to keep state somewhere
23:14:25FromGitter<zacharycarter> sometimes I'd rather store that state in a few globals rather than passing instances of objects around everywhere
23:15:20FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c6eb08c101bc4e3aff35d2]
23:15:32FromGitter<zacharycarter> zengine's camera module
23:15:41FromGitter<zacharycarter> and other modules in zengine use globals
23:16:18Yardanicoliterally 4 different libraries for the same thing in answers: https://stackoverflow.com/questions/12042534/node-js-synchronous-prompt
23:16:23Yardaniconodejs is interesting :D
23:16:50libmanIt's been a zillion years since I wrote anything big and beautiful...
23:17:38FromGitter<zacharycarter> just need to flex those programming muscles and get em back in shape :)
23:18:53Yardanicook I give up at synchronous prompt in nodejs for now :D don't want to wrap it :)
23:19:13libmanFirst I gotta wander in the desert for 40 years...
23:20:20FromGitter<zacharycarter> :P
23:21:38libmanGotta decide if Nim is the one true copyfree userland lang. Competition includes D, Haskell, and MLton.
23:21:49*nhywyll quit (Quit: nhywyll)
23:24:26Araqyou could also write some programs in these languages and see which one you like the most
23:24:51FromGitter<zacharycarter> /hint I think it will be nim
23:30:46Araqlibman: what are you using computers for?
23:39:25mahmudovgenotrance http://ix.io/A9d
23:40:31mahmudovi am hashing files and directories under given parameter
23:40:47mahmudovparameter is a path
23:44:33mahmudovhttp://ix.io/A9f in linux shasum -b 256 /usr/bin . gives hash of directory
23:44:38*Jesin joined #nim
23:45:21*endragor joined #nim
23:50:25libmanTo annoy people, mostly... Lately I just read sites and watch videos, I don't create anymore...
23:52:02libmanMy best paid work was database migration and server-side programming. Always hated the front-end.
23:53:19libmanNow thinking of a 21st century command line framework, with commands returning interactive graphical output.
23:56:20FromGitter<zacharycarter> interesting - whether I use assimp or nimasset I get the same error
23:57:01FromGitter<zacharycarter> something else must be going on