00:06:47 | FromGitter | <sclee15> will newStringStream() supported in js back soon? |
00:20:58 | FromGitter | <brentp> @mratsim cheers re headers (from 3 days ago) I ended up just rewriting the macros as a template, but would like a simple solution. I'll look into those currentSourcePath solutions next time. |
00:30:32 | * | rauss quit (Quit: WeeChat 2.0.1) |
00:30:36 | * | yglukhov joined #nim |
00:31:32 | * | rauss joined #nim |
00:35:13 | * | yglukhov quit (Ping timeout: 248 seconds) |
00:38:49 | FromGitter | <mratsim> If you find it I’m interested as well, a forum post would be good :) |
00:39:09 | FromGitter | <mratsim> What can trigger this? |
00:39:15 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/OzsL/2018-02-14_01-36-56.png) |
00:39:50 | * | briank joined #nim |
00:39:55 | FromGitter | <mratsim> Load average: 400 >_> |
00:50:05 | * | d10n-work quit (Quit: Connection closed for inactivity) |
01:06:42 | * | endragor joined #nim |
01:11:05 | * | endragor quit (Ping timeout: 240 seconds) |
01:33:40 | * | yglukhov joined #nim |
01:37:22 | bl4rk | just compiled latest dev and it works fine, but nimble is complaining about missing dlls |
01:37:29 | bl4rk | could not load: (libcrypto-1_1-x64|libeay64).dll |
01:37:37 | bl4rk | is this normal? |
01:38:05 | * | yglukhov quit (Ping timeout: 255 seconds) |
01:38:21 | bl4rk | (on windows 10) |
01:40:38 | bl4rk | and installed with koch nimble |
01:42:48 | * | vlad1777d quit (Ping timeout: 256 seconds) |
01:44:59 | FromGitter | <Varriount> Relatively expected. You need openssl libraries |
02:20:09 | * | j_rod_s quit (Ping timeout: 264 seconds) |
02:24:26 | * | Tanger joined #nim |
02:27:50 | * | SenasOzys quit (Remote host closed the connection) |
02:30:04 | bl4rk | weird because it ran fine when i used the prebuilt binary |
02:35:23 | * | chemist69 quit (Ping timeout: 276 seconds) |
02:35:28 | FromGitter | <Varriount> bl4rk: The prebuilt binary has the dlls bundled |
02:36:48 | bl4rk | ahh. makes sense, thanks |
02:46:26 | * | j_rod_s joined #nim |
02:49:03 | * | chemist69 joined #nim |
02:52:30 | * | yglukhov joined #nim |
02:53:14 | * | rinzai quit (Ping timeout: 252 seconds) |
02:56:50 | * | j_rod_s quit (Ping timeout: 276 seconds) |
02:57:07 | * | yglukhov quit (Ping timeout: 260 seconds) |
03:04:13 | * | JacobEdelman joined #nim |
03:04:22 | JacobEdelman | what is the correct way to get the smallest item in a hashset in nim? |
03:04:36 | JacobEdelman | am I supposed to be writing a whole for loop just for this? |
03:19:23 | ieatnerds | I'm a bit of a simpleton, but is there really any other way to find the smallest item, without first checking that its the smallest? |
03:22:38 | ieatnerds | even if nim has a built in to find the minimum, wouldnt it also just be iterating over the set ? |
03:30:00 | * | endragor joined #nim |
03:31:14 | * | ak102 joined #nim |
03:31:37 | * | ak102 is now known as Guest72761 |
03:34:21 | FromGitter | <treeform> I think the discord bridge is down |
03:36:51 | * | rinzai joined #nim |
03:38:06 | * | Guest72761 quit (Quit: ZNC - http://znc.in) |
03:38:21 | * | ak102_ joined #nim |
03:41:16 | * | rinzai quit (Ping timeout: 252 seconds) |
03:42:15 | * | ak102_ quit (Client Quit) |
03:42:41 | * | ak_ joined #nim |
03:43:24 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:06:24 | * | yglukhov joined #nim |
04:10:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
04:10:50 | * | xkapastel quit (Quit: Connection closed for inactivity) |
04:14:01 | Demos[m] | I think there's an ordered hashset someplace |
04:14:09 | Demos[m] | but the hashset datastructure |
04:14:58 | Demos[m] | the hashset datastructure doesn't support that operation, but there exist ordered hashsets that do |
04:19:47 | JacobEdelman | My issues is that |
04:19:58 | JacobEdelman | I don't want to have to store the items in memory twice |
04:20:17 | JacobEdelman | I can iterate over them but for-looping over . items |
04:20:22 | JacobEdelman | And accumulating and such |
04:21:10 | JacobEdelman | But it feels like I should either be able to fold a function over them functional programming style, or just have some built-in min macro that deals with it |
04:22:15 | ieatnerds | could try and keep track of the lowest value when you build the set? |
04:24:08 | Demos[m] | that's what an OrderedSet will do |
04:24:58 | ieatnerds | and there we go |
04:30:39 | * | rinzai joined #nim |
04:35:04 | * | rinzai quit (Ping timeout: 256 seconds) |
04:45:59 | radagast_04 | Consider I have initiated a `bin` project with nimble. Is there any way I can use the local libraries under its src/ in other projects? |
05:04:31 | * | radagast_04 quit (Ping timeout: 268 seconds) |
05:05:26 | FromGitter | <nitely> I think that's called an hybrid. It's explained in the readme |
05:09:25 | * | ak_ is now known as ak102 |
05:09:25 | * | ak102 quit (Changing host) |
05:09:25 | * | ak102 joined #nim |
05:10:39 | * | miran quit (Ping timeout: 260 seconds) |
05:10:42 | * | j_rod_s joined #nim |
05:16:33 | * | j_rod_s quit (Ping timeout: 264 seconds) |
05:24:26 | * | rinzai joined #nim |
05:29:35 | * | rinzai quit (Ping timeout: 276 seconds) |
05:29:38 | * | radagast_04 joined #nim |
05:40:25 | * | BitPuffin joined #nim |
05:47:52 | * | yglukhov joined #nim |
05:52:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
06:02:48 | * | endragor quit (Remote host closed the connection) |
06:14:16 | bl4rk | this is commonly used in C to call shellcode: ((void (*)(void))shellcode)(); can anyone tell me what the Nim syntax for this would be |
06:20:51 | * | rinzai joined #nim |
06:25:02 | * | sz0 joined #nim |
06:25:05 | * | rinzai quit (Ping timeout: 248 seconds) |
06:27:45 | * | nsf joined #nim |
06:38:19 | * | endragor joined #nim |
06:43:08 | * | endragor quit (Ping timeout: 256 seconds) |
06:44:05 | * | solitudesf joined #nim |
06:45:25 | * | endragor joined #nim |
06:54:25 | * | j_rod_s joined #nim |
07:03:35 | * | trincyolo quit (Ping timeout: 240 seconds) |
07:10:13 | * | dddddd quit (Remote host closed the connection) |
07:14:38 | * | rinzai joined #nim |
07:19:09 | * | rinzai quit (Ping timeout: 265 seconds) |
07:23:56 | * | PMunch joined #nim |
07:26:26 | FromGitter | <mratsim> @bl4rk: shellcode? Is that bash/sh? You can use nimscript: https://nim-lang.org/docs/nimscript.html#exec,string |
07:29:12 | * | yglukhov joined #nim |
07:30:00 | * | kunev quit (Quit: е те!) |
07:30:03 | Araq | mratsim: it's for cracking things |
07:30:34 | FromGitter | <mratsim> Otherwise the equivalent seems to be: foo = nil. (void*)foo casting in C equals castpointer (foo) in Nim |
07:30:59 | FromGitter | <mratsim> Oh |
07:34:00 | * | yglukhov quit (Ping timeout: 256 seconds) |
07:43:15 | * | girvo joined #nim |
07:45:23 | * | miran joined #nim |
07:49:36 | * | yglukhov joined #nim |
08:06:43 | * | SenasOzys joined #nim |
08:08:08 | FromGitter | <mratsim> bringiton |
08:08:25 | * | rinzai joined #nim |
08:12:49 | * | rinzai quit (Ping timeout: 260 seconds) |
08:20:12 | * | rokups joined #nim |
08:22:02 | * | yglukhov quit (Read error: Connection reset by peer) |
08:22:40 | * | yglukhov joined #nim |
08:23:52 | FromGitter | <mratsim> oops wrong chat |
08:24:08 | PMunch | Haha, was wondering what that was about :P |
08:34:28 | PMunch | Hmm, would it be useful to include a couple more const sets to the strutils module? |
08:34:35 | PMunch | Like uppercase, lowercase |
08:38:48 | * | floppydh joined #nim |
08:39:31 | Araq | no. |
08:40:18 | PMunch | Why not? |
08:41:42 | Araq | because unicode |
08:42:23 | * | vlad1777d joined #nim |
08:42:57 | PMunch | Hmm, ASCIIUppercase? |
08:43:10 | PMunch | Or UppercaseASCII |
08:43:26 | Araq | {'A'..'Z'} is shorter than that :P |
08:43:36 | PMunch | Haha, fair point :P |
08:52:43 | * | yglukhov quit (Remote host closed the connection) |
09:02:18 | * | rinzai joined #nim |
09:07:04 | * | rinzai quit (Ping timeout: 260 seconds) |
09:17:53 | * | gokr joined #nim |
09:17:56 | * | gokr left #nim (#nim) |
09:26:43 | * | rinzai joined #nim |
09:28:03 | * | yglukhov joined #nim |
09:30:45 | * | Vladar joined #nim |
09:32:06 | PMunch | Hmm, some of the nre examples are broken |
09:32:25 | PMunch | https://github.com/nim-lang/Nim/blob/master/lib/impure/nre.nim#L165 |
09:32:32 | PMunch | match returns an option |
09:35:53 | Araq | this module should be .deprecated |
09:36:18 | Araq | and maybe nitely's regexes should become the new standard module |
09:36:53 | Araq | but I haven't studied its API |
09:37:07 | PMunch | Hmm |
09:37:18 | PMunch | What should I use to do my matching for AST generation then? |
09:37:34 | Araq | what do you need? |
09:38:02 | PMunch | Not much, match things like " TEST.hello " |
09:38:36 | Araq | strip and == ? |
09:38:36 | PMunch | And comments like "/* anything else than */" and "// Anything but newline" |
09:38:49 | PMunch | Yeah I've considered it |
09:39:54 | * | yglukhov quit (Read error: Connection reset by peer) |
09:40:07 | Araq | we need a 'lexer' macro and a 'grammar' macro |
09:40:31 | * | yglukhov joined #nim |
09:42:46 | * | ofelas quit (Ping timeout: 256 seconds) |
09:59:41 | FromGitter | <nitely> @Araq "but I haven't studied its API" if you do, I'm open to suggestions |
10:01:46 | FromGitter | <nitely> @PMunch there is https://github.com/Araq/lexim but dunno what state it's in |
10:01:54 | Araq | limbo state |
10:02:10 | Araq | somebody needs to take over its development |
10:02:13 | FromGitter | <nitely> I'm mean how far is from useful |
10:02:31 | Araq | wrote a lexer for Pascal with it and it worked |
10:04:43 | Araq | it's ok but a bit messy to setup with the helper program that is staticExec'ed because Nim's VM is too slow |
10:20:50 | Araq | https://www2.cs.arizona.edu/icon/docs/ipd266.htm inspiring |
10:23:48 | FromGitter | <alehander42> https://www.reddit.com/r/programming/comments/7x9hjk/introduction_to_procedural_macros_in_rust_learn/du7wv5c/ ⏎ ⏎ seems people from other languages sometimes underestimate nim macros |
10:27:17 | * | chemist69 quit (Ping timeout: 256 seconds) |
10:27:40 | * | chemist69 joined #nim |
10:30:16 | FromGitter | <alehander42> ha, we studied Icon once in university (we had this not-compulsory ~semantics of prog langs class(effectively history of langs) and the guy was an absolute polyglot and showcased different ones each time) |
10:31:42 | FromGitter | <nitely> I was thinking about writing a DFA generator that generates code with goto's to go through states. It seems like that's what lexim does |
10:31:45 | FromGitter | <nitely> must be super fast |
10:32:43 | FromGitter | <nitely> @Araq is the VM that slow? I haven't notice when compiling regexes with nim-regex |
10:39:42 | Araq | it uses some O(n^3) optimization algorithm |
10:39:53 | Araq | so yes, it's really slow. |
10:40:37 | Araq | time went from 1 minute to 3s or something when I made the algorithm run at native speed |
11:06:19 | radagast_04 | man, nimsuggest needs a lot of work. Or probably my VSCode is not working well |
11:09:10 | FromGitter | <alehander42> while discussing in the reddit thread linked up, I was asked if nim macros can generate new types. I noted one can generate temporary ones, but if I think about it, you wouldn't be able to construct them out of the same macro.. is there another way to do it @Araq |
11:11:08 | Araq | huh? |
11:18:57 | * | vlad1777d quit (Ping timeout: 264 seconds) |
11:20:16 | * | vlad1777d joined #nim |
11:24:21 | FromGitter | <alehander42> not very important :D anyway, I have to read a bit more about rust procedural macros, to see if they're really gonna compare somehow to nim ones |
11:31:05 | * | vlad1777d quit (Ping timeout: 240 seconds) |
12:16:34 | * | Snircle joined #nim |
12:18:59 | * | cspar quit (Ping timeout: 260 seconds) |
12:32:16 | * | clyybber joined #nim |
12:33:02 | * | sendell joined #nim |
12:38:00 | * | cspar joined #nim |
12:44:41 | Araq | https://github.com/Microsoft/vscode/issues/36630 this is becoming more and more annoying |
12:47:36 | * | cspar quit (Ping timeout: 252 seconds) |
12:58:25 | * | adeohluwa joined #nim |
12:59:19 | adeohluwa | how do u typically spit json object from jester? |
13:05:14 | Araq | instead of HTML, produce JSON and set the HTTP header to 'json' |
13:19:05 | PMunch | nitely, sorry I was AFK. If lexim is in limbo I'll probably just write a simple character matcher and use combparser to do the combinations |
13:19:21 | PMunch | That way I don't have to add another dependency as well |
13:21:31 | PMunch | alehander42, you can create types just fine. Or is there something I'm not understanding about your question |
13:23:08 | FromGitter | <alehander42> yes, you can, I was confused because I had a situation when I wanted to create top level type from non-top level macro, but otherwise it works fine, yeah |
13:23:53 | PMunch | Ah yeah, that's a bit tougher :P |
13:24:20 | * | gokr joined #nim |
13:25:39 | PMunch | You can sorta do it if you have one macro on top "generateTypes" which returns new code that on the next pass generates the types based on what other macros in the first pass added to a global static structure |
13:25:41 | PMunch | I think |
13:29:09 | FromGitter | <alehander42> https://www.reddit.com/r/programming/comments/7x9hjk/introduction_to_procedural_macros_in_rust_learn/du88u48/ the question in the last comment here, basically are all macros expanded *while* semantically checking the code (or untyped macros are expanded immediately and typed ones after typecheck, invoking typecheck for their result again?) |
13:29:26 | FromGitter | <alehander42> I realized I am not sure how this works internally |
13:37:36 | PMunch | Hmm, it seems like he's talking about typed vs. untyped in Nim. But not 100% sure |
13:51:29 | * | yglukhov quit (Ping timeout: 276 seconds) |
13:53:45 | * | gokr quit (Read error: No route to host) |
14:14:23 | * | yglukhov joined #nim |
14:23:48 | * | clyybber quit (Ping timeout: 240 seconds) |
14:48:45 | * | fvs joined #nim |
14:55:47 | * | miran_ joined #nim |
14:56:06 | * | yglukhov quit (Read error: No route to host) |
14:57:40 | * | yglukhov joined #nim |
14:59:55 | Araq | takesUntyped(reduce(x)) # gets 'reduce(x)' |
15:00:06 | * | kunev joined #nim |
15:00:09 | Araq | takesTyped(reduce(x)) # gets 'y' where y = reduce(x) |
15:00:39 | Araq | alehander42: the macro result is checked either way (it has to, macros can do dangerous things) |
15:01:06 | Araq | the difference is only "input is sem'checked" vs "input is not sem'checked" |
15:01:46 | Araq | and soon we'll have "input is semi-checked" too for much better composition of macros |
15:04:59 | fvs | need advice on howto binarySearch a seq[tuple[id,hash]] sorted on hash. I would like to do the binarySearch on the hash. Currently splitting these tables into seq[id], seq[hash] after sorting to achieve this, which seems overkill. |
15:06:03 | radagast_04 | For array of size <= 4, glibc uses insertion sort |
15:06:18 | Araq | there is little you can do about it except copy and adapt binarySearch |
15:06:49 | Araq | fortunately it's short. |
15:07:14 | Araq | once the stdlib is conceptilized these things will be better |
15:13:39 | planetis[m] | ok dumb question: How comes rand(float) return a number in 0..max whereas random(float) in 0..<max while the have the same logic? https://github.com/nim-lang/Nim/blob/devel/lib/pure/random.nim Lines 99 and 141. |
15:15:10 | Araq | that's a bug, I have no clue how to write rand() for float including the max |
15:15:26 | Araq | :D |
15:15:44 | Araq | probably we should just remove it, who needs random floating point values anyway |
15:16:29 | planetis[m] | should a make a Pr to change the docs to say 0..<max ? |
15:16:36 | planetis[m] | but it will be inconsistent with the rest |
15:17:22 | miran_ | "who needs random floating point values anyway" :raises_hand: |
15:17:31 | planetis[m] | or de-deprecete random for floats? |
15:18:50 | planetis[m] | #metoo |
15:19:53 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
15:20:06 | FromGitter | <data-man> @Araq: stdlib's new concept is exist? :) |
15:21:31 | FromGitter | <krux02> Araq: is there an equivalent of `#error` and `#warning` that is implemented in a lot of C/C++ compilers? |
15:23:01 | FromGitter | <krux02> Araq: never mind I found them |
15:25:01 | * | endragor quit (Remote host closed the connection) |
15:26:24 | * | PMunch quit (Quit: Leaving) |
15:27:44 | * | arnetheduck quit (Ping timeout: 256 seconds) |
15:27:44 | planetis[m] | I will look how python does it and make a PR |
15:27:50 | planetis[m] | in random.uniform |
15:28:04 | * | endragor joined #nim |
15:29:15 | * | chemist69 quit (Ping timeout: 265 seconds) |
15:29:35 | shashlick | hey araq, did you and dom96 decide on the trunk based or branch based development model going forward? |
15:30:11 | FromGitter | <krux02> I also need random float values. |
15:30:59 | FromGitter | <krux02> generally random float is very easy |
15:31:21 | * | chemist69 joined #nim |
15:32:31 | * | endragor quit (Ping timeout: 256 seconds) |
15:33:07 | Araq | shashlick: no. But trunk based has no alternative IMO. easily 50-80% of my changes would apply to 1.0 |
15:33:42 | Araq | cherry-picking that much is not gonna work. |
15:35:06 | Araq | maybe if we update the 1.0.x branch and merge into 1.1.x |
15:35:08 | FromGitter | <krux02> just create random bits in form of `uint` then there is an asm instruction that finds the index of the first 1-bit in that random bits seq. Then bitshift that part, then bitshift it, so the randome bits fit in the mantissa of the float but make sure the first one is cut off. then store the number of bits shiftet as a negative exponent of the number. Then there is the rare case that you actually only got only zero bits. |
15:35:08 | FromGitter | ... needs to be handled bit it is unlikely |
15:35:58 | * | yglukhov quit (Remote host closed the connection) |
15:36:59 | FromGitter | <krux02> this creates random numbers between [0,1[ |
15:37:06 | FromGitter | <krux02> for other ranges one needs to multiply |
15:39:08 | FromGitter | <krux02> wait a moment since whes does rand include the upper bound for floating point values? |
15:39:21 | * | yglukhov joined #nim |
15:40:28 | planetis[m] | it doesn't but the documentation says it does |
15:40:43 | FromGitter | <krux02> well it does include the upper bound |
15:41:00 | FromGitter | <krux02> `(float(x) / float(high(uint32))) * max` does include the upper bound |
15:42:07 | * | Jesin joined #nim |
15:42:12 | planetis[m] | thats for js what about the code below that? |
15:42:24 | * | dddddd joined #nim |
15:42:35 | planetis[m] | (I just ask for your opinion personally Idk) |
15:43:37 | planetis[m] | shouldn't it be "result = cast[float](u) * max"? |
15:44:00 | * | yglukhov quit (Ping timeout: 268 seconds) |
15:44:27 | FromGitter | <krux02> cast will reinterpret the integer bits as a floating point value |
15:47:48 | planetis[m] | currently it is: result = (cast[float](u) - 1.0) * max |
15:48:33 | planetis[m] | i thought that -1.0 make the range [0,1) |
15:51:12 | FromGitter | <alehander42> @Araq ok, thanks, I'll try to summarize it then (I just hope no rust devs in that thread take inspiration to add further stuff to rust macros 2.0 :D ) |
15:52:06 | shashlick | araq: makes sense, so is it worth saying that for the near future, proceed with trunk based and re-evaluate once 1.0 comes out |
15:54:30 | FromGitter | <krux02> planetis[m]: yes you are right |
15:54:30 | Araq | shashlick: I wrote a 'since' macro that can do version selections but system.nim can't use macros... |
15:55:42 | * | clyybber joined #nim |
15:55:42 | * | clyybber quit (Client Quit) |
15:55:57 | * | clyybber joined #nim |
15:55:57 | * | clyybber quit (Client Quit) |
15:56:12 | * | clyybber joined #nim |
15:56:12 | * | clyybber quit (Client Quit) |
15:56:12 | Araq | https://gist.github.com/Araq/f41cb3ca3441303a2808a9389650efda |
15:56:22 | FromGitter | <andreaferretti> @planetis[m] there is really no difference, isn't it? |
15:56:27 | * | clyybber joined #nim |
15:56:27 | * | clyybber quit (Client Quit) |
15:56:38 | FromGitter | <andreaferretti> a uniform distribution on an interval will give 0 mass to each point |
15:56:42 | * | clyybber joined #nim |
15:56:42 | * | clyybber quit (Client Quit) |
15:57:05 | FromGitter | <andreaferretti> now, you could argue that floating point reals only have a finite number of values |
15:57:10 | * | clyybber joined #nim |
15:57:10 | * | clyybber quit (Client Quit) |
15:57:12 | Araq | random floats are weird. why not produce random fractions instead? |
15:57:18 | * | clyybber joined #nim |
15:57:18 | * | clyybber quit (Client Quit) |
15:57:32 | FromGitter | <andreaferretti> random floats are extremely common |
15:57:33 | * | clyybber joined #nim |
15:57:33 | * | clyybber quit (Client Quit) |
15:57:40 | FromGitter | <andreaferretti> probablity distributions are just that |
15:57:44 | FromGitter | <andreaferretti> they are everywhere |
15:57:49 | * | clyybber joined #nim |
15:57:49 | * | clyybber quit (Client Quit) |
15:57:55 | FromGitter | <krux02> random floats are almost the only floats that I use |
15:58:05 | * | clyybber joined #nim |
15:58:05 | * | clyybber quit (Client Quit) |
15:58:10 | FromGitter | <krux02> I mean the only random numbers |
15:58:12 | miran_ | hey andreaferretti! i have a couple neo questions :) |
15:58:24 | FromGitter | <krux02> very useful in computer graphics |
15:58:27 | Araq | well I stand by my words. |
15:58:43 | FromGitter | <andreaferretti> also in machine learning, differential equations |
15:59:08 | FromGitter | <andreaferretti> lattice cryptography |
15:59:28 | planetis[m] | i guess not I was just trying to make my nim program output the same results as the python exercise |
16:00:02 | Araq | it really doesn't matter how often you use them, they are weird. and probably cause some non-uniform behaviour down the road. |
16:00:15 | FromGitter | <andreaferretti> if the python exercise relies on the fact that a uniform distribution on [0,1] differs from a uniform distribution on [0,1[ it is making something wrong |
16:00:54 | miran_ | Araq: you are trying to go against whole world ;) |
16:01:00 | FromGitter | <andreaferretti> floating points are weird for that matter |
16:01:13 | FromGitter | <andreaferretti> but as long as we use them to model the real numbers |
16:01:16 | * | gokr joined #nim |
16:01:17 | Araq | there are more numbers in 0.0 .. 1.0 than in 1000_000.0 .. 1000_001.0 |
16:01:20 | FromGitter | <andreaferretti> random floats are going appear |
16:01:26 | Araq | or something like that. |
16:01:35 | FromGitter | <andreaferretti> yeah, that is true |
16:01:46 | FromGitter | <krux02> there are programming languages that call floating point numbers `real`. |
16:01:56 | FromGitter | <krux02> that is just wrong |
16:02:00 | FromGitter | <andreaferretti> this is not a big impediment to producing a uniform distribution |
16:02:02 | Araq | krux02: yep. |
16:02:45 | FromGitter | <andreaferretti> @miran_, please ask, I hope I will be able to answer :-) |
16:02:54 | miran_ | you surely will |
16:03:33 | Araq | the mythical real numbers which consist almost entirely of numbers that cannot be named |
16:03:54 | miran_ | first of all - what a great job did you do with it!! yesterday i started converting some of my numpy examples and for some things i found neo easier than numpy (which i'm much more familiar with) |
16:04:07 | FromGitter | <andreaferretti> happy to hear that! |
16:04:18 | Araq | uncountably many of them. nobody ever saw one, but they are out there. really. |
16:04:23 | miran_ | but, on the other hand, i was struggling to make some things work. for example: |
16:05:03 | miran_ | A = [[1, 2], [3, 4]]; B = zeros(100, 100) |
16:05:06 | Araq | and you can re-arrange them to produce 2 balls of the same volume as the starting ball |
16:05:27 | miran_ | i didn't know how to do: B[0 .. 1, 0 .. 1] = A |
16:06:08 | miran_ | or how to make one row/column of the matrix to be equal to some known vector of that dimension |
16:06:25 | FromGitter | <andreaferretti> let me see if I remember |
16:06:36 | FromGitter | <andreaferretti> for sure you can take slice of matrice |
16:06:45 | FromGitter | <andreaferretti> so what you miss is a copy operation |
16:07:00 | FromGitter | <andreaferretti> let me check that, I think it should be there |
16:07:19 | miran_ | yeah, taking a slice works, but assigning to a slice is what i struggled with |
16:10:02 | Araq | https://en.wikipedia.org/wiki/Banach%E2%80%93Tarski_paradox |
16:10:21 | FromGitter | <andreaferretti> @miran_ you are right, it seems it is missing |
16:10:29 | FromGitter | <andreaferretti> it should be easy to add though |
16:10:38 | FromGitter | <andreaferretti> essentially it is a single blas copy operation |
16:10:54 | FromGitter | <andreaferretti> similar to what you have here |
16:10:55 | FromGitter | <andreaferretti> https://github.com/unicredit/neo/blob/master/neo/dense.nim#L520 |
16:11:13 | FromGitter | <andreaferretti> neo should expose `copy` for your use case |
16:11:38 | miran_ | ok, one more thing i found missing is `+` between vector and float. you can do `3.5 * v1`, but you can't `3.5 + v1` |
16:11:59 | FromGitter | <andreaferretti> and overload `[]=` to make `A[S] = B` a template for `copy(A[S], B)` |
16:12:30 | FromGitter | <andreaferretti> the latter one makes sense, you cannot add a scalar to a vector :-) |
16:12:56 | miran_ | true :) should that be `|+|`? |
16:13:09 | FromGitter | <andreaferretti> you can write something like |
16:13:50 | FromGitter | <andreaferretti> template `+`A: SomeReal (v: Vector[A], k: A) = v + constantVector(k, v.len) |
16:14:00 | FromGitter | <andreaferretti> untested, but it should work |
16:14:17 | miran_ | thanks, will use that |
16:14:36 | FromGitter | <andreaferretti> or you can write such small functions with loops |
16:14:45 | miran_ | that's what i did :) |
16:15:01 | FromGitter | <andreaferretti> unlike python, it will be fast |
16:15:02 | planetis[m] | last question: is there a point in making a PR to remove -1.0 from https://github.com/nim-lang/Nim/blob/devel/lib/pure/random.nim#L141 or not? |
16:15:13 | miran_ | and i also used loops instead of that slice assign |
16:15:32 | FromGitter | <andreaferretti> for slice assign, could you open an issue? |
16:15:38 | miran_ | will do |
16:15:51 | FromGitter | <andreaferretti> it is easy but I cannot do it right now, and I will forget |
16:15:59 | FromGitter | <andreaferretti> or a PR if you have time :-) |
16:16:16 | miran_ | i have a time, but i don't have enough knowledge |
16:16:49 | miran_ | that thing you said about using blas copy - i have no idea how that works :D |
16:17:05 | FromGitter | <andreaferretti> if you want, read the README to figure out the data structure for a matrix |
16:17:48 | FromGitter | <andreaferretti> it should be easy |
16:17:56 | miran_ | i have read the readme and source code - the latter was very helpful exercise - answered couple of my initial questions |
16:18:00 | FromGitter | <andreaferretti> otherwise jsut the issue is fine, I will get to that |
16:18:08 | * | Trustable joined #nim |
16:18:34 | miran_ | e.g. why `len(v1)` doesn't work, but `v1.len` does, how to get nr. of rows/cols of matrix, etc. |
16:18:53 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
16:19:02 | FromGitter | <andreaferretti> copy takes five arguments: how many elements, source pointer to start from, offset between source elements, target pointer, offset between target elements |
16:19:23 | * | SenasOzys quit (Remote host closed the connection) |
16:19:52 | FromGitter | <andreaferretti> http://www.netlib.org/lapack/explore-html/de/da4/group__double__blas__level1_ga21cdaae1732dea58194c279fca30126d.html#ga21cdaae1732dea58194c279fca30126d |
16:20:00 | FromGitter | <andreaferretti> if you a re curious |
16:20:09 | miran_ | i am, will take a look |
16:20:46 | FromGitter | <andreaferretti> @planetis[m] I have no idea where `let u = (0x3FFu64 shl 52u64) or (x shr 12u64)` comes from |
16:21:05 | FromGitter | <andreaferretti> hence I have no idea whether it makes sense to subtract 1.0 from it |
16:21:25 | * | SenasOzys joined #nim |
16:23:44 | * | gokr quit (Read error: No route to host) |
16:24:01 | FromGitter | <krux02> @andreaferetti there should be a comment |
16:24:16 | FromGitter | <krux02> just look at https://de.wikipedia.org/wiki/IEEE_754 |
16:24:30 | FromGitter | <krux02> it is a trick to fill the mantissa of the floating point number with random bits |
16:25:01 | FromGitter | <krux02> then you have in binary 1.XXXXXXXXX |
16:25:24 | Araq | загорает |
16:25:29 | FromGitter | <krux02> when you subtract one, the rusult will be in [0 1) |
16:25:33 | Araq | what does it mean? |
16:25:39 | FromGitter | <andreaferretti> but will it be uniform? |
16:25:44 | FromGitter | <krux02> yes |
16:25:51 | Araq | ah never mind |
16:25:52 | * | yglukhov joined #nim |
16:26:08 | FromGitter | <andreaferretti> > **<planetis[m]>** last question: is there a point in making a PR to remove -1.0 from https://github.com/nim-lang/Nim/blob/devel/lib/pure/random.nim#L141 or not? |
16:26:21 | FromGitter | <andreaferretti> it seems not, according to @krux02 answer |
16:26:22 | FromGitter | <krux02> in [1,2) floating point values are uniform distributed |
16:26:33 | FromGitter | <andreaferretti> nice trick |
16:27:56 | FromGitter | <andreaferretti> I still think that distinguishing between [0,1] and [0,1[ for the purpose of producing random numbers is not really meaningful |
16:28:18 | FromGitter | <krux02> there are as many floating point values between `[1,2)` and `[2,4)` and `[4,8)` etc |
16:28:27 | FromGitter | <krux02> well it is |
16:28:50 | FromGitter | <andreaferretti> is it? |
16:28:57 | Araq | I still think there are no exclusive bounds in programming :-) |
16:29:04 | FromGitter | <krux02> the probability of 1 is higher the lower the precision of the floating point number is |
16:29:17 | FromGitter | <andreaferretti> what I mean is |
16:29:18 | Araq | you always have bits, you can always do <= |
16:29:43 | FromGitter | <andreaferretti> is there any application where using one makes sense and the other does not? |
16:29:48 | Araq | and < N is really <= N-1 |
16:30:18 | FromGitter | <krux02> Araq: only for ℕ |
16:30:25 | FromGitter | <krux02> I mean ℤ |
16:30:52 | * | yglukhov quit (Ping timeout: 268 seconds) |
16:31:04 | Araq | there is nothing else. floats are fiction. |
16:31:16 | * | floppydh quit (Quit: WeeChat 2.0.1) |
16:31:42 | Araq | there is a number X so that < Z can be written as <= X for every float. |
16:31:53 | Araq | it's just that X is really hard to write sometimes. |
16:33:49 | FromGitter | <krux02> well for infinite precision a random number in the range [0,1] has the propability of 0 to become 1 |
16:33:57 | FromGitter | <krux02> same goes for all other numbers |
16:34:39 | FromGitter | <andreaferretti> this is my point |
16:34:58 | FromGitter | <andreaferretti> usually floats are used as an imprecise model for the reals |
16:35:11 | FromGitter | <andreaferretti> and for the reals, it would not matter |
16:35:23 | FromGitter | <krux02> all I want to say is, all random nuber generaters for floating point values exclude the upper bound, I use random float values, and including the upper bound would create rare cases that I never covered, meaning nondeterministic crashes. |
16:35:32 | FromGitter | <krux02> I don't want this at all. |
16:35:46 | FromGitter | <krux02> I was wrong with "all" |
16:35:49 | Araq | you wanted inclusive upper bounds in random for consistency |
16:36:01 | FromGitter | <krux02> but I mean all that I have worked with |
16:36:09 | FromGitter | <krux02> for integers, yes |
16:36:16 | FromGitter | <krux02> not for floats |
16:36:23 | FromGitter | <krux02> seems strange, I know |
16:36:25 | Araq | for floats the same argumentation holds |
16:36:34 | FromGitter | <krux02> but that is exactly what I think is correct |
16:36:43 | Araq | I cannot get an inclusive upper bound when MAX is meant to be exclusive |
16:37:04 | FromGitter | <andreaferretti> the point is |
16:37:12 | FromGitter | <andreaferretti> leave rand exclusive for floats |
16:37:16 | FromGitter | <andreaferretti> it is easier |
16:37:19 | FromGitter | <krux02> yes |
16:37:31 | FromGitter | <krux02> and consistent with c++11 |
16:37:34 | FromGitter | <andreaferretti> and if any application relies on actually ever getting the MAX exactly |
16:37:45 | FromGitter | <andreaferretti> it is written wrong |
16:38:21 | FromGitter | <krux02> and you can say about c++ a lot. A lot of bad design decisions, but since c++11 they only were really careful about choosing what to add. And they added good stuff |
16:39:40 | Araq | ok, fine |
16:39:53 | * | endragor joined #nim |
16:40:01 | Araq | so we'll just fix the docs to mention for floats it's an exclusive upper bound |
16:40:10 | FromGitter | <krux02> yes |
16:40:13 | Araq | but it's inconsistent and a bad idea. |
16:40:36 | planetis[m] | so all there needs to be done is to change the documentaion for rand(float) to say the range is exclusive |
16:40:36 | FromGitter | <krux02> well I like to disagree. But do you use random floating point values? |
16:40:47 | Araq | because I cannot easily get an inclusive upper bound which is what I might want for testing |
16:41:09 | FromGitter | <andreaferretti> even if you could |
16:41:18 | miran_ | andreaferretti: i get a lots of these warnings: |
16:41:19 | FromGitter | <andreaferretti> you would not get this value in tests |
16:41:20 | miran_ | "rewriteLinearCombinationMut(self.A[i, j], s, row(k, j)) --> '; linearCombinationMut(self.A[i, j], s, row(k, j))' [Pattern]" |
16:41:27 | FromGitter | <krux02> and the javascript version needs to be changed |
16:41:39 | Araq | if I claim my code for work for 0.0 .. 1.0 then 1.0 better should work too |
16:42:15 | FromGitter | <andreaferretti> @miran_ I have not used neo lately, but they should be just warning from NIm compiler |
16:42:21 | FromGitter | <andreaferretti> some operations are rewritten |
16:42:29 | FromGitter | <andreaferretti> to combine them into more efficient ones |
16:42:39 | miran_ | ah, ok |
16:42:56 | FromGitter | <andreaferretti> when I used neo there were no explicit warning if I recall correctly |
16:43:08 | FromGitter | <andreaferretti> but the rewrites are intentional |
16:43:15 | FromGitter | <andreaferretti> actually there should be more |
16:43:29 | FromGitter | <andreaferretti> sometimes a pattern is detected where one can avoid intermediate results |
16:43:36 | FromGitter | <andreaferretti> and optimize that a bit |
16:44:37 | miran_ | thanks, will look into that |
16:44:41 | * | Jesin quit (Quit: Leaving) |
16:46:45 | FromGitter | <andreaferretti> this is the manual https://nim-lang.org/docs/manual.html#term-rewriting-macros |
16:47:12 | * | miran_ quit (Quit: Konversation terminated!) |
16:48:09 | * | miran_ joined #nim |
16:56:05 | * | yglukhov joined #nim |
16:59:59 | shashlick | araq: your since macro seems interesting, so it can still be used in stdlib, just not in system.nim? |
17:00:37 | * | yglukhov quit (Ping timeout: 260 seconds) |
17:11:52 | * | nsf quit (Quit: WeeChat 2.0.1) |
17:14:32 | * | endragor quit (Remote host closed the connection) |
17:17:30 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
17:38:19 | * | nsf joined #nim |
17:42:35 | miran_ | andreaferretti: one more question and i'll stop (for today :)) - i've tried to compile my code with both `-d:blas=openblas` and the usual `-d:release`. the latter is about 7x faster! |
17:43:07 | miran_ | is this expected? or is this because my code is mostly regular nim and just some operations use blas? |
17:45:52 | * | rockcavera joined #nim |
17:46:31 | miran_ | for all interested - i tried to translate my python/numpy code to nim/neo, to see if there are any speed improvements (both numpy and neo use BLAS and should be roughly the same speed) |
17:47:01 | miran_ | anybody wants to guess the speed improvements, and if there are any at all? |
18:00:51 | * | joebo quit (Quit: WeeChat 1.1.1) |
18:04:54 | * | sendell quit (Remote host closed the connection) |
18:14:18 | Demos[m] | If it was like straight line code with big array operations I’d expect bumpy to be marginally faster |
18:14:36 | Demos[m] | If there were lots of little arrays then I’d expect nim to be much faster |
18:31:15 | miran_ | Demos[m]: it is numerical integration problem, so basically one big loop which increases time steps one by one, and in each time step you solve some equations |
18:31:59 | miran_ | i expected to see improvements in that looping part, but had no clue what % improvement to expect |
18:33:34 | miran_ | in the end, nim vas 30x faster!!! |
18:33:52 | miran_ | that's not 30%, it is 30x! |
18:37:50 | miran_ | THIS. CHANGES. EVERYTHING. |
18:47:54 | FromGitter | <krux02> miran_: yea and people argue that they need multithreading to solve thear speed bottlenecks in python programs |
18:48:15 | FromGitter | <krux02> they need to change their language :P |
18:48:58 | miran_ | krux02: if only i could solve these equations without knowing previous values, multithreading/multiprocessing would be useful :) |
18:50:37 | miran_ | krux02: the next plan is to compare nim with numpy+numba.jit - if there nim shows such a huge speed dominance, this will be huge news!! |
18:53:29 | * | TakeYourFreedom joined #nim |
18:54:05 | FromGitter | <krux02> well there is also julia for numerical values |
18:54:46 | FromGitter | <krux02> and numby is not necessarily very slow, it has blas under the hood, but that cal only be an advantage, when you actually provide blas big execution chunks |
18:55:37 | miran_ | krux02: i have never tried julia (i had the plan to do it before i discovered nim), but i try to avoid numerics-only languages (like matlab) and prefer general purpose ones |
18:55:54 | FromGitter | <krux02> good argument |
18:56:03 | FromGitter | <krux02> that is also why I did stay away from it. |
18:56:28 | miran_ | and the slowness is not because of numpy, but because of loops in python are relatively slow |
18:56:49 | FromGitter | <krux02> but for scientific applications, not realtime, julia really could get a dominance. |
18:56:59 | miran_ | things that can be vectorized are in numpy, but that time loop must be (a singlethreaded) loop |
18:57:35 | FromGitter | <krux02> yes, loops in python are slow, when you can transform the loop into a bigger problem that can be solved with blas, then you might get a speed improvement |
18:57:43 | FromGitter | <krux02> but that is always the case. |
18:57:58 | FromGitter | <krux02> I like to compare that with a saltstick factory. |
18:58:18 | miran_ | i have no idea what that is :) |
18:58:50 | FromGitter | <krux02> saying 1_000_000 times make me a saltstick, vs saying 1 time make me 1_000_000 saltsticks. |
18:59:30 | FromGitter | <krux02> it is not only the overhead of `saying`, but also that a big chunk problem can be solved faster. |
18:59:45 | miran_ | re julia: it has much bigger audience/adoption than nim, although it is also in pre-1.0 phase. i guess it is because they are focused only on scientific applications |
19:00:03 | miran_ | thanks for clarification, makes sense |
19:00:06 | FromGitter | <krux02> well matlab is expensive :P |
19:00:30 | miran_ | matlab should be put on fire and left to die |
19:00:31 | * | Ven`` joined #nim |
19:00:44 | FromGitter | <krux02> well I like the documentation of matlab. |
19:01:33 | FromGitter | <krux02> I once had a matlab license, I was only allowed to use it while I was connected to the internet. So when I had network problems, matlab closed automatically. |
19:01:45 | FromGitter | <krux02> not the best when you are not on a wired connection. |
19:02:55 | miran_ | see my last comment |
19:03:10 | Amun_Ra | I have an object of packed fields, what's the best way to fill it with data from file? |
19:03:57 | * | Ven` joined #nim |
19:03:59 | FromGitter | <krux02> Amun_Ra: a loop |
19:03:59 | * | yglukhov joined #nim |
19:05:18 | * | Ven` quit (Read error: Connection reset by peer) |
19:05:23 | Amun_Ra | I mean the object contains a few cuints, cushorts, etc. I was thinking of a way to fill those at one step; with readBuffer or something similar |
19:05:50 | * | Ven` joined #nim |
19:08:07 | * | Ven`` quit (Ping timeout: 268 seconds) |
19:09:42 | * | SenasOzys quit (Remote host closed the connection) |
19:10:22 | * | yglukhov quit (Remote host closed the connection) |
19:10:25 | Amun_Ra | I can't find an equivalent of struct s {unsigned x; short y;}; struct s s1; fread(&s1, …); I guess I have to read and fill it field by field |
19:10:54 | * | sz0 quit (Quit: Connection closed for inactivity) |
19:11:24 | * | BitPuffin quit (Remote host closed the connection) |
19:12:29 | mrshu | hi guys, is there any way of getting the absolute path of a symlink? |
19:13:58 | * | SenasOzys joined #nim |
19:18:33 | mrshu | I've tried explandFilename but that also follows the symlink |
19:21:01 | * | Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:22:41 | * | Ven`` joined #nim |
19:31:18 | * | miran_ quit (Quit: Konversation terminated!) |
19:39:44 | FromGitter | <Quelklef> Is there anyway to allow Nim files with the same name? I'm trying to do quasi-bootstrapping and it's stopping me. |
19:47:57 | * | j_rod_s quit (Ping timeout: 240 seconds) |
19:52:29 | * | chemist69 quit (Ping timeout: 255 seconds) |
19:52:52 | * | chemist69 joined #nim |
19:53:22 | * | yglukhov joined #nim |
19:56:34 | * | Snircle joined #nim |
19:58:51 | * | d10n-work joined #nim |
20:00:32 | Araq | shashlick, that is correct |
20:03:32 | Araq | Amun_Ra, I don't understand your question, you already found readBuffer |
20:03:48 | shashlick | araq: looks like more stuff needs to move out of there. How about the compiler itself? Do you see a need for version specific variation there? |
20:04:33 | Araq | shashlick, what do you mean? stdlib requires 'whens' (or 'since' annotations), compiler requires 'ifs' |
20:05:09 | Araq | I made NimMajor etc .intdefine so these can be set from the command line or configuration |
20:05:23 | Araq | the compiler needs to look at these for its internal version checking |
20:05:55 | Araq | that requires a helper proc |
20:09:57 | Amun_Ra | Araq: you are right, my mistake was using ptr instead of addr |
20:12:26 | FromGitter | <tyrion> Hello, this function definition compiles, but then I cannot use it: `proc test(x: openArray[int]): auto = x` is there a way to make it work? Let's say I want to define a function that works for every array and that returns a copy of the array with first and last elements swapped |
20:12:58 | Araq | it shouldn't compile. |
20:13:32 | * | Ven`` quit (Read error: Connection reset by peer) |
20:13:35 | Araq | proc swapAll[I, T](x: array[I, T]): array[I, T] |
20:13:52 | Araq | proc swapAll[T](x: seq[T]): seq[T] |
20:13:58 | Araq | is what you need. |
20:14:02 | FromGitter | <tyrion> umh, it doesn't compile, I was wrong |
20:14:09 | Araq | you can share the proc bodies via a template |
20:15:12 | * | tyrion-mx joined #nim |
20:15:14 | Araq | or you define an inplace swapAll |
20:15:27 | Araq | proc swapAll[T](x: var openarray[T]) |
20:15:46 | * | Ven`` joined #nim |
20:15:47 | Araq | I think the random module has shuffle already |
20:15:58 | shashlick | araq: okay that's cool then - looks like including that macro into nim goes a long way in supporting trunking beyond stdlib, packages, etc. |
20:16:18 | tyrion-mx | Araq, sorry gitter was messing with your code and I couldn't understand. Could you post it again pls? |
20:16:43 | Araq | shashlick, not really :-) 'nim doc' eliminates the .since |
20:17:10 | Araq | which works but is suboptimal. one set of docs for every version would be cool |
20:17:37 | Araq | every proc should have some *since x.y.z* annotation |
20:18:13 | Araq | tyrion-mx, http://irclogs.nim-lang.org/ |
20:18:23 | tyrion-mx | thanks |
20:19:28 | shashlick | araq: I guess we could write some code to identify which nim release a proc came out in and use nimgrep to append it to the code or something |
20:19:42 | shashlick | apart from the nim doc fix of course |
20:21:44 | Araq | to "fix" nim doc means to make nim aware of what 'since' means |
20:21:52 | Araq | in other words I need to make a builtin |
20:22:19 | Araq | and then it works in system.nim too, but it's yet another pragma |
20:22:41 | Araq | not sure what to do :-( |
20:22:46 | shashlick | I see |
20:24:44 | Araq | maybe we should use versionized docs and when it's easy enough to switch between them we don't need to have this all in one file |
20:25:25 | Amun_Ra | which approach would you recommend in nim? https://hastebin.com/nokijupudo.nim |
20:25:49 | Araq | https://docs.oracle.com/javase/7/docs/api/java/io/File.html#setWritable(boolean) |
20:26:07 | Araq | Java seems to do what I have in mind |
20:27:33 | Araq | hmm I think I'm overthinking this |
20:28:56 | federico3 | Amun_Ra: the latter looks more readable and you can reuse readLeUint* elsewhere. FYI https://github.com/xomachine/NESM |
20:30:46 | Araq | shashlick, we can run the docgen for the latest version and either write ## *Since version 1.0* everywhere or we extract this somehow |
20:31:14 | shashlick | araq: how much effort is it to implement this as a pragma? seems like "since" is a pretty core function and needs to be understood by the compiler instead of an overlay. sorry I'm not aware of how the compiler works to compare with your macro implementation |
20:31:19 | Araq | hmm the since macro can patch the proc's doc comment |
20:31:41 | Araq | yeah, I think the since macro can just patch the doc comment |
20:31:50 | Amun_Ra | federico3: thanks, I like #2 too, it'll be for reading a few different chunks of some binary format |
20:31:57 | Araq | and then we don't have to make the compiler aware of it |
20:32:11 | shashlick | araq: how much effort is it to implement this as a pragma? seems like "since" is a pretty core function and needs to be understood by the compiler instead of an overlay. sorry I'm not aware of how the compiler works to compare with your macro implementation |
20:32:34 | Araq | it's cooler as a macro, no? |
20:32:50 | Araq | as a pragma it's actually somewhat hard to implement |
20:33:17 | Araq | since usually the builtin pragmas don't cut whole procs out of the syntax tree |
20:33:27 | Araq | there is no logic for that in the compiler. |
20:33:40 | shashlick | doesn't seem worth the effort then - I can write some code to figure out when a proc was introduced from past versions |
20:34:38 | shashlick | will be harder to figure out if a proc gets moved from one file to another |
20:35:15 | shashlick | of course, I need to understand how to use the compiler package to parse files and get proc signatures, etc. and if they are impacted from variable name changes |
20:36:03 | Araq | huh? what are you working on? |
20:37:32 | shashlick | nothing yet, but we could figure out which past release a given proc was introduced by parsing older versions on github |
20:37:58 | shashlick | and figure out the {.since.} signature of most of them |
20:38:46 | * | miran_ joined #nim |
20:39:30 | * | TakeYourFreedom quit (Remote host closed the connection) |
20:43:58 | * | yglukhov quit (Remote host closed the connection) |
20:56:17 | * | miran_ quit (Quit: Konversation terminated!) |
20:58:52 | * | rokups quit (Quit: Connection closed for inactivity) |
21:06:24 | FromGitter | <krux02> Amun_Ra: sorry I had to leave the office, In nim you have a loop that iterates over the fields of a struct. Internally the compiler just completely unrolls that loop but it will help you to do what you want. |
21:06:47 | FromGitter | <krux02> you can also generate that code with a macro and the reflection library. |
21:16:17 | * | Ven`` quit (Ping timeout: 265 seconds) |
21:18:42 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:23:37 | * | Trustable quit (Remote host closed the connection) |
21:31:55 | * | Ven`` joined #nim |
21:39:51 | FromGitter | <mratsim> Coming after the war but, huh without random floats there is no machine learning/deep learning. Actually I would love to have several other random distributions. ⏎ ⏎ And in my experience Python+Numpy was faster than Julia for my basic use case + Python is saner than Julia syntax-wise (except for the operator overloading) |
21:45:52 | * | Snircle quit (Ping timeout: 252 seconds) |
21:46:05 | * | Ven`` quit (Ping timeout: 240 seconds) |
21:47:02 | * | Snircle joined #nim |
21:51:38 | * | Ven`` joined #nim |
21:52:42 | * | gokr joined #nim |
21:58:56 | * | solitudesf quit (Ping timeout: 268 seconds) |
21:59:33 | * | Snircle_ joined #nim |
22:00:44 | * | vlad1777d joined #nim |
22:01:33 | * | Ven`` quit (Ping timeout: 264 seconds) |
22:01:49 | * | Snircle quit (Ping timeout: 256 seconds) |
22:04:58 | * | vlad1777d quit (Client Quit) |
22:05:07 | * | Ven`` joined #nim |
22:05:14 | * | Ven`` quit (Client Quit) |
22:19:28 | * | vlad1777d joined #nim |
22:32:48 | * | Vladar quit (Quit: Leaving) |
23:04:04 | FromGitter | <krux02> @mratsim https://github.com/krux02/opengl-sandbox/blob/master/fancyglpkg/ziggurat_normal_dist.nim |
23:13:30 | * | j_rod_s joined #nim |
23:14:53 | FromGitter | <mratsim> oh nice |
23:15:11 | FromGitter | <mratsim> Everytime i see Ziggurat, I think Warcraft 3 ... |
23:18:34 | * | j_rod_s quit (Ping timeout: 265 seconds) |
23:35:33 | FromGitter | <krux02> no me I only played Warcraft 2 |
23:55:15 | FromGitter | <mratsim> In nimscript there is a mvFile but no mvDir? :/ |
23:56:01 | * | j_rod_s joined #nim |
23:57:04 | FromGitter | <mratsim> ah mvFile can move dir |
23:59:11 | * | vlad1777d quit (Ping timeout: 268 seconds) |